/* Familjen Grotesk, self-hosted. SIL Open Font License; see fonts/OFL.txt */
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/familjen-grotesk-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Familjen Grotesk";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("/fonts/familjen-grotesk-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/*
  Brand tokens - see brand/brand-guide.html for roles, proportions, and rules.
  Primary     Deep Space  #003249  text, headings, hero and closing-band backgrounds
  Secondary   Cerulean    #007EA7  buttons on light, rules, card tops, markers
  Accent      Marigold    #F2A93B  one call to action per view, with Deep Space text
  Accent      Cream       #FFE3A8  emphasis text on Deep Space (the "if")
  Supporting  Frost       #9AD1D4  light cool tint for large areas, never text on white
  Neutral     Mist        #CCDBDC  lines, dividers, quiet backgrounds
  Working colors (not identity colors): paper, white, muted text, link blue, error red.
*/
:root {
  --deep-space: #003249;
  --cerulean: #007ea7;
  --marigold: #f2a93b;
  --cream: #ffe3a8;
  --frost: #9ad1d4;
  --mist: #ccdbdc;

  /* Approved tints (color mixed with white) */
  --frost-20: #ebf6f6;
  --cerulean-10: #e6f2f6;

  --warm: var(--marigold);
  --warm-hover: #f7bc62;
  --tertiary: var(--frost);
  --secondary: var(--cerulean);

  --bg: #f5f9f9;
  --bg-alt: #e3ebec;
  --surface: #ffffff;
  --text: #003249;
  --muted: #43606f;
  --line: #ccdbdc;
  --card-line: #86a0a8;
  --shadow-1: 0 1px 2px rgba(0, 50, 73, .06), 0 3px 10px rgba(0, 50, 73, .06);
  --shadow-2: 0 2px 4px rgba(0, 50, 73, .08), 0 14px 30px rgba(0, 50, 73, .14);
  --card-shadow: var(--shadow-1);
  --input-line: #7d97a0;
  --link: #006a8e;          /* secondary, darkened for 5:1+ text contrast */
  --btn-bg: #007ea7;
  --btn-text: #ffffff;
  --btn-hover: #006a8e;
  --if-bar: #007ea7;        /* marigold is ~2:1 on light, so light pages use cerulean */
  --marker: #007ea7;
  --focus: #007ea7;
  --danger: #b42318;

  --hero-bg: #003249;
  --hero-text: #ffffff;
  --hero-muted: #ccdbdc;
  --yes-bg: var(--frost-20);
  --dot-1: #003249;          /* first wordmark dot: Deep Space on light, Frost on dark */

  --sans: "Familjen Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #001f2d;
    --bg-alt: #00283a;
    --surface: #003249;
    --text: #e8f1f2;
    --muted: #9db8c1;
    --line: #0d4a64;
    --card-line: #1d5f7d;
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .35);
    --shadow-2: 0 2px 4px rgba(0, 0, 0, .4), 0 14px 30px rgba(0, 0, 0, .45);
    --input-line: #3d7b96;
    --link: #9ad1d4;
    --btn-bg: #9ad1d4;
    --btn-text: #003249;
    --btn-hover: #b5e0e2;
    --if-bar: #f2a93b;
    --marker: #f2a93b;
    --focus: #9ad1d4;
    --danger: #ff8a80;

    --hero-bg: #003249;
    --yes-bg: #05364d;
    --dot-1: #9ad1d4;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 68rem; margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 2rem; } }

a { color: var(--link); }
h1, h2, h3 { line-height: 1.12; margin: 0 0 1rem; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 6vw, 4.25rem); max-width: 20ch; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; }

/* The "if": an underline set below the letters, never through them */
.if {
  font-style: normal;
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--if-bar);
  text-decoration-thickness: .09em;
  text-underline-offset: .16em;
  text-decoration-skip-ink: none;
  white-space: nowrap;
}

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--bg); padding: .5rem 1rem; z-index: 10; }

.nav { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.nav-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1rem; min-height: 3.75rem; padding-top: .35rem; padding-bottom: .35rem; }
.nav nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.25rem; }
.nav nav a:not(.btn) { color: var(--text); text-decoration: none; font-size: .95rem; font-weight: 500; padding: .25rem 0; border-bottom: 2px solid transparent; }
.nav nav a:not(.btn):hover { border-bottom-color: var(--line); }
.nav nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--marker); }
@media (max-width: 36rem) { .nav nav { gap: .25rem .9rem; } .nav nav a:not(.btn) { font-size: .9rem; } }

.wordmark { display: inline-flex; align-items: baseline; font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; line-height: 1; color: var(--text); text-decoration: none; }
.dots { display: inline-flex; align-items: baseline; margin-left: .1em; }
.dots i { display: inline-block; width: .19em; height: .19em; border-radius: 50%; margin-right: .08em; }
.dots i:nth-child(1) { background: var(--dot-1); }
.dots i:nth-child(2) { background: var(--cerulean); }
.dots i:nth-child(3) { background: var(--marigold); }
.dots i:last-child { margin-right: 0; }

.btn {
  display: inline-block; background: var(--btn-bg); color: var(--btn-text);
  border: 0; border-radius: .5rem; padding: .8rem 1.5rem; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--btn-hover); }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn-small { padding: .4rem 1rem; font-size: .95rem; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost:hover { background: transparent; opacity: .8; }

section { padding: 3.5rem 0; }
@media (min-width: 40rem) { section { padding: 5rem 0; } }

.hero { background: var(--hero-bg); color: var(--hero-text); padding-top: 4rem; }
@media (min-width: 40rem) { .hero { padding-top: 7rem; padding-bottom: 6rem; } }
.hero .eyebrow { color: var(--hero-muted); }
.hero .lead { color: var(--hero-muted); }
.hero .if { color: var(--cream); text-decoration: none; }
.hero .btn:not(.btn-ghost) { background: var(--warm); color: #003249; }
.hero .btn:not(.btn-ghost):hover { background: var(--warm-hover); }
.hero a:focus-visible { outline-color: var(--tertiary); }

.page-head { padding-top: 3.5rem; padding-bottom: 2rem; }
@media (min-width: 40rem) { .page-head { padding-top: 5rem; } }
.page-head h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .78rem; font-weight: 700; color: var(--link); margin: 0 0 1.25rem; }
.lead { font-size: 1.25rem; max-width: 40rem; color: var(--muted); margin: 1.5rem 0 2rem; }
.section-intro { max-width: 42rem; color: var(--muted); margin: 0 0 2.5rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; }

.alt { background: var(--bg-alt); }

.pairs { display: grid; gap: 1rem; }
.pair { display: grid; border: 1px solid var(--line); border-radius: .75rem; overflow: hidden; background: var(--surface); }
@media (min-width: 48rem) { .pair { grid-template-columns: 1fr 1fr; } }
.pair p { margin: 0; padding: 1.1rem 1.25rem; }
.no { color: var(--muted); }
.struck { text-decoration: line-through; text-decoration-thickness: 1px; }
.yes { border-top: 1px solid var(--line); font-weight: 600; background: var(--yes-bg); }
@media (min-width: 48rem) { .yes { border-top: 0; border-left: 1px solid var(--line); } }
.tag { display: block; font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: .25rem; }
.yes .tag { color: var(--link); }

.cards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.card { border: 1px solid var(--line); border-top: 4px solid var(--secondary); border-radius: .75rem; padding: 1.5rem; display: flex; flex-direction: column; background: var(--surface); }
.card p { margin: 0 0 1rem; color: var(--muted); }
.card .yesif { margin: auto 0 0; color: var(--text); font-size: .95rem; padding-top: .75rem; border-top: 1px solid var(--line); }
.card .yesif strong { color: var(--link); }
.card ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--muted); font-size: .98rem; }

.service-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
@media (min-width: 40rem) { .service-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 64rem) { .service-list { grid-template-columns: repeat(3, 1fr); } }
.service-list a { display: block; padding: 1rem 1.25rem; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); color: var(--text); text-decoration: none; font-weight: 700; }
.service-list a::after { content: " →"; color: var(--link); }
.service-list a:hover { border-color: var(--secondary); }

.steps { list-style: none; counter-reset: step; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(4, 1fr); } }
.steps li { counter-increment: step; padding-top: 1rem; border-top: 3px solid var(--secondary); }
.steps li::before { content: counter(step, decimal-leading-zero); display: block; font-weight: 700; color: var(--link); margin-bottom: .25rem; }

.scenarios { display: grid; gap: 1.25rem; margin-bottom: 1.75rem; }
@media (min-width: 48rem) { .scenarios { grid-template-columns: repeat(2, 1fr); } }
.scenario { border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); overflow: hidden; display: flex; flex-direction: column; }
.scenario p { margin: 0; padding: 1.1rem 1.4rem; }
.scenario .idea { font-size: 1.2rem; font-weight: 700; line-height: 1.3; letter-spacing: -0.01em; flex: 1; }
.scenario .answer { background: var(--yes-bg); border-top: 1px solid var(--line); font-weight: 500; }
.scenario .answer .tag { color: var(--link); }
/* Align the quote/answer split across each row of cards */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 48rem) { .scenario { display: grid; grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; } }
}
.credibility { color: var(--muted); max-width: 44rem; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 56rem) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stats strong { display: block; font-size: 2rem; line-height: 1.1; font-weight: 700; color: var(--link); }
.stats span { color: var(--muted); font-size: .95rem; }

.about-grid { display: grid; gap: 3rem; }
@media (min-width: 56rem) { .about-grid { grid-template-columns: 1.4fr 1fr; align-items: start; } }
.proof ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: .75rem; background: var(--surface); }
.proof li { padding: 1.1rem 1.25rem; border-top: 1px solid var(--line); display: grid; gap: .1rem; }
.proof li:first-child { border-top: 0; }
.proof strong { font-size: 1.5rem; line-height: 1.1; color: var(--link); }
.proof span { color: var(--muted); font-size: .95rem; }
.creds { padding-left: 1.1rem; color: var(--muted); }

.cta { background: var(--hero-bg); color: var(--hero-text); }
.cta h2 { max-width: 24ch; }
.cta p { color: var(--hero-muted); max-width: 36rem; }
.cta .if { color: var(--cream); text-decoration: none; }
.cta .btn { background: var(--warm); color: #003249; }
.cta .btn:hover { background: var(--warm-hover); }

.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1fr 1.2fr; align-items: start; } }
.direct { color: var(--muted); margin: .25rem 0; }
form label { display: block; font-weight: 700; font-size: .95rem; margin: 0 0 .35rem; }
form input, form textarea {
  width: 100%; margin: 0 0 1.1rem; padding: .75rem .9rem; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: .5rem;
}
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
#form-status { margin: 1rem 0 0; min-height: 1.5rem; font-weight: 600; }
#form-status.ok { color: var(--link); }
#form-status.err { color: var(--danger); }

footer { border-top: 1px solid var(--line); padding: 2rem 0; color: var(--muted); font-size: .9rem; }
.foot { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; justify-content: space-between; align-items: center; }
.foot nav { display: flex; gap: 1.25rem; }
.foot nav a { color: var(--muted); }

.service-group { padding: 2.5rem 0; }
.service-group:first-of-type { padding-top: 1rem; }
.service-group h2 { font-size: 1.6rem; }
.service-group .section-intro { margin-bottom: 1.5rem; }
.card .situation { color: var(--text); font-weight: 600; }
.groups { display: grid; gap: 1.25rem; }
@media (min-width: 48rem) { .groups { grid-template-columns: repeat(3, 1fr); } }
.group-card { border: 1px solid var(--line); border-top: 4px solid var(--secondary); border-radius: .75rem; padding: 1.25rem 1.5rem; background: var(--surface); }
.group-card h3 { margin-bottom: .3rem; }
.group-card p { color: var(--muted); margin: 0 0 .75rem; }
.group-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.group-card a { font-weight: 600; }
form select { width: 100%; margin: 0 0 1.1rem; padding: .75rem .9rem; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: .5rem; }
select:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Card separation: visible edge and soft shadow so white cards lift off paper and tinted sections */
.pair, .scenario, .proof ul, .service-list a { border-color: var(--card-line); box-shadow: var(--card-shadow); }
.card, .group-card { border-left-color: var(--card-line); border-right-color: var(--card-line); border-bottom-color: var(--card-line); box-shadow: var(--card-shadow); }
.yes, .scenario .answer { border-color: var(--card-line); }
form input, form textarea, form select { border-color: var(--input-line); }


.bridge { margin-top: 3rem; }
.bridge-lead { font-size: 1.25rem; color: var(--muted); margin: 0 0 2rem; }
.statement { border-left: 4px solid var(--secondary); padding-left: 1.5rem; }
.statement h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); margin-bottom: .75rem; }
.statement p { margin: 0; color: var(--muted); font-size: 1.125rem; }

.form-note { font-size: .9rem; color: var(--muted); margin: 1rem 0 0; }
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.35rem; margin: 2rem 0 .5rem; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1rem; }

/* Quiet elevation: cards rest with a soft, navy-tinted shadow and lift slightly on hover; the header detaches on scroll */
.card, .group-card, .scenario, .service-list a { transition: transform .2s ease, box-shadow .2s ease; }
.card:hover, .group-card:hover, .scenario:hover, .service-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.btn { transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-1); }
.nav { transition: box-shadow .2s ease; }
.nav.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 20px rgba(0, 50, 73, .08); }
@media (prefers-color-scheme: dark) { .nav.scrolled { box-shadow: 0 1px 0 var(--line), 0 8px 20px rgba(0, 0, 0, .35); } }
@media (prefers-reduced-motion: reduce) {
  .card, .group-card, .scenario, .service-list a, .btn, .nav { transition: none; }
  .card:hover, .group-card:hover, .scenario:hover, .service-list a:hover, .btn:hover { transform: none; }
}

/* Hero artwork: three stepped cards, one per dot of the wordmark (idea, ifs, plan). Hidden on small screens. */
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
.hero-art { display: none; }
@media (min-width: 60rem) {
  .hero-grid { grid-template-columns: 1.1fr .9fr; }
  .hero-art { display: block; }
  .hero-art svg { display: block; width: 100%; height: auto; max-width: 470px; margin-left: auto; }
}

.about-side { display: grid; gap: 1.5rem; align-content: start; }
.headshot { margin: 0; max-width: 26rem; }
.headshot img { display: block; width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 1rem; border: 1px solid var(--card-line); box-shadow: var(--shadow-1); }

.contact-lede { font-size: 1.2rem; color: var(--text); margin: 0 0 2rem; max-width: 30rem; }
.contact-sub { font-size: 1.05rem; margin: 0 0 .75rem; }
.next-steps { list-style: none; counter-reset: n; padding: 0; margin: 0 0 2rem; display: grid; gap: .75rem; max-width: 30rem; }
.next-steps li { counter-increment: n; position: relative; padding-left: 2.25rem; }
.next-steps li::before { content: counter(n); position: absolute; left: 0; top: .1rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--secondary); color: #fff; font-size: .85rem; font-weight: 700; display: grid; place-items: center; }
