/* One stylesheet for every page. Warm off-white ground, warm dark text, one accent (deep green) for
   links and highlights; muted green and amber only for the two outcomes in the method diagram.
   Fonts are served by this site (see THIRD-PARTY.md): nothing loads from elsewhere. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque-latin-wght.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
  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: "Inter";
  src: url("/fonts/inter-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
  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: "JetBrains Mono";
  src: url("/fonts/jetbrains-mono-latin-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
  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;
}

:root {
  --bg: #f6f2ea;           /* warm off-white page */
  --surface: #fffcf6;      /* cards */
  --white: #ffffff;
  --tint: #efe6d6;         /* the "Why me" band */
  --ink: #2b2420;
  --ink-body: #4a413a;
  --ink-2: #6a5f55;        /* secondary text, labels */
  --rule: #e4dacb;
  --rule-strong: #d3c6b2;
  --faint: #b3a590;        /* connectors, small arrows */
  --accent: #1e5a48;
  --accent-hover: #154236;
  --accent-soft: #e3ece5;
  --clay: #8a5a2b;
  --ok: #3f7a45;   --ok-ink: #2f5e35;   --ok-bg: #e9f0e2;   --ok-rule: #bcd3b1;
  --warn: #9a640f; --warn-ink: #7a4f0c; --warn-bg: #f7ebd2; --warn-rule: #e3c792;
  --gutter: 16px;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
/* Anchor targets land below the sticky header (its height plus some air). */
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; font: 15px/1.6 var(--body); color: var(--ink); background: var(--bg); }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, p, figure { margin: 0; }
.mono { font-family: var(--mono); font-weight: 500; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }

/* ---- Icons (inline SVG, decorative) ----------------------------------------------------------- */
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.ico.sm { width: 17px; height: 17px; }
.logo { width: 20px; height: 20px; flex: none; fill: currentColor; }

/* ---- Header ----------------------------------------------------------------------------------- */
/* Sticky header: opaque background and a bottom rule so content scrolls under it cleanly. */
.top { position: sticky; top: 0; z-index: 10; background: var(--bg); border-bottom: 1px solid var(--rule); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 56px; }
.brand { display: flex; align-items: baseline; gap: 8px; color: var(--ink); text-decoration: none; }
.brand { min-width: 0; }
.brand b { flex: none; white-space: nowrap; font-family: var(--display); font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
/* The path (~/…) is shown from 760 px only, so the phone header never cuts anything off. */
.brand span { display: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--ink-2); }
.lang { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.lang .ico { width: 17px; height: 17px; color: var(--ink-2); margin-right: 4px; }
.lang a, .lang span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; }
.lang span { color: var(--ink); font-weight: 600; }

/* ---- Hero and the method diagram ------------------------------------------------------------ */
.hero { padding: 40px 0 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; font-size: 12px; letter-spacing: 0.04em; color: var(--accent); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.hero h1 { font-family: var(--display); font-weight: 650; font-size: 31px; line-height: 1.14; letter-spacing: -0.025em; }
.lede { margin-top: 16px; max-width: 560px; font-size: 18px; line-height: 1.45; color: var(--ink-body); }
.flow { padding: 16px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; box-shadow: 0 1px 0 var(--rule), 0 18px 40px -24px rgba(80, 60, 30, 0.25); }
/* Case-study carousel (CSS only): one slide per example, horizontal scroll-snap, swipe on touch
   screens, arrow keys once the track is focused (it gets tabindex="0" when it holds 2+ slides).
   The indicators link to each slide and are hidden while there is only one. */
.carousel { min-width: 0; margin-top: 32px; }
.carousel-track { display: flex; gap: 16px; margin: -4px -4px -28px; padding: 4px 4px 28px; list-style: none; overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline-offset: -2px; }
.slide { flex: 0 0 100%; min-width: 0; scroll-snap-align: start; }
.carousel-nav { display: flex; justify-content: center; gap: 2px; margin-top: 8px; }
.carousel-nav a { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 32px; }
.carousel-nav a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--rule-strong); }
.carousel-nav a:hover::before, .carousel-nav a:focus-visible::before { background: var(--accent); }
.carousel-nav a:only-child { display: none; }
.flow-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px dashed var(--rule); font-size: 11.5px; color: var(--ink-2); }
.node { display: flex; align-items: center; gap: 12px; padding: 11px 12px; background: var(--white); border: 1px solid var(--rule); border-radius: 12px; }
.node .ico { color: var(--accent); }
.node > div { min-width: 0; }
.node b { display: block; overflow-wrap: anywhere; font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.node small { display: block; font-family: var(--mono); font-weight: 500; font-size: 11px; color: var(--ink-2); }
.arrow { display: block; width: 14px; height: 22px; margin: 0 auto; color: var(--faint); }
.split { display: block; width: 100%; height: 26px; color: var(--faint); }
.outs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.outs .node { gap: 8px; padding-left: 10px; padding-right: 10px; }
.outs .node b { overflow-wrap: normal; hyphens: auto; font-size: 14px; }
.node.ok { background: var(--ok-bg); border-color: var(--ok-rule); }
.node.ok .ico { color: var(--ok); }
.node.ok b { color: var(--ok-ink); }
.node.warn { background: var(--warn-bg); border-color: var(--warn-rule); }
.node.warn .ico { color: var(--warn); }
.node.warn b { color: var(--warn-ink); }

/* ---- Sections ---------------------------------------------------------------------------------- */
.sec { padding: 40px 0; }
.label { display: flex; gap: 10px; align-items: baseline; margin-bottom: 20px; font-family: var(--mono); font-weight: 500; font-size: 12px; line-height: 1.5; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.label span { color: var(--accent); }
.cards { display: grid; gap: 12px; }
.card { padding: 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.badge { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 14px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); }
.card h3 { margin-bottom: 6px; font-family: var(--display); font-weight: 650; font-size: 19px; letter-spacing: -0.01em; }
.card p { color: var(--ink-body); }
.card.open { background: transparent; border: 1.5px dashed var(--rule-strong); }
.card.open .badge { background: var(--tint); color: var(--clay); }

/* Full-width tinted bands (Why me, Contact) alternate with sections on the page background. */
.band { background: var(--tint); }
.band .wrap { padding-top: 44px; padding-bottom: 44px; }
.statement { font-family: var(--display); font-weight: 500; font-size: 22px; line-height: 1.35; letter-spacing: -0.01em; max-width: 760px; }
.statement + p { margin-top: 16px; max-width: 760px; font-size: 16.5px; color: var(--ink-body); }
.statement + p strong { color: var(--accent); font-weight: 600; }

.proj { padding: 20px 18px; background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; }
.proj .tag { margin-bottom: 6px; font-size: 11.5px; color: var(--ink-2); }
.proj h3 { margin-bottom: 18px; font-family: var(--display); font-weight: 650; font-size: 26px; letter-spacing: -0.02em; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; min-height: 46px; padding: 0 18px; border-radius: 12px; font-weight: 600; font-size: 15px; text-decoration: none; }
.btn.pri { background: var(--accent); color: var(--white); }
.btn.pri:hover { background: var(--accent-hover); color: var(--white); }
.btn.alt { background: var(--white); color: var(--ink); border: 1px solid var(--rule-strong); }
.btn.alt:hover { border-color: var(--accent); color: var(--ink); }

.contact { display: flex; flex-wrap: wrap; gap: 10px; }
/* The address is plain text (selectable in one click); the envelope next to it is the mailto link. */
.mail { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; min-height: 56px; padding: 0 16px 0 6px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; font-weight: 600; }
.addr { user-select: all; -webkit-user-select: all; overflow-wrap: anywhere; }
.mailto { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 10px; color: var(--accent); }
.mailto:hover { background: var(--accent-soft); color: var(--accent-hover); }
.mailto.inline { vertical-align: middle; margin: -12px -6px -12px -10px; }
.mailto.inline .ico { width: 18px; height: 18px; }
.social { display: flex; gap: 10px; }
.social a { display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; color: var(--accent); }
.social a:hover { border-color: var(--accent); color: var(--accent-hover); }

/* ---- Legal notice ------------------------------------------------------------------------------ */
.doc { max-width: 720px; padding: 40px 0 48px; }
.doc h1 { margin-bottom: 24px; font-family: var(--display); font-weight: 650; font-size: 31px; letter-spacing: -0.025em; }
.doc h2 { margin: 28px 0 8px; font-family: var(--display); font-weight: 650; font-size: 18px; }
.doc p + p { margin-top: 8px; }
.doc .details { margin: 0; padding-left: 20px; }
.doc .details li + li { margin-top: 2px; }
.doc .note { margin-bottom: 8px; padding: 10px 14px; border-radius: 10px; background: var(--tint); font-size: 14px; color: var(--ink-body); }
.table { margin: 12px 0 16px; overflow-x: auto; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.table table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule); }
.table tr:last-child td { border-bottom: 0; }
.table th { font-family: var(--mono); font-weight: 500; font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); }
.table td:first-child { min-width: 150px; }

/* ---- Footer ------------------------------------------------------------------------------------ */
.foot { border-top: 1px solid var(--rule); }
.band + .foot, main:has(> .band:last-child) + .foot { border-top: 0; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; padding-top: 24px; padding-bottom: 36px; font-size: 12px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); text-decoration: underline; }
.foot .totop { margin-left: auto; }

/* ---- Wider screens ----------------------------------------------------------------------------- */
@media (min-width: 760px) {
  :root { --gutter: 40px; }
  body { font-size: 16px; }
  html { scroll-padding-top: 92px; }
  .top .wrap { min-height: 72px; }
  .brand b { font-size: 20px; }
  .brand span { display: block; font-size: 13px; }
  .hero h1 { font-size: 40px; line-height: 1.1; }
  .lede { margin-top: 20px; font-size: 20px; }
  .sec { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding: 64px 0; border-top: 1px solid var(--rule); }
  .label { margin: 6px 0 0; font-size: 12.5px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .card { padding: 24px; border-radius: 18px; }
  .badge { width: 44px; height: 44px; margin-bottom: 18px; border-radius: 12px; }
  .card h3 { font-size: 21px; }
  .card p { font-size: 15.5px; }
  .band .wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 40px; padding-top: 80px; padding-bottom: 80px; }
  .band .label { margin: 6px 0 0; }
  .statement { font-size: 28px; line-height: 1.3; }
  .statement + p { margin-top: 20px; font-size: 19px; }
  .band + .wrap .sec { border-top: 0; }
  /* Title left, both buttons on one line right; when there isn't room, the buttons move below together. */
  .proj { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; padding: 28px 32px; border-radius: 18px; }
  .proj > :first-child { flex: 1 1 260px; min-width: 0; }
  .proj .btns { flex: none; flex-wrap: nowrap; }
  .proj h3 { margin: 0; font-size: 30px; }
  .btn { min-height: 48px; padding: 0 20px; font-size: 15.5px; }
  .mail { flex: 1 1 auto; min-height: 64px; padding: 0 20px 0 10px; }
  .social a { width: 64px; height: 64px; }
  .doc { padding: 64px 0 72px; }
  .doc h1 { font-size: 40px; }
  .foot .wrap { font-size: 12.5px; padding-bottom: 44px; }
}

@media (min-width: 1040px) {
  :root { --gutter: 48px; }
  .hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 64px; align-items: center; padding: 88px 0 96px; }
  .hero h1 { font-size: 54px; line-height: 1.06; letter-spacing: -0.03em; }
  .lede { margin-top: 24px; font-size: 21px; }
  .eyebrow { margin-bottom: 24px; font-size: 13px; }
  .carousel { margin-top: 0; }
  .flow { padding: 20px 22px 24px; border-radius: 20px; }
  .flow-head { font-size: 12px; }
  .node { padding: 12px 14px; }
  .node b, .outs .node b { font-size: 15px; }
  .node small { font-size: 11.5px; }
  .sec, .band .wrap { grid-template-columns: 240px minmax(0, 1fr); gap: 48px; }
  .sec { padding: 72px 0; }
  .statement { font-size: 31px; }
}

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } .carousel-track { scroll-behavior: auto; } }
