:root {
  color-scheme: dark;
  --background: #080d17;
  --text: #edf3fb;
  --muted: #8795aa;
  --accent: #a9d6fb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--background); }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  color: var(--text);
  background: var(--background);
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button { font: inherit; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; }
::selection { color: #080d17; background: #a9d6fb; }
.ambient, #sky, #celebration { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.ambient {
  background:
    radial-gradient(ellipse at 18% 18%, #19304c66 0, transparent 52%),
    radial-gradient(ellipse at 87% 85%, #20355350 0, transparent 48%),
    radial-gradient(ellipse at 50% 50%, #17263b44 0, transparent 55%);
  transition: opacity 1.2s;
}
.orbit {
  position: fixed;
  top: 50%; left: 50%;
  width: min(1350px, 118vw);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: .75;
}
#celebration { z-index: 4; }
.masthead, .page, .footer { position: relative; z-index: 2; }
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 38px 52px;
}
.signature { font-size: 19px; font-weight: 600; letter-spacing: -.035em; }
.signature-mark { display: inline-block; margin-right: 9px; color: var(--accent); font-size: 23px; vertical-align: -1px; font-weight: 400; }
.date { font-size: 12px; color: #a8b5c7; letter-spacing: .1em; }
.page { display: grid; place-items: center; flex: 1; padding: 30px 32px 42px; }
.scene { width: min(940px, 100%); }
.intro { text-align: center; margin-bottom: 46px; }
.eyebrow { margin: 0 0 19px; color: var(--accent); font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; }
h1 { margin: 0; font-size: clamp(35px, 4.4vw, 62px); line-height: 1.12; letter-spacing: -.055em; font-weight: 450; }
.intro h1 span { color: var(--accent); }
.subtitle { margin: 17px 0 0; color: var(--muted); font-size: 14px; letter-spacing: .005em; line-height: 1.6; }
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 37px 18px 33px;
  border: 1px solid #bddeff16;
  border-radius: 24px;
  background: linear-gradient(135deg, #202e425b, #0c14203d);
  box-shadow: 0 24px 90px #00000024, inset 0 1px #ffffff03;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.unit { position: relative; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.unit + .unit::before { content: ""; position: absolute; left: 0; top: 13%; bottom: 17%; width: 1px; background: linear-gradient(transparent, #c0d8f52b, transparent); }
.number { display: block; font-size: clamp(58px, 8.2vw, 112px); font-weight: 300; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums lining-nums; }
.seconds .number { color: var(--accent); }
.label { margin-top: 18px; font-size: 10px; color: #96a5b9; letter-spacing: .16em; text-transform: uppercase; }
.journey { width: min(460px, 74%); margin: 36px auto 0; }
.journey-caption { display: flex; justify-content: space-between; gap: 18px; color: var(--muted); font-size: 11px; }
#progressText { font-variant-numeric: tabular-nums; color: #a9bad0; }
progress { display: block; appearance: none; border: 0; width: 100%; height: 2px; border-radius: 2px; margin: 13px 0 9px; overflow: hidden; background: #7891b326; }
progress::-webkit-progress-bar { background: #7891b326; }
progress::-webkit-progress-value { background: linear-gradient(90deg, #638aa9, #b6dcfa); border-radius: 2px; }
progress::-moz-progress-bar { background: linear-gradient(90deg, #638aa9, #b6dcfa); border-radius: 2px; }
.journey-years { display: flex; justify-content: space-between; font-size: 10px; letter-spacing: .1em; color: #667990; }
.footer { display: flex; justify-content: center; padding: 14px 24px 37px; }
.preview-button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 10px 17px; border: 1px solid #a9c7ee1f;
  border-radius: 100px; color: #a0b1c7; background: #12203436;
  font-size: 12px; cursor: pointer;
  transition: color .2s, border-color .2s, background-color .2s;
}
.preview-button:hover { color: var(--text); border-color: #a9c7ee66; background: #293c5450; }
.preview-button svg { color: var(--accent); }
.button-arrow { margin-left: 6px; color: var(--accent); }
.birthday { text-align: center; padding: 24px 0 36px; }
.birthday .eyebrow { margin-bottom: 10px; }
.birthday-date { margin: 0 0 17px; font-size: clamp(100px, 16vw, 208px); font-weight: 250; line-height: 1.05; letter-spacing: -.055em; font-variant-numeric: tabular-nums; color: #edf3fb; text-shadow: 0 0 65px #b5dfff1c; }
.birthday-date span { color: var(--accent); margin: 0 .02em; font-weight: 200; }
.birthday h1 { font-size: clamp(32px, 4.5vw, 60px); }
.birthday-wish { color: #aeb9c9; font-size: 15px; line-height: 1.7; margin: 20px 0 0; }
body.is-birthday { --accent: #f0d0a0; }
body.is-birthday .ambient { opacity: .6; }
body.is-birthday .birthday-date { text-shadow: 0 0 75px #f0d0a022; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.noscript { text-align: center; color: var(--muted); line-height: 1.7; }
@media (max-width: 600px) {
  .masthead { padding: 25px 24px; }
  .signature { font-size: 17px; }
  .date { font-size: 10px; letter-spacing: .07em; }
  .page { padding: 25px 20px 30px; }
  .scene { max-width: 460px; }
  .intro { margin-bottom: 32px; }
  .eyebrow { font-size: 9px; letter-spacing: .19em; margin-bottom: 16px; }
  h1 { font-size: clamp(33px, 8.7vw, 45px); }
  .subtitle { font-size: 12px; margin-top: 14px; }
  .countdown { padding: 29px 6px 25px; border-radius: 19px; }
  .number { font-size: clamp(33px, 10.7vw, 59px); }
  .label { font-size: 8px; margin-top: 13px; letter-spacing: .06em; }
  .journey { width: 84%; margin-top: 29px; }
  .journey-caption { font-size: 10px; gap: 8px; }
  .journey-years { font-size: 9px; }
  .orbit { width: 200vw; opacity: .65; }
  .footer { padding-bottom: max(26px, env(safe-area-inset-bottom)); }
  .birthday-wish { max-width: 275px; margin: 18px auto 0; font-size: 13px; }
  .birthday { padding: 18px 0 24px; }
}
@media (max-height: 650px) and (min-width: 601px) {
  .masthead { padding: 19px 32px; }
  .page { padding-top: 12px; padding-bottom: 12px; }
  .intro { margin-bottom: 25px; }
  .countdown { padding-top: 20px; padding-bottom: 20px; }
  .number { font-size: 76px; }
  .journey { margin-top: 20px; }
  .footer { padding-bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
