/* ==========================================================================
   EVDevs — Human expertise. machine velocity.
   Palette: deep graphite foundation · copper (human) · glacier (AI)
   Type: Schibsted Grotesk (structure/velocity) · Source Serif 4 italic (human voice)
   ========================================================================== */

:root {
  --ink: #15171c;
  --ink-raised: #1b1e25;
  --hairline: rgba(232, 230, 225, 0.1);
  --text: #e8e6e1;
  --text-muted: #9ba0a8;
  --copper: #d08c4f;
  --copper-bright: #e0a067;
  --signal: #7faecc;
  --btn-ink: #17120c;

  --font-sans: "Schibsted Grotesk", system-ui, -apple-system, sans-serif;
  --font-serif: "Source Serif 4", Georgia, serif;

  --wrap: 68rem;
  --prose: 40rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-padding-top: 5.5rem;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
}

ul,
ol {
  list-style: none;
}

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

::selection {
  background: var(--copper);
  color: var(--btn-ink);
}

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 100;
  background: var(--copper);
  color: var(--btn-ink);
  padding: 0.5rem 1rem;
  border-radius: 4px;
  text-decoration: none;
  transition: top 0.15s ease;
}

.skip-link:focus {
  top: 1rem;
}

/* --------------------------------------------------------------------------
   Voice: the serif italic marks every "human" moment on the page
   -------------------------------------------------------------------------- */
.voice {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.01em;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--ink) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--hairline);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.brand-mark {
  width: 1.7rem;
  height: 1.7rem;
}

.brand-mark path {
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
}

.brand-mark .bm-copper {
  stroke: var(--copper);
}

.brand-mark .bm-signal {
  stroke: var(--signal);
  stroke-dasharray: 3 2;
}

.brand-mark .bm-rung {
  stroke: var(--text-muted);
  stroke-width: 1.6;
  opacity: 0.6;
}

.brand-name {
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-tld {
  color: var(--text-muted);
  font-weight: 500;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.nav-menu a:not(.btn) {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-menu a:not(.btn):hover {
  color: var(--text);
}

.nav-menu .lang-switch {
  border: 1px solid var(--hairline);
  border-radius: 6px;
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nav-menu .lang-switch:hover {
  border-color: var(--copper);
}

.nav-toggle {
  display: none;
}

@media (max-width: 44rem) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: none;
    border: 1px solid var(--hairline);
    border-radius: 6px;
    color: var(--text);
    font: 500 0.9rem var(--font-sans);
    padding: 0.45rem 0.85rem;
    cursor: pointer;
  }

  .nav-toggle-bar {
    width: 0.9rem;
    height: 2px;
    background: var(--copper);
    box-shadow: 0 5px 0 var(--signal);
    transform: translateY(-3px);
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 4.25rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ink-raised);
    border-bottom: 1px solid var(--hairline);
    padding: 0.75rem clamp(1.25rem, 4vw, 2.5rem) 1.25rem;
  }

  .nav-menu.is-open {
    display: flex;
  }

  .nav-menu li {
    padding: 0.6rem 0;
  }

  .nav-menu .lang-switch {
    display: inline-block;
  }

  .nav-menu .btn {
    justify-content: center;
    display: inline-flex;
  }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  padding: 0.85rem 1.7rem;
  border-radius: 8px;
  border: 1px solid transparent;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--copper);
  color: var(--btn-ink);
}

.btn-primary:hover {
  background: var(--copper-bright);
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--hairline);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--signal);
  color: var(--signal);
}

.btn-sm {
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
}

.btn-lg {
  font-size: 1.1rem;
  padding: 1rem 2.2rem;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(5rem, 12vh, 9rem) clamp(9rem, 20vh, 13rem);
  overflow: hidden;
}

.hero-title {
  font-size: clamp(2.8rem, 8.5vw, 6.25rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 800;
  max-width: 20ch;
}

.hero-title .line-human {
  display: block;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  color: #ede7de;
}

.hero-title .line-ai {
  display: block;
  color: #e3ecf4;
  font-size: 0.8em;
}

.hero-title .ev {
  font-weight: 900;
}

.dot-copper {
  color: var(--copper);
  font-style: normal;
}

.dot-signal {
  color: var(--signal);
}

.hero-lede {
  max-width: 34rem;
  margin-top: 2rem;
  font-size: clamp(1.1rem, 1.7vw, 1.25rem);
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.5rem;
}

.hero-note {
  margin-top: 1.75rem;
  max-width: 34rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
}

.hero-threads {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  height: clamp(7rem, 16vh, 11rem);
  pointer-events: none;
}

.thread {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}

.thread-copper {
  stroke: var(--copper);
}

.thread-signal {
  stroke: var(--signal);
}

@media (prefers-reduced-motion: no-preference) {
  .hero-threads:not(.helix-live) .thread {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: draw 2.2s cubic-bezier(0.5, 0, 0.15, 1) 0.3s forwards;
  }

  .hero-threads:not(.helix-live) .thread-signal {
    animation-duration: 1.5s; /* velocity arrives faster */
  }
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

/* --------------------------------------------------------------------------
   Sections — shared rhythm
   -------------------------------------------------------------------------- */
.section {
  padding-block: clamp(4.5rem, 9vw, 7.5rem);
  border-top: 1px solid var(--hairline);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 1.5rem;
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, var(--copper), var(--signal));
  border-radius: 1px;
}

.h2 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 700;
  margin-bottom: 1.75rem;
}

.h2 .voice {
  font-weight: 600;
  color: #ded7cb;
}

.prose {
  max-width: var(--prose);
  color: var(--text-muted);
}

.prose p + p {
  margin-top: 1.1rem;
}

.prose strong {
  color: var(--text);
  font-weight: 600;
}

.prose-narrow {
  max-width: 24ch;
}

.prose-center {
  margin-inline: auto;
}

/* --------------------------------------------------------------------------
   3 · Pillars (helping hand)
   -------------------------------------------------------------------------- */
.pillars {
  margin-top: 3rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0;
  border-top: 1px solid var(--hairline);
}

.pillar {
  padding: 1.5rem 1.5rem 1.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.pillar dt {
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 0.4rem;
}

.pillar dt::before {
  content: "— ";
  color: var(--copper);
}

.pillar dd {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   4 · Formula
   -------------------------------------------------------------------------- */
.formula {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.5rem, 5vw, 4rem);
  background: var(--ink-raised);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(2rem, 5vw, 3.5rem);
}

.formula-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-bottom: 1.25rem;
  letter-spacing: -0.015em;
}

.formula-human .formula-title {
  color: var(--copper);
}

.formula-ai .formula-title {
  color: var(--signal);
  font-weight: 800;
}

.formula-ai {
  text-align: right;
}

.formula-list li {
  padding-block: 0.45rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.formula-human .formula-list li::before {
  content: "· ";
  color: var(--copper);
}

.formula-ai .formula-list li::after {
  content: " ·";
  color: var(--signal);
}

/* The helix: human strand solid and organic, synthetic strand machine-stitched */
.formula-join {
  align-self: stretch;
  display: flex;
  align-items: center;
}

.helix-v {
  width: 4.5rem;
  height: 100%;
  min-height: 16rem;
}

.helix-h {
  display: none;
}

.helix .thread {
  opacity: 0.9;
}

.strand-synthetic {
  stroke-dasharray: 6 5;
}

/* The synthetic strand is written in binary; a faint signal line flows beneath it */
.strand-ghost {
  opacity: 0.28;
  stroke-width: 1.5;
}

.helix .binary {
  fill: var(--signal);
  font-family: ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 2px;
  filter: drop-shadow(0 0 3px rgba(127, 174, 204, 0.35));
}

@media (prefers-reduced-motion: no-preference) {
  .strand-synthetic {
    animation: helix-flow 4s linear infinite;
  }
}

@keyframes helix-flow {
  to {
    stroke-dashoffset: -44;
  }
}

.helix-rungs line {
  stroke-width: 2;
  opacity: 0.45;
}

.helix-rungs .rung-minor {
  opacity: 0.18;
}

.stop-copper {
  stop-color: var(--copper);
}

.stop-signal {
  stop-color: var(--signal);
}

/* Short over-passes with a background halo create the over/under twist */
.weave-halo {
  fill: none;
  stroke: var(--ink-raised);
  stroke-width: 7;
  stroke-linecap: butt;
}

/* Live (rotating) helix — built by JS over the static fallback */
.helix-live .strand-ghost {
  stroke-width: 2.5;
}

.helix-live .binary {
  font-size: 10px;
  letter-spacing: 2.5px;
}

.helix-live-v {
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to bottom, transparent, #000 7%, #000 93%, transparent);
}

.helix-live-h {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 5%, #000 95%, transparent);
}

.formula-thesis {
  margin-top: 3rem;
  text-align: center;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.formula-thesis .voice {
  font-weight: 600;
  color: #ded7cb;
}

.formula-footnote {
  margin: 1.25rem auto 0;
  text-align: center;
  font-size: 0.95rem;
}

@media (max-width: 44rem) {
  .formula {
    grid-template-columns: 1fr;
  }

  .formula-ai {
    text-align: left;
  }

  .formula-ai .formula-list li::after {
    content: "";
  }

  .formula-ai .formula-list li::before {
    content: "· ";
    color: var(--signal);
  }

  .formula-join {
    justify-content: center;
  }

  .helix-v {
    display: none;
  }

  .helix-h {
    display: block;
    width: min(100%, 17rem);
    height: 3.25rem;
    margin-block: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   5 · Services — editorial rows, not cards
   -------------------------------------------------------------------------- */
.services {
  margin-top: 3rem;
  border-top: 1px solid var(--hairline);
}

.svc-row {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) 1.6fr;
  gap: 1rem 3rem;
  padding-block: 1.6rem;
  border-bottom: 1px solid var(--hairline);
}

.svc-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  transition: color 0.15s ease;
}

.svc-row:hover .svc-title {
  color: var(--copper);
}

.svc-desc {
  color: var(--text-muted);
}

@media (max-width: 44rem) {
  .svc-row {
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
}

/* --------------------------------------------------------------------------
   6 · Steps — a genuine sequence, so numbers are earned
   -------------------------------------------------------------------------- */
.steps {
  margin-top: 3rem;
  counter-reset: step;
  max-width: 46rem;
}

.step {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1.5rem;
  padding-block: 1.75rem;
  border-top: 1px solid var(--hairline);
}

.step-num {
  font-size: 2rem;
  font-weight: 400;
  line-height: 1;
  color: var(--signal);
  font-family: var(--font-serif);
}

.step-title {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
}

.step p {
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   7 · Risks
   -------------------------------------------------------------------------- */
.risks {
  margin-top: 2.5rem;
  columns: 2;
  column-gap: 4rem;
  max-width: 52rem;
}

.risks li {
  break-inside: avoid;
  padding: 0.65rem 0 0.65rem 1.6rem;
  position: relative;
  color: var(--text-muted);
  border-bottom: 1px solid var(--hairline);
}

.risks li::before {
  content: "\00d7"; /* × — risks we cross out */
  position: absolute;
  left: 0;
  color: var(--copper);
  font-weight: 700;
}

@media (max-width: 44rem) {
  .risks {
    columns: 1;
  }
}

/* --------------------------------------------------------------------------
   8 · Proof
   -------------------------------------------------------------------------- */
.proof {
  margin-top: 2.5rem;
  max-width: var(--prose);
}

.proof li {
  padding: 0.8rem 0 0.8rem 1.8rem;
  position: relative;
  border-bottom: 1px solid var(--hairline);
  font-size: 1.05rem;
}

.proof li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1.45rem;
  width: 1rem;
  height: 2px;
  background: linear-gradient(90deg, var(--copper), var(--signal));
  border-radius: 1px;
}

.placeholder-note {
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  opacity: 0.6;
  font-family: var(--font-serif);
  font-style: italic;
}

/* --------------------------------------------------------------------------
   9 · Philosophy
   -------------------------------------------------------------------------- */
.credo {
  margin-top: 1.75rem;
  padding-left: 1.25rem;
  border-left: 2px solid var(--copper);
  color: var(--text);
  font-size: 1.1rem;
  line-height: 1.7;
}

.credo .voice {
  color: #ded7cb;
}

/* --------------------------------------------------------------------------
   10 · Final CTA
   -------------------------------------------------------------------------- */
.section-cta {
  text-align: center;
  padding-block: clamp(6rem, 14vw, 10rem);
}

.cta-title {
  margin-inline: auto;
}

.cta-actions {
  margin-top: 2.5rem;
}

.section-cta .placeholder-note {
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Contact dialog
   -------------------------------------------------------------------------- */
.cta-alt {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cta-alt a,
.dialog-note a {
  color: var(--signal);
  text-decoration: none;
}

.cta-alt a:hover,
.dialog-note a:hover {
  text-decoration: underline;
}

#contact-dialog {
  margin: auto;
  width: min(92vw, 27rem);
  background: var(--ink-raised);
  color: var(--text);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 2.25rem 2rem 2rem;
}

#contact-dialog::backdrop {
  background: rgba(8, 9, 12, 0.65);
  backdrop-filter: blur(3px);
}

@media (prefers-reduced-motion: no-preference) {
  #contact-dialog[open] {
    animation: dialog-in 0.22s ease;
  }
}

@keyframes dialog-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.dialog-close {
  position: absolute;
  top: 0.9rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
  cursor: pointer;
}

.dialog-close:hover {
  color: var(--text);
}

.dialog-title {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin-bottom: 0.5rem;
}

.dialog-sub {
  color: var(--text-muted);
  font-size: 0.95rem;
}

#contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 1.1rem 0 0.35rem;
}

.label-optional {
  color: var(--text-muted);
  font-weight: 400;
}

#contact-form input[type="text"],
#contact-form input[type="email"],
#contact-form textarea {
  width: 100%;
  background: var(--ink);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  padding: 0.65rem 0.8rem;
}

#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form textarea:focus {
  border-color: var(--signal);
  outline: none;
}

#contact-form textarea {
  min-height: 7.5rem;
  resize: vertical;
}

#contact-form .btn {
  width: 100%;
  margin-top: 1.4rem;
}

.dialog-note {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Honeypot: off-screen, not display:none — bots skip hidden fields */
.hp-field {
  position: absolute;
  left: -9999px;
}

.form-status {
  margin-top: 1.25rem;
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.form-status strong {
  display: block;
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
  color: var(--copper);
}

.form-status a {
  color: var(--signal);
}

.form-status.is-error {
  color: #dc9a90;
}

.form-status.is-error strong {
  color: #dc9a90;
}

.btn:disabled {
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding-block: 2.5rem;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-brand {
  font-weight: 700;
}

.footer-brand .voice {
  color: var(--copper);
  font-weight: 600;
}

.footer-sep {
  color: var(--text-muted);
  margin-inline: 0.35rem;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-nav a:hover {
  color: var(--text);
}

.footer-copy {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   Portfolio (demo showcase)
   -------------------------------------------------------------------------- */
.folio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.folio-card {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 1.5rem;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--ink-raised);
  transition: border-color 0.2s ease;
}

.folio-card:hover {
  border-color: rgba(208, 140, 79, 0.45);
}

.folio-tag {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
}

.folio-tag-live {
  color: var(--copper-bright);
  border-color: rgba(208, 140, 79, 0.45);
}

.folio-title {
  font-size: 1.25rem;
  font-weight: 800;
}

.folio-kind {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.folio-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.folio-link {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--copper-bright);
  text-decoration: none;
}

.folio-link:hover {
  text-decoration: underline;
}

.folio-soon {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Scroll reveal (disabled under reduced motion)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease, transform 0.7s ease;
  }

  .reveal.in-view {
    opacity: 1;
    transform: none;
  }
}

/* --------------------------------------------------------------------------
   Inner pages (portfolio, case studies, blog) — shared page head
   -------------------------------------------------------------------------- */
.page-head {
  padding-block: clamp(3.5rem, 8vw, 6rem) clamp(2.5rem, 5vw, 3.5rem);
}

.page-title {
  font-size: clamp(2.2rem, 6vw, 3.75rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  font-weight: 800;
  max-width: 20ch;
  margin-bottom: 1.5rem;
}

.page-title .voice {
  font-weight: 600;
  color: #ded7cb;
}

.page-lede {
  max-width: var(--prose);
  color: var(--text-muted);
  font-size: 1.15rem;
}

.crumbs {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.crumbs a {
  text-decoration: none;
  color: var(--text-muted);
}

.crumbs a:hover {
  color: var(--copper-bright);
}

.nav-menu a[aria-current="page"] {
  color: var(--text);
}

/* --------------------------------------------------------------------------
   Portfolio — featured case study card
   -------------------------------------------------------------------------- */
.folio-feature {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border-color: rgba(208, 140, 79, 0.35);
  background:
    linear-gradient(135deg, rgba(208, 140, 79, 0.07), rgba(127, 174, 204, 0.05)),
    var(--ink-raised);
}

.folio-feature .folio-title {
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  line-height: 1.2;
}

.folio-feature .folio-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.folio-figures {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  overflow: hidden;
}

.folio-figures div {
  background: var(--ink);
  padding: 1rem 1.1rem;
}

.folio-figures strong {
  display: block;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--copper-bright);
  line-height: 1.1;
}

.folio-figures div:nth-child(even) strong {
  color: var(--signal);
}

.folio-figures span {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
  display: block;
  margin-top: 0.3rem;
}

@media (max-width: 44rem) {
  .folio-feature {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Case study
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: 1px;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  margin-top: 2.5rem;
}

.stat {
  background: var(--ink-raised);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.stat-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.stat-value {
  font-size: clamp(2.2rem, 5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--copper-bright);
}

.stat:nth-child(even) .stat-value {
  color: var(--signal);
}

.stat-desc {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.stat-note {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

.fine-print {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
  max-width: var(--prose);
}

.result {
  display: grid;
  grid-template-columns: minmax(10rem, 14rem) minmax(0, 1fr);
  gap: 1.5rem 3rem;
  padding-block: 2.5rem;
  border-top: 1px solid var(--hairline);
}

.result:first-of-type {
  margin-top: 2.5rem;
}

.result-head .stat-value {
  display: block;
}

.result-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 0.4rem;
}

.result-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem 2.5rem;
}

.result-cols h4 {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 0.6rem;
}

.result-cols .col-did h4 {
  color: var(--signal);
}

.result-cols li {
  position: relative;
  padding: 0.35rem 0 0.35rem 1.2rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.55;
}

.result-cols li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 0.6rem;
  height: 2px;
  background: var(--copper);
  border-radius: 1px;
}

.result-cols .col-did li::before {
  background: var(--signal);
}

@media (max-width: 44rem) {
  .result {
    grid-template-columns: 1fr;
  }
}

.phase-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

.phase-table th,
.phase-table td {
  text-align: left;
  vertical-align: top;
  padding: 0.75rem 1rem 0.75rem 0;
  border-bottom: 1px solid var(--hairline);
}

.phase-table th {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 700;
}

.phase-table td:last-child {
  color: var(--copper-bright);
  font-weight: 700;
  white-space: nowrap;
}

.phase-table td:first-child {
  color: var(--text-muted);
}

.phase {
  margin-top: 3rem;
}

.phase h3 {
  font-size: 1.35rem;
  font-weight: 700;
}

.phase h3 .voice {
  color: #ded7cb;
  font-weight: 600;
}

.phase-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.4rem;
}

.phase-outcome {
  margin-top: 1rem;
  color: var(--text);
  padding-left: 1rem;
  border-left: 2px solid var(--copper);
  max-width: var(--prose);
}

@media (max-width: 44rem) {
  .phase-table thead {
    display: none;
  }

  .phase-table tr {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--hairline);
  }

  .phase-table td {
    display: block;
    border: 0;
    padding: 0.1rem 0;
    white-space: normal;
  }
}

/* --------------------------------------------------------------------------
   Landing — case study highlight (stands in until testimonials ship)
   -------------------------------------------------------------------------- */
.case-teaser {
  margin-top: 3rem;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid rgba(208, 140, 79, 0.35);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(208, 140, 79, 0.07), rgba(127, 174, 204, 0.05)),
    var(--ink-raised);
}

.case-teaser-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.case-teaser .stat-grid {
  margin-top: 1.5rem;
}

.case-teaser .stat {
  background: var(--ink);
}

.case-teaser .folio-link {
  display: inline-block;
  margin-top: 1.5rem;
}

/* --------------------------------------------------------------------------
   Blog — index and articles
   -------------------------------------------------------------------------- */
.post-list {
  margin-top: 1rem;
  border-top: 1px solid var(--hairline);
}

.post-item {
  padding-block: 2rem;
  border-bottom: 1px solid var(--hairline);
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 0.5rem 2rem;
}

.post-item time {
  color: var(--text-muted);
  font-size: 0.9rem;
  padding-top: 0.3rem;
}

.post-item h2 {
  font-size: clamp(1.3rem, 3vw, 1.6rem);
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.post-item h2 a {
  text-decoration: none;
}

.post-item h2 a:hover {
  color: var(--copper-bright);
}

.post-item p {
  color: var(--text-muted);
  margin-top: 0.6rem;
  max-width: var(--prose);
}

.post-tags {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--signal);
}

@media (max-width: 44rem) {
  .post-item {
    grid-template-columns: 1fr;
  }
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.25rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article {
  max-width: var(--prose);
  font-size: 1.1rem;
  line-height: 1.75;
  color: #cfccc5;
}

.article > * + * {
  margin-top: 1.25rem;
}

.article h2 {
  font-size: 1.55rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 2.75rem;
}

.article h3 {
  font-size: 1.2rem;
  color: var(--text);
  margin-top: 2rem;
}

.article a {
  color: var(--copper-bright);
}

.article strong {
  color: var(--text);
  font-weight: 600;
}

.article ul,
.article ol {
  padding-left: 1.25rem;
}

.article ul {
  list-style: disc;
}

.article ol {
  list-style: decimal;
}

.article li + li {
  margin-top: 0.5rem;
}

.article li::marker {
  color: var(--copper);
}

.article blockquote,
.article .callout {
  padding: 1rem 1.25rem;
  border-left: 2px solid var(--signal);
  background: var(--ink-raised);
  border-radius: 0 8px 8px 0;
  color: var(--text);
}

.article .callout-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 0.4rem;
}

.article .stat-grid {
  margin-top: 2rem;
}

.article-end {
  margin-top: 3.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--hairline);
  color: var(--text-muted);
  max-width: var(--prose);
}

.article-end .folio-link {
  display: inline-block;
  margin-top: 0.75rem;
}

/* --------------------------------------------------------------------------
   Landing — service proof lines and "when teams call us" cards
   -------------------------------------------------------------------------- */
.svc-proof {
  margin-top: 0.5rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.92rem;
  color: var(--copper-bright);
}

.svc-proof a {
  color: var(--signal);
  font-family: var(--font-sans);
  font-style: normal;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.svc-proof a:hover {
  text-decoration: underline;
}

.sit-answer {
  padding-top: 0.75rem;
  border-top: 1px solid var(--hairline);
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.55;
}

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

@media (max-width: 56rem) {
  .stat-grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .stat-grid-3 {
    grid-template-columns: 1fr;
  }
}

/* Article stat grids: three stats sit in one row; figures sized for the prose column */
.article .stat {
  padding: 1.1rem 1.15rem;
}

.article .stat-value {
  font-size: clamp(1.7rem, 4vw, 2rem);
}

@media (min-width: 36rem) {
  .article .stat-grid:has(> .stat:nth-child(3):last-child) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* --------------------------------------------------------------------------
   Categories — chips (blog categories, portfolio filter) and tags
   -------------------------------------------------------------------------- */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chip span {
  font-size: 0.75rem;
  opacity: 0.7;
}

.chip:hover {
  border-color: var(--signal);
  color: var(--text);
}

.chip.is-active {
  border-color: var(--copper);
  color: var(--text);
  background: rgba(208, 140, 79, 0.08);
}

.post-tags a {
  color: var(--signal);
  text-decoration: none;
}

.post-tags a:hover {
  text-decoration: underline;
}

.page-head .post-tags {
  margin-top: 0.75rem;
}

.case-tags {
  margin-bottom: 0.5rem;
}

.tag-industry {
  color: var(--text-muted);
}

.folio-industry {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.folio-card[hidden] {
  display: none;
}

.case-site {
  margin-top: 0.75rem;
}

/* A lone last stat in a 3-column grid spans the row instead of leaving empty cells */
@media (min-width: 56.01rem) {
  .stat-grid-3 > .stat:last-child:nth-child(3n + 1) {
    grid-column: 1 / -1;
  }
}

@media (min-width: 36.01rem) and (max-width: 56rem) {
  .stat-grid-3 > .stat:last-child:nth-child(2n + 1) {
    grid-column: 1 / -1;
  }
}

.result-cols p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.result-note {
  grid-column: 2;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--copper-bright);
  font-size: 0.98rem;
}

@media (max-width: 44rem) {
  .result-note {
    grid-column: 1;
  }
}

/* Whole portfolio card clickable: the title link stretches over the card */
.folio-card.is-linked {
  position: relative;
  cursor: pointer;
}

.folio-card-link {
  color: inherit;
  text-decoration: none;
}

.folio-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

.folio-card-link:focus-visible {
  outline: none;
}

.folio-card.is-linked:has(.folio-card-link:focus-visible) {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.folio-card.is-linked:hover .folio-title {
  color: var(--copper-bright);
}

.folio-card.is-linked:hover .folio-link {
  text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Hero proof strip and entry offer
   -------------------------------------------------------------------------- */
.hero-proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 2.75rem;
  background: var(--hairline);
  border: 1px solid var(--hairline);
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.hero-proof-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 1.1rem 1.2rem;
  background: color-mix(in srgb, var(--ink-raised) 92%, transparent);
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.hero-proof-item strong {
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--copper-bright);
}

.hero-proof-item:nth-child(even) strong {
  color: var(--signal);
}

.hero-proof-item span {
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--text-muted);
}

.hero-proof-item:hover {
  background: var(--ink-raised);
}

.hero-proof-item:hover span {
  color: var(--text);
}

@media (max-width: 56rem) {
  .hero-proof {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.offer-terms {
  margin: 1.75rem 0 1.25rem;
  color: var(--text-muted);
  font-family: var(--font-serif);
  font-style: italic;
}

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

@media (max-width: 56rem) {
  .stat-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .stat-grid-4 {
    grid-template-columns: 1fr;
  }
}

/* Services hub: the two entry offers sit side by side, a little larger */
.hub-offers {
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}

.hub-offer .folio-title {
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.25;
}

.hub-offer {
  border-color: rgba(208, 140, 79, 0.35);
  background:
    linear-gradient(135deg, rgba(208, 140, 79, 0.07), rgba(127, 174, 204, 0.05)),
    var(--ink-raised);
}

.hub-solutions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (max-width: 64rem) {
  .hub-solutions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 36rem) {
  .hub-solutions {
    grid-template-columns: 1fr;
  }
}

/* "Related service" card at the end of posts and category pages */
.related-offer {
  margin: 2.5rem 0 clamp(3.5rem, 7vw, 5rem);
  max-width: 40rem;
}

.related-offer .folio-grid {
  grid-template-columns: 1fr;
  margin-top: 0;
}
