/* culver.app: one stylesheet for every page. No build step. */

:root {
  color-scheme: light dark;
  /* the app's asset colours (Culver/Assets.xcassets), light */
  --navy: #1a3b6b;
  --navy-deep: #122a4e;
  --red: #e23a3a;
  --sand: #d1bca7;
  --ink: #2b2b2b;
  --bg: #ffffff;
  --bg-alt: #faf7f2;
  --card: #f4efe7;
  --muted: #6b665f;
  --line: #e7e0d6;
  --link: #1a3b6b;
  --badge-bg: #000;
  --badge-ink: #fff;
  --shadow: 0 1px 2px rgb(40 30 20 / 6%), 0 12px 32px rgb(40 30 20 / 10%);
  --radius: 22px;
  --max: 1120px;
  --gutter: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    /* the same colour sets' dark variants */
    --navy: #5a8ad6;
    --red: #f25555;
    --ink: #ededed;
    --bg: #1c1c1e;
    --bg-alt: #161412;
    --card: #23211f;
    --muted: #a39e97;
    --line: #34312d;
    --link: #7fa6e3;
    --badge-bg: #fff;
    --badge-ink: #000;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 12px 32px rgb(0 0 0 / 35%);
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 6px; }

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

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 20;
  background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }

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

.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--navy); text-decoration: none; }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand svg { width: 92px; }
.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: var(--ink); text-decoration: none; opacity: 0.8; }
.site-nav a:hover, .site-nav a[aria-current="page"] { opacity: 1; color: var(--navy); }
@media (max-width: 480px) { .site-nav .wide { display: none; } }

/* ---- type ---------------------------------------------------------------- */

h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; letter-spacing: -0.015em; margin: 0; }
h2 { font-size: clamp(32px, 5vw, 52px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }
.eyebrow {
  display: block; margin-bottom: 14px; font-size: 14px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--red);
}
.lede { font-size: clamp(19px, 2.4vw, 23px); line-height: 1.45; color: var(--muted); }
p { margin: 0 0 1em; }

/* ---- App Store badge --------------------------------------------------- */

/* TODO(owner): swap this for Apple's official "Download on the App Store"
   badge (see README) once the app has an App Store ID. */
.store {
  display: inline-flex; align-items: center; gap: 10px;
  height: 54px; padding: 0 22px 0 18px; border-radius: 14px;
  background: var(--badge-bg); color: var(--badge-ink); text-decoration: none;
  font: 600 18px/1 var(--font-display); letter-spacing: -0.01em;
  transition: transform 0.15s ease;
}
.store:hover { transform: translateY(-1px); text-decoration: none; }
.store small { display: block; font-size: 11.5px; font-weight: 500; letter-spacing: 0; margin-bottom: 3px; opacity: 0.85; }
.store svg { width: 24px; height: 24px; flex: none; }
.store-note { margin-top: 10px; font-size: 14px; color: var(--muted); }

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

.hero { text-align: center; padding: clamp(48px, 9vw, 96px) 0 0; overflow: hidden; }
.wordmark { color: var(--navy); width: min(440px, 78vw); margin: 0 auto; }
.wordmark svg { width: 100%; }
.tagline { margin: 16px 0 0; font-size: clamp(17px, 2.2vw, 21px); color: var(--muted); letter-spacing: 0.01em; }
.hero h2 { margin: clamp(28px, 5vw, 44px) auto 0; max-width: 20ch; }
.hero .lede { max-width: 34ch; margin: 18px auto 30px; }
.scene { position: relative; margin-top: clamp(28px, 6vw, 56px); }
.scene .globe {
  width: min(760px, 108vw); margin: 0 auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 72%);
  mask-image: linear-gradient(to bottom, #000 30%, transparent 72%);
}
.scene .flock {
  position: relative; width: min(1100px, 118vw); max-width: none;
  margin: max(-38%, -290px) 0 0 50%; transform: translateX(-50%);
}

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

.section { padding: clamp(64px, 10vw, 120px) 0; }
.section.alt { background: var(--bg-alt); }
.section-head { max-width: 720px; margin: 0 auto clamp(36px, 6vw, 56px); text-align: center; }
.section-head .lede { margin: 18px auto 0; }

.feature {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center; gap: clamp(32px, 6vw, 88px);
}
.feature.flip .feature-text { order: 2; }
.feature-text { max-width: 500px; }
.feature-text h2 { margin-bottom: 20px; }
.feature-text .lede { margin-bottom: 22px; }
.points { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.points li { position: relative; padding-left: 28px; }
.points li::before {
  content: ""; position: absolute; left: 4px; top: 0.6em; width: 9px; height: 9px;
  border-radius: 50%; background: var(--red); box-shadow: 0 0 0 2.5px var(--bg);
  outline: 1.5px solid color-mix(in srgb, var(--red) 40%, transparent);
}
.section.alt .points li::before { box-shadow: 0 0 0 2.5px var(--bg-alt); }
.feature-media { display: flex; justify-content: center; }

@media (max-width: 820px) {
  .feature { grid-template-columns: 1fr; }
  .feature.flip .feature-text { order: 0; }
  .feature-text { max-width: none; }
}

/* ---- phone frame (screenshots go in img/screens/) ---------------------- */

.phone {
  position: relative; width: min(300px, 72vw); aspect-ratio: 600 / 1300; margin: 0;
  padding: 11px; border-radius: 52px; background: #0d0d0f;
  box-shadow: var(--shadow), inset 0 0 0 1.5px #3a3a3e, inset 0 0 0 4px #0d0d0f;
}
.phone::after {   /* the Dynamic Island */
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 30%; height: 26px; border-radius: 14px; background: #000; z-index: 1;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 42px; background: var(--card); }

/* ---- breeding art ---------------------------------------------------------- */

.pair { width: min(620px, 100%); }

/* ---- breeds grid ------------------------------------------------------------- */

.breeds {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px;
}
.breeds li { background: var(--card); border-radius: var(--radius); padding: 14px 14px 16px; text-align: center; }
.breeds img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.breeds b { display: block; margin-top: 6px; font-size: 15px; font-weight: 600; line-height: 1.25; }
.breeds span { display: block; font-size: 13px; color: var(--muted); }
@media (max-width: 900px) { .breeds { grid-template-columns: repeat(3, minmax(0, 1fr)); } .breeds li:nth-child(n + 10) { display: none; } }
@media (max-width: 560px) { .breeds { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } .breeds li:nth-child(n + 9) { display: none; } }
.breeds-note { text-align: center; color: var(--muted); margin-top: 28px; font-size: 15px; }

/* ---- trust cards -------------------------------------------------------- */

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.card { background: var(--card); border-radius: var(--radius); padding: 26px 24px 22px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; margin: 0; }
.card .icon { width: 30px; height: 30px; color: var(--navy); margin-bottom: 16px; }
@media (max-width: 820px) { .cards { grid-template-columns: 1fr; } }

/* ---- closing call to action --------------------------------------------- */

.cta { text-align: center; }
.cta img.app-icon { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 26px; box-shadow: var(--shadow); }
.cta h2 { margin-bottom: 14px; }
.cta .lede { margin: 0 auto 28px; max-width: 30ch; }

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

.site-footer { border-top: 1px solid var(--line); padding: 32px 0 44px; font-size: 14px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); text-decoration: underline; }
.site-footer p { margin: 0; }

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

.doc { width: min(760px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: clamp(40px, 7vw, 72px) 0 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 46px); font-weight: 700; margin-bottom: 10px; }
.doc .meta { color: var(--muted); font-size: 15px; margin-bottom: 30px; }
.doc h2 { font-size: 24px; margin: 44px 0 12px; letter-spacing: -0.01em; }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc p, .doc li { color: var(--ink); }
.doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.doc li { margin-bottom: 0.45em; }
.doc .summary { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px; padding: 20px 24px 6px; margin-bottom: 8px; }
.doc .summary h2 { margin-top: 0; font-size: 19px; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 20px; font-size: 15px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
.doc th { font-weight: 600; }
.doc .toc { columns: 2; column-gap: 32px; font-size: 15px; padding-left: 1.2em; }
@media (max-width: 560px) {
  .doc .toc { columns: 1; }
  .doc table, .doc tbody, .doc tr, .doc td, .doc th { display: block; }
  .doc thead { display: none; }
  .doc tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .doc td { border: 0; padding: 2px 0; }
  .doc td:first-child { font-weight: 600; }
}

/* the FAQ: native disclosure, no script */
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 32px 14px 0; position: relative;
  font-weight: 600; font-size: 17.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 9px; height: 9px; margin-top: -7px;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { color: var(--muted); }

.contact-box { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 18px; padding: 22px 24px; margin: 18px 0 8px; }
.contact-box p { margin: 0; }
.contact-box a { font-weight: 600; }

/* owner input still needed: obvious on purpose; remove each as it's filled in */
.todo { background: #ffe58a; color: #3a2e00; border-radius: 4px; padding: 0 4px; font-weight: 600; }

/* ---- 404 ----------------------------------------------------------------- */
.lost { text-align: center; padding: clamp(64px, 12vw, 140px) 0; }
.lost img { width: min(240px, 60vw); margin: 0 auto 24px; }
.lost h1 { font-size: clamp(30px, 5vw, 44px); margin-bottom: 14px; }
