/* Biorythm site: always-dark, matches the app (lib/design/tokens.dart). No scripts, no external loads. */

@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/CormorantGaramond-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Cormorant Garamond";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/CormorantGaramond-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Inter-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Inter-Medium.ttf") format("truetype");
}
@font-face {
  font-family: "Inter";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("/fonts/Inter-SemiBold.ttf") format("truetype");
}

:root {
  color-scheme: dark;
  --deep: #04050d;
  --sky: #080b1f;
  --indigo: #15123a;
  --card: #1b1946;
  --ink: #f3f1fb;        /* 17.4:1 on --sky */
  --soft: #c3c0dc;       /* 11.0:1 on --sky, 9.3:1 on --card */
  --muted: #9d9abd;      /* 7.2:1 on --sky, 6.1:1 on --card */
  --accent: #b39cff;     /* violet (biorhythm), 8.5:1 on --sky */
  --accent-2: #5ff0b4;   /* space weather green, 13.5:1 on --sky */
  --moon: #b4cceb;
  --sun: #ffbe5c;
  --rose: #ff8fa3;
  --line: rgba(255, 255, 255, 0.14);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

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

html {
  background: var(--deep);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(180deg, var(--indigo) 0, var(--sky) 45%, var(--deep) 100%) var(--deep);
  color: var(--soft);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 3px solid var(--accent-2);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -4rem;
  z-index: 10;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: var(--sky);
  font-weight: 600;
  border-radius: 6px;
}
.skip-link:focus { top: 0.75rem; color: var(--sky); }

.wrap {
  width: 100%;
  max-width: 60rem;
  margin: 0 auto;
  padding-left: 16px;
  padding-right: 16px;
}

/* Header */
.site-header { padding: 1.1rem 0; }
.site-header .wrap { display: flex; align-items: center; gap: 0.75rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* Headings */
h1, h2, h3 { color: var(--ink); font-weight: 600; margin: 0; }
h1, h2 { font-family: var(--serif); line-height: 1.15; }
h2 { font-size: 2rem; margin-bottom: 0.9rem; }
h3 { font-size: 1.1rem; line-height: 1.3; margin-bottom: 0.35rem; }
p { margin: 0.75rem 0; }

/* Hero */
.hero { padding: 3rem 0 2.5rem; text-align: center; }
.hero h1 { font-size: min(3.4rem, 15vw); letter-spacing: 0.01em; }
.hero .lede { margin: 1rem auto 0; max-width: 34rem; }
.hero .coming { margin-top: 1.4rem; color: var(--accent); font-weight: 500; letter-spacing: 0.02em; }

.lede { font-size: 1.15rem; color: var(--soft); max-width: 40rem; }

/* Sections */
.section { padding: 2.75rem 0; }
.section + .section { border-top: 1px solid var(--line); }
.section > .wrap > p { max-width: 42rem; }

/* Feature cards */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
}
.cards > li, .card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
}
.cards img { display: block; width: 100%; max-width: 15rem; margin: 0 auto; border-radius: 12px; }
.cards p { margin: 0; font-size: 0.98rem; }
.card-cycles h3 { color: var(--accent); }
.card-moon h3 { color: var(--moon); }
.card-sun h3 { color: var(--sun); }
.card-weather h3 { color: var(--accent-2); }
.card-ready h3 { color: var(--rose); }

/* Screenshot strip: scrolls inside its own box on phones, grid on desktop */
.shots {
  display: flex;
  gap: 0.75rem;
  max-width: 100%;
  margin: 1.5rem 0 0;
  padding: 0 0 0.75rem;
  list-style: none;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.shots > li { flex: 0 0 auto; width: 10.5rem; scroll-snap-align: start; }
.shots img { display: block; width: 100%; border-radius: 12px; }

/* "Where Biorythm is going": quieter, visibly different */
.unfolding .wrap {
  border: 1px dashed rgba(179, 156, 255, 0.55);
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  width: calc(100% - 32px);
}
.unfolding h2 { color: var(--soft); }
.unfolding ul { margin: 1.25rem 0 0; padding-left: 1.25rem; color: var(--muted); }
.unfolding li { margin: 0.5rem 0; }
.unfolding li::marker { color: var(--accent); }
.unfolding .lede { color: var(--muted); }

/* Long-form text (privacy, delete pages) */
.prose { max-width: 46rem; margin: 0 auto; padding: 1.5rem 16px 4rem; }
.prose h1 { font-size: 2.6rem; margin-bottom: 0.4rem; }
.prose h2 { font-size: 1.6rem; margin: 2.4rem 0 0.5rem; }
.prose p, .prose li { margin: 0.55rem 0; }
.prose ul { padding-left: 1.25rem; }
.prose strong { color: var(--ink); font-weight: 600; }
.muted { color: var(--muted); }
.scroll { overflow-x: auto; max-width: 100%; }
.prose table {
  border-collapse: collapse;
  width: 100%;
  min-width: 34rem;
  margin: 0.75rem 0;
  font-size: 0.95rem;
}
.prose th, .prose td { border: 1px solid var(--line); padding: 0.5rem 0.65rem; text-align: left; vertical-align: top; }
.prose th { color: var(--ink); font-weight: 600; background: rgba(255, 255, 255, 0.05); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 2rem 0 3rem; color: var(--muted); font-size: 0.92rem; }
.site-footer p { margin: 0.5rem 0; }
.site-footer ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--soft); }
.site-footer a:hover { color: var(--ink); }

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: min(4.5rem, 15vw); }
  .unfolding .wrap { padding: 2rem 2rem; }
}

@media (min-width: 900px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
  .shots { display: grid; grid-template-columns: repeat(6, 1fr); overflow: visible; scroll-snap-type: none; }
  .shots > li { width: auto; }
  .hero { padding: 5rem 0 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
