/* Solilol: "nocturnal fairy tale" theme. Dark only, mobile first. */

@font-face {
  font-family: "Cormorant Garamond";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-style: italic;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/cormorant-garamond-latin-600-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/inter-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/inter-latin-600-normal.woff2") format("woff2");
}

:root {
  --night-950: #08061a;
  --night-900: #0d0a26;
  --night-800: #161036;
  --violet-700: #2b1a5c;
  --violet-500: #6a4fc0;
  --gold-200: #f8e7b0;
  --gold-300: #f1d27f;
  --gold-400: #e2b54c;
  --ink: #f6f1ff;
  --ink-muted: #cfc6ea;
  --pastel-pink: #f8c8e4;
  --pastel-lilac: #cdbcff;
  --pastel-mint: #b9f2e4;
  --pastel-sky: #bfe1ff;
  --iridescent: linear-gradient(120deg, var(--pastel-pink), var(--pastel-lilac), var(--pastel-sky), var(--pastel-mint), var(--pastel-pink));
  --surface: rgba(22, 16, 54, 0.72);
  --surface-strong: rgba(43, 26, 92, 0.55);
  --border: rgba(241, 210, 127, 0.28);
  --focus: var(--gold-300);
  --radius: 18px;
  --gutter: 16px;
  --font-display: "Cormorant Garamond", "Cormorant", Garamond, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background-color: var(--night-900);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
}

/* Night sky: gradient plus two twinkling star layers, fixed behind the content. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 90% 55% at 50% -10%, rgba(106, 79, 192, 0.55), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 100%, rgba(248, 200, 228, 0.12), transparent 70%),
    linear-gradient(180deg, var(--night-950) 0%, var(--night-900) 35%, var(--violet-700) 100%);
}
.sky::before,
.sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-repeat: no-repeat;
  animation: twinkle 5s ease-in-out infinite alternate;
}
.sky::before {
  background-image:
    radial-gradient(circle at 8% 12%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 22% 4%, var(--gold-200) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 37% 18%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 63% 7%, var(--pastel-sky) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 81% 15%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 93% 32%, var(--gold-200) 0 1px, transparent 2px),
    radial-gradient(circle at 14% 46%, var(--pastel-pink) 0 1px, transparent 2px),
    radial-gradient(circle at 72% 54%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 46% 71%, var(--gold-200) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 88% 82%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 5% 90%, var(--pastel-mint) 0 1px, transparent 2px);
}
.sky::after {
  animation-delay: -2.5s;
  background-image:
    radial-gradient(circle at 15% 25%, var(--gold-200) 0 1px, transparent 2px),
    radial-gradient(circle at 31% 9%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 54% 26%, var(--pastel-lilac) 0 1px, transparent 2px),
    radial-gradient(circle at 75% 3%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 96% 10%, var(--gold-200) 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 28% 58%, #fff 0 1px, transparent 2px),
    radial-gradient(circle at 60% 40%, var(--gold-200) 0 1px, transparent 2px),
    radial-gradient(circle at 84% 66%, var(--pastel-pink) 0 1px, transparent 2px),
    radial-gradient(circle at 19% 78%, #fff 0 1.5px, transparent 2.5px),
    radial-gradient(circle at 66% 92%, var(--pastel-sky) 0 1px, transparent 2px);
}
@keyframes twinkle {
  from { opacity: 0.25; }
  to { opacity: 1; }
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  padding: 8px 12px;
  border-radius: 8px;
  background: var(--gold-300);
  color: var(--night-950);
  font-weight: 600;
}
.skip:focus { top: 8px; }

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

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

a { color: var(--gold-300); text-underline-offset: 3px; }
a:hover { color: var(--gold-200); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}
h2 { font-size: 1.75rem; color: var(--gold-300); }
h3 { font-size: 1.3rem; }

code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow-wrap: anywhere;
}

/* Layout */
.masthead,
main,
.footer {
  width: 100%;
  max-width: 40rem;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.masthead { padding-top: 28px; padding-bottom: 8px; text-align: center; }
.brand {
  margin: 0;
  font-family: var(--font-display);
  font-style: italic;
  font-size: 2.4rem;
  line-height: 1;
  color: var(--gold-300);
  text-shadow: 0 0 18px rgba(241, 210, 127, 0.35);
}
.tagline { margin: 8px 0 0; color: var(--ink-muted); font-size: 0.95rem; }

main { display: grid; gap: 20px; padding-top: 16px; padding-bottom: 24px; }

.card {
  position: relative;
  padding: 20px var(--gutter);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Hero: iridescent hairline border */
.hero {
  text-align: center;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--night-800), var(--night-800)) padding-box,
    var(--iridescent) border-box;
  padding-top: 24px;
  padding-bottom: 24px;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(205, 188, 255, 0.18), transparent 70%);
  pointer-events: none;
}
.hero > * { position: relative; }
.eyebrow {
  margin: 0 0 4px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pastel-lilac);
}
.hero h1 {
  font-size: clamp(2.1rem, 9vw, 2.9rem);
  background: var(--iridescent);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 9s ease-in-out infinite alternate;
}
@keyframes shimmer {
  from { background-position: 0% 50%; }
  to { background-position: 100% 50%; }
}
.hero-when { margin: 0 0 16px; color: var(--ink); }

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 12px;
}
.cd-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px 8px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface-strong);
}
.cd-num {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: clamp(1.6rem, 8vw, 2.4rem);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--gold-200);
}
.cd-label {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}
.cd-done {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold-300);
}

.hint { margin: 8px 0 0; font-size: 0.875rem; color: var(--ink-muted); }

.btn {
  display: inline-block;
  margin-top: 16px;
  min-width: 70%;
  padding: 14px 24px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-200), var(--gold-400));
  color: var(--night-950);
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration: none;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset, 0 8px 24px rgba(226, 181, 76, 0.35);
}
.btn:hover { color: var(--night-950); filter: brightness(1.06); }

.btn-ghost {
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: transparent;
  color: var(--gold-300);
  font: inherit;
  font-size: 0.9rem;
  cursor: pointer;
}
.btn-ghost:hover { background: rgba(241, 210, 127, 0.1); }

.badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(205, 188, 255, 0.5);
  color: var(--pastel-lilac);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  vertical-align: middle;
  white-space: nowrap;
}
.badge-gold { border-color: var(--gold-300); color: var(--gold-300); }
.badge-muted { border-color: rgba(207, 198, 234, 0.4); color: var(--ink-muted); }

/* Milestones */
.steps { list-style: none; margin: 0; padding: 0; }
.step {
  position: relative;
  padding: 12px 0 12px 22px;
  border-top: 1px solid rgba(241, 210, 127, 0.14);
}
.step:first-child { border-top: 0; }
.step::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 21px;
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  background: var(--gold-300);
  box-shadow: 0 0 10px rgba(241, 210, 127, 0.6);
}
.step h3 { margin-bottom: 2px; }
.step p { margin: 0; }
.step-reminder { font-size: 0.875rem; color: var(--ink-muted); }
.step.is-past { opacity: 0.7; }
.step.is-past::before { background: var(--ink-muted); box-shadow: none; }
.step.is-next h3 { color: var(--gold-200); }

/* Checklist */
.checklist { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.checklist label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(241, 210, 127, 0.16);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
}
.checklist input {
  flex: none;
  width: 22px;
  height: 22px;
  margin: 1px 0 0;
  accent-color: var(--gold-400);
}
.checklist label:has(input:checked) { border-color: rgba(241, 210, 127, 0.5); background: rgba(241, 210, 127, 0.07); }
.checklist-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
}
.checklist-footer[hidden] { display: none; }
.progress { margin: 0; color: var(--ink-muted); font-size: 0.9rem; }

.tips, .howto { margin: 8px 0 0; padding-left: 1.25rem; display: grid; gap: 8px; }
.tips li::marker { color: var(--gold-300); content: "✦  "; }
.howto li::marker { color: var(--gold-300); font-weight: 600; }
.topic { color: var(--gold-200); }

.footer {
  padding-top: 8px;
  padding-bottom: 32px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-muted);
}
.footer p { margin: 4px 0; }

@media (min-width: 40rem) {
  .masthead { padding-top: 40px; }
  .brand { font-size: 3rem; }
  .card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .sky::before,
  .sky::after,
  .hero h1 { animation: none; }
  .sky::after { opacity: 0.6; }
}
