/* Selune marketing site — palette and type mirror the app (mobile/lib/theme/midnight.dart) */

@font-face {
  font-family: 'Fraunces';
  src: url('../fonts/Fraunces-var.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('../fonts/Inter-var.ttf') format('truetype-variations');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --night: #0e1230;
  --violet: #1a1740;
  --surface: #191735;
  --raised: #221e44;
  --silver: #c9d2e3;
  --muted: #97a0b6;
  --lavender: #9b8fd4;
  --gold: #e4c88a;
  --hairline: rgba(155, 143, 212, 0.18);
  --gold-faint: rgba(228, 200, 138, 0.25);
  color-scheme: dark;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--night);
  color: var(--silver);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--lavender); text-decoration: none; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 1.5rem; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 480;
  line-height: 1.15;
  color: var(--silver);
}

.eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--lavender);
}

/* ---- header ---- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(14, 18, 48, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.75rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.3rem;
  font-weight: 520;
  color: var(--silver);
}
.brand:hover { color: var(--silver); }
.brand svg { display: block; }
.site-nav { display: flex; gap: 1.75rem; font-size: 0.9rem; }

/* ---- hero ---- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 7rem 0 6.5rem;
  background: linear-gradient(180deg, var(--night) 0%, var(--violet) 130%);
}
.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr);
  gap: 3rem;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  font-variation-settings: 'opsz' 144, 'SOFT' 100, 'WONK' 1;
  margin: 1rem 0 1.5rem;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold);
}
.hero .lede {
  max-width: 34rem;
  font-size: 1.15rem;
  color: var(--muted);
  margin-bottom: 2.5rem;
}
.hero-moon {
  justify-self: center;
  filter: drop-shadow(0 0 70px rgba(228, 200, 138, 0.28));
}
.stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.stars .tw1 { animation: twinkle 7s ease-in-out infinite alternate; }
.stars .tw2 { animation: twinkle 9s ease-in-out 2s infinite alternate-reverse; }
@keyframes twinkle {
  from { opacity: 0.9; }
  to { opacity: 0.25; }
}

/* ---- store buttons ---- */

.store-row { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.store {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1.5rem 0.75rem 1.25rem;
  border-radius: 14px;
  line-height: 1.25;
}
.store .caption {
  display: block;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.store .name { display: block; font-size: 1.1rem; font-weight: 650; }
.store-play {
  background: var(--gold);
  color: var(--night);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.store-play:hover {
  color: var(--night);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(228, 200, 138, 0.35);
}
.store-play .caption { color: rgba(14, 18, 48, 0.65); }
.store-ios {
  border: 1px solid var(--hairline);
  background: var(--surface);
  color: var(--muted);
  opacity: 0.55;
  cursor: not-allowed;
}
.store-ios .caption { color: var(--lavender); }

/* ---- sections ---- */

.section { padding: 6rem 0; }
.section-head { max-width: 40rem; margin-bottom: 3.5rem; }
.section-head h2 {
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  margin: 0.75rem 0 1rem;
}
.section-head p { color: var(--muted); }

/* ---- lunar feature timeline ---- */

.phases { list-style: none; position: relative; max-width: 44rem; }
.phases::before {
  content: '';
  position: absolute;
  top: 2.5rem;
  bottom: 2.5rem;
  left: 19px;
  width: 1px;
  background: var(--hairline);
}
.phases li {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 1.5rem;
  padding: 1.6rem 0;
}
.phase-glyph {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--night);
  border: 1px solid var(--hairline);
  border-radius: 50%;
}
.phases .phase-name {
  display: block;
  margin-bottom: 0.2rem;
}
.phases h3 { font-size: 1.35rem; margin-bottom: 0.5rem; }
.phases p { color: var(--muted); max-width: 36rem; }
.phases li.full-moon {
  margin-top: 1.5rem;
  padding: 1.75rem;
  background: var(--raised);
  border: 1px solid var(--gold-faint);
  border-radius: 18px;
}
.phases li.full-moon .phase-glyph {
  background: var(--raised);
  filter: drop-shadow(0 0 14px rgba(228, 200, 138, 0.4));
}

/* ---- download ---- */

.download {
  background: linear-gradient(180deg, var(--violet), var(--night));
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  text-align: center;
}
.download .section-head { margin: 0 auto 2.5rem; }
.download .store-row { justify-content: center; }
.download .fine-print {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--muted);
}

/* ---- contact ---- */

.contact { text-align: center; }
.contact .section-head { margin: 0 auto 2rem; }
.btn-mail {
  display: inline-block;
  padding: 0.85rem 1.9rem;
  border: 1px solid var(--gold-faint);
  border-radius: 14px;
  color: var(--gold);
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.btn-mail:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(228, 200, 138, 0.08);
}

/* ---- footer ---- */

.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-brand { display: inline-flex; align-items: center; gap: 0.5rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 1.5rem; }

/* ---- legal pages ---- */

.prose {
  max-width: 68ch;
  padding: 4.5rem 0 6rem;
}
.prose h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); margin: 0.75rem 0 0.5rem; }
.prose .effective { color: var(--muted); font-size: 0.9rem; margin-bottom: 3rem; }
.prose h2 {
  font-size: 1.3rem;
  margin: 2.5rem 0 0.75rem;
}
.prose p, .prose ul { margin-bottom: 1rem; color: var(--silver); }
.prose ul { padding-left: 1.4rem; }
.prose li { margin-bottom: 0.4rem; }
.prose .summary {
  background: var(--raised);
  border: 1px solid var(--gold-faint);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2.5rem;
}
.prose .summary p { margin: 0; }

/* ---- responsive ---- */

@media (max-width: 780px) {
  .hero { padding: 4.5rem 0 5rem; }
  .hero .wrap { grid-template-columns: 1fr; gap: 2.5rem; }
  .hero-moon { order: -1; width: 150px; height: auto; }
  .section { padding: 4.5rem 0; }
  .site-nav { gap: 1.1rem; font-size: 0.85rem; }
  .phases li.full-moon { padding: 1.5rem 1.1rem; }
  .site-footer .wrap { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stars .tw1, .stars .tw2 { animation: none; }
  .store-play { transition: none; }
}
