/* =========================================================
   Siente Studio · estilos (v2)
   Composición: paneles a pantalla completa con texto abajo a la izquierda,
   bloques oscuros con columnas. Marca: tokens en :root.
   ========================================================= */

@font-face { font-family: "Andine"; src: url("../fonts/andine.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Andine"; src: url("../fonts/andine-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-light.woff2") format("woff2"); font-weight: 300; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-medium.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-semibold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: dark;
  /* Color */
  --ink: #050608;
  --ink-2: #0d0f13;
  --line: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --text: #e9ecef;
  --muted: #9aa1a9;
  --cyan: #22b8e8;
  --blue: #1f5be0;
  --lime: #c8f23a;

  /* Tipografía */
  --sans: "Montserrat", system-ui, sans-serif;
  --serif: "Andine", Georgia, serif;
  --fs-label: 0.75rem;
  --fs-body: clamp(0.98rem, 0.94rem + 0.2vw, 1.08rem);
  --fs-lead: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  --fs-h3: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --fs-h2: clamp(1.6rem, 1.2rem + 1.8vw, 2.6rem);
  --fs-display: clamp(2.3rem, 1.4rem + 4.2vw, 5rem);
  --fs-statement: clamp(1.6rem, 1.1rem + 2.4vw, 3.2rem);
  --track-label: 0.2em;
  --track-head: 0.04em;

  /* Medidas */
  --gutter: max(20px, 5vw);
  --block: clamp(88px, 12vw, 180px);
  --header-h: 76px;
  --wrap: 1400px;

  /* Movimiento */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #2a2e35 var(--ink); }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: var(--sans); font-size: var(--fs-body); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
ul, ol { list-style: none; margin: 0; padding: 0; }
::selection { background: var(--lime); color: var(--ink); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 100; background: var(--white); color: var(--ink); padding: 10px 16px; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; }

/* ================= TIPOGRAFÍA ================= */
.label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--text); }
.display {
  font-size: var(--fs-display); font-weight: 600; line-height: 1.02;
  letter-spacing: var(--track-head); text-transform: uppercase; color: var(--white); text-wrap: balance;
}
.h2 { font-size: var(--fs-h2); font-weight: 600; line-height: 1.1; letter-spacing: var(--track-head); text-transform: uppercase; color: var(--white); text-wrap: balance; }
.h3 { font-size: var(--fs-h3); font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--white); }
.statement { font-family: var(--serif); font-size: var(--fs-statement); line-height: 1.22; letter-spacing: -0.01em; color: var(--white); max-width: 24ch; text-wrap: balance; }
.statement--sm { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2.3rem); max-width: 26ch; }
.lead { font-size: var(--fs-lead); line-height: 1.55; color: var(--text); max-width: 44ch; }
.prose { display: grid; gap: 1.1em; max-width: 58ch; color: var(--muted); }
.link { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; padding-bottom: 4px; transition: background-size 0.45s var(--ease-out); }
.link:hover { background-size: 0 1px; background-position: 100% 100%; }

/* Botón de contorno: el relleno sube desde abajo */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 50px; padding: 0 30px; border: 2px solid var(--white);
  font: 600 var(--fs-label) / 1 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; color: var(--white);
  overflow: hidden; isolation: isolate; cursor: pointer; background: none;
  transition: color 0.35s var(--ease-out);
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--white); transform: translateY(101%); transition: transform 0.45s var(--ease-out); }
.btn:hover { color: var(--ink); }
.btn:hover::before { transform: none; }
.btn:active { transform: scale(0.98); }

/* ================= CABECERA ================= */
.header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  color: var(--white); transition: transform 0.6s var(--ease-out);
}
.header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(5, 6, 8, 0.75), rgba(5, 6, 8, 0));
  opacity: 1; transition: opacity 0.4s ease, background 0.4s ease;
}
.header.is-solid::before { background: rgba(5, 6, 8, 0.92); }
.header.is-hidden { transform: translateY(-100%); }
.header__logo { display: block; padding: 8px 0; }
.header__logo svg { width: 20px; height: 26px; fill: currentColor; transition: transform 0.6s var(--ease-out); }
.header__logo:hover svg { transform: rotate(-90deg); }
.nav { display: flex; gap: clamp(20px, 2.6vw, 40px); }
.nav a { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; padding: 8px 0; position: relative; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease-out); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.menu-btn { display: none; width: 44px; height: 44px; margin-right: -10px; background: none; border: 0; color: inherit; cursor: pointer; }
.menu-btn__icon { position: relative; display: block; width: 24px; height: 12px; margin: auto; }
.menu-btn__icon i { position: absolute; left: 0; right: 0; height: 2px; background: currentColor; transition: transform 0.45s var(--ease-out), top 0.45s var(--ease-out); }
.menu-btn__icon i:first-child { top: 0; }
.menu-btn__icon i:last-child { top: 10px; }
.menu-open .menu-btn__icon i:first-child { top: 5px; transform: rotate(45deg); }
.menu-open .menu-btn__icon i:last-child { top: 5px; transform: rotate(-45deg); }

@media (max-width: 860px) {
  .nav { display: none; }
  .menu-btn { display: block; }
}

/* Menú lateral */
.drawer {
  position: fixed; inset: 0 0 0 auto; z-index: 45; width: min(100%, 420px);
  background: var(--ink-2); display: flex; flex-direction: column; justify-content: space-between;
  padding: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) var(--gutter) calc(32px + env(safe-area-inset-bottom, 0px));
  transform: translateX(100%); transition: transform 0.6s var(--ease-in-out);
}
.drawer.is-open { transform: none; }
.drawer__nav { display: flex; flex-direction: column; }
.drawer__nav a { font-size: 1rem; font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; padding: 16px 0; border-bottom: 1px solid var(--line); }
.drawer__foot { display: grid; gap: 10px; color: var(--muted); font-size: 0.9rem; }

/* ================= PANELES (pantalla completa) ================= */
.panel {
  position: relative; display: flex; align-items: flex-end;
  min-height: 100vh; min-height: 100svh; overflow: hidden; isolation: isolate;
  padding: calc(var(--header-h) + 40px) var(--gutter) clamp(56px, 9vh, 110px);
  background: var(--ink);
}
.panel__media { position: absolute; inset: 0; z-index: -2; }
.panel__media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.06); transition: transform 1.8s var(--ease-out); }
.panel.is-in .panel__media img { transform: none; }
.panel::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(0deg, rgba(5, 6, 8, 0.88) 0%, rgba(5, 6, 8, 0.35) 40%, rgba(5, 6, 8, 0) 65%),
    linear-gradient(90deg, rgba(5, 6, 8, 0.55) 0%, rgba(5, 6, 8, 0) 55%);
}
.panel--hero::after { background: linear-gradient(0deg, rgba(5, 6, 8, 0.6) 0%, rgba(5, 6, 8, 0) 45%); }
.panel__content { display: grid; justify-items: start; gap: 18px; max-width: 640px; }
.panel__content .btn { margin-top: 14px; }
.panel__text { font-size: var(--fs-lead); line-height: 1.5; color: var(--text); max-width: 34ch; }
.panel--next { cursor: pointer; }
.panel--next:hover .btn { color: var(--ink); }
.panel--next:hover .btn::before { transform: none; }
.panel--next .panel__media img { transition: transform 1.2s var(--ease-out); }
.panel--next:hover .panel__media img { transform: scale(1.04); }

.scroll-hint { position: absolute; right: var(--gutter); bottom: clamp(56px, 9vh, 110px); width: 1px; height: 64px; background: var(--line); overflow: hidden; }
.scroll-hint i { position: absolute; inset: 0 0 auto; height: 24px; background: var(--white); animation: hint 2.2s var(--ease-in-out) infinite; }
@keyframes hint { from { transform: translateY(-24px); } to { transform: translateY(64px); } }

/* Campo del inicio (WebGL) y escena de Unicorn Studio */
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; }
.unicorn { position: absolute; inset: 0; z-index: -3; }
.unicorn ~ .field, .field:has(~ .unicorn) { display: none; }
/* Palabra "siente" en semitono (js/siente.js): ocupa el panel, la interacción se escucha en todo el héroe */
.siente { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; opacity: 0; transition: opacity 0.8s var(--ease-out); }
.siente.is-ready { opacity: 1; }
.unicorn ~ .siente, .siente:has(~ .unicorn) { display: none; }
.panel--hero { cursor: crosshair; }
.panel--hero .display { font-size: clamp(1.7rem, 1.2rem + 2vw, 3rem); }
.panel--hero .panel__content { cursor: auto; }

/* ================= BLOQUES ================= */
.block { padding: var(--block) var(--gutter); }
.block--tight { padding-top: 0; }
.block--line .wrap { border-top: 1px solid var(--line); padding-top: clamp(40px, 5vw, 72px); }
.block--statement .wrap { display: grid; gap: 28px; justify-items: start; }
.block__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 16px 32px; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 120px); align-items: start; }
.split--media { align-items: center; }
.split > div { display: grid; gap: 28px; justify-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split > .faq, .split > .case-meta { justify-items: stretch; }

.cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px clamp(24px, 3vw, 48px); margin-top: clamp(40px, 5vw, 64px); }
.cols li { display: grid; gap: 12px; align-content: start; color: var(--muted); }
@media (max-width: 1000px) { .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cols { grid-template-columns: 1fr; } }

.logos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 64px); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.logos li { aspect-ratio: 3 / 2; padding: 9% 16%; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.logos img { width: 100%; height: 100%; object-fit: contain; filter: invert(1); opacity: 0.75; transition: opacity 0.3s ease; }
.logos li:hover img { opacity: 1; }
@media (max-width: 1000px) { .logos { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 560px) { .logos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Cabecera de página interior */
.page-head { padding: calc(var(--header-h) + clamp(64px, 12vw, 180px)) var(--gutter) clamp(48px, 7vw, 96px); }
.page-head .wrap { display: grid; gap: 22px; justify-items: start; }

/* ================= PROYECTOS ================= */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.filters button {
  min-height: 40px; padding: 0 16px; border: 1px solid var(--line); background: none; color: var(--muted);
  font: 600 var(--fs-label) / 1 var(--sans); letter-spacing: var(--track-label); text-transform: uppercase; cursor: pointer;
  transition: color 0.25s ease, border-color 0.25s ease, background-color 0.25s ease;
}
.filters button:hover { color: var(--white); border-color: var(--white); }
.filters button[aria-pressed="true"] { background: var(--white); border-color: var(--white); color: var(--ink); }
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(40px, 5vw, 72px) clamp(20px, 3vw, 40px); }
.card[hidden] { display: none; }
.card a { display: grid; gap: 14px; }
.card__media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ink-2); }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.card a:hover .card__media img { transform: scale(1.04); }
.card__meta { color: var(--muted); }
.card__meta .label { color: var(--muted); }
.card__title { font-size: var(--fs-h2); font-weight: 600; letter-spacing: var(--track-head); text-transform: uppercase; color: var(--white); line-height: 1.1; }
.card__text { color: var(--muted); max-width: 46ch; }
@media (max-width: 760px) { .cards { grid-template-columns: 1fr; } }

/* Caso */
.case-logo { height: clamp(40px, 5vw, 64px); width: auto; filter: invert(1); margin-bottom: 8px; }
.case-meta { display: grid; gap: 40px; }
.meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); width: 100%; }
.meta dt, .contact__list dt { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.meta dd { color: var(--white); }
.deliverables { display: flex; flex-wrap: wrap; gap: 8px 10px; margin-top: 16px; }
.deliverables li { font-size: 0.9rem; padding: 7px 14px; border: 1px solid var(--line); color: var(--text); }

.figure { overflow: hidden; background: var(--ink-2); }
.figure img { width: 100%; height: 100%; object-fit: cover; }
.figure--wide { margin-bottom: clamp(20px, 3vw, 40px); }
.gallery { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(20px, 3vw, 40px); }
.figure--full { grid-column: 1 / -1; }
.figure--half { grid-column: span 2; aspect-ratio: 4 / 3; }
.figure--quarter { grid-column: span 1; aspect-ratio: 2 / 3; }
.figure--full { aspect-ratio: 16 / 9; }
@media (max-width: 760px) {
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure--half { grid-column: 1 / -1; }
  .figure--quarter { grid-column: span 1; }
  .figure--full { aspect-ratio: 4 / 3; }
}

/* ================= SERVICIOS ================= */
.services { display: grid; }
.service {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 3fr); gap: 20px clamp(24px, 4vw, 64px);
  padding: clamp(36px, 4vw, 56px) 0; border-top: 1px solid var(--line);
}
.service .h2 { font-size: clamp(1.3rem, 1rem + 1.2vw, 2rem); }
.service__text { color: var(--muted); max-width: 48ch; }
.service__list { display: grid; gap: 8px; font-size: 0.92rem; color: var(--text); }
.service__list li::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 12px; vertical-align: middle; background: var(--white); border-radius: 0 6px 0 0; }
.service__ref { grid-column: 2; font-size: 0.9rem; color: var(--muted); }
.service__ref a { color: var(--white); background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat; }
@media (max-width: 960px) { .service { grid-template-columns: 1fr; } .service__ref { grid-column: auto; } }

/* ================= PROCESO ================= */
.steps { display: grid; }
.step { display: grid; grid-template-columns: minmax(64px, 2fr) minmax(0, 8fr); gap: 20px clamp(24px, 4vw, 64px); padding: clamp(32px, 4vw, 52px) 0; border-top: 1px solid var(--line); }
.step__n { font-family: var(--serif); font-size: clamp(2rem, 1.4rem + 2.4vw, 3.6rem); line-height: 1; color: var(--muted); font-variant-numeric: tabular-nums; }
.step div { display: grid; gap: 12px; max-width: 60ch; color: var(--muted); }
.faq { display: grid; }
.faq details { border-top: 1px solid var(--line); }
.faq details:last-child { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-weight: 600; color: var(--white); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 12px; height: 12px; margin-top: 6px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform 0.4s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq p { padding: 0 0 24px; color: var(--muted); max-width: 56ch; }

/* ================= CONTACTO ================= */
.contact { position: relative; isolation: isolate; overflow: hidden; min-height: 88svh; padding: calc(var(--header-h) + clamp(56px, 9vw, 140px)) var(--gutter) var(--block); }
.contact::after { content: ""; position: absolute; inset: 0; z-index: -2; background: radial-gradient(50% 60% at 100% 0%, rgba(34, 184, 232, 0.16), transparent 70%), radial-gradient(35% 45% at 85% 10%, rgba(200, 242, 58, 0.08), transparent 70%); }
.contact__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(48px, 7vw, 120px); align-items: start; }
.contact__info { display: grid; gap: 22px; justify-items: start; }
.contact__list { display: grid; gap: 20px; margin-top: 16px; }
.contact__list dd a { font-family: var(--serif); font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem); color: var(--white); background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size 0.45s var(--ease-out); overflow-wrap: anywhere; }
.contact__list dd a:hover { background-size: 100% 1px; }
.form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 24px; align-items: end; }
.field-row { display: grid; gap: 8px; }
.field-row--full { grid-column: 1 / -1; }
.form label { font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea {
  width: 100%; padding: 12px 0; border: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.35); border-radius: 0;
  background: transparent; color: var(--white); font: 400 1.05rem var(--sans); transition: border-color 0.25s ease;
}
.form select option { background: var(--ink-2); }
.form textarea { resize: vertical; min-height: 120px; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-bottom-color: var(--white); }
.form .btn { justify-self: start; }
.form__status { grid-column: 1 / -1; min-height: 1.5em; color: var(--muted); }
.form__status.is-ok { color: var(--lime); }
@media (max-width: 860px) { .contact__grid { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }
.page-contacto .footer__cta { display: none; }

/* ================= PIE ================= */
.footer { padding: 0 var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); }
.footer__cta { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; padding: clamp(56px, 8vw, 110px) 0; border-top: 1px solid var(--line); }
.footer__claim { font-family: var(--serif); font-size: clamp(1.5rem, 1.1rem + 1.8vw, 2.6rem); line-height: 1.2; color: var(--white); max-width: 22ch; }
.footer__bottom { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-top: 28px; border-top: 1px solid var(--line); font-size: var(--fs-label); font-weight: 600; letter-spacing: var(--track-label); text-transform: uppercase; color: var(--muted); }
.footer__nav { display: flex; flex-wrap: wrap; gap: 24px; }
.footer__nav a:hover { color: var(--white); }

/* ================= ENTRADAS ================= */
.js [data-rise] { opacity: 0; transform: translateY(24px); transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-rise].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0ms !important; }
  .js [data-rise] { opacity: 1; transform: none; }
}
