/* =========================================================
   GraphersDesk 2.0 · Design tokens and components
   Fonts: Bricolage Grotesque (display), Instrument Sans (body),
   JetBrains Mono (data labels). Enqueued in functions.php.
   ========================================================= */

:root {
  /* Color */
  --ink: #0D1117;          /* page background, dark sections */
  --ink-2: #11161E;        /* alternate dark band */
  --surface: #151B24;      /* cards on dark */
  --line: #232B37;         /* card borders on dark */
  --line-2: #2E3644;       /* inputs, pills */
  --line-3: #1E2530;       /* section dividers */
  --text: #EDEBE6;
  --text-2: #C9CED6;
  --muted: #A9AFBA;
  --saffron: #F5A524;      /* primary accent */
  --saffron-hi: #FFC766;
  --mint: #2BD4A4;         /* positive / "fix" */
  --coral: #FF8A7A;        /* constraint / problem */
  --paper: #F4F1EA;        /* light sections */
  --paper-card: #FFFFFF;
  --paper-line: #E2DDD2;
  --paper-text: #14171C;
  --paper-muted: #565D6B;
  --saffron-dark: #9A5B00; /* accent text on light, AA contrast */

  /* Type */
  --f-display: 'Bricolage Grotesque', sans-serif;
  --f-body: 'Instrument Sans', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  /* Layout */
  --wrap: 1240px;
  --gutter: 32px;
  --radius: 16px;
  --radius-sm: 10px;
  --section-y: 104px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: var(--saffron); }
a:hover { color: var(--saffron-hi); }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section-y) 0; }
.section--band { background: var(--ink-2); border-top: 1px solid var(--line-3); border-bottom: 1px solid var(--line-3); }
.stack { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; }
.gap-8 { gap: 8px; } .gap-10 { gap: 10px; } .gap-12 { gap: 12px; } .gap-14 { gap: 14px; }
.gap-16 { gap: 16px; } .gap-18 { gap: 18px; } .gap-24 { gap: 24px; } .gap-32 { gap: 32px; } .gap-36 { gap: 36px; } .gap-40 { gap: 40px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr)); gap: 48px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.grid-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 10px; }
.section-head { max-width: 760px; display: flex; flex-direction: column; gap: 14px; }

/* ---------- Type ---------- */
.disp { font-family: var(--f-display); letter-spacing: -0.02em; }
.mono { font-family: var(--f-mono); }
.eyebrow { font-family: var(--f-mono); font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--saffron); }
.muted { color: var(--muted); }
.h1 { font-family: var(--f-display); font-size: clamp(36px, 3.6vw + 22px, 72px); line-height: 1.02; font-weight: 800; letter-spacing: -0.02em; }
.h2 { font-family: var(--f-display); font-size: clamp(28px, 2.6vw + 18px, 52px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; overflow-wrap: break-word; }
.h2--sm { font-size: clamp(28px, 2.2vw + 18px, 44px); }
.h2--md { font-size: clamp(28px, 2.4vw + 18px, 48px); }
.h3 { font-family: var(--f-display); font-size: clamp(24px, 1.2vw + 18px, 34px); line-height: 1.1; font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: 19px; line-height: 1.55; max-width: 560px; }
.body-lg { font-size: 17px; line-height: 1.55; }
.label { font-family: var(--f-mono); font-size: 12px; color: var(--muted); text-transform: uppercase; }
.accent { color: var(--saffron); }

/* ---------- Buttons and pills ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: var(--radius-sm);
  font: 600 15px var(--f-body); text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn--pri { background: var(--saffron); color: var(--ink); }
.btn--pri:hover { background: var(--saffron-hi); color: var(--ink); }
.btn--sec { background: transparent; color: var(--text); border-color: #3A4352; }
.btn--sec:hover { border-color: var(--text); color: var(--text); }
.btn--block { grid-column: 1 / -1; }

.pill {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface); color: var(--text-2);
  font: 500 14px var(--f-body); cursor: pointer;
}
.pill:hover { border-color: var(--saffron); color: var(--text); }
.pill.is-on { background: var(--saffron); color: var(--ink); border-color: var(--saffron); }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.card--ink { background: var(--ink); }
.card--accent { border-color: var(--saffron); }
.card--sm { padding: 20px; }
.stat { font-family: var(--f-display); font-size: clamp(36px, 1.8vw + 26px, 52px); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; overflow-wrap: anywhere; }
.stat--md { font-size: clamp(28px, 1.4vw + 20px, 40px); }

/* ---------- Light sections ---------- */
.light { background: var(--paper); color: var(--paper-text); }
.light .muted { color: var(--paper-muted); }
.light .card { background: var(--paper-card); border-color: var(--paper-line); }
.light .eyebrow, .light .accent-dark { color: var(--saffron-dark); }
.light .btn--sec { color: var(--paper-text); border-color: #C9C2B3; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: rgba(13, 17, 23, 0.92); border-bottom: 1px solid var(--line-3); backdrop-filter: blur(8px); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 72px; flex-wrap: nowrap; }
.site-header .row { flex-wrap: nowrap; align-items: center; }
.btn { white-space: nowrap; }
.show-xs { display: none; }

/* Mobile menu */
.nav-toggle { display: none; width: 48px; height: 48px; flex: none; padding: 0; border-radius: var(--radius-sm); border: 1px solid #3A4352; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 1180px) {
  .site-header .wrap { position: relative; }
  .nav-toggle { display: inline-flex; }
  .site-header .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px; background: var(--ink); border-bottom: 1px solid var(--line-3); max-height: calc(100vh - 72px); overflow-y: auto; }
  .site-header .nav.is-open { display: flex; }
  .site-header .nav a { padding: 14px 0; border-bottom: 1px solid var(--line-3); font-size: 16px; }
  .site-header .nav a:last-child { border-bottom: 0; }
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font: 700 20px var(--f-display); }
.logo:hover { color: var(--text); }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { white-space: nowrap; color: var(--text-2); text-decoration: none; font-size: 15px; padding: 12px 4px; }
.nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 72px; }
.hero__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 56px; align-items: center; }
.ask { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.input {
  min-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-2);
  background: var(--ink); color: var(--text); padding: 0 14px; font: 400 15px var(--f-body); width: 100%;
}
.ask__row { display: flex; gap: 10px; flex-wrap: wrap; }
.ask__row .input { flex: 1 1 260px; width: auto; }
.model { padding: 32px; display: flex; flex-direction: column; gap: 24px; background: var(--ink-2); }
.model__eq { font: 700 44px/1.15 var(--f-display); text-align: center; padding: 20px 0; border-top: 1px dashed var(--line-2); border-bottom: 1px dashed var(--line-2); }
.model__eq sup { font-size: 24px; color: var(--saffron); }
.model__legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; text-align: center; }
.model__legend b { display: block; font: 400 22px var(--f-mono); }
.model__legend span { font-size: 13px; }
.live { color: var(--mint); font: 400 12px var(--f-mono); }
.agent { display: flex; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--ink); border: 1px solid var(--line-3); font-size: 14px; }

/* ---------- Pedigree ---------- */
.pedigree { border-top: 1px solid var(--line-3); border-bottom: 1px solid var(--line-3); padding: 32px 0; }
.pedigree__row { display: flex; gap: 16px 40px; align-items: center; flex-wrap: wrap; }
.pedigree__brand { font: 700 22px var(--f-display); color: var(--text-2); }

/* ---------- Sutra matrix ---------- */
.matrix-wrap { background: var(--ink); border-radius: 20px; padding: 24px; overflow-x: auto; }
.matrix { display: grid; grid-template-columns: 110px repeat(7, minmax(44px, 1fr)); gap: 6px; min-width: 520px; }
.matrix__head { font: 400 11px var(--f-mono); color: var(--muted); text-align: center; padding-bottom: 6px; }
.matrix__row { font: 400 13px var(--f-mono); color: var(--muted); display: flex; align-items: center; }
.matrix__head.is-on, .matrix__row.is-on { color: var(--saffron); }
.cell { height: 44px; border-radius: 8px; border: 1px solid #2A3240; background: #121821; cursor: pointer; color: #5F6876; font: 500 12px var(--f-mono); }
.cell.is-line { background: #1D2531; border-color: #3A4558; color: var(--muted); }
.cell.is-on { background: var(--saffron); border-color: var(--saffron); color: var(--ink); }
.cell:hover { border-color: var(--saffron); }
.play { display: flex; flex-direction: column; gap: 16px; min-height: 300px; }
.play__text { font: 700 30px/1.2 var(--f-display); letter-spacing: -0.02em; }

/* ---------- Services ---------- */
.svc { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 32px; padding: 40px; }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 15px; line-height: 1.45; }
.check svg { flex: none; margin-top: 2px; }
.kpi { display: flex; justify-content: space-between; gap: 12px; padding: 16px; border-radius: var(--radius-sm); background: var(--ink); }
.kpi b { font: 400 14px var(--f-mono); color: var(--saffron); }

/* ---------- Calculator ---------- */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.field b { font-family: var(--f-mono); color: var(--saffron); }
.field input:not([type=range]), .field select { min-height: 48px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: var(--ink); color: var(--text); padding: 0 14px; font: 400 15px var(--f-body); }
input[type=range] { width: 100%; accent-color: var(--saffron); min-height: 32px; }
.calc-out { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.workings { font: 400 13px/1.7 var(--f-mono); color: var(--muted); padding: 16px; border: 1px dashed var(--line-2); border-radius: var(--radius-sm); }

/* ---------- Pain to fix ---------- */
.tag-problem { font: 400 12px var(--f-mono); color: var(--coral); }
.tag-fix { font: 400 12px var(--f-mono); color: var(--mint); }
.divider { height: 1px; background: var(--line); }

/* ---------- Proof ---------- */
.shot { height: 160px; border-radius: var(--radius-sm); background: var(--ink); border: 1px dashed var(--line-2); display: flex; align-items: center; justify-content: center; }
.quote { margin: 0; display: flex; flex-direction: column; gap: 16px; padding: 36px; }
.quote p { font: 500 28px/1.3 var(--f-display); }
.tool { min-height: 56px; border: 1px solid var(--line); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; font-weight: 600; color: var(--text-2); }

/* ---------- FAQ ---------- */
.faq__item { border-bottom: 1px solid #DCD5C7; }
.faq__q { width: 100%; text-align: left; background: none; border: 0; color: inherit; font: 600 18px var(--f-body); padding: 22px 0; display: flex; justify-content: space-between; gap: 16px; cursor: pointer; min-height: 44px; }
.faq__sign { font-family: var(--f-mono); color: var(--saffron-dark); }
.faq__a { margin: 0 0 22px; line-height: 1.6; }
.faq__a[hidden] { display: none; }

/* ---------- CTA form ---------- */
.cta { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 40px; padding: 48px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; }
.form .field > * { min-width: 0; width: 100%; }
.form .full { grid-column: 1 / -1; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line-3); padding: 56px 0 40px; }
.site-footer .wrap { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 32px; }
.site-footer .col { display: flex; flex-direction: column; gap: 8px; font-size: 14px; }

/* ---------- WordPress ---------- */
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }

/* ---------- Responsive ---------- */
html, body { overflow-x: clip; }

/* Large screens */
@media (min-width: 1600px) {
  :root { --wrap: 1360px; }
}

/* Laptops and tablets landscape */
@media (max-width: 1024px) {
  :root { --gutter: 24px; --section-y: 88px; }
  .hero { padding: 72px 0 56px; }
  .hero__grid { gap: 40px; }
  .grid-2 { gap: 40px; }
  .model__eq { font-size: 38px; }
  .play__text { font-size: 26px; }
  .quote p { font-size: 24px; }
}

/* Tablets portrait and large phones */
@media (max-width: 760px) {
  :root { --gutter: 16px; --section-y: 64px; }
  .hide-sm { display: none !important; }
  .hero { padding: 48px 0 40px; }
  .lead { font-size: 17px; }
  .body-lg { font-size: 16px; }
  .card { padding: 22px; }
  .model { padding: 22px; gap: 18px; }
  .model__eq { font-size: 30px; padding: 16px 0; }
  .model__eq sup { font-size: 18px; }
  .model__legend b { font-size: 18px; }
  .svc, .cta { padding: 24px; gap: 28px; }
  .play { min-height: 0; }
  .play__text { font-size: 22px; }
  .quote { padding: 24px; }
  .quote p { font-size: 20px; }
  .matrix-wrap { padding: 16px; border-radius: 16px; }
  .pedigree__row { gap: 10px 24px; }
  .pedigree__brand { font-size: 18px; }
  .site-footer { padding: 40px 0 32px; }
  /* Long button labels may wrap instead of overflowing */
  .btn { white-space: normal; text-align: center; line-height: 1.25; padding: 12px 20px; }
  .site-header .btn { white-space: nowrap; }
  #proof .row { align-items: flex-start !important; }
}

/* Small phones */
@media (max-width: 480px) {
  .site-header .wrap { min-height: 64px; gap: 10px; }
  .logo { font-size: 18px; gap: 8px; }
  .logo svg { width: 24px; height: 24px; }
  .header-cta { padding: 0 14px; min-height: 44px; font-size: 14px; }
  .nav-toggle { width: 44px; height: 44px; }
  .hide-xs { display: none; }
  .show-xs { display: inline; }
  .ask__row .btn { flex: 1 1 100%; }
  .model__legend { grid-template-columns: 1fr; text-align: left; }
  .model__legend > div { display: flex; align-items: baseline; gap: 12px; }
  .model__legend b { display: inline; min-width: 44px; }
  .agent { flex-direction: column; gap: 2px; }
  .model__eq { font-size: 26px; }
  .calc-out { gap: 8px; }
  .calc-out .card--sm { padding: 14px; }
  .kpi { flex-direction: column; gap: 4px; }
  .pill { padding: 0 14px; font-size: 13px; }
  .grid-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool { font-size: 14px; text-align: center; padding: 0 8px; }
  .faq__q { font-size: 16px; padding: 18px 0; }
  .row > .btn--sec { flex: 1 1 auto; }
}

/* Very small phones (320px) */
@media (max-width: 360px) {
  :root { --gutter: 14px; }
  .logo { font-size: 16px; }
  .header-cta { display: none; }
  .card { padding: 18px; }
  .calc-out { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .nav-toggle span { transition: none; }
}
