/* Hefty Industries — draft v2. Design tokens first; everything else reads them.
   Dark is the brand look; light follows the visitor's system or the toggle. */

:root {
  color-scheme: dark;
  --bg: #0a0d11;          /* graphite, near black */
  --bg-2: #10151b;        /* raised panel */
  --bg-3: #161d25;        /* card */
  --ink: #e7edf3;         /* body text   15.9:1 on --bg */
  --ink-2: #a3b1bf;       /* muted text   8.3:1 on --bg */
  --line: rgba(120, 200, 255, 0.16);   /* HUD hairline */
  --line-strong: rgba(120, 200, 255, 0.38);
  --accent: #5fd4ff;      /* arc blue    11.4:1 on --bg */
  --accent-ink: #04121a;  /* text on accent fills */
  --accent-glow: rgba(95, 212, 255, 0.35);
  --warn: #ffcf5c;        /* placeholder marker */
  --field-border: #6a8299; /* form field edge, 3:1+ on panels (WCAG 1.4.11) */
  --radius: 4px;
  --font-display: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.4rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(2rem, 1.5rem + 2.6vw, 3.4rem);
  --wrap: 72rem;
  --gutter: 1rem;
  --header-h: 4rem;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg: #f3f5f7; --bg-2: #e9edf1; --bg-3: #ffffff;
    --ink: #0d1520; --ink-2: #44515f;
    --line: rgba(10, 60, 100, 0.14); --line-strong: rgba(10, 60, 100, 0.32);
    --accent: #085f8a; --accent-ink: #ffffff; --accent-glow: rgba(10, 108, 156, 0.18);
    --warn: #7a4f00; --field-border: #6b7a8a;
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f5f7; --bg-2: #e9edf1; --bg-3: #ffffff;
  --ink: #0d1520; --ink-2: #44515f;
  --line: rgba(10, 60, 100, 0.14); --line-strong: rgba(10, 60, 100, 0.32);
  --accent: #085f8a; --accent-ink: #ffffff; --accent-glow: rgba(10, 108, 156, 0.18);
  --warn: #7a4f00; --field-border: #6b7a8a;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--font-body);
  /* faint drafting grid */
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  background-attachment: fixed;
  background-position: -1px -1px;
}
body::before { /* fade the grid so text sits on calm ground */
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 70% 0%, transparent 0%, var(--bg) 70%);
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.6em; font-weight: 600; }
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3, h4 { font-size: var(--step-1); }
p { margin: 0 0 1em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; border-radius: var(--radius); }
.skip:focus { top: 1rem; }

/* HUD label: "01 // SERVICES" */
.tag {
  font: 500 0.75rem/1 var(--font-mono); letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
}
.tag::before { content: ""; width: 1.5rem; height: 1px; background: currentColor; }
.lead { font-size: var(--step-1); color: var(--ink-2); max-width: 40rem; }
.muted { color: var(--ink-2); }


/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: .75rem 1.4rem; border-radius: var(--radius);
  font: 600 1rem/1.1 var(--font-display); letter-spacing: .02em; text-decoration: none;
  border: 1px solid var(--accent); cursor: pointer; transition: box-shadow .2s, transform .2s, background .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 0 0 0 var(--accent-glow); }
.btn-primary:hover { box-shadow: 0 0 24px 2px var(--accent-glow); transform: translateY(-1px); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--accent); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--ink); text-decoration: none; font: 600 1.05rem/1 var(--font-display); letter-spacing: .08em; text-transform: uppercase; min-height: 44px; }
.brand svg { width: 32px; height: 32px; }
.brand small { display: block; font: 500 .62rem/1 var(--font-mono); letter-spacing: .2em; color: var(--ink-2); margin-top: .3rem; }
.nav { display: none; margin-left: auto; gap: .25rem; }
.nav a { color: var(--ink-2); text-decoration: none; font-size: .95rem; padding: .7rem .7rem; border-radius: var(--radius); }
.nav a:hover { color: var(--ink); background: var(--bg-3); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: .5rem; }
.theme-toggle {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius);
  background: transparent; color: var(--ink-2); border: 1px solid var(--line); cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.theme-toggle svg { width: 20px; height: 20px; }
.header-cta { display: none; }
@media (max-width: 24rem) {
  .brand { font-size: .92rem; letter-spacing: .05em; gap: .45rem; }
  .brand svg { width: 28px; height: 28px; }
  .site-header .wrap { gap: .5rem; }
}
@media (min-width: 60rem) {
  .nav { display: flex; }
  .header-actions { margin-left: .5rem; }
  .header-cta { display: inline-flex; min-height: 44px; padding: .6rem 1rem; font-size: .95rem; }
}

/* ---------- sections ---------- */
section { padding-block: clamp(3.5rem, 2.5rem + 5vw, 6.5rem); }
.section-head { max-width: 46rem; margin-bottom: 2.5rem; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 1rem + 4vw, 4.5rem); padding-bottom: 3rem; overflow: hidden; }
.hero .wrap { display: grid; gap: 2rem; align-items: center; }
.hero h1 { max-width: 15ch; }
.hero h1 em { font-style: normal; color: var(--accent); text-shadow: 0 0 28px var(--accent-glow); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 1.75rem 0 1.5rem; }
.proof-strip { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; font: 500 .82rem/1.4 var(--font-mono); color: var(--ink-2); }
.proof-strip li { display: flex; gap: .6rem; align-items: baseline; }
.proof-strip li::before { content: "▸"; color: var(--accent); }
.hq { position: relative; aspect-ratio: 1 / 1; max-width: 34rem; width: 100%; justify-self: center; }
.hq svg { width: 100%; height: 100%; }
@media (min-width: 60rem) {
  .hero .wrap { grid-template-columns: 1.1fr 0.9fr; }
}

/* HQ illustration motion: one slow beacon. Off for reduced motion. */
.hq .crown { filter: drop-shadow(0 0 10px var(--accent)); }
.hq .beam { transform-origin: 300px 128px; animation: sweep 9s ease-in-out infinite; opacity: .55; }
.hq .pulse { animation: pulse 3.2s ease-in-out infinite; transform-origin: 300px 128px; }
@keyframes sweep { 0%,100% { transform: rotate(-24deg); } 50% { transform: rotate(24deg); } }
@keyframes pulse { 0%,100% { opacity: .35; } 50% { opacity: .9; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hq .beam, .hq .pulse { animation: none; }
  .btn { transition: none; }
  .btn-primary:hover { transform: none; }
}

/* ---------- HUD panel (cards with corner brackets) ---------- */
.panel {
  position: relative; background: var(--bg-3); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.5rem;
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 14px; height: 14px; border: 2px solid var(--accent); pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.panel::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }
.panel h3, .panel h4 { margin-bottom: .4rem; }
.panel p:last-child { margin-bottom: 0; }
.panel .code { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; color: var(--ink-2); margin-bottom: .9rem; display: block; }
.icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 1rem; }

/* ---------- service lines ---------- */
.line-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.line-head h3 { margin: 0; font-size: var(--step-2); }
.line-head p { margin: 0; color: var(--ink-2); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12.5rem), 1fr)); }
.service-line + .service-line, .service-line + .duo { margin-top: 3rem; }
.duo { display: grid; gap: 3rem 1.5rem; }
.duo .service-line + .service-line { margin-top: 0; }
@media (min-width: 48rem) { .duo { grid-template-columns: 1fr 1fr; } }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr)); }
.note { font-size: .9rem; color: var(--ink-2); border-left: 2px solid var(--line-strong); padding-left: .9rem; margin-top: 1.25rem; max-width: 46rem; }

/* ---------- case study ---------- */
.case { display: grid; gap: 2rem; align-items: start; }
@media (min-width: 60rem) { .case { grid-template-columns: 1fr 1fr; } }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat { border-top: 1px solid var(--line-strong); padding-top: .8rem; }
.stat b { display: block; font: 600 var(--step-2)/1.1 var(--font-display); color: var(--accent); }
.stat span { font-size: .9rem; color: var(--ink-2); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: .65rem; }
.checklist li { display: grid; grid-template-columns: 1.25rem 1fr; gap: .6rem; }
.checklist li::before { content: ""; width: .6rem; height: .6rem; margin-top: .55rem; border: 1px solid var(--accent); transform: rotate(45deg); }

/* ---------- steps ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; counter-reset: step; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; }
.steps .panel::before { content: ""; }
.step-n { font: 600 2.6rem/1 var(--font-display); color: transparent; -webkit-text-stroke: 1px var(--accent); margin-bottom: .75rem; display: block; }

/* ---------- pricing ---------- */
.tiers { display: grid; gap: 1rem; }
@media (min-width: 60rem) { .tiers { grid-template-columns: repeat(3, 1fr); } }
.tier { display: flex; flex-direction: column; }
.tier.featured { border-color: var(--line-strong); box-shadow: 0 0 0 1px var(--accent-glow), 0 0 40px -10px var(--accent-glow); }
.group-title { font-size: var(--step-1); margin: 0 0 1.25rem; padding-bottom: .6rem; border-bottom: 1px solid var(--line); }
.tiers + .group-title { margin-top: 3rem; }
.tier .badge { position: absolute; top: -.75rem; right: 1rem; background: var(--accent); color: var(--accent-ink); font: 600 .7rem/1 var(--font-mono); letter-spacing: .12em; padding: .35rem .6rem; border-radius: 2px; text-transform: uppercase; }
.price { font: 600 var(--step-2)/1 var(--font-display); margin: .5rem 0 .25rem; }
.price small { font: 400 .95rem/1 var(--font-body); color: var(--ink-2); }
.tier .then { color: var(--ink-2); font-size: .95rem; margin-bottom: 1rem; }
.tier ul { margin: 0 0 1rem; padding-left: 1.1rem; }
.tier ul li { margin-bottom: .35rem; }
.tier .for { font-weight: 600; }
.addon { margin-top: 1rem; display: grid; gap: 1rem; }
@media (min-width: 48rem) { .addon { grid-template-columns: 1fr 1fr; } }

/* ---------- FAQ ---------- */
.faq { max-width: 50rem; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2.5rem 1.1rem 0; position: relative;
  font: 600 1.08rem/1.35 var(--font-display); min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: .25rem; top: .9rem; font: 400 1.5rem/1 var(--font-mono); color: var(--accent); }
.faq details[open] summary::after { content: "−"; }
.faq details p { color: var(--ink-2); padding-bottom: .5rem; }

/* ---------- about ---------- */
.about { max-width: 46rem; }

/* ---------- contact ---------- */
.contact { display: grid; gap: 2rem; }
@media (min-width: 60rem) { .contact { grid-template-columns: 0.9fr 1.1fr; } }
.contact dl { display: grid; gap: 1rem; margin: 1.5rem 0 0; }
.contact dt { font: 500 .72rem/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-2); margin-bottom: .3rem; }
.contact dd { margin: 0; font-size: 1.1rem; }
form .field { display: grid; gap: .35rem; margin-bottom: 1rem; }
form .row { display: grid; gap: 0 1rem; }
@media (min-width: 40rem) { form .row { grid-template-columns: 1fr 1fr; } }
label { font-weight: 600; font-size: .95rem; }
label .opt { font-weight: 400; color: var(--ink-2); }
input, select, textarea {
  width: 100%; min-height: 48px; padding: .7rem .85rem; font: inherit; color: var(--ink);
  background: var(--bg-2); border: 1px solid var(--field-border); border-radius: var(--radius);
}
textarea { min-height: 7.5rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.form-note { font-size: .88rem; color: var(--ink-2); margin-top: .75rem; }
.form-status { margin-top: .75rem; font-weight: 600; }
.form-status:empty { display: none; }
.form-req { font-size: .88rem; color: var(--ink-2); margin-bottom: 1rem; }
.req { color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--warn); border-width: 2px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 2.5rem; font-size: .9rem; color: var(--ink-2); }
.site-footer .wrap { display: grid; gap: 1rem; }
@media (min-width: 48rem) { .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; } }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .25rem 1rem; }
.site-footer nav a { color: var(--ink-2); padding: .5rem 0; display: inline-block; }
.site-footer .privacy { margin-top: .5rem; }
.site-footer .privacy summary { cursor: pointer; display: inline-block; padding: .5rem 0; min-height: 44px; text-decoration: underline; text-underline-offset: .2em; }
.site-footer .privacy p { max-width: 40rem; margin-top: .25rem; }

/* Sticky phone CTA is deliberately NOT used: it would hide focused content
   (WCAG 2.2, 2.4.11) and duplicates the header button. */
