/* GodwitNav Solutions — site styles
   Palette and type are taken from the company business card
   (company_operations/business_card/godwitnav_card_print.html). */

:root {
  --navy: #0B2A4A;      /* logo shield navy; chart panels */
  --ink: #17324F;       /* body text on paper */
  --sky: #4FA3E8;       /* tracks, rules, graticule (strokes only on paper) */
  --sky-text: #1F6CB0;  /* sky darkened to pass AA as text on paper */
  --pale: #A5D1ED;      /* secondary text on navy */
  --sand: #E3C07A;      /* resolution / emphasis on navy */
  --sand-deep: #8A6420; /* sand darkened for use on paper */
  --paper: #F3EEE3;     /* chart paper */
  --paper-2: #EAE3D3;   /* recessed panels on paper */
  --rule: rgba(23, 50, 79, 0.22);
  --conflict: #C8503C;  /* the godwit's bill; loss of separation */

  --sans: "Outfit", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;

  --measure: 66ch;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5rem; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  font-feature-settings: "ss01";
}
img, svg { max-width: 100%; display: block; }
a { color: var(--sky-text); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 2px; }
.chart :focus-visible, .site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--sand); }

.skip { position: absolute; left: -999px; top: 0; background: var(--sand); color: var(--navy); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }

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

/* ---------- Type scale (perfect fourth, 1.333) ---------- */
h1, h2, h3 { font-weight: 600; line-height: 1.12; margin: 0 0 .6em; letter-spacing: -0.012em; color: var(--navy); }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.55rem); font-weight: 600; letter-spacing: -0.022em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.37rem); }
h3 { font-size: 1.333rem; line-height: 1.25; }
p { margin: 0 0 1em; max-width: var(--measure); }
.lede { font-size: 1.25rem; line-height: 1.5; max-width: 58ch; }
.num { font-family: var(--mono); font-size: .92em; letter-spacing: 0; }
small, .fine { font-size: .875rem; }

/* ---------- Header ---------- */
.site-header { background: var(--navy); color: var(--paper); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(165, 209, 237, .18); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.25rem; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.brand img { width: 44px; height: auto; }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: .005em; line-height: 1; }
.brand-name span { display: block; font-weight: 500; font-size: .7rem; letter-spacing: .32em; color: var(--sky); margin-top: .3rem; }
.nav ul { list-style: none; display: flex; gap: .25rem; margin: 0; padding: 0; }
.nav a { color: var(--pale); text-decoration: none; padding: .5rem .8rem; border-radius: 4px; font-weight: 500; font-size: .98rem; }
.nav a:hover { color: #fff; }
.nav a[aria-current="page"] { color: #fff; box-shadow: inset 0 -2px 0 var(--sand); border-radius: 0; }
.nav-toggle { display: none; }

@media (max-width: 940px) {
  .nav-toggle {
    display: inline-flex; align-items: center; gap: .5rem; background: none; color: #fff;
    border: 1px solid rgba(165, 209, 237, .4); border-radius: 4px; padding: .45rem .75rem; font: 500 .95rem var(--sans); cursor: pointer;
  }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-bottom: 1px solid rgba(165, 209, 237, .18); display: none; }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; padding: .5rem var(--gutter) 1rem; }
  .nav a { display: block; padding: .75rem 0; font-size: 1.05rem; }
  .nav a[aria-current="page"] { box-shadow: none; color: var(--sand); }
}

/* ---------- Chart panel (navy, graticule) — the hero and page heads ---------- */
.chart {
  background-color: var(--navy);
  color: var(--paper);
  /* Soft lighting for depth: a faint sky glow up top, deepening toward the bottom. */
  background-image:
    radial-gradient(120% 90% at 85% -10%, rgba(79, 163, 232, .16), transparent 60%),
    linear-gradient(180deg, #0C2D50 0%, #081F38 100%);
}
.chart h1, .chart h2, .chart h3 { color: #fff; }
.chart p { color: #DCE6EE; }
.chart a { color: var(--sand); }
.chart a:hover { color: #fff; }

/* Home hero */
.hero { position: relative; overflow: hidden; min-height: min(78vh, 720px); display: flex; align-items: center; padding-block: clamp(3.5rem, 9vw, 6rem); }
.hero-sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
/* Keep the copy side calm: the scene fades out behind the text. */
.hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, rgba(10, 38, 68, .96) 0%, rgba(10, 38, 68, .85) 38%, rgba(10, 38, 68, 0) 70%); }
.hero .wrap { position: relative; z-index: 1; width: min(var(--wrap), 100%); }
.hero-copy { max-width: 36rem; }
.hero h1 { max-width: 16ch; font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.sky-toggle { position: absolute; z-index: 2; right: var(--gutter); bottom: 1rem; background: none; border: 0; color: var(--pale); font: 500 .85rem var(--sans); cursor: pointer; padding: .4rem .5rem; opacity: .8; }
.sky-toggle:hover { opacity: 1; color: #fff; }
@media (max-width: 760px) { .hero::after { background: rgba(10, 38, 68, .78); } .hero { padding-bottom: 4.5rem; } .sky-toggle { bottom: .75rem; } }
.hero .lede { color: #DCE6EE; }
.hero .kicker { color: var(--sand); font-weight: 500; margin-bottom: .6rem; }
.hero-defense h1 { max-width: 19ch; font-size: clamp(2.1rem, 4.6vw, 3.5rem); }
.note { font-size: .92rem; color: #4A5F74; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.btn { display: inline-block; padding: .72rem 1.15rem; border-radius: 4px; font-weight: 600; text-decoration: none; font-size: 1rem; line-height: 1.2; }
.btn-primary { background: var(--sand); color: var(--navy); }
.chart .btn-primary { color: var(--navy); }
.btn-primary:hover { background: #F0D398; color: var(--navy); }
.btn-quiet { color: #fff; box-shadow: inset 0 0 0 1px rgba(165, 209, 237, .5); }
.chart .btn-quiet { color: #fff; }
.btn-quiet:hover { box-shadow: inset 0 0 0 1px var(--pale); color: #fff; }
.btn-ink { background: var(--navy); color: #fff; }
.btn-ink:hover { background: var(--ink); color: #fff; }

/* Inner page head */
.page-head { padding-block: clamp(2.25rem, 5vw, 3.75rem); }
.page-head .lede { color: #DCE6EE; }
.page-head .kicker { color: var(--sand); font-weight: 500; margin-bottom: .6rem; font-size: 1rem; }

/* ---------- Sections on paper ---------- */
.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section + .section { border-top: 1px solid var(--rule); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.section-head p { margin-bottom: 0; }

.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 4vw, 4rem); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }

/* Lines of work (home) — a ledger, not cards */
.lines { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.lines > li { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 6fr) minmax(0, 3fr); gap: 1rem 2rem; padding: 1.75rem 0; border-bottom: 1px solid var(--rule); }
.lines h3 { margin: 0; }
.lines h3 a { color: var(--navy); text-decoration: none; }
.lines h3 a:hover { text-decoration: underline; }
.lines p { margin: 0 0 .5rem; }
.lines .meta { font-size: .95rem; }
@media (max-width: 860px) { .lines > li { grid-template-columns: 1fr; gap: .5rem; } }

/* Status tags — encode real state; same four words everywhere */
.status { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--ink); white-space: nowrap; }
.status::before { content: ""; width: .6rem; height: .6rem; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.status.done { color: #2E6B55; }
.status.done::before { background: currentColor; }
.status.progress { color: var(--sky-text); }
.status.progress::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status.submitted { color: var(--sand-deep); }
.status.submitted::before { background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.status.planned { color: #5B6B7C; }
.status-legend { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }

/* Evidence figures */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 2rem; gap: 0; margin: 0; border-top: 2px solid var(--navy); }
.facts > div { padding: 1.25rem 1.25rem 1.25rem 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 2.1rem; font-weight: 600; color: var(--navy); line-height: 1.1; font-variant-numeric: tabular-nums; }
.facts dd { margin: .35rem 0 0; font-size: .98rem; max-width: 36ch; }
@media (max-width: 560px) { .facts { grid-template-columns: 1fr; } }

/* Definition lists / specs */
.spec { margin: 0; border-top: 1px solid var(--rule); }
.spec > div { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 5fr); gap: .25rem 1.5rem; padding: .9rem 0; border-bottom: 1px solid var(--rule); }
.spec dt { font-weight: 600; color: var(--navy); }
.spec dd { margin: 0; }
@media (max-width: 640px) { .spec > div { grid-template-columns: 1fr; } }

/* Ordered process — genuinely a sequence */
.chain { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 2px solid var(--navy); }
.chain li { counter-increment: step; padding: 1rem 1rem 1.1rem 0; border-bottom: 1px solid var(--rule); position: relative; }
.chain li::before { content: counter(step); display: block; font-family: var(--mono); font-size: .85rem; color: var(--sand-deep); margin-bottom: .3rem; }
.chain strong { display: block; color: var(--navy); }
.chain span { font-size: .92rem; }

/* Capability list */
.caps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2.5rem; }
.caps li { padding: 1.1rem 0; border-top: 1px solid var(--rule); }
.caps h3 { font-size: 1.12rem; margin-bottom: .35rem; }
.caps p { margin: 0; font-size: 1rem; }
@media (max-width: 760px) { .caps { grid-template-columns: 1fr; } }

/* Engagement table */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
caption { text-align: left; font-size: .95rem; padding-bottom: .75rem; color: var(--ink); }
th, td { text-align: left; vertical-align: top; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--rule); }
thead th { border-bottom: 2px solid var(--navy); color: var(--navy); font-weight: 600; font-size: .92rem; }
tbody th { color: var(--navy); font-weight: 600; min-width: 11rem; }
td.dur { white-space: nowrap; }
@media (max-width: 640px) {
  table, caption, thead, tbody, tr, th, td { display: block; }
  thead { position: absolute; left: -9999px; }
  tbody tr { padding: .75rem 0; border-bottom: 1px solid var(--rule); }
  tbody th, td { border: 0; padding: .15rem 0; }
  td.dur::before { content: "Duration: "; color: #5B6B7C; }
}

/* Callout for limits / non-claims — recessed, not alarming */
.limits { background: var(--paper-2); border-left: 3px solid var(--navy); padding: 1.25rem 1.5rem; border-radius: 0 4px 4px 0; }
.limits h3 { font-size: 1.12rem; }
.limits ul { margin: 0; padding-left: 1.1rem; }
.limits li { margin-bottom: .45rem; max-width: var(--measure); }
.limits p:last-child, .limits li:last-child { margin-bottom: 0; }

/* Publication list */
.pubs { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.pubs li { padding: 1.25rem 0; border-bottom: 1px solid var(--rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1.5rem; }
.pubs .title { font-weight: 600; color: var(--navy); font-size: 1.08rem; }
.pubs .by, .pubs .where { font-size: .98rem; margin: 0; }
.pubs .status { align-self: start; }
@media (max-width: 640px) { .pubs li { grid-template-columns: 1fr; } }

/* Diagrams on paper */
.diagram { margin: 0; }
.diagram svg { width: 100%; height: auto; }
.diagram figcaption { font-size: .9rem; margin-top: .75rem; max-width: var(--measure); color: #3E556C; }

/* Math */
.eq { font-family: var(--mono); font-size: .98rem; background: var(--paper-2); padding: .9rem 1.1rem; border-radius: 4px; overflow-x: auto; margin: 0 0 1.25rem; max-width: var(--measure); }
var { font-style: italic; font-family: Georgia, "Times New Roman", serif; }

/* Milestones */
.milestones { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.milestones li { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) 8.5rem; gap: .25rem 1.25rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); align-items: baseline; }
.milestones .id { font-family: var(--mono); color: var(--sand-deep); font-size: .95rem; }
.milestones strong { color: var(--navy); }
.milestones p { margin: .2rem 0 0; font-size: .98rem; }
@media (max-width: 640px) { .milestones li { grid-template-columns: 3.25rem minmax(0, 1fr); } .milestones .status { grid-column: 2; } }

/* Contact / company band */
.company { background: var(--paper-2); }
.reg { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.reg > div { padding: .7rem 1rem .8rem 0; }
.reg > div + div { border-left: 1px solid var(--rule); padding-left: 1rem; }
.reg dt { font-size: .85rem; color: #3E556C; }
.reg dd { margin: .15rem 0 0; font-family: var(--mono); color: var(--navy); font-size: 1rem; }
.reg dd.t { font-family: var(--sans); font-weight: 500; }
@media (max-width: 560px) { .reg > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); } }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--pale); padding-block: 2.5rem; font-size: .95rem; }
.site-footer .wrap { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem 2rem; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 .4rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .35rem; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(165, 209, 237, .18); padding-top: 1.25rem; font-size: .85rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }


.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-footer .motto { margin-top: .9rem; max-width: 40ch; font-style: italic; color: var(--pale); }

/* ---------- Shared animation band (research) ---------- */
.anim-band { margin-top: clamp(2rem, 4vw, 3rem); }
.anim-figure { margin: 0; border: 1px solid rgba(165, 209, 237, .22); border-radius: 8px; background: rgba(4, 20, 38, .55); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .6); overflow: hidden; }
.anim-figure canvas { display: block; width: 100%; height: auto; }
#cdr-canvas { aspect-ratio: 1000 / 520; }
.anim-hud { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 2rem; padding: .9rem 1rem; border-bottom: 1px solid rgba(165, 209, 237, .2); }
.anim-steps { list-style: none; counter-reset: s; display: flex; flex-wrap: wrap; gap: .5rem 1.75rem; margin: 0; padding: 0; }
.anim-steps li { counter-increment: s; display: grid; grid-template-columns: auto; color: rgba(165, 209, 237, .55); transition: color .3s; }
.anim-steps b { font-weight: 600; font-size: 1rem; }
.anim-steps b::before { content: counter(s) "  "; font-family: var(--mono); font-weight: 400; font-size: .85rem; white-space: pre; }
.anim-steps span { font-size: .82rem; }
.anim-steps li[data-state="now"] { color: #fff; }
.anim-steps li[data-state="now"] b { color: var(--sand); }
.anim-steps li[data-state="past"] { color: var(--pale); }
.anim-status { display: grid; justify-items: end; text-align: right; gap: .1rem; }
.anim-geom { color: #fff; font-weight: 600; }
.anim-result { font-size: .92rem; color: var(--pale); min-height: 1.4em; }
.anim-result[data-state="conflict"] { color: #F29A86; }
.anim-result[data-state="clear"] { color: var(--sand); }
@media (max-width: 700px) { .anim-status { justify-items: start; text-align: left; } }
.anim-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .75rem 1.5rem; padding: .75rem 1rem; border-top: 1px solid rgba(165, 209, 237, .2); }
.anim-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; font-size: .95rem; color: var(--pale); }
.anim-legend li { display: flex; align-items: center; gap: .5rem; }
.anim-btn { padding: .5rem .9rem; font-size: .92rem; background: none; border: 0; cursor: pointer; font-family: var(--sans); }
.anim-figure figcaption { padding: 0 1rem .9rem; font-size: .85rem; color: var(--pale); }
@media (prefers-reduced-motion: reduce) { .anim-steps li { transition: none; } }

/* ---------- About page: experience blocks ---------- */
.xp > div + div { margin-top: 1.75rem; }
.xp h3 { font-size: 1.2rem; margin-bottom: .4rem; }
.xp p, .xp ul { margin: 0; }
.xp ul { padding-left: 1.1rem; }
.xp li + li { margin-top: .3rem; }

.degrees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.degrees > div { border-top: 2px solid var(--navy); padding-top: 1rem; }
.degrees .deg { font-size: 1.35rem; font-weight: 600; color: var(--navy); line-height: 1.2; margin-bottom: .4rem; }
.degrees p:not(.deg) { font-size: .98rem; }
@media (max-width: 760px) { .degrees { grid-template-columns: 1fr; } }
