/* Halcyon – one stylesheet for every page.
   Direction D1 (2026-11-18): a deep-water band with the sun on a full-width horizon, ivory pages below.
   Each app's own page keeps that app's colours in its hero. No external requests. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2");
}
@font-face {  /* Cub Rhythms' own title face, used only on its card and page */
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/assets/fonts/fraunces-latin-600-normal.woff2") format("woff2");
}

:root {
  --deep: #142D38;        /* deep water */
  --mist: #829698;        /* sea mist: horizon and water lines (decoration only) */
  --sun: #E9A04F;         /* the sun: the mark and the hero, never text */
  --ivory: #ECE7DC;       /* page */
  --ivory-2: #E3DDD0;     /* quiet panels */
  --line: #CFC7B7;        /* hairlines */
  --ink: #142D38;         /* headings */
  --text: #33454A;        /* body, 8:1 on ivory */
  --muted: #4E5F64;       /* secondary, 5.4:1 on ivory */
  --link: #1F5F6E;        /* 6:1 on ivory */
  --on-deep: #F3F0E8;
  --on-deep-2: #C9D3D3;   /* 9:1 on deep */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --max: 1120px;
  --read: 720px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--text); font: 400 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { color: var(--ink); }
a { color: var(--link); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 3px; }
img, svg { display: block; max-width: 100%; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--on-deep); color: var(--deep); padding: 8px 12px; z-index: 10; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 32px; }

/* ---------- The deep-water band and header ---------- */
.band { background: var(--deep); color: var(--on-deep); }
.band--sub { border-bottom: 1.5px solid var(--mist); }   /* subpages: the band ends on the horizon */
.site-header .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; padding-top: 24px; padding-bottom: 24px; }
.band--sub .site-header .wrap { padding-top: 18px; padding-bottom: 18px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--on-deep); text-decoration: none; font: 600 22px/1 var(--serif); }
.brand:hover { color: var(--on-deep); }
.brand svg { width: 30px; height: 30px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 8px 32px; font-size: 15px; }
.site-nav a { color: var(--on-deep-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--on-deep); }

/* ---------- Home hero: headline in the sky, the sun on a full-width horizon ---------- */
.sky { padding-top: 72px; padding-bottom: 96px; }
.sky h1 { margin: 0; max-width: 640px; color: var(--on-deep); font: 500 clamp(40px, 5.4vw, 64px)/1.05 var(--serif); letter-spacing: -0.015em; }
.sky p { margin: 28px 0 0; max-width: 520px; font-size: 18px; color: var(--on-deep-2); }
.sky .more { font-size: 15px; }
.sky .more a { color: var(--on-deep); }
.horizon { border-top: 1.5px solid var(--mist); padding-bottom: 28px; }
.sunrise { width: 360px; margin: -70px 0 0 auto; }    /* the svg's horizon (y = 70) sits on the line */

/* ---------- Sections on ivory ---------- */
.section { padding-top: 80px; padding-bottom: 40px; }
.section h2 { margin: 0; font: 600 30px/1.2 var(--serif); }
.section .intro { margin: 8px 0 28px; color: var(--muted); }

/* App index: rows, so it keeps working with many apps */
.app-row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; padding: 28px 0; border-top: 1px solid var(--line); }
.app-row:last-child { border-bottom: 1px solid var(--line); }
.app-row img { width: 64px; height: 64px; border-radius: 14px; flex: none; }
.app-row .tile-cub { background: #2A2330; }
.app-row .body { flex: 1 1 380px; min-width: 0; }
.app-row h3 { margin: 0; font-size: 22px; font-weight: 600; }
.app-row h3 a { color: var(--ink); text-decoration: none; }
.app-row h3 a:hover { text-decoration: underline; }
.app-row p { margin: 6px 0 0; }
.app-row .meta { flex: 0 1 230px; font-size: 15px; color: var(--muted); line-height: 1.7; }

/* How we build */
.how { display: flex; flex-wrap: wrap; gap: 32px 72px; padding-top: 56px; padding-bottom: 88px; }
.how > div { flex: 1 1 360px; min-width: 0; }
.how h2 { margin: 0; font: 600 30px/1.2 var(--serif); }
.how p { font-size: 17px; margin: 18px 0 0; }
.facts { flex: 1 1 360px; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 32px; align-content: start; font-size: 15px; }
.facts dt { font-weight: 600; color: var(--ink); }
.facts dd { margin: 4px 0 0; color: var(--muted); }

/* ---------- App pages: each app's own colours in its hero ---------- */
.app-hero .wrap { display: flex; flex-wrap: wrap; gap: 48px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.app-hero .lead { flex: 1 1 460px; min-width: 0; }
.app-hero img.icon { width: 88px; height: 88px; border-radius: 20px; }
.app-hero h1 { margin: 24px 0 0; font-size: 52px; line-height: 1.05; }
.app-hero .kind { margin: 10px 0 0; font-size: 18px; }
.app-hero .pitch { margin: 24px 0 0; font-size: 18px; max-width: 540px; }
.app-hero .avail { margin: 28px 0 0; font-size: 15px; }
.shots { flex: 1 1 380px; display: flex; gap: 20px; justify-content: center; }
.shots img { width: 200px; height: auto; border-radius: 22px; }
.shots img + img { margin-top: 48px; }

.app-hero--rt { background: #18344A; color: #D2DDE4; }
.app-hero--rt h1 { color: #FFFFFF; font-weight: 700; letter-spacing: -0.02em; }
.app-hero--rt .kind { color: #FFB300; }
.app-hero--cub { background: #1F1A24; color: #DCCCD3; }
.app-hero--cub h1 { color: #F5EAE4; font-family: Fraunces, Georgia, serif; font-weight: 600; }
.app-hero--cub .kind { color: #F4B455; }

.features { display: flex; flex-wrap: wrap; gap: 32px 48px; margin-top: 32px; }
.feature { flex: 1 1 300px; min-width: 0; border-top: 1.5px solid var(--ink); padding-top: 18px; }
.feature h3 { margin: 0; font-size: 18px; font-weight: 600; }
.feature ul { margin: 12px 0 0; padding-left: 18px; }
.feature li { margin: 4px 0; }

.split { display: flex; flex-wrap: wrap; gap: 24px 72px; padding-top: 56px; padding-bottom: 24px; }
.split > h2 { flex: 1 1 240px; margin: 0; font: 600 30px/1.2 var(--serif); }
.split > .body { flex: 3 1 560px; min-width: 0; }
.split > .body > p:first-child { margin-top: 0; }
.split:last-of-type { padding-bottom: 80px; }
.faq { margin: 0; }
.faq > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.faq > div:first-child { padding-top: 0; }
.faq dt { font-weight: 600; font-size: 17px; color: var(--ink); }
.faq dd { margin: 6px 0 0; }
.note { font-size: 14px; color: var(--muted); }

/* ---------- Policy pages: one reading column ---------- */
.doc { max-width: var(--read); margin: 0 auto; padding: 48px 32px 88px; }
.doc-app { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; font-weight: 500; }
.doc-app a { color: var(--ink); text-decoration: none; }
.doc-app img { width: 48px; height: 48px; border-radius: 12px; }
.doc h1 { margin: 0; font: 600 clamp(32px, 4.5vw, 44px)/1.1 var(--serif); }
.doc .meta { margin: 12px 0 32px; color: var(--muted); font-size: 15px; }
.doc h2 { margin: 44px 0 10px; font: 600 24px/1.3 var(--serif); }
.doc p, .doc li { font-size: 17px; line-height: 1.7; }
.doc b, .doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 8px 0; }
.summary { background: var(--ivory-2); border-radius: 4px; padding: 20px 24px; }
.summary p { margin: 0; }

/* ---------- Footer and 404 ---------- */
.site-footer { border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; padding-top: 36px; padding-bottom: 48px; font-size: 15px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.notfound { padding-top: 80px; padding-bottom: 120px; }
.notfound h1 { margin: 0 0 12px; font: 600 40px/1.1 var(--serif); }

@media (max-width: 560px) {
  .wrap { padding-left: 20px; padding-right: 20px; }
  .sky { padding-top: 40px; padding-bottom: 72px; }
  .sunrise { width: 240px; margin-top: -46.67px; }
  .app-hero h1 { font-size: 42px; }
  .shots img { width: 150px; }
  .facts { grid-template-columns: repeat(1, minmax(0, 1fr)); }
}
