/* ============================================================
   Incendio Solutions — Architectural Light System
   Tonal neutral ground, navy ink, single sky accent.

   Surface model (the thing that makes this read as built, not blank):
   the PAGE is never pure white — it sits on a cool neutral ground, and
   white is reserved for RAISED surfaces (cards, panels, inputs). White
   on white has no hierarchy; white on ground reads instantly as depth.
   ============================================================ */

:root {
  /* ---- ink ---- */
  --ink:            #0A1628;
  --ink-2:          #2A3852;   /* body copy — carries the page */
  --ink-3:          #51617C;   /* secondary copy, still ≥7:1 on ground */
  --ink-4:          #78879E;   /* meta / labels only */

  /* ---- ground: what the page is made of (never pure white) ---- */
  --ground:         #F7F8FA;   /* base + default section */
  --ground-2:       #F1F4F8;   /* alternating band */
  --ground-3:       #E9EEF4;   /* wells, deepest neutral */

  /* ---- paper: RAISED surfaces only ---- */
  --paper:          #FFFFFF;
  --paper-2:        #F7F9FB;
  --paper-3:        #EDF2F7;
  --paper-ink:      #0A1628;   /* inverted blocks */

  /* ---- hairlines ---- */
  --line:           #E1E7EF;
  --line-2:         #C3D0E0;
  --line-ink:       rgba(255, 255, 255, 0.14);

  /* ---- accent (retained brand sky) ---- */
  --accent:         #0284C7;
  --accent-deep:    #075985;
  --accent-bright:  #0EA5E9;
  --accent-soft:    #E0F2FE;
  --accent-line:    #7DD3FC;

  /* ---- signal colours (charts, status only) ---- */
  --ok:             #059669;
  --warn:           #D97706;
  --stop:           #DC2626;

  /* ---- type ---- */
  --font-sans:      'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display:   'Space Grotesk', var(--font-sans);
  --font-mono:      'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-display-1:   clamp(2.75rem, 5.4vw, 4.125rem);
  --fs-display-2:   clamp(2.25rem, 4.4vw, 3.5rem);
  --fs-h2:          clamp(1.875rem, 3.2vw, 2.75rem);
  --fs-h3:          clamp(1.25rem, 1.8vw, 1.5rem);
  --fs-h4:          1.0625rem;
  --fs-lede:        clamp(1.0625rem, 1.5vw, 1.3125rem);
  --fs-body:        1rem;
  --fs-sm:          0.9375rem;
  --fs-xs:          0.8125rem;
  --fs-label:       0.75rem;

  /* ---- measure & rhythm ---- */
  --container:      1240px;
  --container-tight:920px;
  --gutter:         clamp(1.25rem, 4vw, 2.5rem);
  --section-y:      clamp(4.5rem, 9vw, 8.5rem);

  /* ---- geometry ---- */
  --r-sm:           6px;
  --r:              10px;
  --r-lg:           16px;
  --r-xl:           24px;

  /* ---- motion ---- */
  --ease:           cubic-bezier(.22, 1, .36, 1);
  --ease-inout:     cubic-bezier(.65, 0, .35, 1);
  --dur:            .45s;

  /* ---- elevation ----
     A raised surface always carries a resting shadow. Without one the card
     edge depends entirely on a 1px hairline, which is what made the old
     page read as flat. */
  --lift-1:         0 1px 2px rgba(10, 22, 40, .05), 0 1px 3px rgba(10, 22, 40, .04);
  --lift-2:         0 1px 2px rgba(10, 22, 40, .05), 0 8px 20px -6px rgba(10, 22, 40, .10);
  --lift-3:         0 2px 6px rgba(10, 22, 40, .06), 0 22px 48px -18px rgba(10, 22, 40, .20);
  --lift-4:         0 30px 70px -28px rgba(10, 22, 40, .30);
}

/* ============================================================
   Reset + base
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-2);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-deep); }

button { font: inherit; color: inherit; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--ink); color: #fff; padding: .75rem 1.25rem;
  border-radius: 0 0 var(--r) 0;
}
.skip-link:focus { left: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}

/* ============================================================
   Typography
   ============================================================ */

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.022em;
  margin: 0 0 .5em;
  text-wrap: balance;
}

h1 { font-size: var(--fs-display-1); letter-spacing: -0.032em; line-height: 1.04; }
h2 { font-size: var(--fs-h2);        letter-spacing: -0.026em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; }

p { margin: 0 0 1.15em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }

.lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 62ch;
}

/* the engineering signal: mono eyebrow labels */
.label {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-deep);
  margin: 0 0 1.25rem;
}
.label::before {
  content: "";
  width: 1.75rem; height: 1px;
  background: var(--accent-line);
  flex: none;
}
.label--plain::before { display: none; }
.label--muted { color: var(--ink-3); }
.label--muted::before { background: var(--line-2); }

.mono { font-family: var(--font-mono); font-size: var(--fs-xs); letter-spacing: .02em; }

/* ============================================================
   Layout
   ============================================================ */

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

/* Sections alternate along the tonal ladder so consecutive bands separate
   without a rule between them. Pure white is never a section ground — it is
   reserved for the cards sitting on top. */
.section { padding-block: var(--section-y); position: relative; }
.section--alt   { background: var(--ground-2); }
.section--well  { background: var(--ground-3); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }
.section--ink   { background: var(--paper-ink); }

/* hairline dividers instead of heavy section breaks */
.section--ruled { border-top: 1px solid var(--line); }

/* Where two same-tone sections end up adjacent (page composition varies by
   template) a hairline still guarantees the seam is legible. */
.section--alt + .section--alt,
.section--well + .section--well { border-top: 1px solid var(--line); }

.section__head { max-width: 66ch; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section__head--center { margin-inline: auto; text-align: center; }
.section__head--center .label { justify-content: center; }
.section__sub { font-size: var(--fs-lede); color: var(--ink-3); line-height: 1.55; margin: 0; }

/* ============================================================
   Media — real documentary photography

   The site's credibility rests on these reading as genuine photographs of
   real hardware, so they are framed like plates in an engineering report:
   a hairline, a resting shadow, and a mono caption that states what is shown.
   ============================================================ */

/* framed figure used inside content (industry/service intros, prose) */
.media {
  position: relative;
  margin: 0;
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--ground-3);
  box-shadow: var(--lift-2);
}
.media img,
.media picture { width: 100%; height: 100%; display: block; }
.media img { object-fit: cover; }
.media--wide   { aspect-ratio: 16 / 7; }
.media--banner { aspect-ratio: 21 / 9; }
.media--tall   { aspect-ratio: 4 / 3; }
.media__cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3rem 1.25rem .9375rem;
  background: linear-gradient(to top, rgba(10, 22, 40, .8), transparent);
  color: rgba(255, 255, 255, .9);
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .06em; text-transform: uppercase;
}

/* page header photo for industry / service landing pages:
   title and lede on the left, a real photograph on the right */
.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
}
.page-hero__media { aspect-ratio: 5 / 4; }
@media (max-width: 860px) {
  .page-hero { grid-template-columns: 1fr; }
  .page-hero__media { aspect-ratio: 16 / 9; }
}

/* full-bleed proof band — a strip of real hardware that breaks up long
   text stretches and answers "do these people build real things?" */
.proof-band {
  position: relative;
  height: clamp(20rem, 42vw, 32rem);
  overflow: hidden;
  background: var(--paper-ink);
}
.proof-band img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.proof-band__overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: clamp(2rem, 5vw, 4rem) 0;
  background: linear-gradient(105deg, rgba(10,22,40,.86) 0%, rgba(10,22,40,.55) 42%, rgba(10,22,40,.12) 100%);
}
.proof-band__overlay .container { width: 100%; }
.proof-band__overlay .label { color: var(--accent-line); }
.proof-band__overlay .label::before { background: var(--accent-line); opacity: .6; }
.proof-band h2 { color: #fff; max-width: 20ch; margin-bottom: .5rem; }
.proof-band p { color: rgba(255,255,255,.78); max-width: 46ch; margin: 0; }

/* split head: title left, supporting copy right */
.section__head--split {
  max-width: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: end;
}
.section__head--split .section__sub { padding-bottom: .35rem; }

@media (max-width: 860px) {
  .section__head--split { grid-template-columns: 1fr; align-items: start; }
}

/* ---- inverted blocks ----
   Dark bands break up the page and give the scroll a rhythm; without them
   the light theme reads as one undifferentiated white sheet. */
.section--ink h1, .section--ink h2, .section--ink h3, .section--ink h4 { color: #fff; }
.section--ink .section__sub, .section--ink .lede { color: rgba(255,255,255,.72); }
.section--ink p { color: rgba(255,255,255,.68); }
.section--ink .label { color: var(--accent-line); }
.section--ink .label::before { background: var(--accent-line); opacity: .5; }

/* faint technical grid, same motif as the hero but inverted */
.section--ink { position: relative; overflow: hidden; }
.section--ink::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 75% 80% at 70% 40%, #000, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 70% 40%, #000, transparent 72%);
  pointer-events: none;
}
.section--ink > * { position: relative; z-index: 1; }

/* component inversions */
.section--ink .stats,
.section--ink .process,
.section--ink .services-grid {
  background: var(--line-ink);
  border-color: var(--line-ink);
}
.section--ink .stat,
.section--ink .process__step,
.section--ink .service { background: var(--paper-ink); }
.section--ink .service:hover { background: #101c30; }

.section--ink .stat__num { color: #fff; }
.section--ink .stat__label,
.section--ink .process__step p,
.section--ink .service__text { color: rgba(255,255,255,.6); }
.section--ink .process__num { color: var(--accent-line); }
.section--ink .service__meta { color: rgba(255,255,255,.45); }

.section--ink .chip {
  background: rgba(255,255,255,.05);
  border-color: var(--line-ink);
  color: rgba(255,255,255,.72);
}
.section--ink .textlink { color: #fff; border-color: rgba(255,255,255,.3); }
.section--ink .textlink:hover { color: var(--accent-line); border-color: var(--accent-line); }
.section--ink .card {
  background: #0E1A2E;
  border-color: var(--line-ink);
}
.section--ink .card:hover { border-color: rgba(255,255,255,.24); }
.section--ink .card__text { color: rgba(255,255,255,.6); }
.section--ink .card__title,
.section--ink .card__title a { color: #fff; }
.section--ink .testi-card {
  background: #0E1A2E;
  border-color: var(--line-ink);
}
.section--ink .testi-card__quote { color: rgba(255,255,255,.74); }
.section--ink .testi-card__name { color: #fff; }
.section--ink .testi-card__title { color: rgba(255,255,255,.45); }

/* ============================================================
   Buttons
   ============================================================ */

.btn {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-line: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .625rem;
  padding: .8125rem 1.5rem;
  border: 1px solid var(--btn-line);
  border-radius: var(--r);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--font-sans);
  font-size: var(--fs-sm);
  font-weight: 500;
  letter-spacing: -0.005em;
  cursor: pointer;
  white-space: nowrap;
  transition: background .22s var(--ease), border-color .22s var(--ease),
              color .22s var(--ease), transform .22s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--primary {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  --btn-line: var(--ink);
}
.btn--primary:hover { --btn-bg: #16243c; --btn-line: #16243c; color: #fff; }

.btn--accent {
  --btn-bg: var(--accent);
  --btn-fg: #fff;
  --btn-line: var(--accent);
}
.btn--accent:hover { --btn-bg: var(--accent-deep); --btn-line: var(--accent-deep); color: #fff; }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--ink); --btn-line: var(--line-2); }
.btn--ghost:hover { --btn-line: var(--ink); color: var(--ink); }

.btn--onink { --btn-bg: transparent; --btn-fg: #fff; --btn-line: rgba(255,255,255,.28); }
.btn--onink:hover { --btn-bg: #fff; --btn-fg: var(--ink); --btn-line: #fff; color: var(--ink); }

.btn--lg { padding: 1rem 1.875rem; font-size: var(--fs-body); }
.btn--sm { padding: .5625rem 1rem; font-size: var(--fs-xs); }
.btn--block { width: 100%; }

/* arrow that travels on hover */
.btn__arrow { transition: transform .28s var(--ease); flex: none; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* quiet text link with rule */
.textlink {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: var(--fs-sm); font-weight: 500; color: var(--ink);
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-2);
  transition: border-color .22s var(--ease), color .22s var(--ease);
}
.textlink:hover { color: var(--accent-deep); border-color: var(--accent); }
.textlink svg { transition: transform .28s var(--ease); }
.textlink:hover svg { transform: translateX(3px); }

/* ============================================================
   Header / navigation
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 248, 250, .78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease), box-shadow .3s var(--ease);
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  background: rgba(250, 251, 252, .92);
  box-shadow: 0 1px 3px rgba(10, 22, 40, .05);
}

.nav {
  display: flex; align-items: center; gap: 2rem;
  height: 76px;
}
.nav__brand { display: flex; align-items: center; gap: .625rem; flex: none; }
.nav__brand img, .nav__brand svg { height: 46px; width: auto; }
.nav__brand-text {
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  letter-spacing: -0.02em; color: var(--ink);
}

.nav__menu {
  display: flex; align-items: center; gap: .25rem;
  margin: 0 auto 0 1rem; padding: 0; list-style: none;
}
.nav__link {
  display: block; padding: .5rem .875rem;
  font-size: var(--fs-sm); font-weight: 450; color: var(--ink-2);
  border-radius: var(--r-sm);
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav__link:hover, .nav__link[aria-current="page"] { color: var(--ink); background: var(--paper-3); }

.nav__actions { display: flex; align-items: center; gap: .625rem; flex: none; }

.nav__toggle {
  display: none;
  width: 42px; height: 42px;
  align-items: center; justify-content: center;
  background: none; border: 1px solid var(--line); border-radius: var(--r-sm);
  cursor: pointer;
}

@media (max-width: 1000px) {
  .nav__menu, .nav__actions .btn--ghost { display: none; }
  .nav__toggle { display: inline-flex; }
  .nav { justify-content: space-between; }
  .nav__actions { margin-left: auto; }
}

/* mobile drawer */
.nav__drawer {
  position: fixed; inset: 76px 0 0; z-index: 99;
  background: var(--paper);
  padding: 1.5rem var(--gutter) 3rem;
  overflow-y: auto;
  transform: translateY(-8px);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
}
.nav__drawer.is-open { opacity: 1; visibility: visible; transform: none; pointer-events: auto; }
.nav__drawer a {
  display: block; padding: .9375rem .25rem;
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 500;
  color: var(--ink); border-bottom: 1px solid var(--line);
}

/* scroll progress hairline */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 0;
  background: var(--accent); z-index: 200;
  transition: width .1s linear;
}

/* ============================================================
   Hero
   ============================================================ */

.hero {
  position: relative;
  padding-block: clamp(4rem, 9vw, 7.5rem) clamp(3.5rem, 7vw, 6rem);
  overflow: hidden;
}

/* faint technical grid — structure, not decoration */
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 80% 65% at 62% 35%, #000 5%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 62% 35%, #000 5%, transparent 72%);
  opacity: .8;
  pointer-events: none;
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__copy { max-width: 46ch; }
.hero h1 { margin-bottom: 1.25rem; }
.hero .lede { margin-bottom: 2.25rem; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .875rem; align-items: center; }

.hero__art {
  position: relative;
  border-radius: var(--r-xl);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--paper-2);
  aspect-ratio: 4 / 3.2;
  box-shadow: var(--lift-4);
}
.hero__art img,
.hero__art picture { width: 100%; height: 100%; }
.hero__art img { object-fit: cover; }

/* Photographs on this site are documentary, not decorative. A restrained
   inner edge keeps them sitting in the layout instead of floating over it. */
.hero__art::after {
  content: "";
  position: absolute; inset: 0;
  box-shadow: inset 0 0 0 1px rgba(10, 22, 40, .08);
  border-radius: inherit;
  pointer-events: none;
}

/* caption plate — names what the photograph actually shows */
.hero__art-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 2.5rem 1.25rem .875rem;
  background: linear-gradient(to top, rgba(10, 22, 40, .82), transparent);
  color: rgba(255, 255, 255, .92);
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: .08em;
  text-transform: uppercase;
}

@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__copy { max-width: 100%; }
  .hero__art { aspect-ratio: 16 / 10; }
}

/* ============================================================
   Stat strip
   ============================================================ */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.stat { background: var(--paper); padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1rem, 2vw, 1.75rem); }
.stat__num {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3.4vw, 2.875rem);
  font-weight: 600; letter-spacing: -0.03em; line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.stat__label {
  margin-top: .625rem;
  font-size: var(--fs-xs); color: var(--ink-3); line-height: 1.45;
}

@media (max-width: 780px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ============================================================
   Cards — shared skeleton
   ============================================================ */

.card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--lift-1);
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), transform .3s var(--ease);
}
.card:hover {
  border-color: var(--line-2);
  box-shadow: var(--lift-3);
  transform: translateY(-4px);
}
.card__body { padding: clamp(1.375rem, 2.4vw, 1.875rem); display: flex; flex-direction: column; flex: 1; }
.card__title { font-size: var(--fs-h4); margin-bottom: .5rem; }
/* titles read as headings, not links — the accent is earned by the CTA below */
.card__title a { color: var(--ink); transition: color .22s var(--ease); }
.card:hover .card__title a { color: var(--accent-deep); }
.card__text { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.6; margin: 0; }
.card__foot { margin-top: auto; padding-top: 1.25rem; }

/* whole-card click target without nesting interactive elements */
.card__link::after { content: ""; position: absolute; inset: 0; }

/* ---- service card ---- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.service {
  position: relative;
  background: var(--paper);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  display: flex; flex-direction: column;
  transition: background .3s var(--ease);
}
.service:hover { background: var(--paper-2); }
.service__icon {
  width: 40px; height: 40px; margin-bottom: 1.5rem;
  color: var(--accent);
  transition: transform .35s var(--ease);
}
.service:hover .service__icon { transform: translateY(-2px); }
.service__title { font-size: var(--fs-h4); margin-bottom: .5rem; }
.service__text { font-size: var(--fs-sm); color: var(--ink-3); line-height: 1.6; margin: 0 0 1.5rem; }
.service__meta {
  margin-top: auto;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.service__arrow { color: var(--accent); transition: transform .3s var(--ease); }
.service:hover .service__arrow { transform: translateX(4px); }

/* ---- project / case-study card ---- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.project { }
.project__cover {
  position: relative;
  aspect-ratio: 3 / 2;               /* one ratio across the whole grid */
  background: var(--ground-3);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.project__cover img,
.project__cover picture { width: 100%; height: 100%; }
.project__cover img {
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.project:hover .project__cover img { transform: scale(1.05); }
/* a soft top scrim so the industry tag is legible over any photograph */
.project__cover::before {
  content: "";
  position: absolute; inset: 0 0 40% 0;
  background: linear-gradient(to bottom, rgba(10, 22, 40, .34), transparent);
  opacity: .9;
  pointer-events: none;
  z-index: 1;
}
.project__tag {
  position: absolute; top: .875rem; left: .875rem; z-index: 2;
  padding: .3125rem .625rem;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(8px);
  border-radius: var(--r-sm);
  box-shadow: 0 1px 2px rgba(10,22,40,.14);
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.project__subtitle {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent-deep); margin-bottom: .625rem;
}
.project__metrics {
  display: flex; flex-wrap: wrap; gap: 1.25rem;
  margin: 1.25rem 0 0; padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}
.project__metric-num {
  font-family: var(--font-display); font-size: 1.25rem; font-weight: 600;
  color: var(--ink); letter-spacing: -0.02em; font-variant-numeric: tabular-nums;
}
.project__metric-label { font-size: var(--fs-label); color: var(--ink-4); line-height: 1.4; }

.project__actions {
  display: flex; gap: .625rem; flex-wrap: wrap;
  margin-top: 1.25rem;
}

/* tech chips */
.chips { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: 1rem; }
.chip {
  padding: .25rem .5625rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-family: var(--font-mono); font-size: var(--fs-label);
  color: var(--ink-3); white-space: nowrap;
}

/* ---- filters ---- */
.filters {
  display: flex; flex-wrap: wrap; gap: .5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.filter {
  padding: .5rem 1rem;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 100px;
  font-size: var(--fs-sm); font-weight: 450; color: var(--ink-3);
  cursor: pointer;
  transition: all .22s var(--ease);
}
.filter:hover { border-color: var(--line-2); color: var(--ink); }
.filter.is-active {
  background: var(--ink); border-color: var(--ink); color: #fff;
}
.filter__count {
  font-family: var(--font-mono); font-size: var(--fs-label);
  opacity: .55; margin-left: .375rem;
}

/* ---- live demo card ---- */
.livedemo-card .project__cover { aspect-ratio: 16 / 9; }
.live-dot {
  display: inline-flex; align-items: center; gap: .4375rem;
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ok);
}
.live-dot::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 0 rgba(5, 150, 105, .5);
  animation: pulse 2.4s var(--ease-inout) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(5, 150, 105, .5); }
  70%  { box-shadow: 0 0 0 7px rgba(5, 150, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

/* ---- testimonial ---- */
.testi-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 2.6vw, 2rem);
  display: flex; flex-direction: column;
}
.testi-card__quote {
  font-size: var(--fs-body); color: var(--ink-2); line-height: 1.7;
  margin: 0 0 1.5rem;
}
.testi-card__who { display: flex; align-items: center; gap: .875rem; margin-top: auto; }
.testi-card__avatar {
  width: 40px; height: 40px; border-radius: 50%; object-fit: cover;
  background: var(--paper-3); flex: none;
}
.testi-card__name { font-weight: 600; color: var(--ink); font-size: var(--fs-sm); }
.testi-card__title { font-size: var(--fs-xs); color: var(--ink-4); }

/* ---- process ---- */
.process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 1px;
  background: var(--line);
  border-block: 1px solid var(--line);
}
.process__step {
  background: var(--paper);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  position: relative;
}
.process__num {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .12em; color: var(--accent);
  margin-bottom: 1.25rem;
}
.process__step h3 { font-size: var(--fs-h4); margin-bottom: .5rem; }
.process__step p { font-size: var(--fs-sm); color: var(--ink-3); margin: 0; }

/* ---- client logo row ---- */
.clients {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  justify-content: center;
}
.client--logo {
  height: 26px; width: auto;
  opacity: .42; filter: grayscale(1);
  transition: opacity .3s var(--ease), filter .3s var(--ease);
}
.client--logo:hover { opacity: .8; filter: grayscale(0); }

/* ============================================================
   Forms
   ============================================================ */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
}
.field { display: flex; flex-direction: column; gap: .5rem; }
.field--full { grid-column: 1 / -1; }
.field label {
  font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3);
}
.field input, .field textarea, .field select {
  padding: .8125rem 1rem;
  background: var(--paper);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
  font-family: var(--font-sans); font-size: var(--fs-sm); color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field textarea { resize: vertical; min-height: 130px; }

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

/* ============================================================
   FAQ
   ============================================================ */

.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; padding: 1.5rem 0;
  background: none; border: none; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-size: var(--fs-h4); font-weight: 500; color: var(--ink);
}
.faq__icon { flex: none; color: var(--ink-4); transition: transform .3s var(--ease); }
.faq__item.is-open .faq__icon { transform: rotate(45deg); color: var(--accent); }
.faq__a {
  overflow: hidden; max-height: 0;
  transition: max-height .4s var(--ease), opacity .3s var(--ease);
  opacity: 0;
}
.faq__item.is-open .faq__a { opacity: 1; }
.faq__a > div { padding-bottom: 1.5rem; color: var(--ink-3); font-size: var(--fs-sm); max-width: 72ch; }

/* ============================================================
   Footer
   ============================================================ */

.site-footer {
  background: var(--paper-ink);
  color: rgba(255,255,255,.62);
  padding-block: clamp(3.5rem, 7vw, 5.5rem) 2rem;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line-ink);
}
.footer__brand-text { color: rgba(255,255,255,.62); font-size: var(--fs-sm); max-width: 34ch; margin-top: 1rem; }
.footer h4 {
  color: #fff; font-family: var(--font-mono); font-size: var(--fs-label);
  letter-spacing: .12em; text-transform: uppercase; font-weight: 500; margin-bottom: 1.25rem;
}
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; }
.footer__links a { color: rgba(255,255,255,.62); font-size: var(--fs-sm); }
.footer__links a:hover { color: #fff; }
.footer__bottom {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem; padding-top: 2rem;
  font-size: var(--fs-xs); color: rgba(255,255,255,.42);
}

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

/* ============================================================
   CTA band
   ============================================================ */

.cta-band {
  background: var(--paper-ink);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cta-band::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 70% 90% at 88% 50%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 88% 50%, #000, transparent 70%);
  pointer-events: none;
}
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; margin-bottom: .75rem; }
.cta-band p { color: rgba(255,255,255,.68); margin: 0; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: .875rem; }

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

/* ============================================================
   Motion — reveal on scroll
   ============================================================ */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
[data-reveal].is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* ============================================================
   Prose — long-form copy carried over from the detail pages
   ============================================================ */

/* the carried-over markup keeps its own <section>/<div class="container">
   wrappers, so these are descendant rather than child selectors */
.prose .container { max-width: var(--container-tight); }
.prose h2 { font-size: var(--fs-h2); margin-bottom: 1rem; }
.prose h3 { font-size: var(--fs-h3); margin-top: 2.25rem; }
.prose p { color: var(--ink-2); max-width: 72ch; }
.prose .detail-hero__lede {
  font-size: var(--fs-lede);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 68ch;
}

/* capability / stack lists render as chip fields, not bullets */
.service-capabilities,
.service-stack {
  list-style: none;
  margin: 1.25rem 0 2rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.service-capabilities li,
.service-stack li {
  padding: .4375rem .8125rem;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  color: var(--ink-2);
}
.service-stack li {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-3);
}

.service-detail__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
}

.further-reading { list-style: none; margin: 1.25rem 0 0; padding: 0; display: grid; gap: .875rem; }
.further-reading li { padding-left: 1.25rem; position: relative; }
.further-reading li::before {
  content: "→";
  position: absolute; left: 0;
  color: var(--accent); font-family: var(--font-mono);
}
.further-reading a { color: var(--ink); font-size: var(--fs-sm); }
.further-reading a:hover { color: var(--accent-deep); }

/* ============================================================
   Utilities
   ============================================================ */

.u-center      { text-align: center; }
.u-mono        { font-family: var(--font-mono); }
.u-muted       { color: var(--ink-3); }
.u-mt-0        { margin-top: 0; }
.u-hide        { display: none !important; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.to-top {
  position: fixed; right: 1.5rem; bottom: 1.5rem; z-index: 90;
  width: 44px; height: 44px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 50%;
  color: var(--ink); box-shadow: var(--lift-2);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }

/* ==================================================================
 * BLOG ARTICLE BODY
 *
 * Blog posts under /blog/*.html use their own set of content classes
 * (post-hero, detail-hero__title, article-updated, quick-answer,
 * table-wrap, further-reading, grad, prose table). These rules were
 * originally defined in assets/css/styles.css against a dark-navy
 * palette; they are ported here to the system.css light palette so
 * the blog and the rest of the site share one visual language.
 * ================================================================== */

.post-hero {
  width: 100%; height: auto; border-radius: 14px;
  display: block; margin-bottom: 8px;
  box-shadow: var(--lift-1);
}

.detail-hero__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 1.5rem 0 0.75rem;
  text-wrap: balance;
  color: var(--ink);
}

.article-updated {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--ink-4);
  margin: 0 0 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.quick-answer {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 12px 12px 0;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0 2rem;
}
.quick-answer strong { color: var(--ink); }
.quick-answer p { color: var(--ink-2); margin: 0; line-height: 1.6; }

.table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.prose .table-wrap { margin: 1.5rem 0; }
.prose table {
  width: 100%; border-collapse: collapse;
  font-size: 0.92rem;
}
.prose thead th {
  text-align: left; padding: 0.75rem 1rem;
  background: var(--paper-3);
  border-bottom: 2px solid var(--line-2);
  color: var(--ink); font-weight: 600;
  font-family: var(--font-display); letter-spacing: 0.01em;
}
.prose tbody td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2); vertical-align: top;
}
.prose tbody tr:last-child td { border-bottom: none; }
.prose tbody tr:hover td { background: var(--paper-2); }

.further-reading {
  margin: 0.75rem 0 0;
  padding-left: 1.15rem;
  color: var(--ink-2);
}
.further-reading li { margin-bottom: 0.4rem; }

.grad {
  background: linear-gradient(135deg, var(--accent-bright) 0%, var(--accent) 55%, var(--accent-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* Fallback for when the gradient does not render (older Firefox etc) */
@supports not (background-clip: text) { .grad { color: var(--accent); background: none; } }
