/* ==========================================================================
   BLACKCIPHER — Core stylesheet  ·  THEME: "Encoded" brutalist editorial
   Near-black ground + blueprint grid · cream type · ONE crimson accent
   Condensed uppercase display (Anton) · Inter body · JetBrains Mono labels
   Table of contents
     01. Tokens
     02. Reset & base
     03. Typography & layout helpers
     04. Buttons
     05. Navigation
     06. Hero + particle canvas
     07. Cards (services, projects, lab, values)
     08. Process / timeline
     09. Marquee (technologies)
     10. Stats counters
     11. Testimonials slider
     12. CTA banner
     13. Forms
     14. Footer + floating WhatsApp
     15. Chrome: loader, progress bar, cursor glow
     16. Motion (reveal, tilt, magnetic)
     17. Page-specific (case study, legal, 404)
     18. Responsive
     19. Print / reduced motion
   ========================================================================== */

/* 01. TOKENS ------------------------------------------------------------- */
:root {
  /* Ground */
  --bg: #0a0a0a;
  --bg-deep: #060606;
  --surface: #0e0e0e;
  --surface-2: #141414;
  --surface-3: #1a1a1a;

  /* Type */
  --text: #f2ede4;          /* warm cream, not pure white */
  --text-bright: #fbf8f2;
  --muted: #8c8880;         /* warm gray secondary */
  --muted-dim: #6a6660;
  --on-accent: #fdf6f2;

  /* ONE accent */
  --accent: #d13b21;        /* crimson */
  --accent-hi: #e8482a;
  --accent-soft: rgba(209, 59, 33, 0.12);
  --accent-line: rgba(209, 59, 33, 0.45);
  --accent-glow: rgba(209, 59, 33, 0.18);

  /* Hairlines */
  --border: #232323;
  --border-strong: #343434;
  --grid-line: rgba(242, 237, 228, 0.038);

  --danger: #e8482a;
  --ok: #f2ede4;

  --font-display: "Anton", "Arial Narrow", Impact, system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Brutalist = no rounding. Kept as tokens so it can be tuned in one place. */
  --radius: 0px;
  --radius-sm: 0px;
  --radius-pill: 0px;

  --container: 1240px;
  --gutter: clamp(1.15rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7rem);

  --shadow-soft: 0 20px 50px -30px rgba(0, 0, 0, 0.95);
  --shadow-accent: 8px 8px 0 0 var(--accent);

  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --nav-h: 76px;

  /* Blueprint grid, reused in several places */
  --grid-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  --grid-size: 56px 56px;
}

/* 02. RESET & BASE ------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

* { margin: 0; padding: 0; }

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: clamp(0.975rem, 0.35vw + 0.9rem, 1.0625rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* Blueprint ground — the ruled grid from the reference, fixed behind everything */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: var(--grid-image);
  background-size: var(--grid-size);
  mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, rgba(0,0,0,0.9), transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 120% 90% at 50% 0%, rgba(0,0,0,0.9), transparent 82%);
}

main, header, footer, .wa-float, .progress, .cursor-glow { position: relative; z-index: 1; }

img, svg, canvas { display: block; max-width: 100%; height: auto; }
img { background: var(--surface-2); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-hi); }

ul, ol { list-style: none; }

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

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
::selection { background: var(--accent); color: var(--on-accent); }

/* Dark scrollbar (WebKit + Firefox) */
html { scrollbar-color: #2b2b2b var(--bg); scrollbar-width: thin; }
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #2b2b2b; border: 3px solid var(--bg-deep); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--accent);
  color: var(--on-accent);
  padding: 0.7rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; color: var(--on-accent); }

/* 03. TYPOGRAPHY & LAYOUT HELPERS --------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(2.75rem, 5.5vw, 4.25rem); }
.section--surface {
  background: var(--bg-deep);
  border-block: 1px solid var(--border);
}
/* Sections can opt into a stronger grid reveal */
.section--grid::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: var(--grid-image);
  background-size: var(--grid-size);
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0,0,0,0.55), transparent 70%);
  pointer-events: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--text-bright);
}

h1 { font-size: clamp(2.9rem, 8.4vw, 7rem); }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.6rem); line-height: 0.95; }
h3 { font-size: clamp(1.1rem, 1.6vw, 1.45rem); line-height: 1; }
h4 { font-size: 1rem; }

/* Card-level headings are set in the body face for readability */
.card__title,
.mini-card h3,
.quote__name,
.steps__item h3,
.case-fact dd,
h5, h6 {
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.3;
}

p { color: var(--muted); }
p strong, strong { color: var(--text); font-weight: 600; }
h2 + p, h1 + p { margin-top: 1rem; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.3rem;
}
.eyebrow::before {
  content: "//";
  color: var(--accent);
  letter-spacing: 0.1em;
}
.section-head--center .eyebrow { justify-content: center; }

.lead { font-size: clamp(1rem, 1vw, 1.1rem); max-width: 64ch; }
.muted { color: var(--muted); }
.small { font-size: 0.87rem; }
.mono { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; }

/* Kill the old monospace lowercasing where real code-ish text is needed */
.mono--raw { text-transform: none; letter-spacing: 0.02em; }

.section-head { max-width: 70ch; margin-bottom: clamp(2rem, 4vw, 3.25rem); }
.section-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  max-width: none;
}

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

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

/* 04. BUTTONS — sharp, uppercase, mono ----------------------------------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--border-strong);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.76rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.16s var(--ease), background 0.2s linear,
              border-color 0.2s linear, color 0.2s linear, box-shadow 0.16s var(--ease);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 0 var(--text); color: var(--btn-fg); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn svg { flex: 0 0 auto; }

.btn--primary {
  --btn-bg: var(--accent);
  --btn-fg: var(--on-accent);
  border-color: var(--accent);
  font-weight: 600;
}
.btn--primary:hover { box-shadow: 4px 4px 0 0 var(--text); }

.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); box-shadow: 4px 4px 0 0 var(--accent); }
.btn--quiet { border-color: var(--border); }
.btn--quiet:hover { border-color: var(--border-strong); }

.btn--sm { padding: 0.72rem 1.15rem; font-size: 0.7rem; }
.btn--lg { padding: 1.15rem 2rem; font-size: 0.8rem; }
.btn--block { width: 100%; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; align-items: center; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.link-arrow svg { transition: transform 0.2s var(--ease); }
.link-arrow:hover svg { transform: translateX(5px); }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.34rem 0.68rem;
  border: 1px solid var(--border);
  background: transparent;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.chip--accent { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.62rem;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}
.badge::before {
  content: "";
  width: 6px; height: 6px;
  background: currentColor;
}
.badge--live { color: var(--accent); border-color: var(--accent-line); }
.badge--beta { color: var(--text); border-color: var(--border-strong); }
.badge--dev { color: #b8a06a; border-color: #4a3f2a; }
.badge--soon { color: var(--muted); }

.tag-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* The rule-work grid: cells are separated by a single hairline, not by
   individual card borders. Items supply their own background.              */
.grid { display: grid; gap: 1px; background: var(--border); border: 1px solid var(--border); }
.grid > * { background: var(--bg); }
.grid > .card,
.grid > .mini-card,
.grid > .project-card { border: 0; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(268px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); }
.grid--flush { border: 0; background: transparent; }
.grid--flush > * { background: transparent; }

/* 05. NAVIGATION --------------------------------------------------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 90;
  background: rgba(10, 10, 10, 0.86);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav.is-scrolled { background: rgba(10, 10, 10, 0.97); border-bottom-color: var(--border-strong); }

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

.brand { display: inline-flex; align-items: center; gap: 0.75rem; }
.brand__mark {
  color: var(--accent);
  display: inline-grid;
  place-items: center;
  width: 40px; height: 40px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  flex: 0 0 auto;
}
.brand__mark svg { transition: transform 0.5s var(--ease); }
.brand:hover .brand__mark svg { transform: rotate(60deg); }
.brand__word {
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
}
.brand__word span { color: var(--accent); }

.nav__links { display: flex; align-items: center; gap: 1.9rem; }
.nav__links > a:not(.btn) {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  position: relative;
  padding-block: 0.4rem;
  transition: color 0.2s linear;
}
.nav__links > a:not(.btn)::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 0;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.nav__links > a:not(.btn):hover { color: var(--text-bright); }
.nav__links > a:not(.btn):hover::after { width: 100%; }
.nav__links > a[aria-current="page"] { color: var(--text-bright); }
.nav__links > a[aria-current="page"]::after { width: 100%; }

.nav__toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  padding: 12px 11px;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}
.nav__toggle span {
  display: block;
  height: 2px;
  background: var(--text);
  transition: transform 0.28s var(--ease), opacity 0.2s linear;
}
.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); }

/* 06. HERO + PARTICLES --------------------------------------------------- */
.hero {
  position: relative;
  min-height: min(88vh, 860px);
  display: grid;
  align-items: center;
  padding-block: clamp(3.5rem, 9vw, 6.5rem);
  overflow: hidden;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.55;
}
.hero__inner { position: relative; z-index: 1; max-width: 62rem; margin-inline: auto; }
.hero h1 { margin-bottom: 1.8rem; }
.hero h1 .word {
  display: inline-block;
  margin-right: 0.16em;
  opacity: 0;
  transform: translateY(0.16em);
  animation: wordIn 0.7s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.hero h1 .word--accent { color: var(--accent); }
.hero h1 .word--outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}
@keyframes wordIn { to { opacity: 1; transform: none; } }

.hero__lead { margin-inline: auto; max-width: 66ch; margin-bottom: 2.3rem; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.8rem 2rem;
  margin-top: 2.8rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.hero__meta span { display: inline-flex; align-items: center; gap: 0.6rem; }
.hero__meta span::before {
  content: "";
  width: 7px; height: 7px;
  background: var(--accent);
}

.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--muted-dim);
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.hero__scroll i { display: block; width: 1px; height: 28px; background: var(--accent); animation: scrollPulse 2.2s var(--ease) infinite; }
@keyframes scrollPulse { 0%,100% { opacity: 0.3; } 50% { opacity: 1; } }

/* Inner-page hero */
.page-hero {
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); margin-bottom: 1.2rem; }
.page-hero .lead { max-width: 68ch; }
.crumbs {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  color: var(--muted-dim);
  margin-bottom: 1.4rem;
  text-transform: uppercase;
}
.crumbs a:hover { color: var(--accent); }

/* 07. CARDS -------------------------------------------------------------- */
.card,
.mini-card {
  position: relative;
  background: var(--bg);
  border: 0;
  padding: clamp(1.4rem, 2.2vw, 2rem);
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  height: 100%;
  overflow: hidden;
  transition: background 0.25s linear, transform 0.25s var(--ease);
}
.card { border: 1px solid var(--border); }

/* Accent rail that grows on hover */
.card::after,
.mini-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 3px;
  height: 0;
  background: var(--accent);
  transition: height 0.3s var(--ease);
}
.card:hover::after,
.mini-card:hover::after { height: 100%; }

.card:hover,
.mini-card:hover { background: var(--surface-2); }
.card > *, .mini-card > * { position: relative; z-index: 1; }

.card__icon {
  width: 42px; height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-strong);
  color: var(--accent);
  flex: 0 0 auto;
  transition: background 0.25s linear, border-color 0.25s linear;
}
.card:hover .card__icon { background: var(--accent-soft); border-color: var(--accent-line); }
.card--link:hover .link-arrow svg { transform: translateX(5px); }

.card__title { font-size: 1.05rem; }
.card__text { font-size: 0.93rem; }
.card__foot { margin-top: auto; padding-top: 0.5rem; }

.service-block {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  display: grid;
  gap: clamp(1.4rem, 3vw, 3rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  transition: border-color 0.25s linear;
}
.service-block:hover { border-color: var(--border-strong); }
.service-block__head { display: flex; gap: 1.1rem; align-items: flex-start; }
.service-block h2 { font-family: var(--font-display); }
.service-block__slug {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.45rem;
}
.service-block p { margin-top: 1rem; }
.service-block ul { display: grid; gap: 0; margin-top: 1.2rem; border-top: 1px solid var(--border); }
.service-block ul li {
  position: relative;
  padding: 0.7rem 0 0.7rem 1.7rem;
  font-size: 0.92rem;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.service-block ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.1em;
  width: 8px; height: 8px;
  background: var(--accent);
}
.service-block__aside { display: grid; gap: 1.2rem; align-content: start; }
.aside-label {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

/* Project cards */
.project-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1px solid var(--border);
  overflow: hidden;
  height: 100%;
  transition: border-color 0.25s linear;
}
.project-card:hover { border-color: var(--accent-line); }
.project-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.project-card__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.35) contrast(1.03); transition: transform 0.6s var(--ease), filter 0.4s linear; }
.project-card:hover .project-card__media img { transform: scale(1.03); filter: none; }
.project-card__overlay {
  position: absolute;
  inset: 0;
  background: rgba(209, 59, 33, 0.92);
  display: flex;
  align-items: flex-end;
  padding: 1.4rem;
  /* Wipes in from the left like a print head passing over the panel */
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.5s var(--ease);
}
.project-card__overlay .link-arrow { color: var(--on-accent); }
.project-card:hover .project-card__overlay,
.project-card:focus-within .project-card__overlay { clip-path: inset(0 0 0 0); }

/* Scanning rule that sweeps the artwork on hover */
.project-card__media::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(209, 59, 33, 0.7);
  opacity: 0;
  transition: left 0.75s var(--ease), opacity 0.25s linear;
}
.project-card:hover .project-card__media::after { left: 100%; opacity: 1; }
.project-card__body {
  padding: clamp(1.3rem, 2vw, 1.8rem);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  flex: 1;
}
.project-card__body h2, .project-card__body h3 { font-family: var(--font-display); }
.project-card__body p { font-size: 0.93rem; }
.project-card__foot { margin-top: auto; padding-top: 0.6rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.project-card__flag { position: absolute; top: 0; left: 0; z-index: 2; background: var(--accent); border-color: var(--accent); color: var(--on-accent); padding: 0.45rem 0.9rem; }
.project-card__flag::before { background: var(--on-accent); }

.project-card--flagship {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  border-color: var(--accent-line);
}
.project-card--flagship .project-card__media { aspect-ratio: auto; height: 100%; min-height: 340px; border-bottom: 0; border-right: 1px solid var(--border); }
.project-card--flagship .project-card__body { padding: clamp(1.8rem, 3.4vw, 3rem); justify-content: center; }
.project-card--flagship h2 { font-size: clamp(1.6rem, 3.4vw, 2.8rem); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: clamp(1.6rem, 3vw, 2.5rem); border: 1px solid var(--border); }
.filter-chip {
  padding: 0.85rem 1.3rem;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s linear, color 0.2s linear;
}
.filter-chip:hover { color: var(--text-bright); background: var(--surface-2); }
.filter-chip[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }
.filter-bar .chip { border: 0; border-left: 1px solid var(--border); padding-inline: 1.3rem; color: var(--muted-dim); }

.mini-card { border: 1px solid var(--border); }
.mini-card h3 { font-size: 1.02rem; }
.mini-card p { font-size: 0.9rem; }
.mini-card .badge { align-self: flex-start; }
.mini-card .link-arrow { margin-top: auto; }

.value-card__num {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.2em;
}
.value-card h3 { font-family: var(--font-display); font-size: clamp(1.5rem, 3vw, 2.2rem); }

/* 08. PROCESS / TIMELINE ------------------------------------------------- */
.process-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.process-strip__item {
  background: var(--bg);
  padding: clamp(1.6rem, 3vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  transition: background 0.25s linear;
}
.process-strip__item:hover { background: var(--surface-2); }
.process-strip__step {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  color: var(--accent);
}
.process-strip__item h3 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); }
.process-strip__item p { font-size: 0.92rem; }

.timeline { display: grid; gap: 0; border: 1px solid var(--border); background: var(--border); }
.timeline__item {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.3rem, 2.6vw, 2rem);
  background: var(--bg);
  transition: background 0.25s linear;
}
.timeline__item:hover { background: var(--surface-2); }
.timeline__index {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  color: var(--accent);
}
.timeline__item h3 { font-family: var(--font-display); font-size: clamp(1.3rem, 2.2vw, 1.7rem); margin-bottom: 0.5rem; }
.timeline__item p { font-size: 0.93rem; }
.timeline__dur {
  display: inline-block;
  margin-top: 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* 09. MARQUEE ------------------------------------------------------------ */
.marquee {
  position: relative;
  overflow: hidden;
  border-block: 1px solid var(--border);
  padding-block: 1.4rem;
  background: var(--bg-deep);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
/* When JS takes over the marquee it drives transform itself (scroll-reactive) */
.marquee--js .marquee__track { animation: none; will-change: transform; }
.marquee__group { display: flex; align-items: center; gap: clamp(1.8rem, 4vw, 3.4rem); padding-right: clamp(1.8rem, 4vw, 3.4rem); }
.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.7vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted-dim);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  transition: color 0.25s linear;
}
.marquee__item::after { content: ""; width: 6px; height: 6px; background: var(--accent); }
.marquee__item:hover { color: var(--text-bright); }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* 10. STATS -------------------------------------------------------------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.stat { padding: clamp(1.4rem, 2.6vw, 2rem); background: var(--bg); }
.stat__value {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 0.9;
  color: var(--text-bright);
  display: flex;
  align-items: baseline;
  gap: 0.08rem;
}
.stat__value span.unit { color: var(--accent); font-size: 0.5em; }
.stat__label {
  margin-top: 0.9rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  line-height: 1.5;
}

/* 11. TESTIMONIALS SLIDER ------------------------------------------------ */
.slider { position: relative; }
.slider__viewport { overflow: hidden; border: 1px solid var(--border); }
.slider__track { display: flex; transition: transform 0.5s var(--ease); }
.slider__slide { flex: 0 0 100%; }
.quote {
  background: var(--bg);
  padding: clamp(1.7rem, 3.6vw, 3rem);
  display: grid;
  gap: 1.2rem;
  min-height: 100%;
}
.quote__mark { color: var(--accent); font-family: var(--font-display); font-size: 3rem; line-height: 0.4; }
.quote__text {
  font-family: var(--font-body);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.5;
  color: var(--text-bright);
  font-weight: 400;
}
.quote__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
}
.quote__person { display: flex; align-items: center; gap: 0.9rem; }
.avatar {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  flex: 0 0 auto;
}
.quote__name { font-weight: 600; font-size: 0.95rem; text-transform: none; color: var(--text); }
.quote__role { font-size: 0.8rem; color: var(--muted); }
.quote__metric { font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }

.slider__controls { display: flex; align-items: center; gap: 0; margin-top: 0; border: 1px solid var(--border); border-top: 0; width: fit-content; }
.slider__btn {
  width: 52px; height: 52px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s linear, color 0.2s linear;
}
.slider__btn:hover { background: var(--accent); color: var(--on-accent); }
.slider__dots { display: flex; gap: 0; margin-left: 0; align-items: center; padding-inline: 1rem; }
.slider__dot {
  width: 26px; height: 52px;
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 0;
  position: relative;
}
.slider__dot::after {
  content: "";
  position: absolute;
  inset: 24px 6px auto 6px;
  height: 3px;
  background: var(--border-strong);
  transition: background 0.25s linear;
}
.slider__dot[aria-current="true"]::after { background: var(--accent); }

.client-logos { display: flex; flex-wrap: wrap; gap: 1rem 2.2rem; align-items: center; }
.client-logos span { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dim); }

/* 12. CTA BANNER --------------------------------------------------------- */
.cta-banner {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--accent-line);
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--bg-deep);
  display: grid;
  gap: 1.5rem;
  justify-items: start;
}
.cta-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--grid-image);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 100% at 15% 0%, rgba(0,0,0,0.8), transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 100% at 15% 0%, rgba(0,0,0,0.8), transparent 70%);
  pointer-events: none;
}
.cta-banner::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 220px;
  height: 220px;
  background: var(--accent);
  opacity: 0.08;
  transform: rotate(45deg);
  pointer-events: none;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 { max-width: 22ch; }
.cta-banner p { max-width: 58ch; }

.offer-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.2rem;
  align-items: center;
  padding: 1.2rem 1.5rem;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.offer-banner strong { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.8rem; }
.offer-banner p { font-size: 0.9rem; }
.offer-banner__icon { color: var(--accent); }

/* 13. FORMS -------------------------------------------------------------- */
.form-shell { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: 0.5rem; }
.field label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
}
.field label .req { color: var(--accent); }
.field__hint { font-size: 0.79rem; color: var(--muted-dim); }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  padding: 0.9rem 1rem;
  color: var(--text);
  font-size: 0.95rem;
  font-family: var(--font-body);
  transition: border-color 0.2s linear, background 0.2s linear;
  appearance: none;
}
.field textarea { min-height: 152px; resize: vertical; line-height: 1.6; }
.field select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) calc(50% + 2px), calc(100% - 15px) calc(50% + 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 2.6rem;
}
.field input::placeholder, .field textarea::placeholder { color: #5a564f; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #4a4a4a; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface-2);
}
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--accent); border-width: 1px 1px 1px 3px; }
.field__error { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.04em; color: var(--accent-hi); }
.field__error:empty { display: none; }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.25rem; }
.checkbox { display: flex; gap: 0.75rem; align-items: flex-start; font-size: 0.85rem; color: var(--muted); }
.checkbox input { width: 18px; height: 18px; margin-top: 0.15rem; accent-color: var(--accent); flex: 0 0 auto; }

.file-drop {
  border: 1px dashed var(--border-strong);
  padding: 1rem 1.1rem;
  font-size: 0.88rem;
  color: var(--muted);
  display: flex;
  gap: 0.8rem;
  align-items: center;
  transition: border-color 0.2s linear, background 0.2s linear;
}
.file-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.file-drop input[type="file"] { color: var(--muted); font-size: 0.82rem; max-width: 100%; }

.form__status { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.form__status[data-state="error"] { color: var(--accent-hi); }

.form-success {
  border: 1px solid var(--accent-line);
  border-left-width: 4px;
  background: var(--accent-soft);
  padding: clamp(1.5rem, 3vw, 2.2rem);
  display: grid;
  gap: 0.9rem;
  justify-items: start;
}
.form-success h3 { font-family: var(--font-display); font-size: clamp(1.4rem, 2.6vw, 2rem); }

.notice {
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  background: var(--surface);
  padding: 1rem 1.2rem;
  font-size: 0.86rem;
  color: var(--muted);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1.4rem, 2.6vw, 2rem);
  display: grid;
  gap: 1.2rem;
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}
.panel h2 { font-family: var(--font-display); font-size: 1.5rem; }
.steps { display: grid; gap: 0; border-top: 1px solid var(--border); }
.steps__item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 1rem; padding-block: 1.1rem; border-bottom: 1px solid var(--border); }
.steps__num {
  font-family: var(--font-display);
  font-size: 1.6rem;
  line-height: 1;
  color: var(--accent);
}
.steps__item h3 { font-size: 1rem; margin-bottom: 0.3rem; font-family: var(--font-body); font-weight: 600; letter-spacing: 0; text-transform: none; }
.steps__item p { font-size: 0.87rem; }

.contact-list { display: grid; gap: 0; border: 1px solid var(--border); }
.contact-list a {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  transition: background 0.2s linear, padding-left 0.2s var(--ease);
}
.contact-list a:last-child { border-bottom: 0; }
.contact-list a:hover { background: var(--accent-soft); padding-left: 1.5rem; }
.contact-list .card__icon { width: 40px; height: 40px; }
.contact-list strong { display: block; font-size: 0.95rem; color: var(--text); font-weight: 600; }
.contact-list span span, .contact-list a > span:last-child > span { font-size: 0.82rem; color: var(--muted); }

/* 14. FOOTER ------------------------------------------------------------- */
.footer {
  border-top: 1px solid var(--border);
  margin-top: var(--section-y);
  background: var(--bg-deep);
}
.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.8rem, 4vw, 3rem);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.footer h2 {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 1.1rem;
  line-height: 1;
}
.footer h2::before { content: "// "; color: var(--accent); }
.footer ul { display: grid; gap: 0.6rem; }
.footer ul a { font-size: 0.9rem; color: var(--muted); }
.footer ul a:hover { color: var(--accent-hi); }
.footer__tag {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--text-bright);
  margin: 1.2rem 0 0.7rem;
  text-transform: uppercase;
}
.footer__blurb { font-size: 0.9rem; max-width: 34ch; margin-bottom: 1.3rem; }
.footer__note { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted-dim); margin-top: 1rem; }
.footer__base {
  border-top: 1px solid var(--border);
  padding-block: 1.3rem 1.7rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted-dim);
}

/* The discreet way into the private dashboard (bottom-right of every footer).
   Unlisted in search engines: rel="nofollow" + Disallow in robots.txt. Being
   findable is fine — the login and firestore.rules are the actual lock. */
.footer__admin {
  color: var(--muted-dim);
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer__admin:hover,
.footer__admin:focus-visible {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.wa-float {
  position: fixed;
  right: clamp(1rem, 2.5vw, 1.75rem);
  bottom: clamp(1rem, 2.5vw, 1.75rem);
  z-index: 80;
  width: 56px; height: 56px;
  display: grid;
  place-items: center;
  background: var(--accent);
  border: 1px solid var(--accent);
  color: var(--on-accent);
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.wa-float:hover { transform: translate(-3px, -3px); color: var(--on-accent); box-shadow: 5px 5px 0 0 var(--text); }
.wa-float svg { width: 27px; height: 27px; }
.wa-float__pulse {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  animation: waPulse 2.6s var(--ease) infinite;
  pointer-events: none;
}
@keyframes waPulse { 0% { transform: scale(1); opacity: 0.7; } 70% { transform: scale(1.35); opacity: 0; } 100% { opacity: 0; } }

/* 15. CHROME: loader, progress, cursor -------------------------------- */
.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  background: var(--bg);
  animation: loaderOut 0.4s var(--ease) 0.5s forwards;
}
/* First visit of a session gets the longer boot sequence (JS adds .is-full) */
.loader.is-full { animation: loaderOut 0.45s var(--ease) 1.15s forwards; }
.loader__inner { display: grid; justify-items: center; gap: 1.1rem; }
.loader__mark { color: var(--accent); animation: loaderSpin 2.4s linear infinite; }
@keyframes loaderSpin { to { transform: rotate(360deg); } }
.loader__word {
  font-family: var(--font-display);
  letter-spacing: 0.4em;
  font-size: 0.85rem;
  color: var(--text);
  text-transform: uppercase;
}
.loader__bar { width: 160px; height: 2px; background: var(--border-strong); overflow: hidden; }
.loader__bar i { display: block; height: 100%; width: 40%; background: var(--accent); animation: loaderBar 0.8s var(--ease) infinite; }
@keyframes loaderBar { from { transform: translateX(-110%); } to { transform: translateX(320%); } }
@keyframes loaderOut { to { opacity: 0; visibility: hidden; } }
.loader.is-done { display: none; }

.progress { position: sticky; top: 0; z-index: 95; height: 2px; }
.progress__bar { display: block; height: 100%; width: 0; background: var(--accent); }

.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 26px;
  height: 26px;
  margin: -13px 0 0 -13px;
  border: 1px solid var(--accent);
  background: transparent;
  pointer-events: none;
  z-index: 130;
  opacity: 0;
  transition: width 0.25s var(--ease), height 0.25s var(--ease), margin 0.25s var(--ease),
              background-color 0.25s linear, opacity 0.3s linear;
  will-change: transform;
}
/* Centre datum mark */
.cursor-glow::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  background: var(--accent);
}
/* Over anything interactive the reticle opens into a targeting frame */
.cursor-glow.is-hot {
  width: 52px;
  height: 52px;
  margin: -26px 0 0 -26px;
  background: rgba(209, 59, 33, 0.10);
}
.cursor-glow.is-down { background: rgba(209, 59, 33, 0.25); }
@media (hover: hover) and (pointer: fine) { .cursor-glow { opacity: 0.9; } }

/* 16. MOTION ------------------------------------------------------------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
  transition-delay: var(--d, 0s);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

.tilt { transform-style: preserve-3d; }
.tilt.is-tilting { transform: perspective(1000px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }

.page-fade { animation: pageIn 0.45s var(--ease) 0.6s both; }
@keyframes pageIn { from { opacity: 0; } to { opacity: 1; } }

/* 17. PAGE-SPECIFIC ------------------------------------------------------ */
/* Case study */
.case-layout { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: clamp(1.6rem, 4vw, 3.4rem); align-items: start; }
.case-toc { position: sticky; top: calc(var(--nav-h) + 24px); display: grid; gap: 0; border: 1px solid var(--border); }
.case-toc a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--border);
  border-left: 3px solid transparent;
  transition: all 0.2s linear;
}
.case-toc a:last-child { border-bottom: 0; }
.case-toc a:hover { color: var(--text-bright); border-left-color: var(--accent); background: var(--surface); }
.case-body { display: grid; gap: clamp(2.4rem, 5vw, 4rem); }
.case-section { scroll-margin-top: calc(var(--nav-h) + 20px); }
.case-section h2 { margin-bottom: 1.1rem; }
.case-section p + p { margin-top: 1rem; }
.case-section ul { display: grid; gap: 0; margin-top: 1.2rem; border-top: 1px solid var(--border); }
.case-section ul li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.8rem;
  color: var(--muted);
  font-size: 0.94rem;
  border-bottom: 1px solid var(--border);
}
.case-section ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.15em;
  width: 8px; height: 8px;
  background: var(--accent);
}
.case-facts { display: grid; gap: 0; border-top: 1px solid var(--border); }
.case-fact { border-bottom: 1px solid var(--border); padding-block: 0.9rem; }
.case-fact dt { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-dim); }
.case-fact dd { margin-top: 0.35rem; font-size: 0.92rem; color: var(--text); }

.shot { border: 1px solid var(--border); background: var(--surface-2); }
.shot img { width: 100%; filter: grayscale(0.3); }
.shot figcaption {
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted-dim);
  border-top: 1px solid var(--border);
}
.shot-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(196px, 1fr)); gap: 1px; background: var(--border); border: 1px solid var(--border); }
.metric { padding: 1.4rem; background: var(--bg); }
.metric strong { display: block; font-family: var(--font-display); font-size: 2.2rem; color: var(--accent); line-height: 1; }
.metric span { display: block; margin-top: 0.6rem; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); line-height: 1.55; }

/* Legal / long-form */
.prose { max-width: 78ch; display: grid; gap: 1.8rem; }
.prose h2 { font-family: var(--font-mono); font-size: 0.82rem; letter-spacing: 0.2em; color: var(--text-bright); line-height: 1.5; }
.prose h3 { font-family: var(--font-body); font-weight: 600; font-size: 1rem; letter-spacing: 0; text-transform: none; color: var(--text); }
.prose p { font-size: 0.95rem; }
.prose ul { display: grid; gap: 0.6rem; }
.prose ul li { position: relative; padding-left: 1.6rem; color: var(--muted); font-size: 0.94rem; }
.prose ul li::before { content: ""; position: absolute; left: 0; top: 0.7em; width: 10px; height: 1px; background: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { text-align: left; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--border); }
.prose th { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-dim); }

/* 404 */
.err { min-height: 76vh; display: grid; place-items: center; text-align: center; padding-block: clamp(3rem, 8vw, 6rem); }
.err__code {
  font-family: var(--font-display);
  font-size: clamp(6rem, 26vw, 16rem);
  line-height: 0.82;
  color: var(--accent);
}
.err .btn-row { justify-content: center; }

/* Utilities */
.stack-sm { display: grid; gap: 0.7rem; }
.stack-md { display: grid; gap: 1.3rem; }
.stack-lg { display: grid; gap: 1.5rem; }
.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: clamp(1.6rem, 4vw, 3rem); align-items: start; }
.center { text-align: center; }
.mt-lg { margin-top: clamp(2rem, 4vw, 3rem); }
.nowrap { white-space: nowrap; }

/* Bulleted lists used inline inside marketing copy */
ul.dash { display: grid; gap: 0.6rem; }
ul.dash li { position: relative; padding-left: 1.8rem; font-size: 0.92rem; color: var(--muted); }
ul.dash li::before { content: ""; position: absolute; left: 0; top: 0.75em; width: 12px; height: 1px; background: var(--accent); }

/* 18. RESPONSIVE --------------------------------------------------------- */
@media (max-width: 1024px) {
  .case-layout { grid-template-columns: minmax(0, 1fr); }
  .case-toc { position: static; display: flex; flex-wrap: wrap; gap: 0; }
  .case-toc a { border-bottom: 0; border-right: 1px solid var(--border); }
  .form-shell { grid-template-columns: minmax(0, 1fr); }
  .panel { position: static; }
  .project-card--flagship { grid-template-columns: minmax(0, 1fr); }
  .project-card--flagship .project-card__media { min-height: 260px; border-right: 0; border-bottom: 1px solid var(--border); }
  .service-block { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .nav__toggle { display: flex; }
  .nav__links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0 var(--gutter) 1.5rem;
    background: var(--bg);
    border-bottom: 1px solid var(--border-strong);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s var(--ease), transform 0.25s var(--ease), visibility 0.25s;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links > a:not(.btn) {
    padding: 1rem 0.2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.8rem;
  }
  .nav__links > a:not(.btn)::after { display: none; }
  .nav__links > a[aria-current="page"] { color: var(--accent); }
  .nav__cta { margin-top: 1.5rem; width: 100%; }
  .footer__grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
  .offer-banner { grid-template-columns: auto minmax(0, 1fr); }
  .offer-banner .btn { grid-column: 1 / -1; }
  .timeline__item { grid-template-columns: minmax(0, 1fr); }
  .hero { min-height: auto; }
  .hero__scroll { display: none; }
}

@media (max-width: 620px) {
  :root { --nav-h: 66px; --grid-size: 40px 40px; }
  .btn { width: 100%; }
  .btn-row { width: 100%; }
  .brand__word { font-size: 0.98rem; }
  .brand__mark { width: 36px; height: 36px; }
  .filter-chip { flex: 1 1 50%; border-bottom: 1px solid var(--border); }
  .slider__controls { width: 100%; justify-content: space-between; }
  .client-logos { gap: 0.8rem 1.4rem; }
  .hero__meta { flex-direction: column; align-items: center; gap: 0.7rem; }
}

/* 19. PRINT & REDUCED MOTION -------------------------------------------- */
@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;
  }
  [data-reveal] { opacity: 1 !important; transform: none !important; }
  .hero h1 .word { opacity: 1; transform: none; animation: none; }
  .marquee__track { animation: none; }
  .loader { display: none !important; }
  .cursor-glow { display: none !important; }
  .wa-float__pulse { display: none; }
  .btn:hover { transform: none; box-shadow: none; }
}

@media print {
  body { background: #fff; color: #000; }
  .nav, .wa-float, .progress, .loader, .cursor-glow, .hero__canvas, body::before { display: none !important; }
}

/* ==========================================================================
   20. MOTION LAYER — "Encoded" advanced animations
   Mechanical, precise, on-brand: rule draws, panel wipes, label swaps,
   decode/scramble text, scanning reticle, page shutter, scroll-reactive
   marquee. Everything here is disabled under prefers-reduced-motion
   (see section 19 — it zeroes durations globally, plus explicit rules below).
   ========================================================================== */

/* --- 20.1 Reveal variants -------------------------------------------------
   Every variant overrides the base [data-reveal] fade so a single element can
   choose HOW it arrives. JS assigns variants automatically (see main.js →
   autoSequence), so no markup changes are needed.
   -------------------------------------------------------------------------- */
.reveal--up { opacity: 0; transform: translateY(18px); }
.reveal--up.is-visible { opacity: 1; transform: none; }

/* Headline wipe — reads as type being printed onto the page */
.reveal--mask {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 106% 0);
  transition: clip-path 0.85s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal--mask.is-visible { clip-path: inset(0 0 -14% 0); }

/* Label draw — a line of type ticker-taping in from the left */
.reveal--draw {
  opacity: 1;
  transform: none;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.8s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal--draw.is-visible { clip-path: inset(0 0 0 0); }

/* Panel curtain — artwork unfurls upward */
.reveal--wipe {
  opacity: 1;
  transform: none;
  clip-path: inset(0 0 100% 0);
  transition: clip-path 1s var(--ease);
  transition-delay: var(--d, 0s);
}
.reveal--wipe.is-visible { clip-path: inset(0 0 0 0); }

/* --- 20.2 Section furniture that draws itself in -------------------------- */
.section-head h2 { position: relative; }
.section-head h2::after {
  content: "";
  display: block;
  width: 58px;
  height: 4px;
  background: var(--accent);
  margin-top: 1.15rem;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.65s var(--ease) 0.28s;
}
[data-reveal].is-visible > h2::after,
[data-reveal].is-visible h2::after,
h2.reveal--mask.is-visible::after { transform: scaleX(1); }

/* Eyebrow labels trail a crimson rule behind them */
.eyebrow::after {
  content: "";
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.7s var(--ease) 0.3s;
}
.eyebrow.is-visible::after,
[data-reveal].is-visible .eyebrow::after { width: 36px; }

/* --- 20.3 Cards: corner brackets + icon response -------------------------- */
.card::before,
.project-card::before {
  content: "";
  position: absolute;
  inset: 7px;
  z-index: 2;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent)),
    linear-gradient(var(--accent), var(--accent));
  background-position: left top, left top, right bottom, right bottom;
  background-size: 0 2px, 2px 0, 0 2px, 2px 0;
  transition: background-size 0.32s var(--ease);
}
.card:hover::before,
.project-card:hover::before {
  background-size: 20px 2px, 2px 20px, 20px 2px, 2px 20px;
}
.card:hover .card__icon svg { transform: scale(1.12); }
.card__icon svg { transition: transform 0.3s var(--ease); }

/* --- 20.4 Process strip: the line travels Build → Solve → Deploy ---------- */
.process-strip__item { position: relative; overflow: hidden; }
.process-strip__item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.8s var(--ease) var(--d, 0s);
}
.process-strip__item.is-visible::before { transform: scaleX(1); }

/* --- 20.5 Stats: value slides up behind a drawing rule ------------------- */
.stat { position: relative; }
.stat::after {
  content: "";
  position: absolute;
  left: clamp(1.4rem, 2.6vw, 2rem);
  right: clamp(1.4rem, 2.6vw, 2rem);
  bottom: clamp(1.4rem, 2.6vw, 2rem);
  height: 1px;
  background: var(--border-strong);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.9s var(--ease) 0.25s;
}
.stat.is-visible::after { transform: scaleX(1); }
.stat__value { overflow: hidden; }

/* --- 20.6 Buttons: stacked label swap + sending state -------------------- */
.btn__stack { position: relative; display: inline-grid; overflow: hidden; }
.btn__a, .btn__b { grid-area: 1 / 1; display: block; white-space: nowrap; }
.btn__b { transform: translateY(106%); }
.btn:hover .btn__a { transform: translateY(-106%); }
.btn:hover .btn__b { transform: translateY(0); }
.btn__a, .btn__b { transition: transform 0.34s var(--ease); }

.btn.is-sending { pointer-events: none; }
.btn.is-sending .btn__stack { visibility: hidden; }
.btn.is-sending::after {
  content: "Sending";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
}
.btn.is-sending::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 40%;
  background: currentColor;
  animation: btnScan 0.9s var(--ease) infinite;
}
@keyframes btnScan { from { transform: translateX(-110%); } to { transform: translateX(320%); } }

/* Arriving straight from a shutter: skip the loader, reveal content fast
   so the transition reads as one continuous move. */
html.is-arriving .loader { display: none !important; }
html.is-arriving .page-fade { animation: pageIn 0.3s var(--ease) both; }

/* --- 20.7 Page shutter (JS-injected) ------------------------------------ */
.transit {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  pointer-events: none;
  visibility: hidden;
}
.transit.is-active { visibility: visible; pointer-events: auto; }
.transit__bar {
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: bottom center;
}
.transit.is-in .transit__bar {
  transform: scaleY(1);
  transition: transform 0.34s var(--ease);
  transition-delay: calc(var(--i, 0) * 0.055s);
}
.transit__label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--on-accent);
  opacity: 0;
  transition: opacity 0.2s linear 0.15s;
}
.transit.is-in .transit__label { opacity: 1; }

/* --- 20.8 Loader boot log ----------------------------------------------- */
.loader__inner { position: relative; }
.loader__log {
  display: grid;
  gap: 0.35rem;
  min-height: 3.4em;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-dim);
  text-align: left;
}
.loader__log span {
  opacity: 0;
  transform: translateY(4px);
  animation: logIn 0.32s var(--ease) forwards;
  animation-delay: var(--d, 0s);
}
.loader__log b { color: var(--accent); font-weight: 500; }
@keyframes logIn { to { opacity: 1; transform: none; } }

/* --- 20.9 Scroll readout (bottom-left instrument) ------------------------ */
.readout {
  position: fixed;
  left: var(--gutter);
  bottom: var(--gutter);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.63rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted-dim);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s linear, transform 0.4s var(--ease);
  pointer-events: none;
}
.readout.is-on { opacity: 1; transform: none; }
.readout__num { color: var(--text); min-width: 2.2em; }
.readout__bar { position: relative; width: 46px; height: 1px; background: var(--border-strong); }
.readout__bar i { position: absolute; inset: 0 auto 0 0; width: 0; background: var(--accent); }

/* --- 20.10 Slider: autoplay progress + wipe between slides --------------- */
.slider__progress { height: 2px; background: var(--border); margin-top: -1px; }
.slider__progress i { display: block; height: 100%; width: 0; background: var(--accent); }
.quote { animation: quoteIn 0.6s var(--ease) both; }
@keyframes quoteIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* --- 20.11 Case-study TOC: current section marked ------------------------ */
.case-toc a.is-current {
  color: var(--text-bright);
  border-left-color: var(--accent);
  background: var(--surface-2);
}
.case-toc a.is-current::before { content: "▸ "; color: var(--accent); }

/* --- 20.12 Mobile menu: staggered item entrance -------------------------- */
@media (max-width: 900px) {
  .nav__links.is-open > a {
    animation: navItemIn 0.36s var(--ease) both;
    animation-delay: calc(var(--i, 0) * 0.045s);
  }
}
@keyframes navItemIn { from { opacity: 0; transform: translateX(-14px); } to { opacity: 1; transform: none; } }

/* --- 20.13 Hero: grid fade-in, scroll cue, secret handshake -------------- */
body::before { animation: gridIn 1.4s var(--ease) both; }
@keyframes gridIn { from { opacity: 0; transform: scale(1.05); } to { opacity: 1; transform: none; } }

.hero__scroll i { animation: scrollPulse 2.2s var(--ease) infinite; }
.hero__scroll:hover { color: var(--accent); }

/* The hero canvas lifts slightly slower than the page (parallax, set by JS) */
.hero__canvas { will-change: transform; }

/* --- 20.14 Filter chips: instant press feedback -------------------------- */
.filter-chip:active { transform: translateY(1px); }
.grid [hidden] { display: none; }

/* --- 20.15 Reduced motion: strip the new layer --------------------------- */
@media (prefers-reduced-motion: reduce) {
  .reveal--mask, .reveal--draw, .reveal--wipe { clip-path: none !important; opacity: 1 !important; }
  .section-head h2::after { transform: scaleX(1) !important; }
  .process-strip__item::before, .stat::after { transform: scaleX(1) !important; }
  .eyebrow::after { width: 36px !important; }
  .btn__b { display: none; }
  .transit, .readout { display: none !important; }
  .quote { animation: none; }
  .loader__log span { animation: none; opacity: 1; transform: none; }
  body::before { animation: none; }
  .project-card__media::after { display: none; }
}

/* The [hidden] attribute must always win.
   Without this, any element whose class sets display:grid/flex/inline-block
   (the drawer, the modal, the floating button, a hidden form field, a badge)
   ignores hidden="true" and stays on screen. One rule prevents a whole class
   of bugs — including invisible overlays swallowing clicks.
   Kept at the END of the file: a browser does not care, but test browsers with
   a simpler cascade resolve it the same way as real ones this way. */
[hidden] { display: none !important; }
