/* ==========================================================================
   SkyOS — Early Access landing page
   Built from Figma: "Landing Page" (1440×1024) + "mobile-landing-page" (402×1128)

   Mobile-first. Single breakpoint at 900px, where the layout switches from
   a stacked column to the two-column desktop composition.
   ========================================================================== */

/* --------------------------------------------------------------- TOKENS */
:root {
  --ink:            #0E1E2C;   /* headline, numbers, card borders */
  --ink-muted:      #556B82;   /* helper text, unit labels */
  --accent:         #0A66C2;   /* submit button */
  --accent-hover:   #08529C;
  --accent-press:   #073F78;
  --field:          #E5F2FF;   /* email input fill */
  --line:           #E2EAF2;   /* dividers, input border */
  --surface:        #FFFFFF;

  --bg-from:        #F4F9FC;
  --bg-to:          #FFFFFF;

  --font-serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;

  /* 118.98% in Figma — applied to every text layer in this design */
  --lh: 1.19;

  --r-card: 12px;   /* mobile radii */
  --r-card-desktop: 10px;

  --focus-ring: 0 0 0 2px rgba(10, 102, 194, .35);
}

/* ----------------------------------------------------------- RESET/BASE */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100svh;
  background: linear-gradient(180deg, var(--bg-from) 0%, var(--bg-to) 100%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: var(--lh);
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2 { margin: 0; font-weight: 700; }
p { margin: 0; }

input, button { font: inherit; color: inherit; }

:focus-visible { outline: none; box-shadow: var(--focus-ring); }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* =========================================================================
   MOBILE  (base — matches "mobile-landing-page", 402px wide)
   ========================================================================= */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px 0;   /* Figma: 24px side padding */
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 354px;       /* Figma content width at 402 − 2×24 */
  gap: 32px;              /* Figma Content auto-layout gap */
}

/* ------------------------------------------------------------- HEADLINE */
.hero__title {
  font-family: var(--font-serif);
  font-size: 44px;
  line-height: var(--lh);
  color: var(--ink);
}

/* Headline + subtitle travel together, so the 32px column gap sits below
   the pair rather than between them. Mirrors Figma's "TitleArea" group. */
.hero__heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.hero__subtitle {
  max-width: 30ch;         /* keeps it to two tidy lines */
  color: var(--ink-muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  text-wrap: balance;      /* even line lengths where supported */
}

/* ----------------------------------------------------------- WAITLIST */
.waitlist {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 12px;              /* Figma FormContainer gap */
}

/* On mobile the field and button stack; on desktop the button sits
   inside the field's right edge. */
.waitlist__field {
  display: contents;
}

.waitlist__input {
  width: 100%;
  height: 56px;
  padding: 0 20px;   /* matches desktop so both read the same */
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  font-size: 16px;
  color: var(--ink);
}
.waitlist__input::placeholder { color: var(--ink-muted); opacity: 1; }

.waitlist__btn {
  width: 100%;
  height: 56px;
  background: var(--accent);
  border: 0;
  border-radius: var(--r-card);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color .18s ease, transform .12s ease;
}
.waitlist__btn:hover { background: var(--accent-hover); }
.waitlist__btn:active { background: var(--accent-press); transform: translateY(1px); }

.waitlist__note {
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
}

.waitlist__status {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
}
/* Takes no space until it has something to say, so the vertical
   rhythm below it matches the Figma frame exactly. */
.waitlist__status:empty { display: none; }
.waitlist__status[data-state="error"]   { color: #B4232B; }
.waitlist__status[data-state="success"] { color: var(--accent); }

/* --------------------------------------------------------------- RULE */
.hero__rule {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------- COUNTDOWN */
.countdown {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;              /* Figma CountdownSection gap */
  width: 100%;
}

.countdown__label {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink);
}

.countdown__row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;              /* Figma TimerRow gap */
}

.countdown__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;               /* Figma CountdownCard gap */
  width: 80px;
  height: 85px;
  background: var(--surface);
  border: 1px solid var(--ink);
  border-radius: var(--r-card);
}

.countdown__num {
  font-size: 32px;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

.countdown__unit {
  font-size: 12px;
  font-weight: 400;
  line-height: 1;
  color: var(--ink-muted);
}

.countdown__sep {
  font-size: 28px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}

/* ------------------------------------------------------------- VISUAL
   Figma mobile: HeroVisual 402×549, image 960×838 at (−279, −146).
   Reproduced as percentages so the crop holds at any width.            */
.hero__visual {
  position: relative;
  width: 100vw;
  margin-top: 40px;
  aspect-ratio: 402 / 549;
  overflow: hidden;
  pointer-events: none;
}

.hero__visual img {
  position: absolute;
  left: -69.4%;           /* −279 / 402 */
  top: -26.6%;            /* −146 / 549 */
  width: 238.8%;          /*  960 / 402 */
  height: 152.6%;         /*  838 / 549 */
  max-width: none;
  object-fit: cover;
}

/* =========================================================================
   DESKTOP  (≥900px — matches "Landing Page", 1440×1024)
   ========================================================================= */
@media (min-width: 900px) {

  .hero {
    position: relative;
    max-width: 1440px;
    min-height: min(1024px, 100svh);
    margin-inline: auto;
    padding: 0 40px;
    flex-direction: row;
    align-items: center;
    text-align: left;
  }

  /* Content column: Figma x 754 → 1214 of 1440 */
  .hero__content {
    position: relative;
    z-index: 1;
    align-items: flex-start;
    width: 460px;
    max-width: 100%;
    margin-left: 52.36%;    /* 754 / 1440 */
    gap: 0;                 /* desktop uses explicit offsets below */
  }

  .hero__title {
    font-size: clamp(52px, 5.2vw, 75px);
  }

  .hero__heading {
    align-items: flex-start;
    gap: 18px;
  }

  .hero__subtitle {
    max-width: 34ch;
    font-size: 19px;
    font-weight: 300;
  }

  /* Figma: title block ends 451, field starts 489. The subtitle now sits
     between them, so the gap below it is reduced to keep the same rhythm. */
  .waitlist { margin-top: 30px; gap: 0; }

  /* Field + button become one combined control */
  .waitlist__field {
    display: block;
    position: relative;
    width: 100%;
  }

  .waitlist__input {
    height: 60px;
    padding: 0 175px 0 20px;   /* room for the inset button */
    border: 0;
    border-radius: var(--r-card-desktop);
    font-size: 20px;
    font-weight: 300;
  }

  .waitlist__btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 155px;
    height: 60px;
    border-radius: var(--r-card-desktop);
    font-size: 20px;
    font-weight: 500;
  }

  .waitlist__note {
    margin-top: 14px;
    font-size: 15px;
    font-weight: 300;
    text-align: left;
  }

  .waitlist__status { text-align: left; }

  /* The desktop design has no divider between form and countdown */
  .hero__rule { display: none; }

  .countdown {
    align-items: flex-start;
    margin-top: 66px;        /* Figma: note 581 → label 647 */
    gap: 15px;
  }

  .countdown__label {
    font-size: 20px;
    font-weight: 400;
  }

  /* Figma leaves 42px between cards with the ":" centred inside that gap,
     so the flex gap is (42 − colon width) / 2. */
  .countdown__row { gap: 15px; }

  .countdown__card {
    width: 100px;
    height: 100px;
    gap: 6px;
    border-radius: var(--r-card-desktop);
    background: transparent;  /* desktop cards are unfilled in Figma */
  }

  .countdown__num  { font-size: 40px; font-weight: 500; }
  .countdown__unit { font-size: 17px; font-weight: 300; }
  .countdown__sep  { font-size: 40px; font-weight: 500; }

  /* ----------------------------------------------------------- VISUAL
     Figma desktop: image 1165×1130 at (−205, −46) inside 1440×1024.  */
  .hero__visual {
    position: absolute;
    inset: 0;
    width: auto;
    margin: 0;
    aspect-ratio: auto;
    overflow: hidden;
  }

  /* The box below reproduces the Figma placement exactly at 1440×1024.
     `contain` keeps the phone's aspect ratio at every other window size —
     with `cover` it distorts and crops as the window height changes. */
  .hero__visual img {
    left: -14.24%;          /* −205 / 1440 */
    top: 50%;
    transform: translateY(-50%);
    width: 80.9%;           /* 1165 / 1440 */
    height: 110.35%;        /* 1130 / 1024 */
    object-fit: contain;
    object-position: center;
  }
}

/* Wide screens: stop the composition growing past the Figma frame */
@media (min-width: 1440px) {
  .hero { padding-inline: 0; }
}

/* ------------------------------------------------------ REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
}
