:root {
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "Geist Mono", ui-monospace, monospace;
}

/* Mañana y tarde (05:00–16:59 hora del visitante) */
:root[data-theme="light"] {
  --bg: #fafaf7;
  --text: #0a0a0a;
  --text-muted: rgba(10, 10, 10, 0.68);
  --text-faint: rgba(10, 10, 10, 0.45);
  --surface: #ededea;
  --line: rgba(10, 10, 10, 0.09);
  --surface-hover: #e3e3df;
  --button: #0a0a0a;
  --button-text: #fafaf7;
  --button-hover: #2a2a2a;
  --glow-halo: rgba(196, 160, 104, 0.16);
  --glow-core: rgba(176, 138, 82, 0.22);
}

/* Noche (17:00–04:59) */
:root[data-theme="dark"] {
  --bg: #000;
  --text: #fff;
  --text-muted: rgba(255, 255, 255, 0.72);
  --text-faint: rgba(255, 255, 255, 0.45);
  --surface: #1c1c1c;
  --line: rgba(255, 255, 255, 0.09);
  --surface-hover: #262626;
  --button: #333;
  --button-text: #fff;
  --button-hover: #3d3d3d;
  --glow-halo: rgba(255, 255, 255, 0.075);
  --glow-core: rgba(255, 255, 255, 0.14);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  transition: background-color 1s ease, color 1s ease;
}

.page {
  min-height: 100vh;
  max-width: 720px;
  margin: 0 auto;
  padding: 96px 16px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Halo que sigue al ratón: una "membrana" difusa y un núcleo que se estira con el movimiento (ver app.js). */
.page { position: relative; z-index: 1; }

.glow {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
  will-change: transform;
}
.glow.is-on { opacity: 1; }
.glow-halo {
  width: 560px;
  height: 560px;
  margin: -280px 0 0 -280px;
  background: radial-gradient(circle, var(--glow-halo) 0%, transparent 62%);
}
.glow-core {
  width: 180px;
  height: 180px;
  margin: -90px 0 0 -90px;
  background: radial-gradient(circle, var(--glow-core) 0%, transparent 68%);
  filter: blur(6px);
}

/* Oculto hasta que GSAP fija los estados iniciales (ver app.js). */
.is-intro .page > * { visibility: hidden; }

/* Firma "Marcos Wolf": el SVG hace de máscara y toma el color del texto en cada tema. */
.logo {
  display: block;
  width: 190px;
  aspect-ratio: 3940 / 1260;
  background: var(--text);
  -webkit-mask: url(/assets/firma.svg) center / contain no-repeat;
  mask: url(/assets/firma.svg) center / contain no-repeat;
}

.headline-wrap {
  /* Siempre tres líneas: la más larga ("patrimonio y legado.") ≈ 9.6em. */
  --headline-size: calc(var(--fit, 1) * min(72px, calc((min(100vw, 720px) - 32px) / 9.8)));
  width: 100%;
}

.headline {
  margin: 28px 0 0;
  font-size: var(--headline-size);
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.headline .line-mask { padding: 0.14em 0 0.2em; margin: -0.14em 0 -0.2em; }
.headline.is-revealed .line-mask { overflow: visible !important; }
.headline .legacy { display: inline-block; }
.headline .hello { display: inline-block; cursor: help; }

.kicker {
  margin: 18px 0 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: calc(var(--headline-size) * 0.5);
  line-height: 1.1;
  color: var(--text-muted);
}

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 14px 0 10px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 17px;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.pill:hover { background: var(--surface-hover); }
.pill svg { width: 22px; height: 22px; flex: none; }

.about {
  width: 100%;
  max-width: 500px;
  margin: 28px 0 48px;
}

.about-lead {
  margin: 0 0 0.9em;
  text-wrap: pretty;
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: center;
}
.about-lead:last-child { margin-bottom: 0; }
.about-lead em {
  font-family: var(--serif);
  font-size: 1.22em;
  font-style: italic;
  line-height: 1;
  color: var(--text);
}

.co-wrap { white-space: nowrap; }
.co {
  color: var(--text);
  font-weight: 500;
  text-decoration: none;
}
.co:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.co-icon {
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-right: 0.3em;
  vertical-align: -0.14em;
}
.co-icon-eme { width: 1em; height: 1em; vertical-align: -0.16em; }
:root[data-theme="dark"] .co-icon-eme { filter: invert(1); }

.offer {
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  border-radius: 24px;
  background: var(--surface);
  text-align: left;
}

.offer-media {
  position: relative;
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  /* Fondo si aún no hay foto: atardecer de Dubái */
  background:
    radial-gradient(120% 90% at 70% 100%, #f2a65a 0%, rgba(242, 166, 90, 0) 55%),
    linear-gradient(180deg, #1b2a4a 0%, #5b4a6e 55%, #d98a5f 100%);
}
.offer-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: transform;
}
.offer-media video { transition: opacity 0.6s ease; }
.offer-media video.is-fading { opacity: 0; }
.offer-media figcaption {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
}

.offer-body { padding: 22px 22px 18px; }

.offer-title {
  margin: 0 0 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.expect {
  list-style: none;
  margin: 0 0 20px;
  padding: 0;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.expect li {
  position: relative;
  padding: 13px 0 13px 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
  border-bottom: 1px solid var(--line);
}
.expect-icon {
  position: absolute;
  left: 0;
  top: calc(13px + 0.75em - 8px);
  width: 16px;
  height: 16px;
  stroke: var(--text);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: var(--text);
}
.expect strong { font-weight: 600; color: var(--text); }
.expect-sep { margin: 0 0.5em; color: var(--text-faint); }
.expect-desc { color: var(--text-faint); }

.signup {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
}
.signup input[type="email"] {
  flex: 1 1 200px;
  height: 52px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 17px;
  outline: none;
  transition: border-color 0.2s ease, background-color 1s ease;
}
.signup input::placeholder { color: var(--text-faint); }
.signup input:focus { border-color: var(--text-faint); }

.signup button {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  clip-path: inset(0 round 10px);
  height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 10px;
  background: var(--button);
  color: var(--button-text);
  font: inherit;
  font-size: 17px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.signup button:hover { background: var(--button-hover); }
.signup button:disabled { opacity: 0.6; cursor: default; }

/* Brillo que cruza el botón cada pocos segundos. */
.shimmer::after {
  content: "";
  position: absolute;
  inset: -50% auto -50% 0;
  width: 45%;
  background: linear-gradient(105deg, transparent 20%, rgba(255, 255, 255, 0.55) 50%, transparent 80%);
  transform: translateX(-160%) skewX(-12deg);
  animation: shimmer 3.2s ease-in-out 2.4s infinite;
  pointer-events: none;
  z-index: -1;
  mix-blend-mode: overlay;
}
:root[data-theme="light"] .shimmer::after { mix-blend-mode: normal; opacity: 0.35; }
.shimmer:disabled::after { animation: none; }
@keyframes shimmer {
  0% { transform: translateX(-160%) skewX(-12deg); }
  45%, 100% { transform: translateX(360%) skewX(-12deg); }
}

.signup-status {
  flex-basis: 100%;
  min-height: 1.4em;
  margin: 4px 0 0;
  font-size: 15px;
  color: var(--text-muted);
}
.signup-status[data-state="error"] { color: #e5484d; }

.signup-note {
  margin: 2px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-faint);
}
.signup-note a { color: inherit; }
.signup-note a:hover { color: var(--text); }

.honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.footer {
  margin-top: 40px;
  font-size: 15px;
  color: var(--text-faint);
  letter-spacing: 0.01em;
}
.footer a { color: inherit; text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer-sep { margin: 0 6px; }

/* Páginas secundarias (privacidad, baja, gracias) */
.prose .signup { margin-top: 24px; }
.prose .signup input[type="email"] { background: var(--surface); }
.prose {
  max-width: 640px;
  margin: 0 auto;
  padding: 64px 16px 96px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--text-muted);
}
.prose h1 { margin: 32px 0 4px; font-size: 40px; line-height: 1.1; letter-spacing: -0.02em; color: var(--text); }
.prose h2 { margin: 40px 0 8px; font-size: 20px; color: var(--text); }
.prose a { color: var(--text); }
.prose .back { text-decoration: none; color: var(--text-faint); font-size: 15px; }
.prose .updated { margin: 0 0 24px; font-size: 14px; color: var(--text-faint); }

@media (max-width: 640px) {
  .socials { flex-wrap: nowrap; gap: 6px; }
  .pill {
    height: 36px;
    gap: 5px;
    padding: 0 9px 0 7px;
    font-size: clamp(11px, 3vw, 15px);
    letter-spacing: 0;
  }
  .pill svg { width: 17px; height: 17px; }
  .expect { font-size: 12px; letter-spacing: 0.04em; }
}

@media (max-width: 480px) {
  .page { padding-top: 64px; }
  .about-lead { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
  .shimmer::after { animation: none; }
}
