/* Dreamoon — dreamoon.app
   Night palette: ink-blue sky, moonlight cream, a little candle amber. No JavaScript. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fraunces-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 700;
  font-display: swap;
  src: url("/fonts/fraunces-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("/fonts/figtree-normal.woff2") format("woff2");
}

:root {
  --ink: #060917;
  --night: #0a0f24;
  --night-2: #101836;
  --moon: #f4ecd8;
  --moon-dim: #d8cfb9;
  --amber: #f0c27b;
  --text: #e2e3ee;
  --muted: #a3a8c3;
  --faint: #6f7596;
  --line: rgba(244, 236, 216, 0.12);
  --panel: rgba(244, 236, 216, 0.045);
  --serif: "Fraunces", "Iowan Old Style", Georgia, serif;
  --sans: "Figtree", "Avenir Next", "Segoe UI", sans-serif;
  --gutter: clamp(20px, 5vw, 64px);
  --max: 1180px;
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background-color: var(--night);
  /* Scrolls with the page (iOS Safari ignores fixed backgrounds); glows are sized in px so long pages don't stretch them. */
  background-image:
    radial-gradient(900px 640px at 78% 140px, rgba(240, 194, 123, 0.1), transparent 62%),
    radial-gradient(1400px 900px at 70% -80px, rgba(80, 104, 190, 0.22), transparent 70%),
    linear-gradient(180deg, var(--night-2) 0, var(--night) 1100px, var(--ink) 100%);
  background-repeat: no-repeat;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Stars: two tiled layers, the second one breathes. */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
}
body::before {
  background-image:
    radial-gradient(1px 1px at 40px 60px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 190px 140px, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 310px 40px, rgba(255, 244, 220, 0.8), transparent),
    radial-gradient(1px 1px at 420px 260px, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 520px 120px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 90px 330px, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1.5px 1.5px at 250px 420px, rgba(255, 244, 220, 0.55), transparent),
    radial-gradient(1px 1px at 560px 480px, rgba(255, 255, 255, 0.35), transparent);
  background-size: 600px 520px;
  opacity: 0.8;
}
body::after {
  background-image:
    radial-gradient(1.5px 1.5px at 130px 210px, rgba(255, 248, 230, 0.9), transparent),
    radial-gradient(1px 1px at 380px 90px, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 470px 370px, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(2px 2px at 60px 460px, rgba(240, 194, 123, 0.6), transparent);
  background-size: 640px 560px;
  animation: twinkle 7s ease-in-out infinite alternate;
}

/* Film grain keeps the dark gradients from banding. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.page {
  position: relative;
  z-index: 2;
}

a {
  color: var(--moon);
  text-decoration-color: rgba(244, 236, 216, 0.35);
  text-underline-offset: 0.22em;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}
a:hover {
  color: var(--amber);
  text-decoration-color: var(--amber);
}
:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: 16px;
  top: 12px;
  z-index: 10;
  padding: 8px 14px;
  background: var(--moon);
  color: var(--ink);
  border-radius: 999px;
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 28px;
  padding-bottom: 28px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 420;
  font-variation-settings: "SOFT" 100, "opsz" 48;
  letter-spacing: -0.01em;
  color: var(--moon);
  text-decoration: none;
}
.wordmark svg {
  width: 26px;
  height: 26px;
  flex: none;
}

.nav {
  display: flex;
  gap: clamp(16px, 3vw, 32px);
  font-size: 0.95rem;
}
.nav a {
  color: var(--muted);
  text-decoration: none;
}
.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--moon);
}

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  min-height: min(82vh, 760px);
  padding-top: clamp(24px, 6vh, 72px);
  padding-bottom: clamp(48px, 10vh, 120px);
}

.eyebrow {
  margin: 0 0 22px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber);
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 380;
  font-variation-settings: "SOFT" 100, "opsz" 144;
  color: var(--moon);
  letter-spacing: -0.02em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.7rem, 6.4vw, 5.6rem);
  line-height: 1.02;
}
.hero h1 em {
  font-style: italic;
  font-weight: 340;
  color: var(--amber);
}

.lead {
  max-width: 34ch;
  margin: 28px 0 0;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem);
  line-height: 1.6;
  color: var(--muted);
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 40px;
}

.soon {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 13px 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  font-weight: 500;
  color: var(--moon);
  backdrop-filter: blur(6px);
}
.soon .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 0 rgba(240, 194, 123, 0.6);
  animation: pulse 3.2s ease-out infinite;
}

.down {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.98rem;
}

/* The moon: a lit disc, a few craters, and a soft shadow that drifts so the phase slowly changes. */
.sky {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
}
.halo {
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  border: 1px solid rgba(244, 236, 216, 0.07);
}
.halo + .halo {
  inset: -20%;
  border-color: rgba(244, 236, 216, 0.04);
}
.moon {
  position: relative;
  width: 78%;
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 36% 30%, #fffaf0 0%, #f6eedb 30%, #e6dabd 68%, #cdbf9b 100%);
  box-shadow:
    0 0 60px 6px rgba(244, 236, 216, 0.16),
    0 0 180px 50px rgba(240, 194, 123, 0.07);
  animation: float 14s ease-in-out infinite;
}
.moon::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 62%, rgba(150, 132, 98, 0.32) 0 7%, transparent 8%),
    radial-gradient(circle at 58% 40%, rgba(150, 132, 98, 0.22) 0 4.5%, transparent 5.5%),
    radial-gradient(circle at 44% 78%, rgba(150, 132, 98, 0.2) 0 3.5%, transparent 4.5%),
    radial-gradient(circle at 22% 38%, rgba(150, 132, 98, 0.18) 0 3%, transparent 4%),
    radial-gradient(circle at 66% 66%, rgba(150, 132, 98, 0.16) 0 9%, transparent 11%),
    radial-gradient(ellipse 40% 26% at 40% 50%, rgba(170, 152, 116, 0.18), transparent 70%);
}
.shade {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(8, 12, 30, 0.97) 58%, rgba(8, 12, 30, 0) 71%);
  transform: translateX(58%);
  animation: phase 40s ease-in-out infinite alternate;
}

/* ---------- Sections ---------- */

.section {
  /* Only vertical padding: the horizontal gutter comes from .wrap. */
  padding-top: clamp(64px, 11vh, 128px);
  padding-bottom: clamp(64px, 11vh, 128px);
}

.section-head {
  max-width: 40ch;
  margin-bottom: clamp(36px, 6vh, 64px);
}
.section-head h2 {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  line-height: 1.08;
}
.section-head p {
  margin: 18px 0 0;
  color: var(--muted);
}

.kicker {
  display: block;
  margin-bottom: 14px;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--faint);
}

/* Two kinds of content, offset like two pages of a bedside book. */
.pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}
.card {
  position: relative;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--line);
  border-radius: 28px;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(240, 194, 123, 0.07), transparent 60%),
    var(--panel);
}
.card + .card {
  margin-top: clamp(0px, 9vw, 120px);
}
.card h3 {
  margin: 0 0 16px;
  font-size: clamp(1.7rem, 2.8vw, 2.35rem);
  line-height: 1.12;
}
.card p {
  margin: 0;
  color: var(--muted);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  color: var(--moon-dim);
}
.length {
  display: inline-block;
  margin-top: 26px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--faint);
}

/* A night, minute by minute. Each step is dimmer than the last: the page falls asleep too. */
.night {
  position: relative;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.night::before {
  content: "";
  position: absolute;
  top: 9px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(240, 194, 123, 0.6), rgba(244, 236, 216, 0.15) 70%, transparent);
}
.night li {
  position: relative;
  padding-top: 40px;
}
.night li::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 0;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 18px rgba(240, 194, 123, 0.55);
}
.night time {
  display: block;
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 360;
  font-variation-settings: "SOFT" 100, "opsz" 72;
  color: var(--moon);
}
.night p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.night .s2 {
  opacity: 0.82;
}
.night .s3 {
  opacity: 0.64;
}
.night .s4 {
  opacity: 0.46;
}
.night .s5 {
  opacity: 0.26;
}
.night .s2::before,
.night .s3::before,
.night .s4::before {
  background: var(--moon-dim);
  box-shadow: none;
}
.night .s5::before {
  background: transparent;
  border: 1px solid var(--moon-dim);
  box-shadow: none;
}

.features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: 28px;
  overflow: hidden;
  background: var(--line);
}
.feature {
  padding: clamp(24px, 3vw, 36px);
  background: var(--night);
}
.feature svg {
  width: 28px;
  height: 28px;
  color: var(--amber);
}
.feature h3 {
  margin: 18px 0 10px;
  font-size: 1.35rem;
  line-height: 1.2;
}
.feature p {
  margin: 0;
  font-size: 0.97rem;
  color: var(--muted);
}

.closing {
  text-align: center;
}
.closing h2 {
  margin: 0 auto;
  max-width: 18ch;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.05;
}
.closing h2 em {
  color: var(--amber);
}
.closing p {
  margin: 22px auto 0;
  max-width: 44ch;
  color: var(--muted);
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: clamp(32px, 6vh, 64px);
  padding: 40px 0 48px;
  border-top: 1px solid var(--line);
  font-size: 0.93rem;
  color: var(--faint);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 32px;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
}
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}
.site-footer a:hover {
  color: var(--moon);
}

/* ---------- Documents (privacy, terms, support) ---------- */

.doc {
  max-width: 72ch;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 56px) var(--gutter) clamp(48px, 8vh, 96px);
}
.doc h1 {
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
}
.doc .meta {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 0.95rem;
}
.doc h2 {
  margin: 56px 0 14px;
  font-size: 1.65rem;
  line-height: 1.2;
}
.doc h3 {
  margin: 30px 0 8px;
  font-size: 1.2rem;
}
.doc p,
.doc li {
  color: #cfd2e2;
}
.doc ul,
.doc ol {
  padding-left: 1.3em;
}
.doc li + li {
  margin-top: 8px;
}
.doc strong {
  color: var(--moon);
  font-weight: 600;
}
.summary {
  margin: 36px 0 0;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}
.summary h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
}
.summary ul {
  margin: 0;
}

.faq {
  margin-top: 40px;
}
.faq details {
  border-top: 1px solid var(--line);
  padding: 4px 0;
}
.faq details:last-of-type {
  border-bottom: 1px solid var(--line);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 0;
  font-family: var(--serif);
  font-size: 1.25rem;
  font-variation-settings: "SOFT" 100, "opsz" 48;
  color: var(--moon);
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  flex: none;
  font-family: var(--sans);
  font-size: 1.4rem;
  color: var(--amber);
  transition: transform 0.25s ease;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  margin: 0 0 20px;
}

.contact {
  margin-top: 48px;
  padding: 30px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background:
    radial-gradient(100% 120% at 0% 0%, rgba(240, 194, 123, 0.08), transparent 60%),
    var(--panel);
}
.contact h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.contact p {
  margin: 0;
}
.contact .mail {
  display: inline-block;
  margin-top: 14px;
  font-family: var(--serif);
  font-size: 1.35rem;
}

.lost {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
}
.lost h1 {
  margin: 0;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
}
.lost p {
  color: var(--muted);
}

/* ---------- Load-in ---------- */

.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.d1 {
  animation-delay: 0.1s;
}
.d2 {
  animation-delay: 0.25s;
}
.d3 {
  animation-delay: 0.45s;
}
.d4 {
  animation-delay: 0.65s;
}
.sky.rise {
  animation-duration: 2.4s;
  animation-delay: 0.2s;
}

@keyframes rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}
@keyframes phase {
  from {
    transform: translateX(50%);
  }
  to {
    transform: translateX(84%);
  }
}
@keyframes twinkle {
  from {
    opacity: 0.25;
  }
  to {
    opacity: 0.9;
  }
}
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(240, 194, 123, 0.55);
  }
  70%,
  100% {
    box-shadow: 0 0 0 12px rgba(240, 194, 123, 0);
  }
}

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .features {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .night {
    grid-template-columns: 1fr;
    gap: 26px;
    padding-left: 34px;
  }
  .night::before {
    top: 6px;
    bottom: 0;
    left: 6px;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg, rgba(240, 194, 123, 0.6), rgba(244, 236, 216, 0.15) 70%, transparent);
  }
  .night li {
    padding-top: 0;
  }
  .night li::before {
    top: 10px;
    left: -34px;
  }
}

@media (max-width: 760px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
    padding-top: 8px;
  }
  .sky {
    order: -1;
    width: min(64vw, 280px);
    justify-self: center;
  }
  .pair {
    grid-template-columns: 1fr;
  }
  .card + .card {
    margin-top: 0;
  }
  .features {
    grid-template-columns: 1fr;
  }
  .site-header {
    padding-top: 20px;
    padding-bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
  .rise {
    opacity: 1;
    transform: none;
  }
  .shade {
    transform: translateX(62%);
  }
}
