/* Flood Stage LLC — company site.

   Implements design_handoff_flood_stage/: the README and
   "Flood Stage Design System.html". Every colour, face, size and surface is
   the handoff's; what this file adds is composition — full-bleed Ink and
   paper bands, the mark at hero scale, and the waterline where they meet.

   The hex values first in :root are fallbacks computed from the handoff's
   oklch values, for browsers without oklch. Plain CSS, no build step. */

:root {
  --ink: #141b24;
  --ink-rule: #2c333d;           /* oklch(0.32 0.02 255): the level-bar track on ink */
  --on-ink: #f3f5f8;             /* type on ink: 15.9 : 1 */
  --on-ink-muted: #a0a5ab;       /* secondary type on ink: 7.0 : 1 */
  --blue-on-dark: #7dbaff;       /* the accent whenever the ground is ink */
  --stage-blue: #195daa;         /* the waterline, primary actions, links */
  --stage-blue-hover: #004b97;
  --link-hover: #004085;
  --n-00: #fcfdff;               /* surfaces */
  --n-05: #f5f7f9;               /* paper: the page ground */
  --n-20: #d5d8db;               /* hairlines */
  --n-40: #a7abb0;
  --track: #dfe1e5;              /* level-bar track */
  --tint: #e8eff9;
  --text: #272e38;               /* running text */
  --text-muted: #464e58;
  --text-nav: #5c646f;
  --text-label: #616a75;         /* mono labels: 5.1 : 1 on paper */

  --font-mark: Michroma, sans-serif;               /* the lockup only */
  --font-sans: Archivo, Helvetica, Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 40px;
  --space-6: 72px;
  --radius: 2px;
  --page-max: 1180px;
  --gutter: 32px;
  --measure: 72ch;
  --waterline: 6px;
}

@supports (color: oklch(0% 0 0)) {
  :root {
    --ink: oklch(0.22 0.02 255);
    --ink-rule: oklch(0.32 0.02 255);
    --on-ink: oklch(0.97 0.005 255);
    --on-ink-muted: oklch(0.72 0.01 255);
    --blue-on-dark: oklch(0.78 0.13 255);
    --stage-blue: oklch(0.48 0.14 255);
    --stage-blue-hover: oklch(0.42 0.14 255);
    --link-hover: oklch(0.38 0.13 255);
    --n-00: oklch(0.995 0.002 255);
    --n-05: oklch(0.975 0.004 255);
    --n-20: oklch(0.88 0.005 255);
    --n-40: oklch(0.74 0.008 255);
    --track: oklch(0.91 0.005 255);
    --tint: oklch(0.95 0.015 255);
    --text: oklch(0.3 0.02 255);
    --text-muted: oklch(0.42 0.02 255);
    --text-nav: oklch(0.5 0.02 255);
    --text-label: oklch(0.52 0.02 255);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--n-05);
  color: var(--text);
  font: 400 16px/1.6 var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--stage-blue); text-decoration: none; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 2px solid var(--stage-blue); outline-offset: 3px; border-radius: var(--radius); }

.wrap { max-width: var(--page-max); margin-inline: auto; padding-inline: var(--gutter); }

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

/* ---- the mark ---------------------------------------------------------------
   Two lines of Michroma over the waterline. Type, rule and gap scale as one
   unit: rule about a sixth of the type, gap about half. The rule never moves
   and never changes colour outside the system's forms. */

.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;              /* the rule runs the width of the words */
  width: fit-content;
  color: var(--ink);
  --lk: 17px;
  gap: calc(var(--lk) / 2);
}
.lockup:hover { color: inherit; }
.lockup__word { font-family: var(--font-mark); font-size: var(--lk); letter-spacing: 0.06em; line-height: 1; }
.lockup__rule { display: block; height: max(2px, calc(var(--lk) / 6)); background: var(--stage-blue); }

.lockup--sm { --lk: 9px; gap: 4px; }                 /* the handoff's web-header size */
.lockup--sm .lockup__rule { height: 2px; }
.lockup--md { --lk: 13px; gap: 7px; }
.lockup--md .lockup__rule { height: 3px; }
.lockup--xl { --lk: clamp(46px, 7.4vw, 96px); }

.lockup--inverted { color: var(--on-ink); }
.lockup--inverted .lockup__rule { background: var(--blue-on-dark); }

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

.t-display, .t-h1, .t-h2 { margin: 0; color: var(--ink); font-weight: 600; text-wrap: balance; }
.t-display { font-size: 48px; line-height: 1.05; letter-spacing: -0.03em; }
.t-h1 { font-size: 32px; line-height: 1.15; letter-spacing: -0.02em; }
.t-h2 { font-size: 22px; line-height: 1.25; letter-spacing: -0.015em; }
.t-lede { margin: 0; max-width: 60ch; font-size: 17px; line-height: 1.6; color: var(--text-muted); text-wrap: pretty; }
.t-small { font-size: 13px; line-height: 1.55; color: var(--text-muted); }

.t-label,
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-label);
}
.eyebrow { letter-spacing: 0.14em; color: var(--stage-blue); }
.mono { font-family: var(--font-mono); }

/* ---- bands: full-bleed Ink and paper ---------------------------------------- */

.band { padding-block: var(--space-6); }
.band--ink { background: var(--ink); color: var(--on-ink); }
.band--ink .t-display, .band--ink .t-h1, .band--ink .t-h2 { color: var(--on-ink); }
.band--ink .t-lede, .band--ink .t-small { color: var(--on-ink-muted); }
.band--ink .eyebrow { color: var(--blue-on-dark); }
.band--ink .t-label { color: var(--on-ink-muted); }
.band--ink a { color: var(--blue-on-dark); }
.band--ink a:hover { color: var(--on-ink); }
.band--ink :focus-visible { outline-color: var(--blue-on-dark); }

/* the waterline: Stage Blue, where Ink meets paper */
.waterline { height: var(--waterline); background: var(--stage-blue); transform-origin: left center; }

@media (prefers-reduced-motion: no-preference) {
  .masthead--home .waterline { animation: waterline 1.2s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s both; }
  @keyframes waterline { from { transform: scaleX(0); } to { transform: scaleX(1); } }
}

/* ---- masthead: navigation, and the page's title on Ink ---------------------- */

.masthead { background: var(--ink); color: var(--on-ink); }
.masthead__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  padding-block: var(--space-4);
}
.masthead__title {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding-block: var(--space-5) var(--space-6);
}
.masthead .t-display { color: var(--on-ink); }
.masthead .t-lede { color: var(--on-ink-muted); }
.masthead .eyebrow { color: var(--blue-on-dark); }

.site-nav { display: flex; flex-wrap: wrap; gap: var(--space-2) 22px; font-size: 14px; line-height: 1.6; }
.site-nav a { color: var(--on-ink-muted); padding-bottom: 2px; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--on-ink); }
.site-nav a[aria-current="page"] { color: var(--on-ink); font-weight: 500; border-bottom-color: var(--blue-on-dark); }

/* the home masthead: the mark at hero scale */
.hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: end;
  gap: var(--space-5) var(--space-6);
  padding-block: var(--space-6) 96px;
}
.hero__name { margin: 0; line-height: 0; }
.hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); max-width: 520px; }
.hero__text .t-display { color: var(--on-ink); }

/* ---- buttons: 40px, 2px corners ---------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font: 500 14px/1 var(--font-sans);
  cursor: pointer;
}
.button--primary { background: var(--stage-blue); border-color: var(--stage-blue); color: var(--n-00); }
.button--primary:hover { background: var(--stage-blue-hover); border-color: var(--stage-blue-hover); color: var(--n-00); }
/* on Ink the accent is Blue on dark, with Ink type */
.band--ink .button--primary, .masthead .button--primary { background: var(--blue-on-dark); border-color: var(--blue-on-dark); color: var(--ink); }
.band--ink .button--primary:hover, .masthead .button--primary:hover { background: var(--on-ink); border-color: var(--on-ink); color: var(--ink); }

/* ---- sections on paper -------------------------------------------------------- */

.section-head { display: flex; flex-direction: column; gap: var(--space-3); max-width: 620px; margin-bottom: var(--space-5); }

/* the name: four stages, from rising water to abundance */
.stages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
}
.stage { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
.stage svg { display: block; width: 100%; height: auto; margin-bottom: var(--space-3); }
.stage .t-h2, .stage p { margin: 0; }
.card.stage--name { border-color: var(--stage-blue); }   /* the stage the company is named for */
.stage--name .t-label { color: var(--stage-blue); }
.s-water { fill: var(--stage-blue); }
.s-vessel { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: square; }
.s-vessel--under { stroke: var(--n-00); opacity: 0.6; }
.s-ground { stroke: var(--n-20); stroke-width: 1.5; }

/* surfaces: a card is n-00 on a 1px n-20 hairline, never a shadow */
.card { background: var(--n-00); border: 1px solid var(--n-20); border-radius: var(--radius); }

/* company facts: a hairline grid of readouts */
.facts {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--n-20);
  overflow: hidden;
}
.fact { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-4); background: var(--n-00); }
.fact--wide { grid-column: span 2; }
.fact dt { font: 400 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-label); }
.fact dd { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.35; letter-spacing: -0.01em; color: var(--ink); }
.fact dd.mono { font-size: 17px; font-weight: 400; letter-spacing: 0; }

/* ---- contact band -------------------------------------------------------------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: var(--space-5) var(--space-6);
}
.contact .section-head { margin-bottom: 0; }
.contact__lines { display: flex; flex-direction: column; gap: var(--space-3); }
.contact__email { font-family: var(--font-mono); font-size: clamp(20px, 2.6vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }

/* ---- documents: legal pages -------------------------------------------------- */

.doc {
  display: grid;
  grid-template-columns: 240px minmax(0, var(--measure));
  gap: var(--space-5) var(--space-6);
  padding-block: var(--space-6);
}
.doc__meta { align-self: start; position: sticky; top: var(--space-4); }
.meta { margin: 0; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-4); }
.meta dt { font: 400 11px/1 var(--font-mono); letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-label); }
.meta dd { margin: var(--space-2) 0 0; font-size: 14px; line-height: 1.5; color: var(--ink); }

.prose > :first-child { margin-top: 0; }
.prose h2 { margin: var(--space-5) 0 var(--space-2); font-size: 22px; font-weight: 600; line-height: 1.25; letter-spacing: -0.015em; color: var(--ink); }
.prose p { margin: 0 0 var(--space-3); }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }  /* text links need more than colour */

/* contact page: two readouts */
.readouts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); padding-block: var(--space-6); }
.readout { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-5) var(--space-4); }
.readout dd { margin: 0; }
.readout .contact__email { color: var(--stage-blue); }

/* ---- footer: back on Ink, signed by the small mark ---------------------------- */

.site-foot { background: var(--ink); color: var(--on-ink-muted); }
.site-foot__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  padding-block: var(--space-5);
  border-top: 1px solid var(--ink-rule);
  font-size: 13px;
  line-height: 1.55;
}
.site-foot p { margin: 0; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: var(--space-2) 18px; }
.site-foot a { color: var(--on-ink-muted); }
.site-foot a:hover { color: var(--on-ink); }
.site-foot :focus-visible { outline-color: var(--blue-on-dark); }
.band--ink + .site-foot .site-foot__row { border-top-color: var(--ink-rule); }

/* ---- placeholders: a labelled slot until the real value goes in --------------
   Each is a span with class "todo" whose data-token holds the double-brace token. The deploy
   check finds the token; the page shows the label. */

.todo {
  padding: 1px 6px;
  border-radius: var(--radius);
  outline: 1px dashed currentColor;
  outline-offset: -1px;
  font-family: var(--font-mono);
  font-size: 0.72em;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: 0.12em;
  white-space: nowrap;
  opacity: 0.85;
}

/* ---- narrow screens ------------------------------------------------------------ */

@media (max-width: 900px) {
  .hero, .contact, .doc { grid-template-columns: minmax(0, 1fr); }
  .stages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { padding-block: var(--space-5) var(--space-6); }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .fact--wide { grid-column: auto; }
  .doc__meta { position: static; }
  .readouts { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
  .stages { grid-template-columns: minmax(0, 1fr); }
  .t-display { font-size: 40px; }
  .band { padding-block: var(--space-5); }
}

.band--flush { padding-top: 0; }
.readout__value { margin: 0; font-size: 20px; font-weight: 500; line-height: 1.4; color: var(--ink); }
