/* ============================================================================
   PRISMA INTELLIGENCE — shared design system
   Built to PRISMA_INTELLIGENCE_WEBSITE_BRIEF.md § 09 (see brand/).

   One stylesheet serves the English master homepage and every industry page.
   Adding a field of work is a content addition — nothing here should need to
   change for it.

   Two families, nine colours, one reading column with a narrow label rail.
   Motion budget: 140ms on hover/focus. Nothing moves on its own.
   ========================================================================= */

/* ── FONTS ────────────────────────────────────────────────────────────────
   Self-hosted variable woff2 (OFL, see brand/). latin + latin-ext so the
   German ä ö ü ß and the € sign render from our own origin — no third-party
   font request, no layout shift. `swap` keeps text visible while loading. */

@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/newsreader-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;
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('assets/fonts/newsreader-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: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/instrument-sans-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;
}
@font-face {
  font-family: 'Instrument Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('assets/fonts/instrument-sans-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: 'Montserrat';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/montserrat-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;
}
@font-face {
  font-family: 'Montserrat';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('assets/fonts/montserrat-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;
}

/* ── TOKENS ───────────────────────────────────────────────────────────── */

:root {
  --font-editorial: 'Newsreader', Georgia, 'Times New Roman', serif;
  --font-functional: 'Instrument Sans', -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mark: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;

  --color-paper: #F8F7F3;
  --color-ink: #1F2B2C;
  --color-body: #3D4B4D;
  --color-muted: #526264;
  --color-accent: #3E6773;
  --color-accent-hover: #284A56;
  --color-accent-soft: #8BA9AF;   /* decorative only — never text */
  --color-line: #D9DEDB;
  --color-surface: #F1F3F0;
  --color-focus: #285C71;

  /* The brief asks for "approximately 55–68 characters" of body text and also
     writes the token as `66ch`. Those are not the same thing: the CSS `ch` unit
     is the advance of "0", and in Instrument Sans that is ~1.5x an average prose
     character — so 66ch renders ~86 characters per line, well past comfortable.
     46ch measures 65–67 actual characters, which is the number the brief wants.
     Verified per-character in the browser, not inferred. */
  --measure-body: 46ch;
  --site-max: 1160px;
  --site-gutter: clamp(24px, 5vw, 76px);
  --space-section: clamp(104px, 13vw, 184px);

  /* The label rail. One number, so the asymmetry is identical on every
     section of every page and the eye learns where content begins. */
  --rail: 168px;
  --rail-gap: clamp(32px, 5vw, 72px);

  --ease: 140ms ease;
}

/* ── RESET ────────────────────────────────────────────────────────────── */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-body);
  font-family: var(--font-functional);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { max-width: 100%; }

/* ── TYPE ─────────────────────────────────────────────────────────────── */

h1, h2 {
  color: var(--color-ink);
  font-family: var(--font-editorial);
  font-weight: 400;
  font-optical-sizing: auto;
  font-synthesis-weight: none;
  letter-spacing: -0.005em;
}

/* The brief puts the hero measure at "10–14ch depending on wording". Wording
   varies more than that allows: the English headline is 34 characters, the
   German one 51. At a fixed 14ch the German hero broke into four short, badly
   ragged lines and pushed the lede off a laptop screen. A wider ceiling plus
   `text-wrap: balance` lets each headline find its own even rag — English
   settles on two lines, German on three. */
h1 {
  font-size: clamp(3.5rem, 6vw, 5.6rem);
  line-height: 1.06;
  max-width: 18ch;
  letter-spacing: -0.015em;
  text-wrap: balance;
  /* Last-resort guard: a single word longer than the screen would otherwise
     push the whole page sideways. Only engages when a word genuinely cannot fit. */
  overflow-wrap: break-word;
}

/* The brief's hero scale bottoms out at 3.5rem (56px). On a 360px phone the
   word "understanding." is 354px wide at that size against 312px of available
   column — it overflowed the page horizontally. Below 480px the hero scales
   with the viewport instead. Desktop is untouched. */
@media (max-width: 480px) {
  h1 { font-size: clamp(2.5rem, 11vw, 3.5rem); }
}

h2 {
  font-size: clamp(2.05rem, 3.3vw, 3.15rem);
  line-height: 1.16;
  max-width: 20ch;
  text-wrap: balance;
}

h3 {
  color: var(--color-ink);
  font-family: var(--font-functional);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.45;
  letter-spacing: -0.003em;
}

p { max-width: var(--measure-body); }

.lede {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.55;
  max-width: 48ch;
}

.eyebrow {
  display: block;
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.note {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-muted);
  max-width: var(--measure-body);
}

/* ── LINKS ────────────────────────────────────────────────────────────── */

a {
  color: var(--color-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: color var(--ease);
}
a:hover { color: var(--color-accent-hover); }

:focus-visible {
  outline: 2px solid var(--color-focus);
  outline-offset: 4px;
}

/* The one recurring call to action. A text link with a mark, not a button —
   the industry page gets the only real button on the site. */
.link-quiet {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid var(--color-accent-soft);
  padding-bottom: 2px;
  transition: color var(--ease), border-color var(--ease);
}
.link-quiet:hover { border-bottom-color: var(--color-accent-hover); }
.link-quiet .arrow { font-size: 0.9em; line-height: 1; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--color-ink);
  color: var(--color-paper);
  padding: 12px 18px;
  z-index: 10;
  text-decoration: none;
}
.skip-link:focus {
  left: var(--site-gutter);
  top: 12px;
  color: var(--color-paper);
}

/* ── SHELL ────────────────────────────────────────────────────────────── */

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

/* Header is static, not sticky: nothing should follow the reader down
   the page. Brief § 09 — no busy header, no floating widget. */
.site-header { padding-block: clamp(26px, 3.4vw, 40px); }
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--color-ink);
  text-decoration: none;
}
.lockup svg { width: 19px; height: 19px; flex: 0 0 19px; display: block; }
/* The wordmark is Montserrat Light at .30em — the locked lockup from the
   September kit, and the only place this typeface appears. */
.lockup .wordmark {
  font-family: var(--font-mark);
  font-size: 0.8125rem;
  font-weight: 300;
  letter-spacing: 0.30em;
  text-transform: uppercase;
  white-space: nowrap;
}
.lockup:hover { color: var(--color-accent-hover); }

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 38px);
  flex-wrap: wrap;
  row-gap: 8px;
}
.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-body);
  text-decoration: none;
  transition: color var(--ease);
}
.site-nav a:hover { color: var(--color-ink); }
/* Language switch - set apart from the section links by a hairline. */
.site-nav .lang {
  font-size: 0.8125rem;
  letter-spacing: 0.08em;
  color: var(--color-muted);
  /* Equal space either side of the hairline: nav gap + margin on the left
     matches the padding on the right. */
  margin-left: clamp(8px, 1.5vw, 26px);
  padding-left: calc(clamp(20px, 3vw, 38px) + clamp(8px, 1.5vw, 26px));
  border-left: 1px solid var(--color-line);
}

/* ── SECTIONS ─────────────────────────────────────────────────────────── */

section { padding-block: 0; }

.band { padding-block: var(--space-section); }
/* Only one gap between any two things. Without these, the hero's bottom
   padding and the first band's top padding stack into ~350px of nothing. */
.band + .band { padding-top: 0; }
.hero + .band { padding-top: 0; }

/* The asymmetry: a narrow label rail, then the reading column.
   Collapses to one column below 860px — the label simply sits above. */
.rail {
  display: grid;
  gap: 18px var(--rail-gap);
}
@media (min-width: 860px) {
  .rail {
    grid-template-columns: var(--rail) minmax(0, 1fr);
    align-items: start;
  }
  .rail > .rail-label { padding-top: 0.55em; }
}
.rail-body > * + * { margin-top: 1.15em; }
.rail-body > h2 + * { margin-top: 1.1em; }

/* A hairline above a section, used sparingly — structure, not decoration. */
.ruled { border-top: 1px solid var(--color-line); padding-top: clamp(34px, 4vw, 52px); }

/* ── HERO ─────────────────────────────────────────────────────────────── */

.hero {
  padding-top: clamp(64px, 9vw, 128px);
  padding-bottom: clamp(96px, 12vw, 168px);
}
.hero .eyebrow { margin-bottom: clamp(22px, 2.6vw, 34px); }
.hero h1 { margin-bottom: clamp(26px, 3vw, 38px); }
.hero .lede { margin-bottom: clamp(32px, 3.6vw, 46px); }

/* The single accent marker in the first viewport — a 1px tidal rule,
   28px wide, sitting above the eyebrow. The brief allows the accent to
   appear once above the fold; this is that once. */
.hero .marker {
  display: block;
  width: 28px;
  height: 1px;
  background: var(--color-accent);
  margin-bottom: 20px;
}

/* ── THE OBSERVATION (pull statement) ─────────────────────────────────── */

.statement {
  font-family: var(--font-editorial);
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  line-height: 1.32;
  color: var(--color-ink);
  font-weight: 400;
  max-width: 24ch;
  letter-spacing: -0.008em;
  text-wrap: balance;   /* keeps a single short word off its own last line */
}

/* ── METHOD LIST ──────────────────────────────────────────────────────── */
/* Four steps. Hairline separated rows, no cards, no borders around them. */

.steps { border-top: 1px solid var(--color-line); }
.steps li {
  display: grid;
  gap: 4px 28px;
  padding-block: clamp(20px, 2.4vw, 28px);
  border-bottom: 1px solid var(--color-line);
}
@media (min-width: 640px) {
  .steps li { grid-template-columns: 2.5rem minmax(0, 1fr); }
}
.steps .n {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.28em;
}
.steps p { color: var(--color-body); max-width: var(--measure-body); }

/* ── FIELDS OF WORK ───────────────────────────────────────────────────── */
/* An editorial link, deliberately not a card. One entry is the launch state
   and must look complete on its own. Adding a second = one more <li>. */

.fields { border-top: 1px solid var(--color-line); }
.field {
  border-bottom: 1px solid var(--color-line);
  padding-block: clamp(30px, 3.6vw, 44px);
}
.field-index {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-muted);
  font-variant-numeric: tabular-nums;
  display: block;
  margin-bottom: 10px;
}
.field h3 {
  font-family: var(--font-editorial);
  font-size: clamp(1.5rem, 2.1vw, 1.875rem);
  font-weight: 400;
  line-height: 1.22;
  letter-spacing: -0.008em;
  margin-bottom: 12px;
}
.field p { max-width: var(--measure-body); margin-bottom: 20px; }
/* A field announced before its page exists: plain text, never a link. */
.field-soon {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-muted);
}

/* ── CLOSE ────────────────────────────────────────────────────────────── */

.close { padding-bottom: clamp(96px, 11vw, 150px); }
.close .statement { margin-bottom: clamp(26px, 3vw, 36px); }

/* ── BUTTON (industry pages only) ─────────────────────────────────────── */

.btn {
  display: inline-block;
  background: var(--color-ink);
  color: var(--color-paper);
  font-size: 0.9688rem;
  font-weight: 500;
  text-decoration: none;
  padding: 15px 26px;
  transition: background var(--ease);
}
.btn:hover { background: var(--color-accent-hover); color: var(--color-paper); }

.cta-sub { font-size: 0.875rem; color: var(--color-muted); margin-top: 14px; }

/* ── SCOPE / LEGAL NOTE ───────────────────────────────────────────────── */
/* Misted surface, used once per page at most. Not a card grid. */

.scope {
  background: var(--color-surface);
  padding: clamp(24px, 3vw, 34px) clamp(22px, 3vw, 34px);
  border-left: 2px solid var(--color-accent-soft);
}
.scope p { font-size: 0.9375rem; max-width: var(--measure-body); }
.scope p + p { margin-top: 0.7em; }

/* ── FOOTER ───────────────────────────────────────────────────────────── */

.site-footer {
  border-top: 1px solid var(--color-line);
  padding-block: clamp(34px, 4vw, 52px) clamp(44px, 5vw, 68px);
  font-size: 0.875rem;
  color: var(--color-muted);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 40px;
  justify-content: space-between;
  align-items: flex-start;
}
.site-footer a { color: var(--color-muted); text-decoration: none; border-bottom: 1px solid var(--color-line); }
.site-footer a:hover { color: var(--color-ink); border-bottom-color: var(--color-muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.footer-entity { max-width: 42ch; }
.footer-entity p + p { margin-top: 6px; }

/* ── LEGAL PAGES ──────────────────────────────────────────────────────── */

.legal { padding-block: clamp(48px, 6vw, 86px) clamp(80px, 9vw, 120px); }
.legal h1 {
  font-size: clamp(2.25rem, 3.6vw, 3.25rem);
  max-width: 18ch;
  margin-bottom: clamp(24px, 3vw, 36px);
}
.legal h2 {
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  max-width: 34ch;
  margin-bottom: 0.6em;
}
.legal section + section { margin-top: clamp(38px, 4.4vw, 58px); }
.legal p + p { margin-top: 0.85em; }
.legal dl { margin: 0; }
.legal dt {
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-top: 1.1em;
}
.legal dd { margin: 4px 0 0; color: var(--color-ink); max-width: var(--measure-body); }

/* A placeholder that cannot be mistaken for finished copy. Deliberately
   conspicuous — these must be filled or removed before the site goes live. */
.todo {
  display: inline-block;
  background: var(--color-surface);
  border-bottom: 2px solid var(--color-accent);
  color: var(--color-ink);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 2px 8px;
}
