/* ==========================================================================
   Graphic Planet — sitio 2026
   Réplica de la maqueta "referencia1": fondo gris claro con bruma blanca,
   paneles de vidrio (glassmorphism) y verde lima como único color.
   ========================================================================== */

:root {
  --bg: #ECEEEA;
  --ink: #0E100D;
  --ink-2: #3C4039;
  --muted: #6A6E66;
  --line: rgba(14, 16, 13, .12);

  --lime: #9BD62A;
  --lime-bright: #BDEE3C;
  --lime-deep: #6CB31A;
  --lime-soft: rgba(185, 236, 70, .28);
  --lime-grad: linear-gradient(95deg, #6CB31A 0%, #9BD62A 55%, #B5E639 100%);

  --glass: rgba(255, 255, 255, .42);
  --glass-strong: rgba(255, 255, 255, .62);
  --glass-border: rgba(255, 255, 255, .85);
  --glass-shadow: 0 24px 60px -28px rgba(20, 30, 10, .28), inset 0 1px 0 rgba(255, 255, 255, .9);

  --font: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --frame-r: 30px;
  --side: 84px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  background-color: var(--bg);
  /* bruma: manchas blancas y grises difusas, como en la maqueta */
  background-image:
    radial-gradient(40% 30% at 12% 8%, rgba(255, 255, 255, .95), transparent 70%),
    radial-gradient(35% 28% at 92% 18%, rgba(255, 255, 255, .85), transparent 70%),
    radial-gradient(30% 25% at 70% 55%, rgba(210, 214, 206, .7), transparent 70%),
    radial-gradient(45% 30% at 20% 70%, rgba(255, 255, 255, .9), transparent 70%),
    radial-gradient(35% 25% at 85% 92%, rgba(214, 218, 210, .8), transparent 70%);
  background-attachment: fixed;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
h1, h2, h3, p, dl, dd { margin: 0; }

:focus-visible { outline: 2px solid var(--lime-deep); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: fixed; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px;
  transition: top .2s;
}
.skip:focus { top: 12px; }

/* ---------- Vidrio ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(22px) saturate(1.5);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* ---------- Texto lima ---------- */
.lime-text {
  background: var(--lime-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.light { font-weight: 400; }

/* ---------- Botones ---------- */
.btn-lime {
  display: inline-flex; align-items: center; gap: 14px;
  min-height: 50px; padding: 0 26px;
  border: 0; border-radius: 999px;
  background: linear-gradient(90deg, #B2E937, #C8F24C);
  color: #13200A; font-size: 15px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(150, 210, 30, .8), inset 0 1px 0 rgba(255, 255, 255, .6);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease);
}
.btn-lime:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(150, 210, 30, .9), inset 0 1px 0 rgba(255, 255, 255, .6); }
.btn-lime .arrow, .btn-outline .arrow { font-size: 18px; transition: transform .3s var(--ease); }
.btn-lime:hover .arrow, .btn-outline:hover .arrow { transform: translateX(4px); }
.btn-block { width: 100%; justify-content: center; }

.btn-outline {
  display: inline-flex; align-items: center; gap: 22px;
  min-height: 46px; padding: 0 22px 0 26px;
  border: 1.5px solid var(--ink); border-radius: 999px; background: transparent;
  font-size: 13px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  transition: background-color .3s var(--ease);
}
.btn-outline:hover { background: rgba(255, 255, 255, .6); }
.arrow.lime { color: var(--lime-deep); }

.pill {
  display: inline-block; padding: 8px 18px;
  border: 1px solid rgba(14, 16, 13, .35); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  background: rgba(255, 255, 255, .4);
}

/* ==========================================================================
   Página y marcos de vidrio
   ========================================================================== */
.page {
  max-width: 1440px; margin: 0 auto;
  padding: 36px clamp(16px, 3vw, 44px) 0;
}
.frame {
  position: relative;
  border-radius: var(--frame-r);
  background: linear-gradient(180deg, rgba(255, 255, 255, .58), rgba(255, 255, 255, .34));
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 40px 90px -50px rgba(20, 30, 10, .35), inset 0 1px 0 #fff;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.frame-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-2);
}
.foot-url { display: inline-flex; align-items: center; gap: 22px; }
.foot-url i { display: inline-block; width: 44px; height: 1.5px; background: var(--ink-2); }
.foot-tag { text-align: right; color: var(--muted); font-weight: 500; line-height: 1.6; }

/* ==========================================================================
   Menú lateral
   ========================================================================== */
.sidebar {
  position: fixed; z-index: 40;
  left: max(24px, calc((100vw - 1440px) / 2 + 64px));
  top: 50%; transform: translateY(-42%);
  width: var(--side);
  display: flex; flex-direction: column; align-items: center; gap: 20px;
  padding: 26px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .5);
}
.sidebar a, .sidebar button {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: 72px; padding: 6px 0;
  background: none; border: 0;
  font-size: 12px; font-weight: 500; color: var(--ink-2);
  transition: color .25s;
}
.side-ico {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%;
  transition: background-color .25s, box-shadow .25s;
}
.side-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sidebar a:hover .side-ico, .sidebar button:hover .side-ico { background: rgba(155, 214, 42, .18); }
.sidebar a[aria-current="page"] { color: var(--lime-deep); font-weight: 600; }
.sidebar a[aria-current="page"] .side-ico {
  width: 50px; height: 50px; color: var(--ink);
  background: radial-gradient(circle at 50% 40%, #C6F24A, #9BD62A);
  box-shadow: 0 0 0 8px rgba(185, 236, 70, .22), 0 10px 26px -6px rgba(140, 200, 30, .8);
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero { padding: 34px 44px 30px calc(var(--side) + 70px); min-height: min(92vh, 860px); display: flex; flex-direction: column; }
.topbar {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 24px;
  margin-left: calc(-1 * (var(--side) + 20px));
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 26px; font-weight: 700; letter-spacing: -.035em; }
.brand img { width: 36px; height: 36px; object-fit: contain; }
.topnav {
  justify-self: center;
  display: flex; align-items: center; gap: 18px;
  font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-2);
}
.topnav a:hover { color: var(--ink); }
.topnav span { color: var(--muted); font-weight: 400; }

.hero-grid {
  flex: 1;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 20px;
  padding: 20px 0;
}
.hero-title {
  font-size: clamp(56px, 6.9vw, 104px);
  line-height: .9; letter-spacing: -.05em; font-weight: 600;
}
.hero-lead { margin-top: 26px; max-width: 34em; font-size: clamp(15px, 1.25vw, 18px); color: var(--ink-2); }
.hero-copy .btn-lime { margin-top: 36px; }

.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 600px; }
.hero-art { width: 100%; height: auto; display: block; overflow: visible; }
.hero-card {
  position: absolute; right: -2%; top: 44%;
  width: 36%; min-width: 180px;
  padding: 24px 24px 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, .38);
}
.hero-card img { width: 26px; height: 26px; object-fit: contain; margin-bottom: 18px; }
.hero-card p { font-size: clamp(16px, 1.45vw, 21px); line-height: 1.22; font-weight: 500; letter-spacing: -.02em; }
.card-arrow { display: inline-block; margin-top: 18px; font-size: 24px; transition: transform .3s var(--ease); }
.card-arrow:hover { transform: translateX(4px); }

/* ==========================================================================
   Servicios
   ========================================================================== */
.services { padding: clamp(80px, 9vw, 120px) clamp(20px, 3vw, 44px) 40px calc(var(--side) + 70px); }
.services-head {
  display: grid; grid-template-columns: 1fr 300px; align-items: center; gap: 40px;
  margin-bottom: 44px;
}
.section-title {
  margin-top: 14px;
  font-size: clamp(40px, 4.8vw, 70px);
  line-height: 1; letter-spacing: -.045em; font-weight: 600;
}
.services-note { font-size: 14px; color: var(--ink-2); line-height: 1.6; }

/* Carrusel de unidades: 4 visibles, avanza solo (ver main.js) */
.cards-viewport {
  --per: 4; --gap: 16px;
  overflow: hidden;
  /* espacio de sobra para que la sombra (≈56px) y el hover no se recorten */
  margin: -30px -14px -100px; padding: 30px 14px 100px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.cards {
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: var(--gap);
  will-change: transform;
}
/* Cinta continua: las tarjetas están duplicadas, así que correr media pista
   (más medio espacio) deja todo exactamente donde empezó y el ciclo no se nota */
.cards.is-marquee { width: max-content; animation: marquee var(--marquee-time, 40s) linear infinite; }
.cards.is-marquee > li { flex-basis: var(--card-w); }
.cards-viewport:hover .cards.is-marquee,
.cards-viewport:focus-within .cards.is-marquee { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(calc(-50% - var(--gap) / 2)); } }
.cards > li { flex: 0 0 calc((100% - var(--gap) * (var(--per) - 1)) / var(--per)); }
.card {
  position: relative;
  display: flex; flex-direction: column;
  height: 100%; min-height: 230px;
  padding: 22px 22px 20px;
  border-radius: 20px;
  transition: transform .35s var(--ease), background-color .35s var(--ease);
}
.card:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .62); }
.card-ico {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle, rgba(185, 236, 70, .45), rgba(185, 236, 70, .12));
}
.card-ico svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card h3 { margin-top: 22px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.card p { margin-top: 10px; font-size: 14px; color: var(--muted); line-height: 1.45; }
.card-arrow-sm { margin-top: auto; padding-top: 20px; font-size: 20px; transition: transform .3s var(--ease), color .3s; }
.card:hover .card-arrow-sm { transform: translateX(5px); color: var(--lime-deep); }

/* ==========================================================================
   Proyecto destacado
   ========================================================================== */
.featured {
  position: relative;
  padding: 60px clamp(20px, 3vw, 44px) 80px calc(var(--side) + 40px);
}
.blob {
  position: absolute; z-index: 0; pointer-events: none;
  background: linear-gradient(135deg, #C9F24E, #A6E030);
  border-radius: 36px;
}
.blob-a { left: calc(var(--side) + 90px); top: 40px; width: 26%; height: 36%; transform: rotate(14deg) skewX(-10deg); }
.blob-b { right: 12%; top: 34%; width: 12%; height: 34%; transform: rotate(-24deg) skewX(12deg); border-radius: 30px; }

.featured-stage { position: relative; z-index: 1; }
.slide { position: relative; display: grid; grid-template-columns: 34% 1fr; align-items: center; }
.slide[hidden] { display: none; }
/* Cambio de diapositiva: la tarjeta entra desde la izquierda y la foto desde la
   derecha hasta juntarse; al salir, cada una se va por su lado. */
.featured { overflow-x: clip; }
.slide.is-active .featured-card { animation: in-left .9s var(--ease) both; }
.slide.is-active .featured-art,
.slide.is-active .featured-photo { animation: in-right .9s var(--ease) both; }
.slide.is-active .badge { animation: in-right .9s .15s var(--ease) both; }
.slide.is-leaving .featured-card { animation: out-left .45s cubic-bezier(.5, 0, .9, .4) both; }
.slide.is-leaving .featured-art,
.slide.is-leaving .featured-photo,
.slide.is-leaving .badge { animation: out-right .45s cubic-bezier(.5, 0, .9, .4) both; }
@keyframes in-left   { from { opacity: 0; transform: translateX(-140px); } to { opacity: 1; transform: none; } }
@keyframes in-right  { from { opacity: 0; transform: translateX(160px); }  to { opacity: 1; transform: none; } }
@keyframes out-left  { to { opacity: 0; transform: translateX(-140px); } }
@keyframes out-right { to { opacity: 0; transform: translateX(160px); } }
.featured-art, .featured-photo { grid-column: 1 / -1; grid-row: 1; margin-left: 24%; width: 76%; }
.featured-art { height: auto; }
.featured-photo {
  aspect-ratio: 520 / 345; overflow: hidden;
  clip-path: polygon(18% 12%, 86% 18%, 97% 76%, 90% 94%, 3% 88%, 3% 36%);
  border-radius: 30px;
}
.featured-photo img { width: 100%; height: 100%; object-fit: cover; }

.featured-card {
  grid-column: 1; grid-row: 1; z-index: 2;
  margin-left: 4%;
  padding: 36px 34px;
  border-radius: 26px;
  background: rgba(255, 255, 255, .42);
}
.kicker { font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-2); }
.featured-card h2 { margin-top: 18px; font-size: clamp(30px, 3.2vw, 46px); line-height: 1.02; letter-spacing: -.04em; font-weight: 600; }
.featured-card > p:not(.kicker) { margin-top: 18px; font-size: 16px; color: var(--ink-2); }
.link-lime { display: inline-flex; gap: 14px; margin-top: 32px; font-weight: 600; color: var(--lime-deep); }
.link-lime span { color: var(--ink); transition: transform .3s var(--ease); }
.link-lime:hover span { transform: translateX(4px); }

.badge {
  position: absolute; right: 1%; top: 2%; z-index: 2;
  width: clamp(120px, 12vw, 170px); aspect-ratio: 1; border-radius: 50%;
  display: flex; flex-direction: column; justify-content: center; align-items: flex-start;
  padding-left: 22px;
  background: radial-gradient(circle at 40% 40%, rgba(225, 245, 180, .9), rgba(205, 236, 140, .55));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.badge strong { font-size: clamp(28px, 2.8vw, 40px); letter-spacing: -.04em; font-weight: 600; line-height: 1; }
.badge span { margin-top: 6px; font-size: 13px; color: var(--ink-2); }

.slider-nav { position: absolute; right: clamp(20px, 3vw, 44px); bottom: 110px; z-index: 3; display: flex; gap: 10px; }
.round-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1.5px solid rgba(14, 16, 13, .25); background: rgba(255, 255, 255, .4);
  font-size: 20px; line-height: 1; color: var(--muted);
  transition: border-color .25s, color .25s, background-color .25s;
}
.round-btn.dark { border-color: var(--ink); color: var(--ink); }
.round-btn:hover { background: var(--lime-bright); border-color: var(--lime-bright); color: var(--ink); }

/* ==========================================================================
   Tu marca, sin límites
   ========================================================================== */
.brand-block { padding: 64px 44px 36px calc(var(--side) + 70px); margin-top: 10px; }
.brand-grid { display: grid; grid-template-columns: 1fr 1.15fr .85fr; align-items: center; gap: 30px; }
.brand-copy .section-title { font-size: clamp(42px, 4.6vw, 66px); }
.brand-copy p { margin-top: 26px; max-width: 30em; font-size: 16px; color: var(--ink-2); }
.brand-copy .btn-outline { margin-top: 30px; text-transform: none; letter-spacing: 0; font-size: 16px; }
.brand-art { width: 100%; height: auto; }

.stats {
  padding: 32px 34px;
  border-radius: 26px;
  display: flex; flex-direction: column; gap: 22px;
}
.stats img { width: 28px; height: 28px; object-fit: contain; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dd { font-size: clamp(34px, 3.4vw, 48px); line-height: 1; letter-spacing: -.045em; font-weight: 600; }
.stats dt { margin-top: 6px; font-size: 16px; color: var(--ink-2); }
.brand-block .frame-foot { margin-top: 40px; }

/* ==========================================================================
   Pie
   ========================================================================== */
.footer {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 32px;
  padding: 48px 44px 110px calc(var(--side) + 70px);
  font-size: 14px; color: var(--ink-2);
}
.footer .brand { font-size: 20px; color: var(--ink); }
.footer .brand img { width: 28px; height: 28px; }
.footer address { font-style: normal; display: flex; flex-wrap: wrap; gap: 6px 24px; }
.footer-social { display: flex; gap: 18px; }
.footer a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.copy { color: var(--muted); }

/* ==========================================================================
   Diálogo de contacto
   ========================================================================== */
.contact {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100svh - 32px);
  border-radius: 30px; padding: clamp(28px, 5vw, 44px);
  background: rgba(246, 248, 243, .82);
  color: var(--ink);
}
.contact::backdrop { background: rgba(214, 220, 206, .5); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.contact[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.contact-close-form { position: absolute; top: 18px; right: 18px; margin: 0; }
.contact-close {
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--glass-border); background: rgba(255, 255, 255, .7);
  font-size: 22px; line-height: 1;
}
.contact-title { margin: 16px 0 26px; font-size: clamp(30px, 4.6vw, 44px); line-height: 1; letter-spacing: -.04em; font-weight: 600; }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; gap: 18px; }
@media (min-width: 560px) { .field-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field textarea {
  font: inherit; font-size: 16px; font-weight: 400; color: var(--ink);
  background: rgba(255, 255, 255, .75); border: 1px solid rgba(14, 16, 13, .12); border-radius: 14px;
  padding: 12px 14px; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--lime-deep); box-shadow: 0 0 0 4px var(--lime-soft); }
.chips { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; padding: 0; }
.chips label { position: relative; }
.chips input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chips span {
  display: inline-block; padding: 8px 16px; border-radius: 999px;
  border: 1px solid rgba(14, 16, 13, .14); background: rgba(255, 255, 255, .7); font-size: 14px;
  transition: background-color .2s, border-color .2s;
}
.chips input:checked + span { background: var(--lime-bright); border-color: var(--lime-bright); }
.chips input:focus-visible + span { outline: 2px solid var(--lime-deep); outline-offset: 2px; }
.form-error { color: #A12A1A; font-size: 14px; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1180px) {
  .cards-viewport { --per: 3; }
  .brand-grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; }
}

@media (max-width: 899px) {
  :root { --side: 0px; }
  .page { padding-top: 12px; }
  .sidebar {
    left: 12px; right: 12px; top: auto; bottom: 12px; transform: none;
    width: auto; flex-direction: row; justify-content: space-around; gap: 0;
    padding: 8px 6px;
  }
  .sidebar a, .sidebar button { width: auto; min-width: 56px; font-size: 11px; }
  .sidebar a[aria-current="page"] .side-ico { width: 36px; height: 36px; box-shadow: 0 0 0 5px rgba(185, 236, 70, .22); }
  .hero, .services, .featured, .brand-block, .footer { padding-left: 20px; padding-right: 20px; }
  .hero { min-height: 0; padding-top: 20px; }
  .topbar { margin-left: 0; grid-template-columns: 1fr auto; }
  .topnav { display: none; }
  .brand { font-size: 21px; }
  .brand img { width: 30px; height: 30px; }
  .btn-outline { gap: 12px; padding: 0 16px; font-size: 12px; min-height: 42px; }
  .hero-grid { grid-template-columns: 1fr; padding-top: 40px; }
  .hero-visual { justify-self: center; }
  .hero-card { right: 0; width: 46%; padding: 16px; }
  .services-head { grid-template-columns: 1fr; gap: 18px; }
  .cards-viewport { --per: 2; }
  .slide { grid-template-columns: 1fr; }
  .featured-art, .featured-photo { margin-left: 0; width: 100%; }
  .featured-card { grid-row: 2; margin: -40px 12px 0; }
  .badge { top: -20px; right: 0; }
  .slider-nav { position: static; justify-content: flex-end; margin-top: 18px; }
  .blob-a { left: 0; width: 50%; }
  .brand-grid { grid-template-columns: 1fr; }
  .stats { flex-direction: column; }
  .footer { grid-template-columns: 1fr; padding-bottom: 120px; }
  .frame-foot { font-size: 10px; }
}
@media (max-width: 560px) {
  /* en celular "Contacto" ya está en la barra inferior */
  .topbar .btn-outline { display: none; }
  .cards-viewport { --per: 1.15; }   /* se asoma la siguiente tarjeta */
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
