/* NRB Consulting — shared design tokens and components.
   The written standard is design-language.md; read that before changing values.

   Load order matters: link this BEFORE a page's own <style> block, so page-level
   rules can still override a component when a page genuinely needs to differ. */

/* Inter is loaded via <link> in each page's <head>, not @import here: an
   @import cannot be discovered until this file has downloaded and parsed,
   which serialises two round trips before any text can swap.
   See design-language.md section 3. */

/* ---- Tokens ---------------------------------------------------------- */
:root {
  --paper:      #f7f5ef;
  --ink:        #10232e;
  --ink-soft:   #29424f;
  --grey-text:  #4d6067;
  --moss:       #346247;
  --lime:       #c7ef70;
  --mist:       #e8eee9;
  --line:       #cfd9d3;
  --white:      #ffffff;

  /* Height of the sticky nav. The hero subtracts this to reserve the first
     screen, so keep it in sync with nav padding + logo height. */
  --nav-h: 81px;

  --font:    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --display: Georgia, 'Times New Roman', serif;

  /* Legacy aliases. 23 pages still reference these; mapping them here means
     linking this stylesheet does not break them mid-rollout. Deprecated --
     migrate rules onto the tokens above when you touch a page, and do not add
     new uses. --grey-text is intentionally NOT aliased to #555: the old value
     fails contrast on paper. */
  --black:      #10232e;
  --accent:     #29424f;
  --grey-light: #f7f5ef;
  --grey-mid:   #cfd9d3;
}

/* ---- Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
/* Keep anchored sections clear of the sticky nav. */
:target, section[id] { scroll-margin-top: calc(var(--nav-h) + 1rem); }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; }

/* A visible focus ring everywhere. Never remove this without replacing it. */
a:focus-visible, button:focus-visible, summary:focus-visible,
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 2px solid var(--moss);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Type ------------------------------------------------------------ */
h1 {
  font-family: var(--display); font-weight: 500;
  /* min(vw, vh) so a short laptop shrinks the headline rather than pushing the
     call to action below the fold. */
  font-size: clamp(2.5rem, min(4.6vw, 7.5vh), 4rem);
  line-height: 1.0; letter-spacing: -.045em;
  margin-bottom: 1.1rem; text-wrap: balance;
}
h2 {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(2.1rem, 3.8vw, 3.25rem);
  line-height: 1.02; letter-spacing: -.045em;
  margin-bottom: .75rem; text-wrap: balance;
}
p { color: var(--ink-soft); }
.eyebrow {
  font-size: .75rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--moss); margin-bottom: .7rem;
}
.section-sub {
  color: var(--grey-text); margin-bottom: 2rem;
  font-size: 1.05rem; max-width: 620px;
}
.breadcrumb { font-size: .85rem; color: var(--grey-text); margin-bottom: .85rem; }
.breadcrumb a { text-decoration: none; color: var(--grey-text); }
.breadcrumb a:hover { color: var(--ink); }

/* ---- Layout ---------------------------------------------------------- */
/* Width follows content, not the page.
   A single narrow column for everything is the dated look: on a 1440px screen
   it leaves half the viewport empty and squeezes card grids into ~200px tracks
   where text wraps every three words. But prose still needs a readable measure
   -- a paragraph running the full 1120px is worse, not better.
   So the section is wide, and the elements that must stay narrow say so. */
section { padding: 5.25rem clamp(1.25rem, 5vw, 4rem); max-width: 1180px; margin: 0 auto; }

/* Prose keeps its measure inside the wide container. Applies to paragraphs and
   lists that are direct children of a section -- anything inside a card or grid
   is already constrained by its own track. */
section > p, section > ul, section > ol, section > blockquote { max-width: 68ch; }
section > h2, section > .sec-head { max-width: none; }

/* Opt-outs for the two cases the default gets wrong. */
.section--prose { max-width: 780px; }      /* article-style pages: cost guide, case studies */
.section--full  { max-width: 1180px; }     /* force full width where a page narrows itself */
.divider {
  border: none; border-top: 1px solid var(--line);
  max-width: calc(100% - clamp(2.5rem, 10vw, 8rem)); margin: 0 auto;
}

/* Full-bleed alternating band. Tinted grounds break up a long page; a uniform
   run of identical sections is the strongest generic-template signal. */
.band { max-width: none; padding-left: 0; padding-right: 0; }
.band > .band-inner { max-width: 1120px; margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 4rem); }
.band-tint { background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* Numbered section header: numeral in a narrow gutter, heading in the wide column. */
.sec-head {
  display: grid; grid-template-columns: 90px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2.5rem); align-items: start; margin-bottom: 2.5rem;
}
.sec-num {
  font-family: var(--display); font-size: 2.6rem; line-height: .8;
  color: var(--moss); opacity: .38; letter-spacing: -.04em;
  font-variant-numeric: lining-nums;
}
.sec-head h2, .sec-head .section-sub { margin-bottom: 0; }
.sec-head .section-sub { margin-top: .9rem; }

/* ---- Nav ------------------------------------------------------------- */
nav {
  padding: 1rem clamp(1.25rem, 4vw, 4rem);
  display: flex; justify-content: space-between; align-items: center;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10;
  background: rgba(247, 245, 239, .94); backdrop-filter: blur(12px);
}
nav .logo img { height: 34px; width: auto; display: block; }
nav a.cta-nav {
  background: var(--ink); color: var(--white);
  padding: .65rem 1.15rem; border-radius: 999px;
  text-decoration: none; font-size: .88rem; font-weight: 700;
  transition: background .18s ease, transform .18s ease;
}
nav a.cta-nav:hover { background: var(--moss); transform: translateY(-1px); }

/* ---- Buttons --------------------------------------------------------- */
.btn-primary, .btn-secondary {
  padding: .85rem 1.35rem; border-radius: 999px; text-decoration: none;
  font-weight: 750; font-size: .94rem; display: inline-block;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.btn-primary { background: var(--ink); color: var(--white); }
.btn-primary:hover { background: var(--moss); transform: translateY(-1px); }
.btn-secondary { color: var(--ink); border: 1.5px solid var(--line); }
.btn-secondary:hover { background: var(--white); border-color: var(--moss); }

/* ---- Hero ------------------------------------------------------------ */
/* Base hero: layout-neutral. Most pages have a single-column hero of their own,
   so this must NOT impose a grid -- doing so splits their content into columns.
   Opt into the two-column treatment with .hero--split. */
.hero {
  max-width: 1240px;
  padding-top: clamp(2rem, 3.5vh, 3.5rem);
  padding-bottom: clamp(2.25rem, 4.5vh, 4.5rem);
}

/* Two-column hero: wide copy column plus a dark summary panel. */
.hero--split {
  /* Reserve the first screen so the next band cannot creep into the fold.
     svh, not vh: vh ignores mobile browser chrome. */
  min-height: calc(100svh - var(--nav-h));
  align-content: center;
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, .75fr);
  gap: clamp(2rem, 5vw, 4.5rem); align-items: center;
}
.hero--split p { font-size: 1.05rem; color: var(--grey-text); max-width: 56ch; margin-bottom: 1.5rem; line-height: 1.65; }
.hero-ctas { display: flex; gap: 1rem; flex-wrap: wrap; }
.local-note { display: flex; gap: .6rem; align-items: center; margin-top: 1rem; font-size: .88rem; color: var(--grey-text); }
.local-note::before { content: ''; width: 8px; height: 8px; background: var(--moss); border-radius: 50%; flex: 0 0 auto; }

.hero-panel {
  background: var(--ink); color: var(--white);
  border-radius: 22px; padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: 0 18px 50px rgba(16, 35, 46, .17);
}
.hero-panel .panel-label { color: var(--lime); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 800; margin-bottom: .7rem; }
.hero-panel h2 { color: var(--white); font-size: 1.3rem; line-height: 1.15; letter-spacing: -.03em; margin-bottom: .7rem; }
.hero-panel p { color: #d8e2dd; font-size: .9rem; line-height: 1.55; margin-bottom: 1rem; }
.hero-panel ul { list-style: none; }
.hero-panel li { border-top: 1px solid rgba(255, 255, 255, .16); padding: .6rem 0; color: #eff5ef; font-size: .875rem; }
.hero-panel li span { color: var(--lime); font-weight: 800; margin-right: .6rem; }

/* ---- Cards ----------------------------------------------------------- */
/* Static presentation cards. No shadow and NO hover: a hover response reads as
   "clickable", and clicking one of these does nothing, which Clarity records as
   a rage click. Presence comes from the moss left border instead. */
.features-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 1rem; margin-top: 2rem; }
.feature-item {
  display: flex; gap: 1rem; padding: 1.5rem;
  background: var(--white); border: 1px solid var(--line);
  border-left: 2px solid var(--moss); border-radius: 2px;
  align-items: flex-start;
}
.feature-item .icon { font-family: var(--display); color: var(--moss); font-size: 1.5rem; opacity: .45; letter-spacing: -.03em; flex-shrink: 0; margin-top: -.15rem; }
.feature-item strong { display: block; font-size: 1rem; margin-bottom: .3rem; }
.feature-item p { font-size: .92rem; color: var(--grey-text); margin: 0; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1rem; margin-top: 2rem; }
.step { display: flex; gap: 1.25rem; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--line); background: var(--white); border-radius: 2px; }
.step-num { background: var(--lime); color: var(--ink); width: 30px; height: 30px; border-radius: 2px; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 1rem; font-weight: 500; flex-shrink: 0; }
.step strong { display: block; margin-bottom: .2rem; font-size: .95rem; }
.step p { font-size: .9rem; color: var(--grey-text); margin: 0; }

/* ---- Proof cards ----------------------------------------------------- */
/* Shipped work shown on service pages. Static, so no hover: the links inside
   carry the interaction. Lives here so pages without their own proof CSS
   (the demo and vertical pages) can use the component too. */
.proof-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.proof-cards:has(> :last-child:nth-child(2)) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 900px) { .proof-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .proof-cards, .proof-cards:has(> :last-child:nth-child(2)) { grid-template-columns: 1fr; } }
.proof-card { padding: 1.5rem; background: var(--white); border: 1px solid var(--line); border-left: 2px solid var(--moss); border-radius: 2px;
  /* Column layout so the badge can be pushed to the bottom: with equal-height
     cards the links would otherwise sit at different heights across a row. */
  display: flex; flex-direction: column; }
.proof-card .badge { margin-top: auto; align-self: flex-start; }
.proof-card .label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--moss); margin-bottom: .5rem; }
.proof-card h3 { font-family: var(--display); font-weight: 500; font-size: 1.35rem; letter-spacing: -.03em; margin-bottom: .45rem; }
.proof-card p { font-size: .9rem; color: var(--grey-text); line-height: 1.6; }
.proof-card .badge { display: inline-block; padding-top: .9rem; font-size: .82rem; font-weight: 700; }
.proof-card .badge a { text-decoration: none; border-bottom: 1px solid var(--line); transition: border-color .18s ease; }
.proof-card .badge a:hover { border-bottom-color: var(--moss); }

/* ---- Pricing --------------------------------------------------------- */
.pricing-box { margin-top: 2rem; border: 1px solid var(--ink); background: var(--ink); color: var(--white); border-radius: 20px; padding: clamp(1.75rem, 4vw, 3rem); max-width: 720px; }
.pricing-box .price { font-family: var(--display); font-size: 2.5rem; font-weight: 500; letter-spacing: -.04em; margin-bottom: .25rem; color: var(--lime); }
.pricing-box .price-sub { font-size: .9rem; margin-bottom: 1.5rem; }
.pricing-box ul { list-style: none; margin-bottom: 1.5rem; }
.pricing-box ul li { padding: .4rem 0; font-size: .95rem; }
.pricing-box ul li::before { content: "✓  "; color: var(--lime); font-weight: 600; }
.pricing-box .price-sub, .pricing-box ul, .pricing-note { color: #d8e2dd; }
.pricing-box .btn-primary { background: var(--lime); color: var(--ink); }
.pricing-box .btn-primary:hover { background: var(--white); }
.pricing-note { font-size: .85rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .18); }

/* ---- FAQ ------------------------------------------------------------- */
/* <details>/<summary>: summary is genuinely interactive, so it may hover. */
.faq-list { margin-top: 1.5rem; display: grid; gap: 1rem; }
.faq-item { border-bottom: 1px solid var(--line); padding: 0; }
.faq-item summary {
  list-style: none; cursor: pointer;
  display: flex; justify-content: space-between; align-items: baseline; gap: 1.5rem;
  padding: 1.15rem 0; font-weight: 700; font-size: 1rem;
  min-height: 44px; /* tap target */
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; color: var(--moss); font-size: 1.35rem; line-height: 1; flex: 0 0 auto; transition: transform .2s ease; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { color: var(--moss); }
.faq-item p { font-size: .93rem; color: var(--grey-text); margin: 0 0 1.25rem; max-width: 68ch; }

/* ---- Case studies ---------------------------------------------------- */
/* The tile is not a link; the anchor inside it is. Hover belongs on the anchor. */
.case-study-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: 2rem; }
.case-study { padding: clamp(1.5rem, 3vw, 2.25rem); background: var(--ink); color: var(--white); min-height: 250px; display: flex; flex-direction: column; justify-content: space-between; border-radius: 3px; }
.case-study:nth-child(2) { background: var(--moss); }
.case-study .case-type { color: var(--lime); font-size: .72rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.case-study h3 { font-family: var(--display); color: var(--white); font-weight: 500; font-size: 2rem; line-height: 1; letter-spacing: -.045em; margin: 1.5rem 0 .75rem; }
.case-study p { color: #d8e2dd; font-size: .92rem; margin-bottom: 1.4rem; }
.case-study a { color: var(--white); font-size: .88rem; font-weight: 800; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .45); width: fit-content; transition: border-color .18s ease; }
.case-study a:hover { border-bottom-color: var(--lime); }

/* ---- Manifesto ------------------------------------------------------- */
.manifesto { max-width: none; padding-top: 0; padding-bottom: 0; }
.manifesto-inner {
  max-width: 1120px; margin: 0 auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1.25rem, 5vw, 4rem);
  background: var(--mist); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 2rem;
}
.manifesto-kicker { color: var(--moss); line-height: 1.5; margin-top: .5rem; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .12em; }
/* Scoped to .manifesto-quote, not `.manifesto p` -- the kicker is also a <p> and
   would inherit the display size, overflow its column and collide with this. */
.manifesto-quote { font-family: var(--display); font-size: clamp(1.55rem, 3vw, 2.35rem); line-height: 1.12; letter-spacing: -.035em; color: var(--ink); max-width: 780px; }

/* ---- CTA strip ------------------------------------------------------- */
.cta-strip { background: var(--moss); color: var(--white); text-align: center; padding: clamp(4rem, 9vw, 6.5rem) 2rem; position: relative; overflow: hidden; }
.cta-strip::before { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% 0%, rgba(199, 239, 112, .16), transparent 62%); pointer-events: none; }
.cta-strip > * { position: relative; }
.cta-strip h2 { color: var(--white); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.03; margin: 0 auto .9rem; max-width: 18ch; }
.cta-strip p { color: #dcebdf; margin: 0 auto 2rem; font-size: 1.05rem; max-width: 46ch; }
.cta-strip .cta-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-white { background: var(--lime); color: var(--ink); padding: .75rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: .95rem; transition: background .18s ease; }
.btn-white:hover { background: var(--white); }
.btn-outline-white { border: 1.5px solid rgba(255, 255, 255, .45); color: var(--white); padding: .75rem 1.5rem; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .95rem; transition: border-color .18s ease, background .18s ease; }
.btn-outline-white:hover { border-color: var(--white); background: rgba(255, 255, 255, .08); }

/* ---- Footer ---------------------------------------------------------- */
footer { text-align: center; padding: 2rem; font-size: .8rem; color: var(--grey-text); border-top: 1px solid var(--line); }
footer a { color: var(--grey-text); }

/* Wide content scrolls in its own container so the page body never scrolls
   sideways. A table with real columns cannot reflow below ~340px, so give it
   somewhere to go rather than letting it push the whole page. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
section > table { display: block; overflow-x: auto; max-width: 100%; }

/* ---- Responsive ------------------------------------------------------ */
@media (max-width: 760px) {
  section { padding-top: 3.75rem; padding-bottom: 3.75rem; }
  .hero--split { grid-template-columns: 1fr; min-height: 0; }
  .features-list, .steps, .case-study-grid, .manifesto-inner { grid-template-columns: 1fr; }
  .manifesto-inner { gap: .75rem; }
  .sec-head { grid-template-columns: 1fr; gap: .5rem; }
  .sec-num { font-size: 1.6rem; }
  h1 { font-size: clamp(2.5rem, 11vw, 3.6rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  nav a.cta-nav:hover, .btn-primary:hover { transform: none; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
