/* ==========================================================================
   Kestrel Softworks — shared stylesheet
   Design tokens: cool graphite ink / cool paper white / single signal accent.
   Type: Space Grotesk (display), IBM Plex Sans (body), IBM Plex Mono (labels).
   ========================================================================== */

:root {
  --ink: #14161b;
  --ink-soft: #40444d;
  --paper: #f5f6f3;
  --paper-raised: #ffffff;
  --paper-sunken: #ebede8;
  --line: #dde0da;
  --muted: #666b72;
  --accent: #e8461c;
  --accent-strong: #c93a15;
  --accent-soft: #fde7de;
  --on-accent: #fff8f5;

  --radius-s: 8px;
  --radius-m: 16px;
  --radius-l: 28px;
  --radius-pill: 999px;

  --maxw: 1240px;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  --font-display: "Space Grotesk", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-body: "IBM Plex Sans", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-s: 0.18s;
  --dur-m: 0.4s;

  --shadow-card: 0 1px 2px rgba(20, 22, 27, 0.04), 0 12px 28px -14px rgba(20, 22, 27, 0.18);
  --shadow-pop: 0 8px 20px -6px rgba(232, 70, 28, 0.35);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1f2ef;
    --ink-soft: #c7cad0;
    --paper: #111214;
    --paper-raised: #18191c;
    --paper-sunken: #0b0c0d;
    --line: #2b2d31;
    --muted: #9a9ea6;
    --accent: #ff6a3d;
    --accent-strong: #ff8259;
    --accent-soft: #33201a;
    --on-accent: #1a0d08;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 20px 40px -20px rgba(0, 0, 0, 0.6);
    --shadow-pop: 0 8px 24px -6px rgba(255, 106, 61, 0.35);
  }
}

@font-face {
  font-family: "Space Grotesk";
  src: local("Space Grotesk");
  font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); max-width: 65ch; }

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

ul { margin: 0; padding: 0; list-style: none; }

button { font-family: inherit; cursor: pointer; }

::selection { background: var(--accent); color: var(--on-accent); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

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

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }
.section--sunken { background: var(--paper-sunken); }
.section--ink {
  background: var(--ink);
  color: var(--paper);
}
.section--ink p, .section--ink .muted { color: rgba(245, 246, 243, 0.66); }

.divider { border: none; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Type helpers ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 1rem;
}
.h-display {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  max-width: 18ch;
}
.h-section {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  max-width: 20ch;
}
.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 56ch;
}
.muted { color: var(--muted); }
.mono-tag {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease), background var(--dur-s) var(--ease), border-color var(--dur-s) var(--ease);
}
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-pop);
}
.btn-primary:hover { background: var(--accent-strong); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  border-color: var(--line);
  color: var(--ink);
}
.btn-outline:hover { border-color: var(--ink); transform: translateY(-2px); }
.section--ink .btn-outline { border-color: rgba(245, 246, 243, 0.28); color: var(--paper); }
.section--ink .btn-outline:hover { border-color: var(--paper); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  padding-inline: 0.2rem;
  border-radius: 0;
}
.btn-ghost::after {
  content: "";
  display: block;
  height: 2px;
  background: var(--accent);
  width: 0;
  transition: width var(--dur-m) var(--ease);
}
.btn-ghost:hover::after { width: 100%; }
.btn-sm { padding: 0.55rem 1.1rem; font-size: 0.85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px) saturate(140%);
  -webkit-backdrop-filter: blur(10px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
}
.brand svg { width: 30px; height: 30px; flex: none; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav-links a {
  font-size: 0.93rem;
  color: var(--ink-soft);
  position: relative;
  padding: 0.3rem 0;
  transition: color var(--dur-s) var(--ease);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-links .btn-primary { display: none; }
.nav-cta { display: flex; align-items: center; gap: 1.25rem; }
.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 40px;
  height: 40px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: "";
  display: block;
  width: 20px;
  height: 2px;
  background: var(--ink);
  position: relative;
  transition: transform var(--dur-s) var(--ease), opacity var(--dur-s) var(--ease);
}
.nav-toggle span::before { position: absolute; top: -6px; }
.nav-toggle span::after { position: absolute; top: 6px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem var(--gutter) 2rem;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-m) var(--ease), transform var(--dur-m) var(--ease);
    overflow-y: auto;
  }
  .nav-links.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-links a {
    width: 100%;
    padding: 0.9rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav-links .btn-primary { display: inline-flex; margin-top: 1rem; }
  .nav-toggle { display: flex; }
  .nav-cta .btn-primary.desktop-only { display: none; }
}

/* ---------- Hero (asymmetric split) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}
.hero-copy p { margin-bottom: 1.75rem; }
.hero-actions { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.hero-visual {
  position: relative;
  aspect-ratio: 4 / 3.4;
  border-radius: var(--radius-l);
  background: linear-gradient(155deg, var(--paper-raised), var(--paper-sunken));
  border: 1px solid var(--line);
  overflow: hidden;
}
.hero-visual svg { width: 100%; height: 100%; }
.hero-visual .node { animation: node-pulse 3.2s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.hero-visual .node:nth-child(3n) { animation-delay: 0.6s; }
.hero-visual .node:nth-child(3n+1) { animation-delay: 1.15s; }
@keyframes node-pulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.18); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-visual .node { animation: none; }
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-visual { order: -1; aspect-ratio: 16/11; }
}

/* ---------- Logo wall ---------- */
.logo-wall {
  display: flex;
  align-items: center;
  gap: clamp(1.75rem, 4vw, 3.25rem);
  flex-wrap: wrap;
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}
.logo-wall svg { height: 26px; width: auto; color: var(--muted); opacity: 0.75; transition: opacity var(--dur-s), color var(--dur-s); }
.logo-wall svg:hover { opacity: 1; color: var(--ink); }
.logo-wall-label { font-family: var(--font-mono); font-size: 0.78rem; color: var(--muted); white-space: nowrap; }

/* ---------- Bento grid (services) ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(160px, auto);
  gap: 1.1rem;
}
.bento-cell {
  border-radius: var(--radius-m);
  padding: clamp(1.4rem, 3vw, 2.1rem);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.6rem;
  border: 1px solid var(--line);
  background: var(--paper-raised);
  transition: transform var(--dur-m) var(--ease), box-shadow var(--dur-m) var(--ease);
}
.bento-cell:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.bento-cell h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.bento-cell p { font-size: 0.92rem; margin: 0; max-width: 32ch; }
.bento-cell .cell-icon { width: 34px; height: 34px; color: var(--accent); margin-bottom: 0.4rem; }
.bento-a { grid-column: span 3; grid-row: span 2; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.bento-a p { color: rgba(245,246,243,0.68); }
.bento-a .cell-icon { color: var(--accent); }
.bento-b { grid-column: span 3; grid-row: span 2; background: var(--accent-soft); border-color: transparent; }
.bento-c, .bento-d, .bento-e, .bento-f { grid-column: span 2; }

@media (max-width: 980px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .bento-a, .bento-b { grid-column: span 2; grid-row: span 1; }
  .bento-c, .bento-d, .bento-e, .bento-f { grid-column: span 1; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .bento-a, .bento-b, .bento-c, .bento-d, .bento-e, .bento-f { grid-column: 1 / -1; }
}

/* ---------- Process row ---------- */
.process-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.process-step {
  padding: 1.75rem 1.25rem 1.75rem 0;
  border-right: 1px solid var(--line);
}
.process-step:last-child { border-right: none; }
.process-step .num {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 0.85rem;
  display: block;
  margin-bottom: 0.9rem;
}
.process-step h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.process-step p { font-size: 0.9rem; margin: 0; }

@media (max-width: 900px) {
  .process-row { grid-template-columns: 1fr 1fr; }
  .process-step { border-right: none; border-bottom: 1px solid var(--line); padding: 1.5rem 0; }
  .process-step:nth-child(odd) { padding-right: 1.25rem; }
}
@media (max-width: 560px) {
  .process-row { grid-template-columns: 1fr; }
}

/* ---------- Featured work spotlight + grid ---------- */
.work-spotlight {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
}
.work-spotlight .tile { aspect-ratio: 16/11.5; border-radius: var(--radius-l); }
.work-spotlight .tags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.tag {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  color: var(--muted);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.work-card { display: flex; flex-direction: column; gap: 0.9rem; }
.work-card .tile { aspect-ratio: 4/3; border-radius: var(--radius-m); margin-bottom: 0.2rem; }
.work-card h3 { font-size: 1.05rem; margin-bottom: 0.2rem; }
.work-card p { font-size: 0.9rem; }

@media (max-width: 900px) {
  .work-spotlight { grid-template-columns: 1fr; }
  .work-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .work-grid { grid-template-columns: 1fr; }
}

.tile {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-sunken);
}
.tile svg { width: 100%; height: 100%; }

/* ---------- Marquee (max one per page) ---------- */
.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: 1.4rem;
}
.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--muted);
  white-space: nowrap;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* ---------- Testimonials ---------- */
.testimonial-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
}
.testimonial blockquote {
  margin: 0 0 1.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.35;
  max-width: 42ch;
}
.testimonial figcaption { display: flex; align-items: center; gap: 0.8rem; }
.avatar-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 700;
  color: var(--on-accent); flex: none;
}
.testimonial cite { font-style: normal; font-size: 0.88rem; color: var(--muted); }
.testimonial cite b { color: var(--ink); font-weight: 600; display: block; font-size: 0.94rem; }

@media (max-width: 760px) {
  .testimonial-pair { grid-template-columns: 1fr; }
}

/* ---------- CTA band ---------- */
.cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
  border-radius: var(--radius-l);
  padding: clamp(2.25rem, 5vw, 3.5rem);
  background: var(--ink);
  color: var(--paper);
}
.cta-band h2 { margin: 0; max-width: 20ch; }
.cta-band p { color: rgba(245,246,243,0.66); margin: 0.5rem 0 0; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding-block: clamp(2.5rem, 5vw, 3.5rem); }
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p { font-size: 0.92rem; max-width: 32ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 1rem; font-weight: 500; }
.footer-col li { margin-bottom: 0.65rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink-soft); transition: color var(--dur-s); }
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-social { display: flex; gap: 1rem; }
.footer-social a svg { width: 18px; height: 18px; }
.footer-social a { color: var(--muted); transition: color var(--dur-s); }
.footer-social a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 1.75rem; }
}

/* ---------- Page header (inner pages) ---------- */
.page-head {
  padding-block: clamp(2.75rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem);
}
.page-head .h-display { max-width: 20ch; }

/* ---------- Stats row ---------- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stat { padding: 2rem 1.5rem 2rem 0; border-right: 1px solid var(--line); }
.stat:last-child { border-right: none; }
.stat .num { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 2.8rem); color: var(--accent); display: block; }
.stat .label { font-size: 0.88rem; color: var(--muted); }

@media (max-width: 760px) {
  .stats-row { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2n) { border-right: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); padding-top: 2rem; }
}

/* ---------- Values list (numbered, no cards) ---------- */
.value-list { border-top: 1px solid var(--line); }
.value-row {
  display: grid;
  grid-template-columns: 100px 1fr 1.4fr;
  gap: 2rem;
  padding-block: 2.1rem;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.value-row .num { font-family: var(--font-mono); color: var(--muted); font-size: 0.9rem; }
.value-row h3 { font-size: 1.2rem; margin: 0; }
.value-row p { margin: 0; font-size: 0.95rem; }

@media (max-width: 760px) {
  .value-row { grid-template-columns: 1fr; gap: 0.5rem; }
}

/* ---------- Team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}
.team-grid.leads { grid-template-columns: repeat(2, 1fr); margin-bottom: 1.5rem; }
.team-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--paper-raised);
  transition: transform var(--dur-m) var(--ease), box-shadow var(--dur-m) var(--ease);
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.team-card .avatar {
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600;
  color: var(--on-accent);
}
.team-grid.leads .avatar { aspect-ratio: 16/10; }
.team-card .avatar span { font-size: 2rem; }
.team-card .info { padding: 1.1rem 1.2rem 1.35rem; }
.team-card h3 { font-size: 1.02rem; margin-bottom: 0.1rem; }
.team-card .role { font-family: var(--font-mono); font-size: 0.76rem; color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.6rem; display: block; }
.team-card p { font-size: 0.88rem; margin: 0; }

@media (max-width: 980px) {
  .team-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .team-grid, .team-grid.leads { grid-template-columns: 1fr; }
}

/* ---------- Comparison table (pricing) ---------- */
.compare-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-m); }
table.compare { width: 100%; border-collapse: collapse; min-width: 640px; }
table.compare th, table.compare td { padding: 1.1rem 1.4rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare thead th {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
  background: var(--paper-sunken);
}
table.compare thead th:first-child { color: var(--ink); }
table.compare tbody th { font-weight: 600; font-size: 0.92rem; width: 26%; }
table.compare td { font-size: 0.9rem; color: var(--ink-soft); }
table.compare tbody tr:last-child th, table.compare tbody tr:last-child td { border-bottom: none; }
table.compare tbody tr:hover { background: var(--paper-sunken); }
.plan-highlight { color: var(--accent); font-weight: 600; }

/* ---------- FAQ accordion (native details) ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-list details {
  border-bottom: 1px solid var(--line);
  padding-block: 1.3rem;
}
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary .plus {
  flex: none;
  width: 22px; height: 22px;
  position: relative;
}
.faq-list summary .plus::before, .faq-list summary .plus::after {
  content: "";
  position: absolute;
  background: var(--ink);
  transition: transform var(--dur-s) var(--ease), opacity var(--dur-s) var(--ease);
}
.faq-list summary .plus::before { left: 4px; right: 4px; top: 50%; height: 2px; transform: translateY(-50%); }
.faq-list summary .plus::after { top: 4px; bottom: 4px; left: 50%; width: 2px; transform: translateX(-50%); }
.faq-list details[open] summary .plus::after { opacity: 0; transform: translateX(-50%) rotate(90deg); }
.faq-list details p { margin: 0.9rem 0 0; font-size: 0.95rem; }

/* ---------- Filter pills ---------- */
.filter-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  padding-bottom: 2.25rem;
}
.filter-pill {
  border: 1px solid var(--line);
  background: var(--paper-raised);
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: all var(--dur-s) var(--ease);
}
.filter-pill:hover { border-color: var(--ink); color: var(--ink); }
.filter-pill.is-active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---------- Portfolio grid ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}
.portfolio-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: var(--paper-raised);
  transition: transform var(--dur-m) var(--ease), box-shadow var(--dur-m) var(--ease);
}
.portfolio-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-card); }
.portfolio-card .tile { aspect-ratio: 4/3; border-radius: 0; border: none; border-bottom: 1px solid var(--line); }
.portfolio-card .info { padding: 1.3rem 1.4rem 1.5rem; }
.portfolio-card h3 { font-size: 1.05rem; margin-bottom: 0.35rem; }
.portfolio-card p { font-size: 0.9rem; margin-bottom: 0.8rem; }
.portfolio-card[hidden] { display: none; }

@media (max-width: 980px) {
  .portfolio-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .portfolio-grid { grid-template-columns: 1fr; }
}

/* ---------- Service detail sections ---------- */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding-block: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
}
.service-detail.reverse .service-visual { order: 2; }
.service-detail .service-visual .tile { aspect-ratio: 4/3.2; border-radius: var(--radius-l); }
.service-includes { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem 1.5rem; margin-top: 1.5rem; }
.service-includes li { display: flex; gap: 0.6rem; font-size: 0.92rem; align-items: flex-start; }
.service-includes svg { width: 18px; height: 18px; color: var(--accent); flex: none; margin-top: 0.15rem; }
.service-detail .index { font-family: var(--font-mono); color: var(--muted); font-size: 0.85rem; }

@media (max-width: 900px) {
  .service-detail, .service-detail.reverse { grid-template-columns: 1fr; }
  .service-detail.reverse .service-visual { order: 0; }
  .service-includes { grid-template-columns: 1fr; }
}

/* ---------- Divider stat band (breaks zigzag rhythm) ---------- */
.divider-quote {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.divider-quote blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.6vw, 1.7rem);
  max-width: 32ch;
  margin: 0 0 1rem;
}

/* ---------- Blog list ---------- */
.blog-featured {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(1.75rem, 4vw, 3rem);
  align-items: center;
  padding-bottom: clamp(2.5rem, 5vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.blog-featured .tile { aspect-ratio: 16/11; border-radius: var(--radius-l); }
.blog-cluster h3.cluster-title {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}
.blog-cluster { margin-bottom: 3rem; }
.blog-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  padding-block: 1.4rem;
  border-top: 1px solid var(--line);
}
.blog-cluster .blog-row:last-child { border-bottom: 1px solid var(--line); }
.blog-row .date { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
.blog-row h4 { font-size: 1.05rem; margin: 0 0 0.3rem; }
.blog-row p { font-size: 0.9rem; margin: 0; }
.blog-row .arrow { width: 20px; height: 20px; color: var(--muted); transition: transform var(--dur-s) var(--ease); }
.blog-row:hover .arrow { transform: translateX(4px); color: var(--accent); }

@media (max-width: 820px) {
  .blog-featured { grid-template-columns: 1fr; }
  .blog-row { grid-template-columns: 1fr; gap: 0.4rem; }
  .blog-row .arrow { display: none; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.4rem; }
.field label { font-size: 0.88rem; font-weight: 600; }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.field input, .field textarea, .field select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--paper-raised);
  color: var(--ink);
  transition: border-color var(--dur-s) var(--ease), box-shadow var(--dur-s) var(--ease);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); opacity: 0.8; }
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 130px; }
.field.has-error input, .field.has-error textarea { border-color: var(--accent-strong); }
.field .error-msg { font-size: 0.8rem; color: var(--accent-strong); display: none; }
.field.has-error .error-msg { display: block; }
.form-status {
  display: none;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 1.2rem;
  border-radius: var(--radius-s);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.92rem;
  margin-bottom: 1.5rem;
}
.form-status.is-visible { display: flex; }
.form-status svg { width: 18px; height: 18px; flex: none; }

.office-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.office-card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.office-card p { font-size: 0.9rem; margin-bottom: 0.3rem; }
.map-placeholder {
  aspect-ratio: 16/10;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 28px 28px,
    var(--paper-sunken);
  margin-bottom: 1.5rem;
}
.map-placeholder .pin {
  position: absolute;
  top: 46%;
  left: 42%;
  width: 26px;
  height: 26px;
  color: var(--accent);
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- 404 ---------- */
.error-page {
  min-height: calc(100dvh - 68px - 320px);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: 4rem;
}
.error-page .code {
  font-family: var(--font-mono);
  font-size: clamp(4rem, 14vw, 8rem);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-page p { margin-inline: auto; }
.error-page .actions { display: flex; gap: 1rem; justify-content: center; margin-top: 1.75rem; flex-wrap: wrap; }

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ---------- Section heading block ---------- */
.section-head { margin-bottom: clamp(2rem, 4vw, 3rem); max-width: 60ch; }
.section-head.split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.8rem 1.2rem;
  z-index: 100;
  border-radius: var(--radius-s);
}
.skip-link:focus { left: var(--gutter); top: 0.75rem; }
