/* Industry — design-system tokens and component classes. This file is the source of truth for the system's look; retune it here and see readme.md. */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;700&family=Barlow+Condensed:wght@400;600&display=swap');

:root {
  --color-bg: #f4f2ee;
  --color-surface: #eae7e1;
  --color-text: #1b1a17;
  --color-accent: #a85a22;
  --color-accent-2: #a85a22;
  --color-divider: color-mix(in srgb, #1b1a17 16%, transparent);

  /* Tonal ramps — generated in OKLCH on one shared lightness scale, so the
     same step of any role matches the others in visual value. */
  --color-neutral-100: #f6f5f2;
  --color-neutral-200: #e8e5df;
  --color-neutral-300: #d6d2ca;
  --color-neutral-400: #b9b4aa;
  --color-neutral-500: #9a948a;
  --color-neutral-600: #7c766c;
  --color-neutral-700: #5f5a51;
  --color-neutral-800: #44403a;
  --color-neutral-900: #2b2823;

  --color-accent-100: #fdf4ec;
  --color-accent-200: #f7e3cf;
  --color-accent-300: #edc7a2;
  --color-accent-400: #d9a677;
  --color-accent-500: #c2824c;
  --color-accent-600: #8f4a1b;
  --color-accent-700: #743d16;
  --color-accent-800: #453a30;
  --color-accent-900: #23201c;

  --color-accent-2-100: #fdf4ec;
  --color-accent-2-200: #f7e3cf;
  --color-accent-2-300: #edc7a2;
  --color-accent-2-400: #d9a677;
  --color-accent-2-500: #c2824c;
  --color-accent-2-600: #8f4a1b;
  --color-accent-2-700: #743d16;
  --color-accent-2-800: #453a30;
  --color-accent-2-900: #23201c;

  --font-heading: "Barlow Condensed", system-ui, sans-serif;
  --font-heading-weight: 600;
  --font-body: "Barlow", system-ui, sans-serif;

  --space-1: 3.4px;
  --space-2: 6.8px;
  --space-3: 10.2px;
  --space-4: 13.6px;
  --space-6: 20.4px;
  --space-8: 27.2px;

  --radius-sm: 2px;
  --radius-md: 4px;
  --radius-lg: 7px;

  /* Elevation — derived from the ground: soft ink-tinted shadows on a
     light theme, a hairline edge + ambient darkness on a dark one. */
  --shadow-sm: 0 1px 2px color-mix(in srgb, #2b2823 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2b2823 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2b2823 22%, transparent);
}

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
}
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: var(--font-heading-weight); }

.blueprint {
  position: relative;
  border: 1px solid var(--color-divider);
  border-radius: 0;
}
/* The overlay image treatments (halftone, duotone) clip their overlay
   (overflow:hidden); a blueprint wrapper draws its registration marks
   outside the box, so when both classes share a wrapper the frame must
   win. */
.blueprint.halftone, .blueprint.plate, .blueprint.duotone { overflow: visible; }
.blueprint > .corner {
  position: absolute; width: 11px; height: 11px;
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.blueprint > .corner::before, .blueprint > .corner::after {
  content: ""; position: absolute; background: currentColor;
}
.blueprint > .corner::before { left: 5px; top: 0; width: 1px; height: 100%; }
.blueprint > .corner::after  { top: 5px; left: 0; width: 100%; height: 1px; }
.blueprint > .corner.tl { top: -6px; left: -6px; }
.blueprint > .corner.tr { top: -6px; right: -6px; }
.blueprint > .corner.bl { bottom: -6px; left: -6px; }
.blueprint > .corner.br { bottom: -6px; right: -6px; }

.duotone{position:relative;overflow:hidden}
.duotone::after{content:"";position:absolute;inset:0;pointer-events:none;
  background:var(--color-accent);mix-blend-mode:color}

/* ══════════════════════════════════════════════════════════════════════════
   Components — built with the tokens above. Plain CSS
   on plain HTML: no JavaScript, no build step. Each class is documented in
   readme.md and demonstrated in foundations/ and components/.
   ══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size:clamp(16.5px,15.97px + 0.14vw,18px); line-height: 1.55; font-weight: 400; }
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 var(--space-2);
}
h1 { font-size: clamp(26px,20.37px + 1.5vw,42px); }
h2 { font-size: clamp(21px,17.13px + 1.03vw,32px); }
h3 { font-size: clamp(17px,14.18px + 0.75vw,25px); }
h4 { font-size:clamp(19.5px,18.62px + 0.23vw,22px); }
h5 { font-size:clamp(17px,16.47px + 0.14vw,18.5px); }
h6 { font-size:clamp(16px,15.82px + 0.05vw,16.5px); }
h6 { letter-spacing: 0.08em; text-transform: uppercase; }
p { margin: 0 0 var(--space-3); }
a { color: var(--color-accent); text-underline-offset: 3px; }
img { display: block; max-width: 100%; }
figure { margin: 0; }
figcaption {
  font-size:clamp(13.5px,13.32px + 0.05vw,14px); margin-top: var(--space-1);
  color: color-mix(in srgb, var(--color-text) 55%, transparent);
}
.text-muted { color: color-mix(in srgb, var(--color-text) 55%, transparent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
::selection { background: color-mix(in srgb, var(--color-accent) 30%, transparent); }

/* — rules — */
.hr {
  height: 1px; border: 0; margin: var(--space-4) 0;
  background: var(--color-divider);
}

/* — buttons — */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; text-decoration: none;
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size:clamp(17px,16.82px + 0.05vw,17.5px); line-height: 1.2; color: var(--color-text); /* matches the .input's 14px —
     the pair sits side by side in sign-up rows */
  background: transparent; border: 1px solid transparent;
  padding: var(--space-2) calc(var(--space-3) * 1.2);
  border-radius: var(--radius-md);
}
.btn svg { display: block; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: var(--color-accent); color: var(--color-bg); }
.btn-primary:hover { background: var(--color-accent-600); }
.btn-primary:active { background: var(--color-accent-700); }
.btn-secondary { border-color: var(--color-divider); }
.btn-secondary:hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.btn-secondary:active { background: color-mix(in srgb, var(--color-text) 14%, transparent); }
.btn-ghost { color: var(--color-accent); padding-inline: var(--space-1); }
.btn-ghost:hover { background: color-mix(in srgb, var(--color-accent) 10%, transparent); }
.btn-ghost:active { background: color-mix(in srgb, var(--color-accent) 18%, transparent); }
.btn-icon { width: 36px; height: 36px; padding: 0; }
.btn-block { width: 100%; margin-top: var(--space-2); }

/* — forms — */
.field > label {
  display: block; font-size:clamp(15px,14.82px + 0.05vw,15.5px); margin-bottom: 5px;
  color: color-mix(in srgb, var(--color-text) 70%, transparent);
}
.input {
  width: 100%; min-height: 36px; padding: 6px 10px; font: inherit;
  font-size:clamp(17px,16.82px + 0.05vw,17.5px); color: var(--color-text); caret-color: var(--color-accent);
  background: var(--color-surface);
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.input:hover { border-color: color-mix(in srgb, var(--color-text) 45%, transparent); }
.input:focus-visible { border-color: var(--color-accent); outline-offset: 0; }
textarea.input { min-height: 90px; resize: vertical; }
.radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size:clamp(17px,16.82px + 0.05vw,17.5px); }
.radio input, .seg-opt input {
  position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none;
}
.radio .dot {
  width: 16px; height: 16px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--color-divider);
}
.radio:hover .dot { border-color: var(--color-accent); }
.radio input:checked + .dot {
  border-color: var(--color-accent); background: var(--color-accent);
  box-shadow: inset 0 0 0 4px var(--color-bg);
}
.radio input:focus-visible + .dot { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.seg {
  display: inline-flex; overflow: hidden;
  border: 1px solid var(--color-divider); border-radius: var(--radius-md);
}
.seg-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; font-size:clamp(16px,15.82px + 0.05vw,16.5px); cursor: pointer;
}
.seg-opt + .seg-opt { border-left: 1px solid var(--color-divider); }
.seg-opt:has(input:checked) { background: var(--color-accent); color: var(--color-bg); }
.seg-opt:not(:has(input:checked)):hover { background: color-mix(in srgb, var(--color-text) 7%, transparent); }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--color-accent); outline-offset: -2px; }

/* — cards — */
.card {
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-3); border-radius: var(--radius-md); background: var(--color-surface);
}
.card-kicker { font-size:clamp(13px,12.82px + 0.05vw,13.5px); letter-spacing: 0.1em; text-transform: uppercase; color: var(--color-accent); }
.card-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size:clamp(17px,16.47px + 0.14vw,18.5px); line-height: 1.2;
}
.card-body { margin: 0; font-size:clamp(16px,15.82px + 0.05vw,16.5px); opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size:clamp(13.5px,13.32px + 0.05vw,14px);
  color: color-mix(in srgb, var(--color-text) 50%, transparent);
}
.elev-sm { box-shadow: var(--shadow-sm); }
.elev-md { box-shadow: var(--shadow-md); }
.elev-lg { box-shadow: var(--shadow-lg); }

/* — tags — */
.tag {
  display: inline-flex; align-items: center; font-size:clamp(13.5px,13.32px + 0.05vw,14px);
  letter-spacing: 0.02em; padding: 3px 10px;
  border-radius: calc(var(--radius-md) * 0.75);
}
.tag-accent { background: var(--color-accent-100); color: var(--color-accent-800); }
.tag-accent-2 { background: var(--color-accent-2-100); color: var(--color-accent-2-800); }
.tag-neutral { background: var(--color-neutral-100); color: var(--color-neutral-800); }
.tag-outline { border: 1px solid var(--color-accent); color: var(--color-accent); }

/* — navigation — */
.nav {
  display: flex; align-items: center; gap: var(--space-4);
  padding: var(--space-3) var(--space-4);
  border-bottom: none;
}
.nav-brand {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size:clamp(18px,17.3px + 0.19vw,20px); margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size:clamp(17px,16.82px + 0.05vw,17.5px); }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size:clamp(17px,16.82px + 0.05vw,17.5px); }
.table th {
  text-align: left; font-size:clamp(13.5px,13.32px + 0.05vw,14px); letter-spacing: 0.08em; text-transform: uppercase;
  color: color-mix(in srgb, var(--color-text) 60%, transparent);
  padding: var(--space-2); border-bottom: 1px solid var(--color-divider);
}
.table td {
  padding: var(--space-2);
  border-bottom: 1px solid color-mix(in srgb, var(--color-text) 8%, transparent);
}
.table tbody tr:hover { background: color-mix(in srgb, var(--color-text) 4%, transparent); }

/* — dialog — */
.dialog-backdrop {
  position: fixed; inset: 0; display: grid; place-items: center;
  padding: var(--space-4);
  background: color-mix(in srgb, var(--color-neutral-900) 50%, transparent);
}
.dialog {
  width: min(440px, 100%); display: flex; flex-direction: column; gap: var(--space-3);
  padding: var(--space-4); border-radius: var(--radius-lg);
  background: var(--color-surface); box-shadow: var(--shadow-lg);
}
.dialog-title {
  font-family: var(--font-heading); font-weight: var(--font-heading-weight);
  font-size:clamp(19.5px,18.62px + 0.23vw,22px);
}
.dialog-body { font-size:clamp(17px,16.82px + 0.05vw,17.5px); opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* — blueprint frame: components are wireframe objects (see .blueprint
     and .corner above) — square, transparent, hairline-bordered — */
.card, .btn, .input, .tag, .seg, .dialog { border-radius: 0; }
.card, .dialog { background: transparent; border: 1px solid var(--color-divider); }
.btn { border: 1px solid var(--color-divider); }
.btn-primary { border-color: var(--color-accent); }
.btn-ghost { border-color: transparent; }


/* --- Mobile ergonomics -------------------------------------------------
   Added in the mobile pass. The type scale above is fluid; these are the
   platform behaviours that a desktop-first build had never set. */
html { -webkit-text-size-adjust: 100%; }
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-wrap: break-word;
}
img, svg, video { max-width: 100%; }

/* Touch targets. Scoped to controls -- never to inline prose links, which
   would break line flow. */
@media (max-width: 899px) {
  .btn, button, summary, [role="button"],
  input[type="submit"], input[type="button"] { min-height: 44px; }
  .input, select, textarea { min-height: 44px; font-size: 16px; } /* 16px stops iOS zoom-on-focus */
}

::selection { background: var(--color-accent); color: #fff; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Site navigation ---------------------------------------------------
   Desktop flyouts are pure CSS (:hover / :focus-within) so they survive a
   static build -- the previous version drove them from React state, which
   the generator strips, leaving dead chevrons that opened nothing.
   The mobile panel uses a checkbox so it needs no JavaScript either. Every
   destination is a real <a> in the DOM at all widths. */

.navbar {
  max-width: 1280px; margin: 0 auto;
  padding: 13px clamp(16px, 3.5vw, 56px);
  display: flex; align-items: center; gap: 12px 22px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--color-text); margin-right: auto; }
.brand-mark { flex: none; display: block; }
.brand-name { display: block; font: 600 clamp(19px,18.1px + 0.24vw,22px)/1 var(--font-heading); letter-spacing: .03em; text-transform: uppercase; }
.brand-sub  { display: block; margin-top: 3px; font: 400 clamp(12.5px,12.32px + 0.05vw,13px)/1.4 var(--font-body); letter-spacing: .15em; text-transform: uppercase; color: color-mix(in srgb, var(--color-text) 62%, transparent); }

.nav { font: 600 clamp(16px,15.82px + 0.05vw,16.5px)/1.3 var(--font-heading); letter-spacing: .07em; text-transform: uppercase; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 1px; }
.nav-item { position: relative; }
.nav-link { display: flex; align-items: center; gap: 6px; padding: 11px 12px; color: inherit; text-decoration: none; }
.nav-link:hover, .nav-link:focus-visible { color: var(--color-accent-700); }
.nav-link[aria-current="page"] { color: var(--color-accent-700); }
.nav-caret { flex: none; transition: transform .18s ease; }

.nav-menu { list-style: none; margin: 0; padding: 7px; }
.nav-menu a {
  display: block; padding: 11px 13px; text-decoration: none; color: var(--color-text);
  font: 500 clamp(15.5px,15.32px + 0.05vw,16px)/1.35 var(--font-body);
  letter-spacing: .01em; text-transform: none;
}
.nav-menu a:hover, .nav-menu a:focus-visible {
  background: color-mix(in srgb, var(--color-accent) 11%, transparent);
  color: var(--color-accent-700);
}
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-burger { display: none; }

.nav-cta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.nav-phone { display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--color-text); }
.nav-phone:hover, .nav-phone:focus-visible { color: var(--color-accent-700); }
.nav-phone-num { font: 600 clamp(18px,17.3px + 0.19vw,20px)/1 var(--font-heading); letter-spacing: .02em; white-space: nowrap; }

@media (min-width: 980px) {
  .has-menu > .nav-menu {
    position: absolute; top: 100%; left: 0; z-index: 50;
    min-width: 290px; background: var(--color-bg); box-shadow: var(--shadow-lg);
    opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .16s ease, transform .16s ease, visibility .16s;
  }
  .has-menu:hover > .nav-menu,
  .has-menu:focus-within > .nav-menu { opacity: 1; visibility: visible; transform: none; }
  .has-menu:hover > .nav-link .nav-caret,
  .has-menu:focus-within > .nav-link .nav-caret { transform: rotate(180deg); }
  .nav-menu--areas { left: auto; right: 0; width: min(540px, 78vw); display: grid; grid-template-columns: 1fr 1fr; }
}

@media (max-width: 979px) {
  .nav { display: none; flex-basis: 100%; order: 9; }
  .nav-toggle:checked ~ .nav { display: block; }
  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-item { border-top: 1px solid var(--color-divider); }
  .nav-link { padding: 14px 2px; min-height: 44px; }
  .nav-caret { display: none; }            /* nothing to expand: already open */
  .has-menu > .nav-menu { padding: 0 0 10px 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
  .nav-menu a { padding: 11px 8px; min-height: 44px; display: flex; align-items: center; }
  .nav-burger {
    display: flex; align-items: center; justify-content: center;
    width: 46px; height: 46px; flex: none; cursor: pointer;
    border: 1px solid var(--color-divider); background: transparent; color: var(--color-text);
  }
  .nav-burger:hover { border-color: var(--color-accent); color: var(--color-accent-700); }
  .nav-toggle:focus-visible ~ .nav-burger { outline: 2px solid var(--color-accent); outline-offset: 2px; }
  .nav-burger .bar { transition: opacity .18s ease, transform .18s ease; transform-origin: center; }
  .nav-toggle:checked ~ .nav-burger .bar-top    { transform: translateY(6px) rotate(45deg); }
  .nav-toggle:checked ~ .nav-burger .bar-mid    { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger .bar-bottom { transform: translateY(-6px) rotate(-45deg); }
  .nav-cta .btn { display: none; }         /* the CTA repeats inside the panel */
  .nav-phone-num { display: none; }        /* icon only in a crowded bar */
  .nav-panel-cta { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px 2px 4px; border-top: 1px solid var(--color-divider); }
}
@media (min-width: 980px) { .nav-panel-cta { display: none; } }

/* Keep the brand, phone and burger on one row on a phone: the brand block is
   wide enough to push the controls onto a second line otherwise. */
@media (max-width: 979px) {
  .navbar { gap: 10px 12px; }
  .brand { flex: 1 1 auto; min-width: 0; margin-right: 6px; }
  .brand > span { min-width: 0; }
  .brand-sub { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .nav-cta { flex: none; gap: 6px; }
}
@media (max-width: 600px) {
  .brand-sub { display: none; }
  .brand-mark { width: 44px; height: 23px; }
  .brand-name { font-size: clamp(17px,16.6px + 0.1vw,19px); }
}
