@font-face {
  font-family: "Sora";
  src: url("fonts/sora-latin-var.woff2") format("woff2");
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("fonts/geist-mono-latin-var.woff2") format("woff2");
  font-weight: 400 500;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Mercury's grays */
  --void: #000;
  --charcoal: #0d0e10;
  --graphite: #2a2c30;
  --slate: #5d6168;
  --cool: #9aa0a8;     /* 7.9:1 on black */
  --silver: #c9ccd1;   /* 13:1 on black */
  --frost: #eef0f3;
  --pad-x: clamp(20px, 5vw, 80px);
  --pad-y: clamp(16px, 3.2dvh, 40px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html { background: var(--void); overflow-x: clip; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--silver);
  font-family: "Sora", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

::selection { background: rgba(201, 204, 209, .35); color: var(--frost); }

#sky {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh;
  display: block;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
}
.gl-ready #sky { opacity: 1; }

/* The planet's box. main.js reads it to place the 3D sphere; the still
   image fills it when WebGL is unavailable. */
.planet-slot {
  position: fixed;
  contain: layout paint;
  z-index: 0;
  --size: min(86vw, 190dvh);
  width: var(--size);
  height: var(--size);
  top: 34dvh;
  left: calc(50% - var(--size) / 2);
  pointer-events: none;
}
.planet-still {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  opacity: 0;
  animation: still-in 2.4s var(--ease-out) .1s forwards;
  transition: opacity .9s ease;
}
.has-gl .planet-still { display: none; }
@keyframes still-in { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

.page {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: calc(var(--pad-y) + env(safe-area-inset-top, 0px)) var(--pad-x) calc(var(--pad-y) + env(safe-area-inset-bottom, 0px));
}

/* ---------- top ---------- */
.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}
.top { position: relative; z-index: 2; }
.wordmark {
  font-weight: 600;
  font-size: clamp(17px, 1.35vw, 21px);
  letter-spacing: -0.01em;
  color: var(--frost);
  text-decoration: none;
  border-radius: 6px;
}
.clock {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12.5px;
  color: var(--cool);
  display: flex;
  gap: .9em;
  align-items: baseline;
  white-space: nowrap;
}
.clock time { color: var(--silver); font-variant-numeric: tabular-nums; }
.clock time::before {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-right: .7em;
  border-radius: 50%;
  background: var(--silver);
  box-shadow: 0 0 0 0 rgba(201,204,209,.5);
  animation: pulse 2.8s ease-in-out infinite;
  vertical-align: 1px;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,204,209,.45); }
  50% { box-shadow: 0 0 0 5px rgba(201,204,209,0); }
}

/* ---------- hero ---------- */
.hero {
  align-self: center;
  justify-self: center;
  width: 100%;
  max-width: 90rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-block: clamp(8px, 2dvh, 24px);
}
.details {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
/* a soft pool of shade under the supporting copy, so it reads on the planet */
.details::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -12% -22% -18%;
  background: radial-gradient(closest-side, rgba(0,0,0,.62), rgba(0,0,0,.38) 55%, rgba(0,0,0,0));
  pointer-events: none;
}

.headline {
  margin: 0 0 clamp(14px, 2.6dvh, 30px);
  font-weight: 700;
  font-size: min(7.1vw, 12.6dvh);
  line-height: .98;
  letter-spacing: -0.035em;
  max-width: 9.6em;
  text-wrap: balance;
  /* Fallback look (no WebGL): brushed silver. */
  color: var(--silver);
  background: linear-gradient(172deg, #fbfcfd 0%, #b9bdc3 38%, #6e737a 52%, #d7dade 70%, #9ba0a7 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: rise 1.4s var(--ease-out) .35s both;
}
/* With WebGL the glass is drawn on the canvas at this text's exact glyph
   positions; the DOM text stays for screen readers, selection and search. */
.has-gl .headline {
  background: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  animation: none;
}

.sub {
  margin: 0 0 clamp(14px, 2.4dvh, 26px);
  max-width: 34em;
  font-size: clamp(15px, 1.2vw, 18px);
  font-weight: 400;
  line-height: 1.55;
  color: var(--frost);
  text-shadow: 0 1px 12px rgba(0,0,0,.9), 0 0 2px rgba(0,0,0,.8);
  animation: rise 1.2s var(--ease-out) 1.0s both;
}

.tools {
  list-style: none;
  margin: 0 0 clamp(18px, 3.4dvh, 38px);
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  max-width: 62em;
}
.tools li {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12.5px;
  line-height: 1;
  padding: 9px 13px 9px 12px;
  color: var(--silver);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.2);
  backdrop-filter: blur(10px) saturate(1.2);
  animation: rise 1s var(--ease-out) both;
}
.tools li::before {
  content: "";
  display: inline-block;
  width: 5px; height: 5px;
  border-radius: 50%;
  margin-right: 9px;
  vertical-align: 2px;
  background: radial-gradient(circle at 35% 35%, #f3f4f6, #7b8087 70%);
}
.tools li:nth-child(1) { animation-delay: 1.15s; }
.tools li:nth-child(2) { animation-delay: 1.23s; }
.tools li:nth-child(3) { animation-delay: 1.31s; }
.tools li:nth-child(4) { animation-delay: 1.39s; }

.offer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  text-align: left;
  gap: clamp(14px, 2.2vw, 36px);
  animation: rise 1.2s var(--ease-out) 1.5s both;
}
.price {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  column-gap: 4px;
  line-height: 1.1;
  max-width: 17em;
}
.price .amount {
  font-size: clamp(26px, 2.3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--frost);
  font-variant-numeric: tabular-nums;
}
.price .per {
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13px;
  color: var(--cool);
}
.price .terms {
  flex-basis: 100%;
  margin-top: 5px;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 12px;
  color: var(--cool);
}

.ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- glass buttons ---------- */
.btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 50px;
  padding: 0 24px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease-out), border-color .5s ease, background-color .5s ease;
  -webkit-backdrop-filter: blur(16px) saturate(1.5) brightness(1.08);
  backdrop-filter: blur(16px) saturate(1.5) brightness(1.08);
}
.btn::before { /* specular sheen that travels on hover */
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.34) 48%, rgba(255,255,255,.08) 54%, transparent 66%);
  transform: translateX(-120%);
  transition: transform 1.1s var(--ease-out);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateX(120%); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.985); transition-duration: .15s; }

.btn-primary {
  color: #0b0c0e;
  background:
    radial-gradient(120% 140% at 30% -20%, rgba(255,255,255,.95), rgba(255,255,255,0) 60%),
    linear-gradient(180deg, #e9ebee 0%, #c4c8cd 55%, #a9aeb4 100%);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.95),
    inset 0 -2px 6px rgba(60,64,70,.35),
    0 12px 36px -12px rgba(200,205,212,.35),
    0 2px 8px rgba(0,0,0,.6);
}
.btn-primary:hover {
  box-shadow:
    inset 0 1px 0 #fff,
    inset 0 -2px 6px rgba(60,64,70,.3),
    0 16px 44px -10px rgba(210,214,220,.5),
    0 2px 8px rgba(0,0,0,.6);
}
.btn-primary::before { background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.9) 48%, rgba(255,255,255,.2) 54%, transparent 66%); }
.arrow {
  position: relative;
  width: 16px; height: 1.5px;
  background: currentColor;
  transition: width .5s var(--ease-out);
}
.arrow::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 7px; height: 7px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  transform-origin: 70% 30%;
}
.btn-primary:hover .arrow { width: 22px; }

.btn-ghost {
  color: var(--frost);
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 13.5px;
  font-weight: 400;
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.9);
}
.btn-ghost:hover { border-color: rgba(255,255,255,.34); background-color: rgba(255,255,255,.05); }

a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--frost);
  outline-offset: 4px;
}

/* ---------- foot ---------- */
.foot p {
  margin: 0;
  font-family: "Geist Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--slate);
  color: #7e838a; /* 5.3:1 on black */
  text-align: center;
  text-shadow: 0 0 6px #000, 0 0 12px #000;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

/* ---------- portrait / phones ---------- */
@media (max-aspect-ratio: 5/6) {
  .planet-slot {
    --size: 190vw;
    top: 40dvh;
  }
  .headline { font-size: min(13.4vw, 7.4dvh); max-width: 7.2em; }
  .sub { font-size: 15px; }
  .tools { gap: 6px; }
  .tools li { font-size: 12px; padding: 8px 11px 8px 10px; }
  .foot p { margin-top: 10px; }
  .offer { flex-direction: column; gap: 16px; text-align: center; }
  .price { justify-content: center; }
  .ctas { justify-content: center; }
}

@media (max-width: 420px) {
  .clock #clock-text { display: none; }
  .btn { height: 48px; padding: 0 18px; gap: 10px; }
  .btn-ghost { font-size: 12.5px; padding: 0 16px; }
  .offer { gap: 14px 18px; }
}

/* short landscape screens: shed the extras before anything clips */
@media (max-height: 700px) and (min-aspect-ratio: 5/6) {
  .tools li:nth-child(n+4) { display: none; }
  .foot { display: none; }
}
@media (max-height: 540px) and (min-aspect-ratio: 5/6) {
  .tools { display: none; }
  .sub { max-width: 30em; }
}
@media (max-height: 740px) and (max-aspect-ratio: 5/6) {
  .tools { display: none; }
  .foot { display: none; }
}

.still *, .still *::before, .still *::after { animation: none !important; transition: none !important; }
.still #sky { opacity: 1; transition: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
  }
}

/* build-time still of the planet alone (used to render the fallback image) */
.still-planet .page { display: none; }
.still-planet .planet-slot { --size: 100vmin; top: 0; left: 0; right: auto; transform: none; }

.debug .headline { -webkit-text-fill-color: rgba(255,0,0,.55) !important; }
