/* ==========================================================================
   Sam Prime Construction — core.css
   Tokens, reset, typography, layout shell, buttons, forms, header, footer.

   Hand-authored CSS. No framework, no build step for styles — edit this file
   and refresh. Section-level compositions live in sections.css.

   Contents
     1.  Tokens
     2.  Reset & base
     3.  Typography
     4.  Layout shell & rhythm
     5.  Utility surfaces (blueprint grid, rules, mono labels)
     6.  Buttons & links
     7.  Icons
     8.  Topbar
     9.  Header, mega menu, mobile nav
     10. Forms
     11. Footer
     12. Motion primitives & reduced motion
   ========================================================================== */

/* ---------------------------------------------------------------- 1. Tokens */
:root {
  /* Carbon — the dark architectural base */
  --carbon-900: #0b0d10;
  --carbon-800: #101215;
  --carbon-700: #16191d;
  --carbon-600: #1e2228;
  --carbon-500: #2a2f36;
  --steel: #3a4149;

  /* Concrete — cool light neutrals (deliberately not warm/beige) */
  --concrete-50: #f7f8f6;
  --concrete-100: #eef0ec;
  --concrete-200: #e2e4de;
  --concrete-300: #cdd0c9;

  /* Ink */
  --ink: #12151a;
  --ink-2: #464d56;
  --muted: #6d757e;
  --muted-dark: #9aa3ad;

  /* Brand amber, sampled from the logo */
  --amber-300: #fbcb93;
  --amber-400: #f79a45;
  --amber-500: #ef7f1a;
  --amber-600: #d0680b;
  --amber-700: #a4520a;
  --amber-rgb: 239, 127, 26;

  --line: rgba(18, 21, 26, 0.12);
  --line-soft: rgba(18, 21, 26, 0.07);
  --line-dark: rgba(255, 255, 255, 0.1);
  --line-dark-soft: rgba(255, 255, 255, 0.06);

  --font-display: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* Fluid type scale */
  --fs-display: clamp(2.75rem, 7vw, 6.25rem);
  --fs-h1: clamp(2.1rem, 4.4vw, 3.85rem);
  --fs-h2: clamp(1.75rem, 3.1vw, 2.75rem);
  --fs-h3: clamp(1.15rem, 1.5vw, 1.45rem);
  --fs-lead: clamp(1.02rem, 1.25vw, 1.2rem);
  --fs-body: 1rem;
  --fs-sm: 0.875rem;
  --fs-mono: 0.7rem;

  /* Sharp, architectural — corners are the exception, not the rule */
  --r-xs: 2px;
  --r-sm: 3px;
  --r-md: 6px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 13, 16, 0.06);
  --shadow-md: 0 2px 6px rgba(11, 13, 16, 0.06), 0 14px 30px -18px rgba(11, 13, 16, 0.28);
  --shadow-lg: 0 4px 10px rgba(11, 13, 16, 0.07), 0 28px 60px -28px rgba(11, 13, 16, 0.4);
  --shadow-amber: 0 12px 30px -12px rgba(var(--amber-rgb), 0.55);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-spring: cubic-bezier(0.34, 1.42, 0.62, 1);

  --shell: 1480px;
  --gutter: clamp(1.25rem, 4.5vw, 5rem);
  --band: clamp(4.5rem, 8vw, 8.5rem);
  --band-tight: clamp(3.25rem, 5.5vw, 5.5rem);
  --header-h: 76px;
}

/* ------------------------------------------------------------ 2. Reset & base */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1.5rem);
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--ink);
  background: var(--concrete-50);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.nav-open { overflow: hidden; }

img,
svg,
video { display: block; max-width: 100%; }

img {
  height: auto;
  background-color: var(--concrete-200);
  color: transparent;
}

a { color: inherit; text-decoration: none; }

button,
input,
select,
textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

::selection {
  background: rgba(var(--amber-rgb), 0.28);
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--amber-500);
  outline-offset: 3px;
}

/* Thin scrollbar tuned to the palette */
* { scrollbar-width: thin; scrollbar-color: var(--concrete-300) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--concrete-300); border: 3px solid var(--concrete-50); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--amber-400); }

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--amber-500);
  color: #fff;
  font-weight: 600;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Reading-progress hairline pinned to the very top of the viewport */
.scroll-progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 2px;
  z-index: 210;
  pointer-events: none;
}
.scroll-progress i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: 0 50%;
  transform: scaleX(0);
  background: linear-gradient(90deg, var(--amber-600), var(--amber-400));
}
@supports (animation-timeline: scroll()) {
  .scroll-progress i {
    animation: progress-grow linear both;
    animation-timeline: scroll(root block);
  }
}
@keyframes progress-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Cross-document transitions where the browser supports them (http/https). */
@view-transition { navigation: auto; }

/* ------------------------------------------------------------ 3. Typography */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.display {
  font-size: var(--fs-display);
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.h1 { font-size: var(--fs-h1); }
.h2 { font-size: var(--fs-h2); line-height: 1.04; }
.h3 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.02em; }
.h4 { font-family: var(--font-display); font-size: 1.05rem; letter-spacing: -0.015em; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 62ch;
  text-wrap: pretty;
}

p { text-wrap: pretty; }

/* Amber accent inside a heading — the one flourish the display face gets */
.hl { color: var(--amber-500); }
.hl-underline {
  position: relative;
  white-space: nowrap;
}
.hl-underline::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.06em;
  height: 0.09em;
  background: var(--amber-500);
  transform: scaleX(var(--u, 1));
  transform-origin: 0 50%;
}

.mono-label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--amber-600);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.mono-label::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: currentColor;
  flex: none;
}
.mono-label.no-rule::before { display: none; }

.on-dark .mono-label,
.band-dark .mono-label { color: var(--amber-400); }

.text-muted { color: var(--muted); }
.measure { max-width: 62ch; }
.measure-sm { max-width: 46ch; }

/* --------------------------------------------------- 4. Layout shell & rhythm */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell-narrow { max-width: 1080px; }

.band { padding-block: var(--band); position: relative; }
.band-tight { padding-block: var(--band-tight); }

.band-light { background: var(--concrete-50); }
.band-concrete { background: var(--concrete-100); }
.band-dark {
  background: var(--carbon-800);
  color: #fff;
}
.band-dark .lead,
.band-dark .text-muted { color: var(--muted-dark); }

.band-dark + .band-dark { border-top: 1px solid var(--line-dark-soft); }

/* Section header: mono index on the left, headline + optional action */
.sec-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem 3rem;
  align-items: end;
  margin-bottom: clamp(2.5rem, 4vw, 4rem);
}
.sec-head > .sec-head-main { max-width: min(100%, 46rem); }
.sec-head .h2 { margin-top: 1.1rem; }
.sec-head .lead { margin-top: 1.1rem; font-size: 1rem; max-width: 56ch; }
@media (min-width: 900px) {
  .sec-head { grid-template-columns: minmax(0, 1fr) auto; }
}

/* ------------------------------------------- 5. Utility surfaces & ornaments */

/* Blueprint grid — a faint measured grid that makes flat colour fields read as
   drawing paper rather than as an empty div. */
.grid-lines::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--line-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, #000 30%, transparent 100%);
}
.band-dark.grid-lines::before {
  background-image:
    linear-gradient(to right, var(--line-dark-soft) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line-dark-soft) 1px, transparent 1px);
}
.grid-lines > * { position: relative; }

/* Hazard rule — a thin diagonal-stripe divider, the site's signature edge */
.hazard-rule {
  height: 6px;
  background-image: repeating-linear-gradient(
    -45deg,
    var(--amber-500) 0 10px,
    var(--carbon-800) 10px 20px
  );
}
.hazard-rule.on-light {
  background-image: repeating-linear-gradient(
    -45deg,
    var(--amber-500) 0 10px,
    var(--concrete-300) 10px 20px
  );
}

/* Corner brackets — architectural registration marks on featured cards */
.brackets { position: relative; }
.brackets::before,
.brackets::after {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 2px solid var(--amber-500);
  transition: inset 0.4s var(--ease-out);
}
.brackets::before { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.brackets::after { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.rule { height: 1px; background: var(--line); border: 0; }
.band-dark .rule { background: var(--line-dark); }

/* ------------------------------------------------------- 6. Buttons & links */
.btn {
  --btn-bg: var(--amber-500);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  border-radius: var(--r-xs);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid transparent;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease-spring), box-shadow 0.35s var(--ease-out),
    background-color 0.25s var(--ease-out), color 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
  will-change: transform;
}
/* Wipe fill that rises from the bottom edge on hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--carbon-800);
  transform: translateY(101%);
  transition: transform 0.42s var(--ease-out);
}
.btn:hover::before { transform: translateY(0); }
.btn:hover { color: #fff; box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(1px) scale(0.99); }
.btn .i { width: 1em; height: 1em; transition: transform 0.35s var(--ease-out); }
.btn:hover .i[data-icon="arrow-right"] { transform: translateX(4px); }

.btn-accent { --btn-bg: var(--amber-500); box-shadow: var(--shadow-amber); }
.btn-accent:hover { box-shadow: 0 16px 34px -14px rgba(11, 13, 16, 0.5); }

.btn-dark { --btn-bg: var(--carbon-800); }
.btn-dark::before { background: var(--amber-500); }

.btn-outline {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--carbon-800); }

.btn-ghost {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255, 255, 255, 0.24);
}
.btn-ghost::before { background: #fff; }
.btn-ghost:hover { color: var(--carbon-800); border-color: #fff; }

.btn-white { --btn-bg: #fff; --btn-fg: var(--carbon-800); }

.btn-sm { padding: 0.68rem 1.15rem; font-size: 0.85rem; }
.btn-lg { padding: 1.1rem 2rem; font-size: 1rem; }
.btn-block { width: 100%; }

/* Text link with a rule that draws in from the left */
.link-go {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.92rem;
  color: inherit;
  padding-bottom: 0.3rem;
  background-image: linear-gradient(var(--amber-500), var(--amber-500));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.4s var(--ease-out), color 0.25s var(--ease-out);
}
.link-go:hover { background-size: 100% 2px; color: var(--amber-600); }
.link-go .i { width: 1em; height: 1em; transition: transform 0.35s var(--ease-out); }
.link-go:hover .i { transform: translateX(4px); }
.band-dark .link-go:hover { color: var(--amber-400); }

/* --------------------------------------------------------------- 7. Icons */
.i {
  display: inline-block;
  width: 1.15em;
  height: 1.15em;
  flex: none;
  line-height: 0;
  color: currentColor;
}
.i svg { width: 100%; height: 100%; display: block; }

.icon-tile {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--amber-600);
  border-radius: var(--r-xs);
  transition: background-color 0.3s var(--ease-out), color 0.3s var(--ease-out),
    border-color 0.3s var(--ease-out), transform 0.4s var(--ease-spring);
}
.icon-tile .i { width: 1.4rem; height: 1.4rem; }
.band-dark .icon-tile {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-dark);
  color: var(--amber-400);
}

/* --------------------------------------------------------------- 8. Topbar */
.topbar {
  background: var(--carbon-900);
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.76rem;
  border-bottom: 1px solid var(--line-dark-soft);
  position: relative;
  z-index: 120;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 38px;
  padding-block: 0.35rem;
}
.topbar-note {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}
.topbar-note .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--amber-500);
  box-shadow: 0 0 0 0 rgba(var(--amber-rgb), 0.7);
  animation: pulse-dot 2.4s var(--ease-out) infinite;
}
@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(var(--amber-rgb), 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(var(--amber-rgb), 0); }
  100% { box-shadow: 0 0 0 0 rgba(var(--amber-rgb), 0); }
}
.topbar-meta { display: flex; align-items: center; gap: 1.6rem; }
.topbar-meta li { display: flex; align-items: center; gap: 0.45rem; }
.topbar-meta .i { width: 0.85rem; height: 0.85rem; color: var(--amber-500); }
.topbar-meta a:hover { color: #fff; }
@media (max-width: 1100px) {
  .topbar-note { display: none; }
  .topbar-inner { justify-content: center; }
}
@media (max-width: 720px) {
  .topbar-abn,
  .topbar-meta li:first-child { display: none; }
}

/* ------------------------------------------------- 9. Header & navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 130;
  background: var(--carbon-800);
  color: #fff;
  border-bottom: 1px solid var(--line-dark-soft);
  transition: background-color 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out);
}
.site-header.is-stuck {
  background: rgba(11, 13, 16, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 12px 34px -22px rgba(0, 0, 0, 0.9);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: var(--header-h);
}
@media (max-width: 520px) { .header-inner { gap: 0.75rem; } }

.brand { display: flex; align-items: center; gap: 0.7rem; flex: none; min-width: 0; }
.brand-mark { height: 38px; width: auto; background: none; }
.brand-text {
  display: grid;
  font-family: var(--font-display);
  line-height: 1;
}
.brand-text b { font-size: 1.02rem; font-weight: 700; letter-spacing: -0.02em; }
.brand-text i {
  font-style: normal;
  font-family: var(--font-mono);
  font-size: 0.53rem;
  font-weight: 600;
  letter-spacing: 0.32em;
  color: var(--amber-500);
  margin-top: 0.28rem;
}
@media (max-width: 420px) { .brand-text b { font-size: 0.92rem; } }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2rem);
  margin-inline: auto;
}
.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.25s var(--ease-out);
}
.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  background: var(--amber-500);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.38s var(--ease-out);
}
.nav-link:hover { color: #fff; }
.nav-link:hover::after,
.nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: 0 50%; }
.nav-link[aria-current="page"] { color: #fff; }
.nav-link .chev { width: 0.6rem; height: 0.6rem; transition: transform 0.3s var(--ease-out); }
.nav-drop:hover .chev,
.nav-drop:focus-within .chev { transform: rotate(180deg); }

@media (max-width: 1080px) { .nav { display: none; } }

/* Mega menu */
.nav-drop { position: static; }
.mega {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--carbon-800);
  border-top: 1px solid var(--line-dark-soft);
  border-bottom: 1px solid var(--line-dark-soft);
  box-shadow: 0 40px 60px -34px rgba(0, 0, 0, 0.9);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.3s var(--ease-out), transform 0.36s var(--ease-out), visibility 0.3s;
}
.nav-drop:hover .mega,
.nav-drop:focus-within .mega { opacity: 1; visibility: visible; transform: translateY(0); }
.mega-grid {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding: 2.25rem var(--gutter);
  display: grid;
  gap: 2.5rem;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 0.85fr);
}
.mega-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem 1.5rem; align-content: start; }
.mega-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--r-xs);
  transition: background-color 0.3s var(--ease-out), border-color 0.3s var(--ease-out);
}
.mega-item:hover { background: rgba(255, 255, 255, 0.04); border-color: var(--line-dark); }
.mega-num {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  color: var(--amber-500);
  padding-top: 0.28rem;
}
.mega-body strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
.mega-body small { display: block; font-size: 0.8rem; color: var(--muted-dark); line-height: 1.5; margin-top: 0.2rem; }
.mega-go { width: 0.85rem; height: 0.85rem; color: var(--muted-dark); opacity: 0; transform: translate(-4px, 4px); transition: all 0.3s var(--ease-out); }
.mega-item:hover .mega-go { opacity: 1; transform: none; color: var(--amber-500); }

.mega-aside {
  border: 1px solid var(--line-dark);
  border-radius: var(--r-xs);
  overflow: hidden;
  background: var(--carbon-700);
}
.mega-aside img { width: 100%; height: 150px; object-fit: cover; object-position: center 28%; }
.mega-aside-body { padding: 1.1rem 1.25rem 1.35rem; }
.mega-aside-body p { font-size: 0.83rem; color: var(--muted-dark); margin-top: 0.7rem; line-height: 1.55; }
.mega-aside-body .link-go { margin-top: 1rem; color: #fff; font-size: 0.85rem; }

/* Header right side */
.header-actions { display: flex; align-items: center; gap: 1rem; flex: none; margin-left: auto; }
.header-phone {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding-right: 1rem;
  border-right: 1px solid var(--line-dark);
}
.header-phone .i { width: 1.05rem; height: 1.05rem; color: var(--amber-500); }
.header-phone span { display: grid; line-height: 1.15; }
.header-phone small { font-size: 0.62rem; color: var(--muted-dark); letter-spacing: 0.04em; }
.header-phone b { font-family: var(--font-display); font-size: 0.9rem; }
.header-phone:hover b { color: var(--amber-400); }
@media (max-width: 1280px) { .header-phone { display: none; } }
@media (max-width: 560px) { .header-actions .btn { display: none; } }

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-xs);
  padding: 0 10px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  transition: transform 0.35s var(--ease-out), opacity 0.2s linear, width 0.35s var(--ease-out);
}
.nav-toggle span:nth-child(2) { width: 70%; }
.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); width: 100%; }
@media (max-width: 1080px) { .nav-toggle { display: flex; } }

/* Mobile panel */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 125;
  background: var(--carbon-900);
  color: #fff;
  overflow-y: auto;
  padding-top: calc(var(--header-h) + 38px);
  opacity: 0;
  transform: translateY(-2%);
  transition: opacity 0.32s var(--ease-out), transform 0.42s var(--ease-out);
}
.mobile-nav[hidden] { display: none; }
.mobile-nav.is-open { opacity: 1; transform: none; }
.mobile-nav-inner { padding: 2rem var(--gutter) 3rem; display: grid; gap: 1.5rem; }
.mobile-nav nav { display: grid; }
.mobile-nav nav > a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line-dark-soft);
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  opacity: 0;
  transform: translateY(14px);
}
.mobile-nav.is-open nav > a { animation: mnav-in 0.5s var(--ease-out) forwards; }
.mobile-nav nav > a .i { width: 1rem; height: 1rem; color: var(--amber-500); }
.mobile-nav nav > a:nth-child(1) { animation-delay: 0.05s; }
.mobile-nav nav > a:nth-child(2) { animation-delay: 0.1s; }
.mobile-nav nav > a:nth-child(3) { animation-delay: 0.15s; }
.mobile-nav nav > a:nth-child(5) { animation-delay: 0.22s; }
.mobile-nav nav > a:nth-child(6) { animation-delay: 0.27s; }
.mobile-nav nav > a:nth-child(7) { animation-delay: 0.32s; }
@keyframes mnav-in { to { opacity: 1; transform: none; } }
.mobile-sub { display: grid; gap: 0.1rem; padding: 0.85rem 0 1.1rem 1rem; border-left: 2px solid var(--amber-500); margin: 0.4rem 0 0.6rem; }
.mobile-sub a { font-size: 0.92rem; color: var(--muted-dark); padding: 0.3rem 0; }
.mobile-sub a:hover { color: #fff; }
.mobile-nav-foot { display: grid; gap: 1rem; margin-top: 0.5rem; }
.mobile-call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.9rem;
  border: 1px solid var(--line-dark);
  font-family: var(--font-display);
  border-radius: var(--r-xs);
}
.mobile-call .i { color: var(--amber-500); }

/* ---------------------------------------------------------------- 10. Forms */
.field { display: grid; gap: 0.5rem; }
.field label,
.field-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}
.field .req { color: var(--amber-600); }

.input,
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xs);
  font-size: 0.95rem;
  color: var(--ink);
  transition: border-color 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.25s;
}
.field textarea { resize: vertical; min-height: 8rem; }
.field select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236d757e' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.9rem center; background-size: 1.05rem; padding-right: 2.6rem; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(var(--amber-rgb), 0.16);
}
.field input:user-invalid,
.field textarea:user-invalid { border-color: #c2410c; }

.field-row { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .field-row.cols-2 { grid-template-columns: 1fr 1fr; } }

.choice-grid { display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.choice {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0.95rem;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--r-xs);
  font-size: 0.88rem;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out), background-color 0.25s var(--ease-out);
}
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .tick {
  width: 16px;
  height: 16px;
  border: 1px solid var(--concrete-300);
  border-radius: var(--r-xs);
  display: grid;
  place-items: center;
  flex: none;
  transition: all 0.2s var(--ease-out);
}
.choice .tick::after { content: ""; width: 8px; height: 8px; background: #fff; transform: scale(0); transition: transform 0.2s var(--ease-spring); }
.choice:hover { border-color: var(--concrete-300); }
.choice:has(input:checked) { border-color: var(--amber-500); background: rgba(var(--amber-rgb), 0.06); }
.choice:has(input:checked) .tick { background: var(--amber-500); border-color: var(--amber-500); }
.choice:has(input:checked) .tick::after { transform: scale(1); }
.choice:has(input:focus-visible) { outline: 2px solid var(--amber-500); outline-offset: 2px; }

.form-note { font-size: 0.78rem; color: var(--muted); }
.form-status {
  padding: 0.9rem 1.1rem;
  border-left: 3px solid var(--amber-500);
  background: rgba(var(--amber-rgb), 0.08);
  font-size: 0.9rem;
}
.form-status[hidden] { display: none; }
.form-status.is-error { border-color: #c2410c; background: rgba(194, 65, 12, 0.08); }
.honeypot { position: absolute; left: -9999px; }

/* --------------------------------------------------------------- 11. Footer */
.site-footer {
  background: var(--carbon-900);
  color: rgba(255, 255, 255, 0.72);
  position: relative;
}
.footer-cta {
  background: var(--amber-500);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.footer-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.07) 0 2px, transparent 2px 14px);
  pointer-events: none;
}
.footer-cta-inner {
  position: relative;
  padding-block: clamp(3rem, 5vw, 4.75rem);
  display: grid;
  gap: 2rem;
  align-items: center;
}
.footer-cta .h2 { margin-top: 1rem; max-width: 20ch; }
.footer-cta .mono-label { color: rgba(255, 255, 255, 0.8); }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.footer-cta .btn-accent { --btn-bg: var(--carbon-800); box-shadow: none; }
.footer-cta .btn-accent::before { background: #fff; }
.footer-cta .btn-accent:hover { color: var(--carbon-800); }
.footer-cta .btn-ghost { border-color: rgba(255, 255, 255, 0.55); }
@media (min-width: 960px) {
  .footer-cta-inner { grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; }
}

.footer-main {
  display: grid;
  gap: 2.75rem;
  padding-block: clamp(3rem, 5vw, 4.5rem);
}
@media (min-width: 700px) { .footer-main { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1080px) { .footer-main { grid-template-columns: 1.6fr 1fr 1.2fr 1.4fr; gap: 3rem; } }

.footer-brand img { height: 72px; width: auto; background: none; }
.footer-blurb { font-size: 0.9rem; line-height: 1.7; color: var(--muted-dark); margin-top: 1.25rem; max-width: 40ch; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.5rem; }
.footer-social a {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-xs);
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s var(--ease-out);
}
.footer-social a:hover { background: var(--amber-500); border-color: var(--amber-500); color: #fff; transform: translateY(-2px); }
.footer-social .i { width: 1rem; height: 1rem; }

.footer-col { display: grid; align-content: start; gap: 0.7rem; }
.footer-col .mono-label { color: rgba(255, 255, 255, 0.45); margin-bottom: 0.4rem; }
.footer-col .mono-label::before { background: var(--amber-500); }
.footer-col a { font-size: 0.92rem; color: var(--muted-dark); width: fit-content; transition: color 0.25s var(--ease-out), transform 0.25s var(--ease-out); }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-contact-row { display: flex; gap: 0.65rem; font-size: 0.92rem; color: var(--muted-dark); line-height: 1.55; }
.footer-contact-row .i { width: 1rem; height: 1rem; color: var(--amber-500); margin-top: 0.28rem; }
.footer-licence {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  margin-top: 0.6rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line-dark-soft);
  font-size: 0.8rem;
  color: var(--muted-dark);
}
.footer-licence .i { color: var(--amber-500); width: 1rem; height: 1rem; margin-top: 0.2rem; }

.footer-base {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.35rem;
  border-top: 1px solid var(--line-dark-soft);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}
.footer-base a:hover { color: #fff; }
.footer-base-tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--amber-500); }

.to-top {
  position: fixed;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  z-index: 110;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: var(--amber-500);
  color: #fff;
  border-radius: var(--r-xs);
  box-shadow: var(--shadow-amber);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: all 0.35s var(--ease-out);
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--carbon-800); box-shadow: var(--shadow-lg); }
.to-top .i { width: 1.1rem; height: 1.1rem; }

/* ---------------------------------------------- 12. Motion primitives */
[data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease-out), transform 0.85s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal].is-in { opacity: 1; transform: none; }
.no-js [data-reveal] { opacity: 1; transform: none; }

/* Image that uncovers itself with a clip sweep instead of a plain fade */
[data-reveal="clip"] {
  transform: none;
  opacity: 1;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--ease-out);
  transition-delay: var(--d, 0ms);
}
[data-reveal="clip"].is-in { clip-path: inset(0 0 0 0); }
.no-js [data-reveal="clip"] { clip-path: none; }

/* Per-word headline rise, wired up by site.js */
.words { display: inline; }
.word { display: inline-block; overflow: hidden; vertical-align: top; }
.word > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 0.9s var(--ease-out);
  transition-delay: calc(var(--wi, 0) * 55ms);
}
.is-in .word > span,
.no-js .word > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .word > span { transform: none !important; }
}
