/* 4AM Engineering — site styles (shared by every page). Simplified 2026-10-26. */
/* Font: Hanken Grotesk, self-hosted. Free stand-in for Halyard Display (Roberts Forensic's face, Adobe Fonts only). 2026-11-01. */
@font-face { font-family: "Hanken Grotesk"; font-style: normal; font-weight: 300 700; font-display: swap; src: url(fonts/hanken-grotesk-latin.woff2) format("woff2"); }

/* Light (white) by default; dark only when the header toggle sets data-theme="dark" (2026-11-01). */
:root {
  --night: #0b1222;
  --amber: #e9a83a;
  --amber-ink: #95560a;
  --blue-line: #8fa9d6;
  --ink: #141b2b;
  --muted: #586276;
  --line: #dde2ea;
  --bg: #ffffff;
  --surface: #ffffff;
  --bg-alt: #f3f5f8;
  --note: #fff4dc;
  --band: #ffffff;
  --band-ink: var(--ink);
  --band-muted: var(--muted);
  --band-line: var(--line);
  --mark-bg: #f3f5f8;
  --footer-bg: #f3f5f8;
  --radius: 12px;
  --max: 1080px;
  --sans: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --display: "Hanken Grotesk", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --amber-ink: #f0b44c;
  --ink: #e7ebf3;
  --muted: #9ba6ba;
  --line: #253049;
  --bg: #0e1526;
  --surface: #131c30;
  --bg-alt: #101829;
  --note: #2c2412;
  --band: var(--night);
  --band-ink: #ffffff;
  --band-muted: #b9c4d8;
  --band-line: rgba(143, 169, 214, .2);
  --mark-bg: #1f2a44;
  --footer-bg: #070c18;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; font-family: var(--sans); font-size: 17px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--amber-ink); text-underline-offset: 3px; }
img, svg { max-width: 100%; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--amber); color: var(--night); padding: 8px 14px; border-radius: 8px; z-index: 100; font-weight: 700; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 4px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--band); color: var(--band-ink); border-bottom: 1px solid var(--band-line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--band-ink); text-decoration: none; font-weight: 700; letter-spacing: .08em; font-size: .95rem; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 9px; background: var(--mark-bg); border: 1px solid rgba(233, 168, 58, .45); color: var(--amber-ink); font-family: var(--mono); font-size: .75rem; letter-spacing: 0; flex: none; }
nav { display: flex; align-items: center; gap: 4px; }
nav a { color: var(--band-muted); text-decoration: none; font-size: .93rem; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
nav a:hover { color: var(--band-ink); background: rgba(127, 127, 127, .1); }
nav a.tel { color: var(--band-ink); font-weight: 600; }
nav a.cta { background: var(--amber); color: var(--night); font-weight: 700; margin-left: 6px; }
nav a.cta:hover { background: #f3bb5c; }
@media (max-width: 860px) { nav a:not(.cta):not(.tel) { display: none; } }
@media (max-width: 560px) { .brand > span:last-child { display: none; } }
@media (max-width: 380px) { nav a { padding: 8px 8px; font-size: .86rem; } nav a.cta { margin-left: 0; } }
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; margin-left: 6px; flex: none; border-radius: 8px; border: 1px solid var(--band-line); background: transparent; color: var(--band-ink); cursor: pointer; }
.theme-toggle:hover { background: rgba(127, 127, 127, .1); }
.theme-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle .moon, :root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { display: inline-block; background: var(--amber); color: var(--night); text-decoration: none; padding: 13px 22px; border-radius: 10px; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
.btn:hover { background: #f3bb5c; }
.btn.ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn.ghost:hover { background: rgba(127, 127, 127, .1); }

/* ---------- Sections ---------- */
section { padding: 64px 0; }
@media (min-width: 900px) { section { padding: 88px 0; } }
section.alt { background: var(--bg-alt); }
:root[data-theme="dark"] section.alt { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.2rem); line-height: 1.15; margin: 0 0 28px; }
h3 { font-size: 1.1rem; margin: 0 0 4px; }
.note { color: var(--muted); margin: 24px 0 0; }

/* ---------- Hero ---------- */
.hero { background: var(--night); color: #fff; padding-bottom: 0; overflow: hidden; }
.eyebrow { font-family: var(--mono); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--amber-ink); margin: 0 0 16px; }
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.8rem); line-height: 1.05; letter-spacing: -.025em; margin: 0 0 18px; max-width: 13em; }
.sub { color: var(--band-muted); font-size: 1.1rem; margin: 0 0 32px; }
.hero-rig { margin: 48px auto 0; padding: 0 16px; max-width: 1180px; color: var(--blue-line); opacity: .7; }
.rig { display: block; width: 100%; height: auto; }
.rig path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; }
.rig .ln { stroke-width: 2.2; }
.rig .ln-thin { stroke-width: 1.4; }
@media (max-width: 700px) { .rig .ln { stroke-width: 5; } .rig .ln-thin { stroke-width: 3.5; } .hero-rig { opacity: 1; } }

/* ---------- Facts ---------- */
.facts { background: var(--night); color: #fff; padding: 0 0 56px; }
.facts ul { list-style: none; margin: 0; padding: 28px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; border-top: 1px solid rgba(143, 169, 214, .2); }
@media (min-width: 820px) { .facts ul { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.facts li { color: #9fb0cc; font-size: .92rem; line-height: 1.35; }
.facts strong { display: block; color: #fff; font-family: var(--display); font-size: clamp(1.8rem, 3.4vw, 2.4rem); letter-spacing: -.02em; line-height: 1.1; }

/* ---------- Services ---------- */
.grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--radius); padding: 20px; font-weight: 600; font-family: var(--display); font-size: 1.05rem; line-height: 1.3; }

/* ---------- Experts ---------- */
.people { display: grid; gap: 16px; }
@media (min-width: 820px) { .people { grid-template-columns: 1fr 1fr; } }
.person { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.person .cv-form { margin-top: auto; padding-top: 20px; }
.person h3 { font-size: 1.3rem; }
.role { color: var(--amber-ink); font-weight: 600; margin: 0 0 16px; }
.person ul { margin: 0; padding: 0; list-style: none; }
.person li { padding: 9px 0; border-top: 1px solid var(--line); font-size: .97rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--muted); border-top: 1px solid var(--line); font-size: .9rem; padding: 32px 0; }
.site-footer a { color: var(--amber-ink); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer strong { color: var(--ink); }

/* ---------- Inner pages (submit, privacy, thanks) ---------- */
.page { padding: 48px 0 72px; }
.page .wrap { max-width: 800px; }
.page h1 { font-size: clamp(1.7rem, 3.4vw, 2.3rem); line-height: 1.15; margin: 0 0 10px; }
.lede { color: var(--muted); margin: 0 0 24px; font-size: 1.06rem; }
.callout { background: var(--note); border-left: 4px solid var(--amber); padding: 12px 16px; border-radius: 8px; margin: 0 0 28px; }

/* ---------- Form ---------- */
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 6px; margin: 0 0 20px; background: var(--surface); }
legend { font-weight: 700; padding: 0 6px; }
.field { margin: 0 0 14px; }
label { display: block; font-weight: 600; margin-bottom: 5px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .9rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea { width: 100%; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 640px) { .two { grid-template-columns: 1fr; } }
.choice { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 6px 0; }
.choice input { margin-top: 5px; accent-color: var(--amber); }
.req { color: var(--amber-ink); }
.hidden { display: none; }

/* ---------- CV request ---------- */
.cv-form { margin: 20px 0 0; }
.cv-row { display: flex; gap: 10px; }
.cv-row input { flex: 1; min-width: 0; }
@media (max-width: 440px) { .cv-row { flex-direction: column; } }

/* ---------- Home page, redesigned 2026-10-27 ---------- */
/* Hero: text only, quieter than the old one (no line drawing, no stats band). */
.hero2 { background: var(--band); color: var(--band-ink); border-bottom: 1px solid var(--band-line); padding: 56px 0 64px; }
.hero2 h1 { font-size: clamp(2rem, 4.6vw, 3.1rem); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 16px; }
.hero2 .sub { margin-bottom: 26px; max-width: 34em; }
.creds { margin: 28px 0 0; padding: 18px 0 0; border-top: 1px solid var(--band-line); color: var(--band-muted); font-size: .9rem; font-family: var(--mono); letter-spacing: .01em; }
.creds span { white-space: nowrap; }

/* Services: a title and one sentence each. */
.svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.svc li { background: var(--surface); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: var(--radius); padding: 18px 20px; }
.svc h3 { margin: 0 0 4px; }
.svc p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.5; }

/* Focus areas, written as the question counsel is asking. */
.qs { list-style: none; margin: 0; padding: 0; columns: 2 320px; column-gap: 40px; }
.qs li { break-inside: avoid; padding: 12px 0; border-top: 1px solid var(--line); }
.qs strong { display: block; font-family: var(--display); }
.qs span { color: var(--muted); font-size: .93rem; }

/* Principal: short prose beside a credential list. */
.bio { display: grid; gap: 36px; }
@media (min-width: 880px) { .bio { grid-template-columns: 1.3fr 1fr; } }
.bio p { margin: 0 0 16px; max-width: 38em; }
.ledger { margin: 0; padding: 0; list-style: none; font-size: .95rem; }
.ledger li { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-top: 1px solid var(--line); }
.ledger li span:last-child { color: var(--muted); font-family: var(--mono); font-size: .85rem; text-align: right; }
.bio .sub-h { font-size: .8rem; font-family: var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--amber-ink); margin: 28px 0 8px; }
.bio .sub-h:first-child { margin-top: 0; }


/* Closing band. */
.close { background: var(--bg-alt); color: var(--ink); border-top: 1px solid var(--line); }
.close p { color: var(--muted); max-width: 36em; margin: 0 0 24px; }
.close a.tel { color: var(--ink); }

/* Fees and declined matters under Services (2026-10-30). */
.fees { max-width: 620px; margin-top: 32px; }
.fees h3 { margin: 28px 0 8px; }
.fees h3:first-child { margin-top: 0; }
.declines { margin: 0; padding-left: 1.2em; font-size: .95rem; }
.declines li { padding: 4px 0; }
.nav-right { display: flex; align-items: center; gap: 4px; }
