/* THE GATHERING — mismo sistema que la web de Paraguay Relocation:
   vidrio líquido monocromo (negro · grafito · plata), Fraunces + Inter + IBM Plex Mono. */

:root {
  --ink: oklch(0.14 0 0);
  --navy-800: oklch(0.18 0 0);
  --paper: oklch(0.16 0 0);
  --ink-on-dark: oklch(0.97 0 0);
  --soft-on-dark: oklch(0.74 0 0);
  --plata: oklch(0.86 0 0);

  --lg-tint: oklch(1 0 0 / 6%);
  --lg-tint-strong: oklch(1 0 0 / 10%);
  --lg-blur: 22px;
  --lg-saturate: 135%;
  --lg-border: oklch(1 0 0 / 14%);
  --lg-border-strong: oklch(1 0 0 / 26%);
  --lg-highlight: oklch(1 0 0 / 45%);
  --lg-inner: inset 0 1px 0 oklch(1 0 0 / 10%);
  --lg-shadow: 0 18px 50px -24px oklch(0 0 0 / 85%);
  --lg-shadow-lift: 0 26px 60px -26px oklch(0 0 0 / 90%);
  --lg-radius: 16px;
  --lg-radius-lg: 20px;
  --ease-glass: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur-1: 260ms;
  --dur-2: 420ms;
  --dur-3: 700ms;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --container: 1120px;
  color-scheme: dark;
}
:root:lang(ru) { --font-display: "Lora", Georgia, serif; }   /* Fraunces no tiene cirílico */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  color: var(--ink-on-dark);
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1000px 620px at 12% -8%, oklch(1 0 0 / 9%), transparent 60%),
    radial-gradient(820px 520px at 92% 8%, oklch(1 0 0 / 6%), transparent 62%),
    radial-gradient(900px 700px at 50% 110%, oklch(1 0 0 / 5%), transparent 65%),
    var(--ink);
  background-attachment: fixed;
}
body.con-puerta { overflow: hidden; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid oklch(0.92 0 0); outline-offset: 3px; border-radius: 4px; }
[hidden] { display: none !important; }

#fondo { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.site-header, main, .site-footer { position: relative; z-index: 1; }

.container-x { max-width: var(--container); margin: 0 auto; padding-inline: clamp(16px, 5vw, 40px); }

.eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--plata); margin: 0 0 14px; display: flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--plata); display: inline-block; }

/* ---- material de vidrio ---- */
.glass, .site-header, .stop-num, .lang-switch, .sonido, .modal {
  position: relative;
  background: var(--lg-tint);
  border: 1px solid var(--lg-border);
  box-shadow: var(--lg-shadow), var(--lg-inner);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .glass, .site-header, .stop-num, .lang-switch, .sonido, .modal {
    -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
    backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-saturate));
  }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .site-header, .lang-switch, .sonido, .modal { background: oklch(0.2 0 0 / 92%); }
}
.glass::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--lg-highlight), transparent);
}

/* ---- botones ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 15px; padding: 14px 26px; border-radius: 999px;
  text-decoration: none; border: 1px solid transparent; cursor: pointer; position: relative; overflow: hidden;
  transition: transform var(--dur-1) var(--ease-glass), background var(--dur-1) var(--ease-glass), box-shadow var(--dur-1) var(--ease-glass);
}
.btn-primary { background: oklch(1 0 0 / 92%); color: var(--ink); box-shadow: 0 10px 30px -16px oklch(1 0 0 / 45%); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(100deg, transparent 35%, oklch(1 0 0 / 55%) 50%, transparent 65%);
  transform: translateX(-120%); transition: transform var(--dur-3) var(--ease-glass);
}
.btn-primary:hover { background: oklch(1 0 0); transform: translateY(-1px); box-shadow: 0 16px 40px -18px oklch(1 0 0 / 55%); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn:active { transform: translateY(0) scale(0.985); transition-duration: 120ms; }
.btn[disabled] { opacity: 0.6; cursor: progress; }

.link-arrow {
  font-size: 14px; color: var(--soft-on-dark); text-decoration: none;
  border-bottom: 1px solid oklch(1 0 0 / 14%); padding-bottom: 2px;
  transition: color var(--dur-1) var(--ease-glass), border-color var(--dur-1) var(--ease-glass);
}
.link-arrow:hover { color: oklch(0.99 0 0); border-color: oklch(1 0 0 / 40%); }
.boton-texto { background: none; border: none; padding: 0; cursor: pointer; }
.boton-texto.mini { justify-self: start; font-size: 13px; color: var(--soft-on-dark); border-bottom: 1px solid var(--lg-border); padding-bottom: 1px; margin-top: 2px; }
.boton-texto.mini:hover { color: var(--ink-on-dark); }
.boton-texto.en-linea { text-decoration: underline; text-underline-offset: 3px; color: var(--ink-on-dark); }

/* ---- cabecera ---- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  background: oklch(0.14 0 0 / 55%); border: none; border-bottom: 1px solid var(--lg-border); box-shadow: var(--lg-inner);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-block: 14px; }
.wordmark { font-family: "Fraunces", Georgia, serif; font-weight: 700; font-size: 17px; letter-spacing: 0.06em; color: var(--ink-on-dark); text-decoration: none; white-space: nowrap; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang-switch { display: flex; align-items: center; gap: 2px; border-radius: 999px; padding: 2px; box-shadow: var(--lg-inner); }
.lang-btn {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; padding: 6px 9px;
  background: none; border: none; border-radius: 999px; color: var(--soft-on-dark); cursor: pointer;
  transition: color var(--dur-1) var(--ease-glass), background var(--dur-1) var(--ease-glass);
}
.lang-btn:hover { color: var(--ink-on-dark); }
.lang-btn.is-active { background: oklch(1 0 0 / 92%); color: var(--ink); }

.sonido {
  display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; padding: 7px 12px 7px 10px; cursor: pointer;
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--soft-on-dark);
  box-shadow: var(--lg-inner);
}
.sonido:hover { color: var(--ink-on-dark); border-color: var(--lg-border-strong); }
.nota-musical { font-size: 13px; line-height: 1; font-family: var(--font-body); }
.barras { display: inline-flex; align-items: flex-end; gap: 2px; height: 12px; }
.barras i { width: 2px; height: 3px; background: currentColor; border-radius: 1px; transition: height var(--dur-2) var(--ease-glass); }
.sonido[aria-pressed="true"] { color: var(--ink-on-dark); }
.sonido[aria-pressed="true"] .barras i { animation: barra 1.1s ease-in-out infinite; }
.sonido[aria-pressed="true"] .barras i:nth-child(2) { animation-delay: -0.35s; }
.sonido[aria-pressed="true"] .barras i:nth-child(3) { animation-delay: -0.7s; }
.sonido[aria-pressed="true"] .barras i:nth-child(4) { animation-delay: -0.2s; }
@keyframes barra { 0%, 100% { height: 3px; } 50% { height: 12px; } }

/* ---- puerta ---- */
.puerta {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(700px 500px at 50% 40%, oklch(1 0 0 / 7%), transparent 70%), oklch(0.12 0 0 / 82%);
  -webkit-backdrop-filter: blur(26px); backdrop-filter: blur(26px);
  transition: opacity 900ms var(--ease-glass), filter 900ms var(--ease-glass), visibility 0s linear 900ms;
}
.puerta.se-va { opacity: 0; filter: blur(10px); visibility: hidden; pointer-events: none; }
.puerta-idiomas { position: absolute; top: max(16px, env(safe-area-inset-top)); right: 16px; }
.puerta-centro { text-align: center; max-width: 520px; display: grid; justify-items: center; }
.puerta-centro .eyebrow { margin-bottom: 18px; }
.puerta-titulo { font-family: "Fraunces", Georgia, serif; font-size: clamp(44px, 11vw, 88px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.puerta-linea { margin: 18px 0 34px; color: var(--soft-on-dark); font-size: clamp(15px, 2.2vw, 18px); line-height: 1.6; }
.puerta-botones { display: grid; justify-items: center; gap: 18px; }
.puerta-botones .btn { min-width: 200px; padding: 16px 34px; font-size: 16px; }
.puerta-nota { margin: 26px 0 0; font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.04em; color: oklch(0.62 0 0); }
.anillo { width: 92px; height: 92px; margin-bottom: 26px; }
.anillo circle { fill: oklch(0.9 0 0); }
@media (prefers-reduced-motion: no-preference) {
  .anillo g { transform-origin: 60px 60px; animation: girar 40s linear infinite; }
  .anillo circle { animation: latido 3.2s ease-in-out infinite; animation-delay: calc(var(--i) * -0.27s); }
}
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes latido { 0%, 100% { opacity: 0.35; } 50% { opacity: 1; } }

/* ---- hero ---- */
.hero { padding-block: clamp(64px, 13vw, 128px) clamp(56px, 10vw, 100px); border-bottom: 1px solid var(--lg-border); }
.hero-inner { max-width: 820px; }
.thesis { margin: 0 0 30px; }
.thesis-line {
  position: relative; display: block; width: fit-content;
  font-size: clamp(30px, 5.6vw, 54px); line-height: 1.2; font-weight: 500; letter-spacing: -0.02em;
  color: var(--soft-on-dark); margin: 0 0 14px;
}
.thesis-line:nth-child(1) { --d: 0.35s; }
.thesis-line:nth-child(2) { --d: 1.15s; }
.thesis-line:nth-child(3) { --d: 2.05s; }
.thesis-line.strike::after {
  content: ""; position: absolute; left: 0; top: 54%; height: 2px; width: 0%; background: var(--plata);
}
.thesis-line.resolve { color: oklch(0.99 0 0); font-weight: 600; opacity: 0; transform: translateY(10px); margin-top: 6px; }
.hero-sub { font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--soft-on-dark); max-width: 580px; margin: 0 0 40px; opacity: 0; }
.hero-cta { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; opacity: 0; }
/* las animaciones arrancan al cruzar la puerta */
body.dentro .thesis-line.strike::after { animation: strikeIn 0.55s ease forwards; animation-delay: var(--d); }
body.dentro .thesis-line.strike { animation: dimText 0.5s ease forwards; animation-delay: calc(var(--d) + 0.55s); }
body.dentro .thesis-line.resolve { animation: resolveIn 0.7s ease forwards; animation-delay: var(--d); }
body.dentro .hero-sub { animation: fadeUp 0.7s ease forwards; animation-delay: 2.35s; }
body.dentro .hero-cta { animation: fadeUp 0.7s ease forwards; animation-delay: 2.6s; }
@keyframes strikeIn { to { width: 100%; } }
@keyframes dimText { to { opacity: 0.42; } }
@keyframes resolveIn { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---- secciones ---- */
.section { padding-block: clamp(64px, 10vw, 108px); }
.section-head { max-width: 640px; margin-bottom: clamp(32px, 6vw, 52px); }
.section-head h2 { font-size: clamp(28px, 4.2vw, 40px); letter-spacing: -0.02em; }
.section-lead { margin: 14px 0 0; color: var(--soft-on-dark); font-size: 15.5px; line-height: 1.6; }

.journey { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; list-style: none; margin: 0; padding: 0; }
.journey::before { content: ""; position: absolute; left: 4%; right: 4%; top: 20px; height: 1px; background: var(--lg-border); }
.stop { position: relative; z-index: 1; }
.stop-num {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 13px; color: var(--ink-on-dark); margin-bottom: 18px;
}
.stop h3 { font-size: 19px; margin-bottom: 8px; }
.stop p { font-size: 15px; line-height: 1.55; color: var(--soft-on-dark); margin: 0 0 10px; }
.stop .result { font-family: var(--font-mono); font-size: 11.5px; color: var(--plata); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---- formulario ---- */
.pro-form { max-width: 620px; border-radius: var(--lg-radius-lg); padding: clamp(20px, 3.6vw, 34px); display: grid; gap: 18px; overflow: hidden; }
.form-row { display: grid; gap: 7px; align-content: start; min-width: 0; }
.form-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row label, .grupo legend { font-size: 13px; letter-spacing: 0.01em; color: var(--soft-on-dark); }
.grupo { border: none; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
.grupo legend { padding: 0; margin-bottom: 2px; color: var(--ink-on-dark); font-weight: 600; font-size: 14px; }
.ayuda { font-size: 12.5px; color: oklch(0.62 0 0); }
.pro-form input:not([type="checkbox"]), .pro-form select {
  width: 100%; min-width: 0; font: inherit; font-size: 16px; color: var(--ink-on-dark);
  background: oklch(1 0 0 / 4%); border: 1px solid var(--lg-border); border-radius: 10px; padding: 12px 13px;
  transition: border-color var(--dur-1) var(--ease-glass), background var(--dur-1) var(--ease-glass), box-shadow var(--dur-1) var(--ease-glass);
}
.pro-form select {
  appearance: none; -webkit-appearance: none; padding-right: 38px;
  background-image: linear-gradient(45deg, transparent 50%, var(--soft-on-dark) 50%), linear-gradient(135deg, var(--soft-on-dark) 50%, transparent 50%);
  background-position: calc(100% - 19px) 52%, calc(100% - 14px) 52%; background-size: 5px 5px; background-repeat: no-repeat;
}
.pro-form select:invalid { color: oklch(0.6 0 0); }
.pro-form select option, .pro-form select optgroup { background: oklch(0.16 0 0); color: oklch(0.97 0 0); }
.pro-form input::placeholder { color: oklch(0.5 0 0); }
.pro-form input:hover, .pro-form select:hover { border-color: var(--lg-border-strong); }
.pro-form input:focus-visible, .pro-form select:focus-visible {
  outline: none; border-color: oklch(1 0 0 / 40%); background-color: oklch(1 0 0 / 8%); box-shadow: 0 0 0 3px oklch(1 0 0 / 10%);
}
.pro-form [aria-invalid="true"] { border-color: oklch(0.72 0.12 25) !important; }
.con-boton { display: flex; align-items: center; gap: 12px; }
.con-boton .boton-texto { flex: none; margin: 0; }
.check { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.55; color: var(--soft-on-dark); cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: oklch(0.95 0 0); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0; font-size: 14px; line-height: 1.5; color: oklch(0.86 0.08 25); }
.pro-form .btn { justify-self: start; }
.form-note { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--soft-on-dark); }
.exito { gap: 12px; }
.exito:focus { outline: none; }
.exito-titulo { font-size: clamp(24px, 3.4vw, 30px); letter-spacing: -0.02em; }
.codigo { margin: 4px 0; font-family: var(--font-mono); font-size: clamp(26px, 6vw, 34px); letter-spacing: 0.12em; color: var(--ink-on-dark); }
.exito .boton-texto { justify-self: start; margin-top: 8px; }

/* ---- pie ---- */
.site-footer { border-top: 1px solid var(--lg-border); padding-block: 28px calc(28px + env(safe-area-inset-bottom)); color: var(--soft-on-dark); font-size: 13px; }
.site-footer .container-x { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px 24px; }
.foot-tag { font-family: var(--font-mono); letter-spacing: 0.03em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; align-items: center; }
.foot-links a, .foot-links .boton-texto { color: var(--soft-on-dark); text-decoration: none; font-size: 13px; }
.foot-links a:hover, .foot-links .boton-texto:hover { color: var(--ink-on-dark); text-decoration: underline; text-underline-offset: 3px; }

/* ---- privacidad ---- */
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: min(80vh, 720px); overflow: auto; padding: 24px 26px 26px;
  border-radius: var(--lg-radius-lg); color: var(--ink-on-dark); background: oklch(0.17 0 0 / 88%);
}
.modal::backdrop { background: oklch(0 0 0 / 60%); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal-cabeza { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-cabeza h2 { font-size: 24px; }
.cerrar { background: none; border: 1px solid var(--lg-border); border-radius: 999px; width: 36px; height: 36px; cursor: pointer; color: var(--soft-on-dark); }
.cerrar:hover { color: var(--ink-on-dark); border-color: var(--lg-border-strong); }
.modal dl { margin: 0; display: grid; gap: 14px; }
.modal dt { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--plata); }
.modal dd { margin: 4px 0 0; font-size: 14.5px; line-height: 1.65; color: var(--soft-on-dark); }
.modal dd a { color: var(--ink-on-dark); }

/* ---- aparición al hacer scroll ---- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .section-head, .stop, .pro-form {
      animation: revealUp linear both; animation-timeline: view(); animation-range: entry 5% cover 22%;
    }
  }
}
@keyframes revealUp { from { opacity: 0; transform: translateY(14px); filter: blur(4px); } to { opacity: 1; transform: none; filter: blur(0); } }

@media (max-width: 820px) {
  :root { --lg-blur: 14px; --lg-tint: oklch(1 0 0 / 8%); }
  body { background-attachment: scroll; }
  .btn-primary::after { display: none; }
  .journey { grid-template-columns: 1fr; gap: 30px; }
  .journey::before { left: 20px; top: 0; bottom: 0; right: auto; width: 1px; height: auto; }
}
@media (max-width: 560px) {
  .form-dos { grid-template-columns: 1fr; }
  .wordmark { font-size: 14px; letter-spacing: 0.04em; }
  .sonido-texto { display: none; }
  .sonido { padding: 9px 10px; }
  .lang-btn { padding: 6px 7px; }
  .hero-cta { gap: 20px; }
}
@media (max-width: 370px) {
  .wordmark { font-size: 12.5px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0s !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
