/* =====================================================================
   ERA LONGEVITY CO — Landing (waitlist / coming soon)
   Hermana de ERA · Deep Health. Mismo sistema: Geist + PT Mono · paleta ERA
   ===================================================================== */

/* ---------- TOKENS ---------- */
:root {
  --night:   #010517;
  --night-2: #0a1430;
  --teal:    #c6e5df;
  --sand:    #efe8e3;
  --blue:    #b1c3cd;
  --blush:   #d5bdbc;
  --blond:   #f8eacd;
  --paper:   #fafafa;
  --white:   #ffffff;
  --ink:     #29292b;
  --muted:   #696969;
  --line:    #e0e0e0;

  --sans: 'Geist','Helvetica Neue',Helvetica,Arial,sans-serif;
  --display: 'Montserrat','Geist','Helvetica Neue',Helvetica,Arial,sans-serif;
  --mono: 'PT Mono','SF Mono',ui-monospace,monospace;

  --r-sm: .55rem;
  --r-md: 1rem;
  --r-lg: 1.5rem;
  --r-pill: 100px;

  --maxw: 1280px;
  --pad: clamp(1.15rem, 4vw, 3rem);
  --section-y: clamp(4.5rem, 9vw, 9rem);
}

/* ---------- RESET ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--teal); color: var(--night); }

/* ---------- TIPOGRAFÍA ---------- */
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.06; letter-spacing: -0.025em; color: var(--night); }
h1 { font-size: clamp(2.4rem, 5.5vw, 4.2rem); }
h2 { font-size: clamp(1.85rem, 3.4vw, 2.9rem); line-height: 1.1; }
h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.025em; }

.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--muted); line-height: 1.55; }
.section--dark .lead { color: rgba(255,255,255,.72); }

/* Eyebrow "chip": pastilla mono (sin punto) */
.eyebrow--chip {
  display: inline-block;
  font-family: var(--mono); text-transform: uppercase;
  font-size: .76rem; font-weight: 400; letter-spacing: .16em;
  color: var(--teal);
  padding: .55rem 1.05rem; border-radius: var(--r-pill);
  background: rgba(198,229,223,.1); border: 1px solid rgba(198,229,223,.32);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.eyebrow--chip.is-dark { color: var(--night-2); background: rgba(1,5,23,.05); border-color: rgba(1,5,23,.14); }

/* ---------- LAYOUT ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); }
.section--dark { background: var(--night); color: rgba(255,255,255,.8); }
.section--dark h1, .section--dark h2, .section--dark h3 { color: var(--white); }

/* =====================================================================
   PUNTOS EN ESQUINAS (firma Ondex)
   ===================================================================== */
.dotcard { position: relative; }
.dotcard::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  --dot: rgba(255,255,255,.42);
  background-image:
    radial-gradient(circle, var(--dot) 1.6px, transparent 2.1px),
    radial-gradient(circle, var(--dot) 1.6px, transparent 2.1px),
    radial-gradient(circle, var(--dot) 1.6px, transparent 2.1px),
    radial-gradient(circle, var(--dot) 1.6px, transparent 2.1px);
  background-size: 6px 6px;
  background-position: 13px 13px, right 13px top 13px, left 13px bottom 13px, right 13px bottom 13px;
  background-repeat: no-repeat;
}

/* =====================================================================
   BOTONES (pill + insignia circular con flecha ↗)
   ===================================================================== */
.btn {
  display: inline-flex; align-items: center; gap: .7rem;
  background: var(--night); color: var(--white);
  border-radius: var(--r-pill);
  padding: .4rem .4rem .4rem 1.4rem;
  font-size: 1rem; font-weight: 500; letter-spacing: -0.01em;
  transition: transform .4s cubic-bezier(.135,.9,.15,1), box-shadow .4s ease, background .3s ease;
  white-space: nowrap;
}
.btn .label { padding-block: .6rem; }
.btn .badge {
  width: 2.4rem; height: 2.4rem; border-radius: 50%;
  background: var(--blue); color: var(--night);
  display: grid; place-items: center; flex: none;
  transition: transform .45s cubic-bezier(.135,.9,.15,1), background .3s ease;
}
.btn .badge svg { width: 1.05rem; height: 1.05rem; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -14px rgba(1,5,23,.5); }
.btn:hover .badge { transform: translate(2px,-2px); background: var(--teal); }

.btn--invert { background: var(--white); color: var(--night); }
.btn--invert .badge { background: var(--night); color: var(--white); }
.btn--invert:hover .badge { background: var(--teal); color: var(--night); }

/* Frosted (sobre imagen) */
.btn--frost {
  background: rgba(255,255,255,.14);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  color: var(--white); border: 1px solid rgba(255,255,255,.25);
}
.btn--frost .badge { background: rgba(255,255,255,.85); color: var(--night); }
.btn--frost:hover .badge { background: var(--teal); }

.btn--block { width: 100%; justify-content: space-between; }
.btn--lg { font-size: 1.05rem; padding-left: 1.7rem; }
.btn--lg .badge { width: 2.7rem; height: 2.7rem; }

/* =====================================================================
   NAV (minimal: logo + waitlist)
   ===================================================================== */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  transition: background .35s ease, border-color .35s ease, backdrop-filter .35s ease;
  border-bottom: 1px solid transparent;
  color: var(--white);
}
.nav.is-scrolled {
  background: rgba(250,250,250,.82);
  -webkit-backdrop-filter: saturate(180%) blur(16px); backdrop-filter: saturate(180%) blur(16px);
  border-color: var(--line);
  color: var(--night);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 1.1rem var(--pad);
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand { display: flex; align-items: center; }
.brand__logo { height: 44px; width: auto; transition: filter .35s ease; }
.nav.is-scrolled .brand__logo { filter: brightness(0); }
.brand__logo--footer { height: 38px; }
.nav .btn { background: var(--night); color: var(--white); }
.nav.is-scrolled .btn .badge { background: var(--blue); }

/* =====================================================================
   1 · HERO (coming soon — video full-bleed, contenido centrado)
   ===================================================================== */
.hero {
  position: relative; min-height: 100vh; display: flex;
  flex-direction: column; align-items: center; justify-content: center; text-align: center;
  overflow: hidden; color: var(--white);
  padding: clamp(6rem, 11vh, 8rem) var(--pad) clamp(2.5rem, 5vw, 4rem);
}
.hero__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  background: var(--night-2);
}
.hero__overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(120% 90% at 50% 35%, rgba(1,5,23,.30) 0%, rgba(1,5,23,.66) 70%, rgba(1,5,23,.95) 100%),
    linear-gradient(180deg, rgba(1,5,23,.5) 0%, rgba(1,5,23,.35) 45%, rgba(1,5,23,.92) 100%);
}
.hero__inner {
  position: relative; z-index: 3; width: 100%; max-width: 860px;
  display: flex; flex-direction: column; align-items: center;
}
.hero__kicker { margin-bottom: 1.6rem; }
.hero__title {
  font-size: clamp(2.1rem, 5vw, 3.7rem); line-height: 1.04; letter-spacing: -0.025em;
  color: var(--white); text-shadow: 0 2px 30px rgba(1,5,23,.55);
  text-wrap: balance; margin-inline: auto;
}
.hero__title span { color: rgba(255,255,255,.62); }
.hero__sub {
  margin: 1.3rem auto 0; max-width: 46ch;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem); color: rgba(255,255,255,.85); line-height: 1.5;
  text-wrap: balance; letter-spacing: .01em;
}
.hero__actions { margin-top: clamp(1.4rem, 3vw, 2rem); display: flex; justify-content: center; }

/* =====================================================================
   2 · SOBRE ERA LONGEVITY CLINIC (claro, centrado)
   ===================================================================== */
.about { text-align: center; }
.about__inner { max-width: 980px; margin-inline: auto; }
.about .eyebrow--chip { margin-bottom: 1.4rem; }
.about__title { margin-bottom: 1.4rem; text-wrap: balance; }
.about__text { font-size: clamp(1.08rem, 1.6vw, 1.28rem); color: var(--muted); line-height: 1.62; text-wrap: pretty; }
.about__text + .about__text { margin-top: 1.1rem; }
.about__text strong { color: var(--night); font-weight: 600; }
.about__lede {
  margin-top: 2.4rem; font-family: var(--display); font-size: clamp(1.3rem, 2.4vw, 1.8rem);
  font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; color: var(--night);
  text-wrap: balance;
}
.about__lede span { display: inline-block; margin-top: .4rem; font-family: var(--mono); font-weight: 400; font-size: .82rem; text-transform: uppercase; letter-spacing: .2em; color: var(--muted); }

/* =====================================================================
   3 · WAITLIST (banda oscura con captura de email)
   ===================================================================== */
.waitlist { position: relative; overflow: hidden; color: var(--white); }
.waitlist__bg {
  position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover;
  background: var(--night);
}
.waitlist__overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(1,5,23,.9) 0%, rgba(1,5,23,.8) 50%, rgba(1,5,23,.95) 100%);
}
.waitlist .container { position: relative; z-index: 2; }
.waitlist__inner { max-width: 620px; margin-inline: auto; text-align: center; }
.waitlist .eyebrow--chip { margin-bottom: 1.4rem; }
.waitlist h2 { color: var(--white); margin-bottom: 1rem; text-wrap: balance; }
.waitlist p { color: rgba(255,255,255,.76); font-size: 1.05rem; margin-bottom: 2rem; max-width: 44ch; margin-inline: auto; }

.wl-form { display: flex; gap: .7rem; max-width: 460px; margin: 0 auto; }
.wl-form .input { flex: 1; }
.input {
  width: 100%; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-pill); padding: .95rem 1.35rem; color: var(--white);
  font-family: inherit; font-size: 1rem; transition: border-color .2s ease, background .2s ease;
}
.input::placeholder { color: rgba(255,255,255,.45); }
.input:focus { outline: none; border-color: var(--teal); background: rgba(255,255,255,.1); }
.wl-form .btn { flex: none; }
.wl-note { margin-top: 1.1rem; font-family: var(--mono); font-size: .76rem; letter-spacing: .04em; color: rgba(255,255,255,.5); }

/* =====================================================================
   MODAL / POPUP WAITLIST (blanco frosted, centrado)
   ===================================================================== */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: grid; place-items: center; padding: var(--pad);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility .35s ease;
}
.modal.is-open { opacity: 1; visibility: visible; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(1,5,23,.55);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.modal__card {
  position: relative; z-index: 1; width: 100%; max-width: 440px;
  background: rgba(255,255,255,.86);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--r-lg);
  padding: clamp(1.8rem, 4vw, 2.6rem);
  box-shadow: 0 40px 80px -24px rgba(1,5,23,.5);
  text-align: center;
  transform: translateY(14px) scale(.98); transition: transform .4s cubic-bezier(.135,.9,.15,1);
}
.modal.is-open .modal__card { transform: translateY(0) scale(1); }
.modal__card::after { --dot: rgba(1,5,23,.18); }

.modal__close {
  position: absolute; top: .9rem; right: .9rem;
  width: 2.2rem; height: 2.2rem; border-radius: 50%;
  display: grid; place-items: center; color: var(--night);
  background: rgba(1,5,23,.06); transition: background .2s ease;
}
.modal__close:hover { background: rgba(1,5,23,.12); }
.modal__close svg { width: 1.1rem; height: 1.1rem; }

.modal .eyebrow--chip { margin-bottom: 1.1rem; }
.modal__title { font-size: clamp(1.5rem, 4vw, 2rem); margin-bottom: .6rem; text-wrap: balance; }
.modal__sub { color: var(--muted); font-size: 1rem; margin-bottom: 1.6rem; text-wrap: pretty; }

/* form en columna, inputs oscuros sobre fondo claro */
.wl-form--stack { flex-direction: column; gap: .7rem; max-width: 100%; }
.modal .input {
  background: rgba(1,5,23,.04); border: 1px solid rgba(1,5,23,.14); color: var(--ink);
}
.modal .input::placeholder { color: rgba(1,5,23,.4); }
.modal .input:focus { border-color: var(--night-2); background: rgba(1,5,23,.06); }
.modal .btn--block { margin-top: .4rem; }

.hp { position: absolute; left: -9999px; opacity: 0; height: 0; width: 0; }
.wl-error { margin-top: .2rem; color: #c0392b; font-size: .85rem; }

.modal__thanks { display: flex; flex-direction: column; align-items: center; }
.modal__check {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; margin-bottom: 1.2rem;
  display: grid; place-items: center; color: var(--white);
  background: var(--night);
}
.modal__check svg { width: 1.7rem; height: 1.7rem; }
.modal__thanks .btn { margin-top: 1.6rem; }

body.modal-open { overflow: hidden; }

/* =====================================================================
   FOOTER
   ===================================================================== */
.footer { background: var(--night); color: rgba(255,255,255,.6); border-top: 1px solid rgba(255,255,255,.1); }
.footer__inner { padding-block: 3rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1.5rem; align-items: center; }
.footer__inner p { max-width: 34ch; font-size: .92rem; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.1); padding-block: 1.4rem; font-size: .84rem; color: rgba(255,255,255,.45); display: flex; flex-wrap: wrap; gap: .75rem; justify-content: space-between; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 760px) {
  body { font-size: 16px; }
  .nav__cta .btn .label { display: none; }
  .nav__cta .btn { padding: .4rem; }
  .wl-form { flex-direction: column; }
  .wl-form .btn { justify-content: space-between; }
}
