/* Southstack — site stylesheet.
   Part 1 is the "Organic" design-system tokens + components, verbatim from the
   Claude Design project. Part 2 is the site-level overrides the mockup carried
   in its <helmet> block, plus classes replacing the mockup's inline-only bits. */
/* Fonts are self-hosted (site/fonts/) so the site's CSP can stay strict —
   no fonts.googleapis.com / fonts.gstatic.com at runtime. Files fetched from
   Google Fonts (Caprasimo v6, Figtree v9 variable); re-download to update. */
@font-face {
  font-family: 'Caprasimo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/caprasimo-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: 'Caprasimo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/caprasimo-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/figtree-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: 'Figtree';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/figtree-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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --color-bg: #f5ead8;
  --color-surface: #ebddc5;
  --color-text: #201e1d;
  --color-accent: #c67139;
  --color-accent-2: #7a8a5e;
  --color-divider: color-mix(in srgb, #201e1d 16%, transparent);

  --color-neutral-100: #f9f4ed;
  --color-neutral-200: #eee7db;
  --color-neutral-300: #dcd3c4;
  --color-neutral-400: #c0b6a5;
  --color-neutral-500: #a19786;
  --color-neutral-600: #82796a;
  --color-neutral-700: #645c50;
  --color-neutral-800: #474238;
  --color-neutral-900: #2e2b25;

  --color-accent-100: #fff2eb;
  --color-accent-200: #ffe1d0;
  --color-accent-300: #ffc6a5;
  --color-accent-400: #f6a06b;
  --color-accent-500: #d67f48;
  --color-accent-600: #b2622d;
  --color-accent-700: #8c491a;
  --color-accent-800: #643312;
  --color-accent-900: #402310;

  --color-accent-2-100: #f0fae1;
  --color-accent-2-200: #e1eecc;
  --color-accent-2-300: #ccdbb2;
  --color-accent-2-400: #aebf92;
  --color-accent-2-500: #8fa073;
  --color-accent-2-600: #728157;
  --color-accent-2-700: #56633f;
  --color-accent-2-800: #3d472b;
  --color-accent-2-900: #272e1b;

  --font-heading: "Caprasimo", system-ui, sans-serif;
  --font-heading-weight: 400;
  --font-body: "Figtree", system-ui, sans-serif;

  --space-1: 4.4px;
  --space-2: 8.8px;
  --space-3: 13.2px;
  --space-4: 17.6px;
  --space-6: 26.4px;
  --space-8: 35.2px;

  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 28px;

  --shadow-sm: 0 1px 2px color-mix(in srgb, #2e2b25 14%, transparent);
  --shadow-md: 0 3px 10px color-mix(in srgb, #2e2b25 16%, transparent);
  --shadow-lg: 0 12px 32px color-mix(in srgb, #2e2b25 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); }

.washed { filter: saturate(0.6) contrast(0.85) brightness(1.1) opacity(0.94); }

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; font-size: 15px; 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: 42px; }
h2 { font-size: 32px; }
h3 { font-size: 25px; }
h4 { font-size: 20px; }
h5 { font-size: 16px; }
h6 { font-size: 13px; 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: 11px; 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); }

.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: 14px; line-height: 1.2; color: var(--color-text);
  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); color: var(--color-bg); }
.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); color: var(--color-text); }
.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: 12px; 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: 14px; 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: 14px; }
.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: 13px; 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: 10px; 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: 17px; line-height: 1.2;
}
.card-body { margin: 0; font-size: 13px; opacity: 0.8; flex: 1; }
.card-meta {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
  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: 11px;
  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: 18px; margin-right: auto;
}
.nav a { color: inherit; text-decoration: none; font-size: 14px; }
.nav a:hover, .nav a[aria-current='page'] { color: var(--color-accent); }

/* — tables — */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th {
  text-align: left; font-size: 11px; 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: 20px;
}
.dialog-body { font-size: 14px; opacity: 0.85; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-2); margin-top: var(--space-2); }

/* — rounded frame: everything softens, small controls go pill — */
.card, .dialog { border-radius: calc(var(--radius-lg) * 1.15); }
.btn, .tag, .seg, .input { border-radius: 999px; }
.input { padding-inline: 14px; }

/* ══════════════════════════════════════════════════════════════════════════
   Part 2 — site-level overrides (the mockup's <helmet> block) and the few
   classes that replace design-tool-only constructs.
   ══════════════════════════════════════════════════════════════════════ */

body {
  /* the display face stays Caprasimo for the wordmark only; headings set in
     the body face so the page reads like a software company, not a jam label */
  --font-display: "Caprasimo", system-ui, sans-serif;
  --font-heading: "Figtree", system-ui, sans-serif;
  --font-heading-weight: 700;
  margin: 0; text-wrap: pretty;
  font-family: var(--font-body); color: var(--color-text);
  background:
    radial-gradient(820px 560px at 88% -140px, color-mix(in srgb, var(--color-accent-200) 75%, transparent), transparent 62%),
    radial-gradient(700px 580px at -10% 88%, color-mix(in srgb, var(--color-accent-2-200) 65%, transparent), transparent 60%),
    var(--color-bg);
  background-attachment: fixed;
}
a { color: var(--color-accent-700); text-underline-offset: 3px; }
a:hover { color: var(--color-accent-600); }

/* sticky translucent header (was inline on the mockup's <header>) */
.site-header {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--color-divider);
}
.site-header .nav {
  max-width: 1200px; margin: 0 auto;
  padding: 14px clamp(20px, 5vw, 72px);
  gap: 12px clamp(14px, 2.4vw, 32px);
  flex-wrap: wrap;
}
.brand-lockup {
  display: flex; align-items: center; gap: 13px;
  margin-right: auto; cursor: pointer; text-decoration: none;
  color: inherit;
}
.brand-lockup:hover { color: inherit; }
.brand-word {
  font-family: var(--font-display); font-size: 17px;
  letter-spacing: 0.07em; text-transform: uppercase;
}
.brand-word .tld {
  font-size: 0.52em; letter-spacing: 0.02em; color: #8c491a;
  vertical-align: baseline; margin-left: 0.12em;
}
/* the primary CTA in the nav is a link, not a button element */
a.btn { text-decoration: none; }

/* portfolio image placeholders (replace the design tool's <image-slot>) */
.img-placeholder {
  width: 100%; display: grid; place-items: center; gap: 10px;
  background:
    radial-gradient(420px 260px at 70% 20%, color-mix(in srgb, var(--color-accent-200) 55%, transparent), transparent 70%),
    var(--color-surface);
  border: 1.5px dashed color-mix(in srgb, var(--color-text) 22%, transparent);
  border-radius: var(--radius-lg); overflow: hidden;
  color: color-mix(in srgb, var(--color-text) 45%, transparent);
}
.img-placeholder .ph-inner { display: grid; place-items: center; gap: 10px; padding: 24px; text-align: center; }
.img-placeholder img { height: 56px; width: auto; opacity: 0.35; }
.img-placeholder span { font-size: 12.5px; letter-spacing: 0.06em; text-transform: uppercase; font-weight: 600; }
.ratio-4-3 { aspect-ratio: 4 / 3; }
.ratio-21-9 { aspect-ratio: 21 / 9; }

/* section eyebrow (accent dash + uppercase label) */
.eyebrow { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; }
.eyebrow .dash { width: 36px; height: 3px; border-radius: 999px; background: var(--color-accent); flex: none; }
.eyebrow .label {
  font-size: 12.5px; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--color-accent-700); font-weight: 600;
}

/* the dark sage full-bleed band (process / principles sections) */
.band-sage {
  background:
    radial-gradient(900px 420px at 85% -10%, color-mix(in srgb, var(--color-accent-2-700) 65%, transparent), transparent 64%),
    var(--color-accent-2-800);
  color: var(--color-neutral-100);
}

/* numbered process step marker */
.step-num {
  width: 42px; height: 42px; border-radius: 999px;
  border: 1.5px solid color-mix(in srgb, var(--color-accent-300) 70%, transparent);
  display: grid; place-items: center; font-size: 14px;
  color: var(--color-accent-300); margin-bottom: 16px;
}

/* contact form status line */
.form-status { font-size: 13.5px; color: color-mix(in srgb, var(--color-text) 60%, transparent); }
.form-status.error { color: #a03123; }

/* honeypot — visually removed, still in the form for bots */
.hp-field {
  position: absolute !important; left: -9999px !important;
  width: 1px; height: 1px; overflow: hidden;
}

[hidden] { display: none !important; }

/* ══════════════════════════════════════════════════════════════════════════
   Mobile (≤720px) — hamburger nav, hero art placement, project stacking.
   ══════════════════════════════════════════════════════════════════════ */

/* desktop: the toggle is invisible and the link group dissolves into the
   header's flex row, so nothing about the wide layout changes */
.nav-toggle { display: none; }
.nav-links { display: contents; }

@media (max-width: 720px) {
  .site-header .nav { flex-wrap: wrap; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; cursor: pointer;
    background: transparent; color: var(--color-text);
    border: 1px solid var(--color-divider); border-radius: 12px;
  }
  .nav-toggle .icon-close { display: none; }
  .site-header.nav-open .icon-menu { display: none; }
  .site-header.nav-open .icon-close { display: block; }

  .site-header .nav-links {
    display: none; flex-basis: 100%; flex-direction: column; align-items: stretch;
    gap: 2px; margin-top: 6px; padding: 10px 0 16px;
    border-top: 1px solid var(--color-divider);
  }
  .site-header.nav-open .nav-links { display: flex; }
  .site-header .nav-links a { font-size: 16px; padding: 9px 4px; }
  .site-header .nav-links a.btn {
    align-self: flex-start; margin-top: 10px;
    padding: 11px 24px; font-size: 15px;
  }

  /* hero art shrinks into the pocket right of the heading's orange lines,
     above the body copy. Measured at the 30px phone type: the longest orange
     line ends ~x300 and the copy starts y231; the inline top:140px already
     clears the second heading line, and the calc pins the art's left edge at
     x278, just past "part you're tired" (~x268). 148px wide = ~86px tall. */
  #ss-art {
    right: 12px !important;
    width: min(148px, calc(100vw - 290px)) !important;
  }

  /* single-column project layouts read text first, screenshot after */
  .mobile-order-last { order: 1; }
}

/* below ~380px the heading wraps one line deeper (copy starts y266, the last
   line "of doing." ends x151) — the art drops into the whitespace beside it,
   still above the paragraph. 107px wide = ~62px tall, bottom lands y262. */
@media (max-width: 379px) {
  #ss-art {
    top: 200px !important;
    width: min(107px, calc(100vw - 183px)) !important;
  }
}

/* ══════════════════════════════════════════════════════════════════════════
   Portfolio mockup previews — scaled live iframes, click to maximize
   ══════════════════════════════════════════════════════════════════════════ */
.demo-thumb {
  position: relative; display: block; width: 100%; padding: 0;
  border: 1px solid var(--color-divider); border-radius: var(--radius-lg);
  overflow: hidden; cursor: zoom-in; background: var(--color-surface);
  box-shadow: var(--shadow-md);
}
.demo-thumb iframe { display: block; width: 100%; height: 100%; border: 0; pointer-events: none; }
.demo-thumb:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 3px; }
.demo-expand {
  position: absolute; right: 14px; bottom: 14px;
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px;
  border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase;
  background: color-mix(in srgb, var(--color-neutral-900) 74%, transparent);
  color: var(--color-neutral-100);
  transition: background 0.15s ease;
}
.demo-thumb:hover .demo-expand { background: var(--color-neutral-900); }

.demo-lightbox {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: clamp(16px, 4vw, 48px);
  background: color-mix(in srgb, var(--color-neutral-900) 84%, transparent);
  backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
}
.demo-lightbox[hidden] { display: none; }
.demo-lightbox-frame {
  width: min(1500px, 100%, calc((100vh - 96px) * 4 / 3));
  aspect-ratio: 4 / 3; border-radius: var(--radius-md); overflow: hidden;
  background: var(--color-neutral-900); box-shadow: var(--shadow-lg);
}
.demo-lightbox-frame iframe { display: block; width: 100%; height: 100%; border: 0; }
.demo-lightbox-close {
  position: absolute; top: 20px; right: 20px; width: 44px; height: 44px;
  display: grid; place-items: center; border: 0; border-radius: 999px; cursor: pointer;
  background: color-mix(in srgb, #ffffff 16%, transparent); color: #ffffff;
}
.demo-lightbox-close:hover { background: color-mix(in srgb, #ffffff 30%, transparent); }
