/* Fresh Coast RF website: shared styles for index.html, cross-checks.html and greenhouse.html.
   One copy of the brand tokens and components. Copy this file with any page you publish.
   Tokens match .claude/skills/fcrf-design. --link is the darker blue the app pages use for text
   on white, because lake blue (#168BBD) on white is about 3.9:1 and text needs 4.5:1. Lake blue
   stays for fills, rules and accents. */
:root {
  --navy: #0B2946;
  --lake: #168BBD;
  --link: #0f6f99;
  --ink: #111;
  --muted: #4a5663;
  --line: #d9e3ea;
  --tint: #f3f8fb;
  /* Surface and text roles. Dark mode below changes these and leaves --navy and --lake alone. */
  --bg: #fff; --card: #fff; --heading: var(--navy); --band: var(--navy); --rule: var(--navy);
  --button: #0f6f99; --button-hover: var(--navy);
  --max: 960px;
  --hero-h: 300px;
  --measure: 68ch;
}
/* Dark mode follows the visitor's device setting until they pick one with the header toggle (theme.js
   sets data-theme on <html>). Values match the app pages (apps.freshcoastrf.com).
   Navy bands stay navy; --button stays dark enough for white text. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #08131f; --card: #0f2033; --tint: #0f2033; --ink: #e8eef4; --muted: #a3b3c2; --line: #1e3550;
    --link: #5cc0ea; --heading: #fff; --rule: var(--lake); --button-hover: #0c5a7d;
  }
}
:root[data-theme="dark"] {
    --bg: #08131f; --card: #0f2033; --tint: #0f2033; --ink: #e8eef4; --muted: #a3b3c2; --line: #1e3550;
    --link: #5cc0ea; --heading: #fff; --rule: var(--lake); --button-hover: #0c5a7d;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
section, .hero { scroll-margin-top: 96px; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 2px; }
a:hover { color: var(--heading); }
a:focus-visible, .button:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--lake); outline-offset: 3px; border-radius: 3px;
}
.dark a:focus-visible, .hero a:focus-visible, footer a:focus-visible { outline-color: #fff; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
h1, h2, h3 { color: var(--heading); line-height: 1.2; }
h2 { font-size: 1.7rem; margin: 0 0 .6em; }
h3 { font-size: 1.15rem; margin: 1.6em 0 .4em; }
/* Keep running text to a readable line length. Grids and cards set their own widths. */
section p, section ul, section ol { max-width: var(--measure); }
ul, ol { padding-left: 1.3em; }
li { margin: .35em 0; }
.small { font-size: .92rem; color: var(--muted); }
.intro { font-size: 1.1rem; }

/* Header */
header { border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 10; }
header .wrap { display: flex; align-items: center; gap: 16px; min-height: 92px; flex-wrap: nowrap; }
header img { height: 76px; width: auto; display: block; }
nav { display: flex; gap: 4px; }
nav a {
  color: var(--heading); text-decoration: none; font-weight: 600; font-size: .95rem;
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 6px;
}
nav a:hover { color: var(--link); background: var(--tint); }
nav { margin-left: auto; }

/* Logo swap and the light/dark toggle */
.logo-dark { display: none !important; }
:root[data-theme="dark"] .logo-light { display: none !important; }
:root[data-theme="dark"] .logo-dark { display: block !important; }
#theme-toggle {
  display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line); border-radius: 50%; background: var(--card); color: var(--heading); cursor: pointer; padding: 0;
}
#theme-toggle:hover { border-color: var(--link); color: var(--link); }
#theme-toggle svg { width: 20px; height: 20px; }
#theme-toggle .sun { display: none; }
:root[data-theme="dark"] #theme-toggle .sun { display: block; }
:root[data-theme="dark"] #theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none !important; }
  :root:not([data-theme="light"]) .logo-dark { display: block !important; }
  :root:not([data-theme="light"]) #theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) #theme-toggle .moon { display: none; }
}

/* Navy bands */
.hero, .dark { background: var(--band); color: #fff; }
.dark { border-bottom: 4px solid var(--lake); }
/* Every page's navy title band is the same height on desktop. */
.hero { padding: 40px 0; min-height: var(--hero-h); display: flex; align-items: center; }
.hero > .wrap { width: 100%; }
.page-hero { color: #fff; padding: 60px 0 36px; }
.hero h1, .page-hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .4em; }
.hero p, .page-hero p { font-size: 1.2rem; max-width: 40em; margin: 0; color: #dbe8f2; }
.hero p { margin-bottom: 1.8em; }
.hero .note, .page-hero .note { font-size: .95rem; margin: 1em 0 0; color: #a9c4d8; }

/* Buttons: one solid style on white, a white one on navy, and an outline for the second choice */
.button {
  display: inline-block; background: var(--button); color: #fff; text-decoration: none;
  font-weight: 600; padding: 12px 24px; border-radius: 6px; border: 2px solid var(--button);
}
.button:hover { background: var(--button-hover); border-color: var(--button-hover); color: #fff; }
.hero .button, .dark .button { background: #fff; border-color: #fff; color: var(--navy); }
.hero .button:hover, .dark .button:hover { background: #dbe8f2; border-color: #dbe8f2; color: var(--navy); }
.hero .button.ghost, .dark .button.ghost { background: transparent; color: #fff; margin-left: 10px; }
.hero .button.ghost:hover, .dark .button.ghost:hover { background: #fff; color: var(--navy); }

/* Sections */
section { padding: 64px 0; border-bottom: 1px solid var(--line); }
section.tint { background: var(--tint); }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.cols > div > h3:first-child { margin-top: 0; }

/* Points: a short heading and a paragraph, side by side, with a rule above. For a set of parallel ideas. */
.points { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 1.4em; }
.points > div { border-top: 2px solid var(--rule); padding-top: 14px; }
.points h3 { margin: 0 0 .4em; }
.points p { margin: 0 0 .6em; }
.points p:last-child { margin-bottom: 0; }

/* Cards: only for a set of like items that each stand alone (features, areas). */
.work { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 1.2em; }
.card { border: 1px solid var(--line); border-radius: 6px; padding: 20px 22px; background: var(--card); }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

/* Checklist: two columns of short items with a check mark */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 32px; padding: 0; margin: 0 0 1.2em; max-width: none; }
.checklist li { list-style: none; position: relative; padding-left: 1.6em; margin: 0; }
.checklist li::before { content: "\2713"; position: absolute; left: 0; color: var(--link); font-weight: 700; }

/* Figures */
figure { margin: 1.6em 0 0; }
figure a { display: block; }
.shot { display: block; width: 100%; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.dark .shot { border-color: #24496d; }
figcaption { font-size: .92rem; color: var(--muted); margin-top: .6em; }
.dark figcaption { color: #a9c4d8; text-align: center; }

footer { background: var(--band); color: #c9d9e6; padding: 36px 0; font-size: .92rem; }
footer a { color: #fff; }
footer p { margin: .4em 0; max-width: 80ch; }

@media (max-width: 820px) {
  .points { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  /* On a phone the header scrolls away with the page so it does not take a sixth of the screen. */
  header { position: static; }
  header .wrap { padding-top: 8px; padding-bottom: 4px; min-height: 0; gap: 0; flex-wrap: wrap; }
  #theme-toggle { margin-left: auto; }
  header img { height: 48px; }
  nav { width: 100%; justify-content: flex-end; gap: 0; order: 3; margin-left: 0; }
  #theme-toggle { width: 36px; height: 36px; }
  .checklist { grid-template-columns: 1fr; }
  nav a { padding: 0 6px; }
  nav a:first-child { padding-left: 0; }
  nav a:last-child { padding-right: 0; }
  .cols, .work { grid-template-columns: 1fr; gap: 16px; }
  .hero { padding: 44px 0 52px; min-height: 0; }
  .hero .button { display: block; text-align: center; }
  .hero .button.ghost { margin: 12px 0 0; }
  .page-hero { padding: 40px 0 28px; }
  section { padding: 44px 0; }
  section, .hero { scroll-margin-top: 16px; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Current page in the header */
nav a[aria-current="page"] { background: var(--tint); box-shadow: inset 0 -3px 0 var(--lake); }
@media (max-width: 900px) and (min-width: 721px) { header img { height: 60px; } }
