/* ==========================================================================
   Abundance Integrations
   Warm editorial system shared with the Abundance family sites.
   Cabinet Grotesk headings, Satoshi body, IBM Plex Mono labels.
   ========================================================================== */

/* ---------- Fonts ---------- */

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("/assets/fonts/CabinetGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Cabinet Grotesk";
  src: url("/assets/fonts/CabinetGrotesk-Extrabold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Satoshi";
  src: url("/assets/fonts/Satoshi-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IBM Plex Mono";
  src: url("/assets/fonts/IBMPlexMono-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */

:root {
  --bg: #faf8f5;
  --bg-soft: #f3efe7;
  --bg-card: #fffdf9;
  --ink: #33291d;
  --ink-soft: #554a3c;
  --ink-muted: #756a5b;
  --olive: #5a6e3a;
  --olive-dark: #475a2e;
  --olive-light: #a9bc8c;
  --dark: #12100e;
  --dark-soft: #1a1713;
  --line: rgba(51, 41, 29, 0.16);
  --line-strong: rgba(51, 41, 29, 0.28);
  --line-dark: rgba(250, 248, 245, 0.16);
  --error: #93402c;

  --font-heading: "Cabinet Grotesk", system-ui, -apple-system, sans-serif;
  --font-body: "Satoshi", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;

  --container: 1320px;
  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --nav-h: 104px;
  --section-y: clamp(5rem, 9vw, 9rem);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset and base ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-menu-open {
  overflow: hidden;
}

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

img {
  height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
fieldset {
  margin: 0;
}

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

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

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

button {
  cursor: pointer;
}

::selection {
  background: var(--olive);
  color: #fff;
}

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

.why :focus-visible {
  outline-color: var(--olive-light);
}

.btn-primary:focus-visible {
  outline-color: var(--ink);
  outline-offset: 4px;
}

.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-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transform: translateY(-150%);
  transition: transform 0.2s var(--ease);
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Type ---------- */

h1,
h2,
h3 {
  font-family: var(--font-heading);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 0.98;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2.5rem, 4.6vw, 4.25rem);
}

h3 {
  font-size: 1.375rem;
  line-height: 1.12;
  letter-spacing: -0.025em;
}

.accent {
  color: var(--olive);
}

.mono {
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--olive);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  flex: none;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.section-label span {
  color: var(--olive);
}

.section-label.on-dark {
  color: rgba(250, 248, 245, 0.5);
}

.section-label.on-dark span {
  color: var(--olive-light);
}

.section-intro {
  max-width: 440px;
  justify-self: end;
  padding-bottom: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.section-intro.on-dark {
  color: rgba(250, 248, 245, 0.66);
}

.section {
  padding-block: var(--section-y);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
  margin-bottom: clamp(3rem, 6vw, 5rem);
}

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: 0;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  line-height: 1;
  text-transform: uppercase;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease),
    color 0.25s var(--ease),
    transform 0.25s var(--ease);
}

.btn-primary {
  background: var(--olive);
  color: #fff;
}

.btn-primary:hover {
  background: var(--olive-dark);
}

.btn-arrow,
.text-link svg {
  width: 15px;
  height: 15px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}

.btn:hover .btn-arrow,
.text-link:hover svg {
  transform: translateX(3px);
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-strong);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  transition:
    color 0.25s var(--ease),
    border-color 0.25s var(--ease);
}

.text-link:hover {
  color: var(--olive);
  border-color: var(--olive);
}

.btn[disabled],
.btn.is-loading {
  opacity: 0.65;
  pointer-events: none;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 248, 245, 0.94);
  border-bottom: 1px solid transparent;
  transition:
    background-color 0.25s var(--ease),
    border-color 0.25s var(--ease);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.site-header.is-scrolled {
  background: rgba(250, 248, 245, 0.98);
  border-bottom-color: var(--line);
}

.nav-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: var(--nav-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex: none;
}

.brand img {
  display: block;
  width: clamp(340px, 44vw, 640px);
  height: auto;
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: clamp(1.125rem, 2.4vw, 2.25rem);
  margin-left: auto;
}

.primary-nav a {
  position: relative;
  padding: 0.5rem 0;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color 0.2s var(--ease);
}

.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--olive);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}

.primary-nav a:hover,
.primary-nav a.is-active {
  color: var(--olive);
}

.primary-nav a:hover::after,
.primary-nav a.is-active::after {
  transform: scaleX(1);
}

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
}

.menu-toggle-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 20px;
}

.menu-toggle-lines span {
  display: block;
  height: 1px;
  width: 100%;
  background: currentColor;
  transition: transform 0.25s var(--ease);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:first-child {
  transform: translateY(3px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] .menu-toggle-lines span:last-child {
  transform: translateY(-3px) rotate(-45deg);
}

.mobile-menu {
  display: none;
}

.mobile-menu[hidden] {
  display: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(3rem, 6vw, 6rem);
  padding-bottom: clamp(4rem, 8vw, 8rem);
  overflow: hidden;
}

.hero-head {
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.hero-head .eyebrow {
  margin-bottom: clamp(1.25rem, 2.5vw, 2rem);
}

.hero h1 {
  max-width: 1220px;
  font-size: clamp(2.75rem, 7.2vw, 7rem);
  line-height: 0.94;
  letter-spacing: -0.045em;
}

.hero-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, 0.6fr);
  gap: clamp(2rem, 4vw, 5rem);
  align-items: end;
}

.hero-copy {
  max-width: 760px;
  padding-top: 0.25rem;
}

.hero-sub {
  max-width: 700px;
  margin-bottom: 2rem;
  font-size: clamp(1.0625rem, 1.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--ink-soft);
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.hero-side {
  padding-bottom: 2px;
}

.hero-side-label {
  margin-bottom: 0.75rem;
  font-size: 0.5625rem;
  letter-spacing: 0.14em;
  color: var(--ink-muted);
}

.hero-facts {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.hero-facts li:last-child {
  border-bottom: 0;
}

.hero-facts li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--olive);
  flex: none;
}

/* ---------- What we do ---------- */

.services {
  background: var(--bg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.service {
  position: relative;
  padding: 1.5rem 1.5rem 0 1.5rem;
  border-right: 1px solid var(--line);
}

.service:last-child {
  padding-right: 0;
  border-right: 0;
}

.service::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--olive);
  transition: width 0.5s var(--ease);
}

.service:hover::before {
  width: 100%;
}

.service-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: clamp(2.5rem, 5vw, 4.5rem);
}

.service-num {
  color: var(--olive);
}

.service-icon {
  width: 30px;
  height: 30px;
  color: var(--olive);
  fill: none;
  stroke: currentColor;
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

.service:hover .service-icon {
  transform: translateY(-3px);
}

.service h3 {
  margin-bottom: 0.75rem;
  font-size: clamp(1.25rem, 1.7vw, 1.5rem);
}

.service p {
  max-width: 270px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* ---------- Who we work with ---------- */

.who {
  background: var(--bg-soft);
}

.who-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.who-head h2 {
  max-width: 640px;
}

.who-copy {
  max-width: 620px;
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-soft);
}

.sector-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: clamp(2rem, 4vw, 3rem);
  border-top: 1px solid var(--line-strong);
}

.sector-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 1.125rem 0;
  border-bottom: 1px solid var(--line);
  font-family: var(--font-mono);
  font-size: 0.625rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink);
}

.sector-list li:nth-child(odd) {
  padding-right: 1rem;
  border-right: 1px solid var(--line);
}

.sector-list li::before {
  content: "";
  width: 6px;
  height: 6px;
  flex: none;
  background: var(--olive);
}

/* ---------- Client ---------- */

.client {
  padding-block: clamp(2rem, 3.5vw, 3.5rem);
  background: var(--bg);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.client-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.client-brand {
  padding-right: clamp(1.5rem, 4vw, 3rem);
  border-right: 1px solid var(--line);
}

.client-brand .section-label {
  margin-bottom: 1.5rem;
}

.client-mark {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(3.5rem, 7vw, 6rem);
  line-height: 0.85;
  letter-spacing: -0.06em;
  color: var(--ink);
}

.client-quote {
  max-width: 820px;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

/* ---------- Why ---------- */

.why {
  position: relative;
  overflow: hidden;
  background: var(--dark);
  color: var(--bg);
}

.why::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(169, 188, 140, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 188, 140, 0.05) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(circle at 15% 40%, #000 0%, transparent 65%);
  mask-image: radial-gradient(circle at 15% 40%, #000 0%, transparent 65%);
  pointer-events: none;
}

.why-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}

.why-head h2 {
  max-width: 620px;
  color: var(--bg);
}

.why-copy {
  max-width: 620px;
  margin-top: 1.5rem;
  font-size: clamp(1.0625rem, 1.3vw, 1.1875rem);
  line-height: 1.65;
  color: rgba(250, 248, 245, 0.68);
}

.group-panel {
  padding-top: 0.5rem;
}

.group-label {
  margin-bottom: 1.25rem;
  color: rgba(250, 248, 245, 0.5);
}

.group-list {
  border-top: 1px solid var(--line-dark);
}

.group-list li {
  border-bottom: 1px solid var(--line-dark);
}

.group-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  font-family: var(--font-heading);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--bg);
  transition: color 0.2s var(--ease);
}

.group-list a:hover {
  color: var(--olive-light);
}

.group-arrow {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  color: rgba(250, 248, 245, 0.4);
  transition:
    transform 0.25s var(--ease),
    color 0.2s var(--ease);
}

.group-list a:hover .group-arrow {
  transform: translate(3px, -3px);
  color: var(--olive-light);
}

/* ---------- Contact ---------- */

.contact {
  background: var(--bg);
}

.services,
.who,
.why,
.contact {
  padding-block: clamp(2.5rem, 4.5vw, 4.5rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 5vw, 5rem);
  align-items: start;
}

.contact-copy h2 {
  max-width: 620px;
}

.contact-sub {
  max-width: 440px;
  margin-top: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.form-card {
  padding: clamp(1.5rem, 3vw, 2.75rem);
  border: 1px solid var(--line);
  background: var(--bg-card);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem 1.5rem;
}

.field {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.field-full {
  grid-column: 1 / -1;
}

.field label {
  margin-bottom: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.5625rem;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.field label span {
  color: var(--olive);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.8125rem 0.875rem;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--ink);
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgba(51, 41, 29, 0.36);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--olive);
  box-shadow: 0 0 0 3px rgba(90, 110, 58, 0.16);
}

.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--olive);
  outline-offset: 2px;
}

.field.has-error input,
.field.has-error select,
.field.has-error textarea {
  border-color: var(--error);
}

.field-error {
  min-height: 1rem;
  margin-top: 0.375rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--error);
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
  padding-right: 2.5rem;
}

.select-wrap svg {
  position: absolute;
  top: 50%;
  right: 0.875rem;
  width: 14px;
  height: 14px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--ink-soft);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  margin-top: 1.25rem;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(147, 64, 44, 0.3);
  background: rgba(147, 64, 44, 0.06);
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--error);
}

.form-status[hidden] {
  display: none;
}

.form-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.form-note {
  max-width: 300px;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.form-note span {
  color: var(--olive);
}

.form-privacy {
  margin-top: 1rem;
  max-width: 460px;
  font-size: 0.75rem;
  line-height: 1.55;
  color: var(--ink-muted);
}

.form-privacy a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.form-privacy a:hover {
  color: var(--olive);
}

.form-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  text-align: center;
}

.form-success[hidden] {
  display: none;
}

.success-icon {
  width: 56px;
  height: 56px;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.form-success p {
  max-width: 420px;
  font-family: var(--font-heading);
  font-size: clamp(1.375rem, 2.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

/* ---------- Footer ---------- */

.site-footer {
  padding-top: clamp(3.5rem, 6vw, 5rem);
  padding-bottom: 2rem;
  background: var(--bg-soft);
  border-top: 1px solid var(--line);
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.8fr) minmax(0, 0.8fr) minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
}

.footer-brand .brand {
  margin-bottom: 1.25rem;
}

.footer-brand .brand img {
  width: 100%;
  max-width: 420px;
  height: auto;
}

.footer-line {
  max-width: 320px;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.footer-heading {
  margin-bottom: 1.125rem;
  font-size: 0.625rem;
  letter-spacing: 0.14em;
  color: var(--ink);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.footer-col li,
.footer-col a {
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.footer-col a {
  border-bottom: 1px solid transparent;
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.footer-col a:hover {
  color: var(--olive);
  border-color: var(--olive);
}

.footer-legal {
  max-width: 320px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--ink-soft);
}

.footer-legal a {
  color: var(--ink);
  border-bottom: 1px solid var(--line-strong);
  transition:
    color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}

.footer-legal a:hover {
  color: var(--olive);
  border-color: var(--olive);
}

.footer-parent {
  margin-top: 0.5rem;
}

.footer-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--ink-muted);
}

.footer-note {
  max-width: 560px;
  text-align: right;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
}

.footer-legal-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-legal-links a:hover {
  color: var(--ink);
}

.footer-legal-links span {
  color: var(--line-strong);
}

/* ---------- Legal pages ---------- */

.legal-page {
  background: var(--bg);
}

.legal-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}

.legal-head {
  position: sticky;
  top: calc(var(--nav-h) + 2rem);
}

.legal-head h1 {
  margin-top: 0.75rem;
  font-size: clamp(2.75rem, 5.5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.legal-meta {
  margin-top: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  letter-spacing: 0.08em;
  line-height: 1.5;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.legal-body {
  max-width: 720px;
}

.legal-body h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
}

.legal-body p,
.legal-body li {
  color: var(--ink-soft);
  line-height: 1.7;
}

.legal-body p + p {
  margin-top: 1rem;
}

.legal-body ul {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
}

.legal-body li {
  margin-bottom: 0.5rem;
}

.legal-body a {
  color: var(--olive);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.legal-body a:hover {
  color: var(--olive-dark);
}

/* ---------- Scroll reveal ---------- */

.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition:
    opacity 0.7s var(--ease),
    transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .brand img {
    width: clamp(320px, 40vw, 520px);
  }

  .primary-nav {
    gap: 1rem;
  }

  .primary-nav a {
    font-size: 0.5625rem;
  }

  .hero-body {
    grid-template-columns: minmax(0, 1.4fr) minmax(200px, 0.6fr);
    gap: 2.5rem;
  }

  .service {
    padding-right: 1.25rem;
  }
}

@media (max-width: 900px) {
  :root {
    --nav-h: 84px;
  }

  .primary-nav {
    display: none;
  }

  .brand img {
    width: min(70vw, 380px);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .mobile-menu {
    display: block;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    padding: 0.5rem var(--gutter) 2rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }

  .mobile-menu[hidden] {
    display: none;
  }

  .mobile-nav {
    display: flex;
    flex-direction: column;
    border-top: 1px solid var(--line);
  }

  .mobile-nav a {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    min-height: 64px;
    border-bottom: 1px solid var(--line);
    font-family: var(--font-heading);
    font-size: 1.375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .mobile-nav a .mono {
    color: var(--olive);
  }

  .mobile-cta {
    width: 100%;
    margin-top: 1.5rem;
  }

  .mobile-menu-meta {
    margin-top: 1.5rem;
    color: var(--ink-muted);
  }

  .hero-body {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-side {
    max-width: 620px;
  }

  .hero-facts {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem 1.75rem;
    padding-top: 1rem;
  }

  .hero-facts li {
    padding: 0;
    border-bottom: 0;
  }

  .section-head {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 1.5rem;
  }

  .section-intro {
    justify-self: start;
    padding-bottom: 0;
  }

  .service-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service {
    padding: 1.5rem 1.5rem 2rem 1.5rem;
    border-top: 1px solid var(--line);
  }

  .service:nth-child(2n) {
    padding-right: 0;
    border-right: 0;
  }

  .service:nth-child(2n + 1) {
    border-right: 1px solid var(--line);
  }

  .service-top {
    margin-bottom: 2rem;
  }

  .who-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .who-head h2 {
    max-width: 620px;
  }

  .client-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .client-brand {
    padding-right: 0;
    padding-bottom: 1.5rem;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .client-brand .section-label {
    margin-bottom: 1rem;
  }

  .why-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .why-head {
    position: static;
  }

  .why-head h2 {
    max-width: 620px;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact-copy {
    max-width: 680px;
  }

  .footer-top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2.5rem;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }

  .legal-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .legal-head {
    position: static;
  }
}

@media (max-width: 720px) {
  .footer-bottom {
    flex-direction: column;
    gap: 0.75rem;
  }

  .footer-note {
    text-align: left;
  }
}

@media (max-width: 640px) {
  .menu-toggle-text {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.5rem, 11vw, 3.25rem);
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 1rem;
  }

  .hero-actions .btn,
  .hero-actions .text-link {
    width: 100%;
  }

  .hero-actions .text-link {
    justify-content: space-between;
  }

  .service-grid {
    grid-template-columns: 1fr;
  }

  .service,
  .service:nth-child(2n),
  .service:nth-child(2n + 1) {
    padding: 1.5rem 0 2rem;
    border-right: 0;
  }

  .service:last-child {
    padding-bottom: 0;
  }

  .service-top {
    margin-bottom: 1.5rem;
  }

  .service p {
    max-width: 420px;
  }

  .who-copy {
    font-size: 1.0625rem;
  }

  .client-mark {
    font-size: 3.25rem;
  }

  .client-quote {
    font-size: 1.625rem;
  }

  .group-list a {
    padding: 1rem 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .form-foot {
    align-items: stretch;
    flex-direction: column;
    gap: 1.25rem;
  }

  .form-foot .btn {
    width: 100%;
  }

  .legal-head h1 {
    font-size: clamp(2.5rem, 12vw, 3.5rem);
  }

  .footer-top {
    grid-template-columns: 1fr;
  }

  .footer-brand {
    grid-column: auto;
  }

}

@media (max-width: 380px) {
  .nav-shell {
    gap: 0.5rem;
  }

  .brand img {
    width: min(66vw, 300px);
  }

  .menu-toggle-text {
    display: none;
  }

  .hero h1 {
    font-size: 2.375rem;
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .js .reveal {
    opacity: 1;
    transform: none;
  }
}
