/* ============================================
   Algarin Industries — Modern Industrial Redesign
   Warm graphite palette, big editorial type
   ============================================ */

:root {
  /* Warm graphite — dark mode default */
  --ink: #0E0D0C;
  --panel: #161413;
  --panel-2: #1C1A18;
  --line: #2A2724;
  --line-2: #3A3631;
  --mute: #6B6660;
  --text-mute: #9C968D;
  --paper: #E8E4DD;
  --paper-2: #F5F2EC;
  --paper-3: #FFFFFF;

  --bg: var(--ink);
  --bg-2: var(--panel);
  --fg: var(--paper);
  --fg-mute: var(--text-mute);
  --fg-dim: var(--mute);
  --rule: var(--line);
  --rule-2: var(--line-2);

  /* Accent — vivid purple */
  --accent: #B471FF;
  --accent-soft: rgba(180, 113, 255, 0.15);

  /* Type */
  --font-display: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "IBM Plex Mono", "JetBrains Mono", ui-monospace, Menlo, monospace;

  /* Density */
  --section-py: 160px;
  --gutter: clamp(24px, 4vw, 64px);
  --max-w: 1440px;

  /* Motion */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Light theme */
[data-theme="light"] {
  --bg: var(--paper-2);
  --bg-2: var(--paper-3);
  --fg: #1A1817;
  --fg-mute: #4A4540;
  --fg-dim: #7A7570;
  --rule: #D8D2C8;
  --rule-2: #C4BCB0;
}

/* Palette variants */
[data-palette="cool"] {
  --ink: #0C0E10;
  --panel: #14171A;
  --panel-2: #1A1E22;
  --line: #252A30;
  --line-2: #353B43;
  --mute: #5F666E;
  --text-mute: #92989F;
  --paper: #DDE2E8;
  --paper-2: #ECEFF3;
  --paper-3: #FFFFFF;
}
[data-palette="neutral"] {
  --ink: #0D0D0D;
  --panel: #161616;
  --panel-2: #1C1C1C;
  --line: #292929;
  --line-2: #393939;
  --mute: #696969;
  --text-mute: #9A9A9A;
  --paper: #E5E5E5;
  --paper-2: #F2F2F2;
  --paper-3: #FFFFFF;
}

/* Accent variants */
[data-accent="violet"] { --accent: #8A4FE6; --accent-soft: rgba(138, 79, 230, 0.15); }
[data-accent="lilac"] { --accent: #D6A8FF; --accent-soft: rgba(214, 168, 255, 0.18); }
[data-accent="off"] { --accent: var(--paper); --accent-soft: var(--rule-2); }

/* Type variants */
[data-type="swiss"] {
  --font-display: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --font-body: "Helvetica Neue", "Helvetica", "Arial", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}
[data-type="editorial"] {
  --font-display: "Instrument Serif", "Times New Roman", serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

/* Density */
[data-density="tight"] { --section-py: 96px; }
[data-density="loose"] { --section-py: 220px; }

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}
img, svg { display: block; max-width: 100%; }
button { font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* ============================================
   Layout
   ============================================ */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

section {
  padding: var(--section-py) 0;
  position: relative;
}

/* Top hairline rule on sections */
.section-rule {
  border-top: 1px solid var(--rule);
}

/* ============================================
   Section header (eyebrow + title pattern)
   ============================================ */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 48px 0;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.eyebrow .num {
  color: var(--accent);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  margin-bottom: 96px;
}
.section-head h2 {
  font-family: var(--font-display);
  font-size: clamp(40px, 5.5vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.section-head .lede {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--fg-mute);
  max-width: 44ch;
  text-wrap: pretty;
}

@media (max-width: 800px) {
  .section-head { grid-template-columns: 1fr; gap: 32px; margin-bottom: 56px; }
}

/* ============================================
   Nav
   ============================================ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 20px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.nav-logo .wordmark { transition: opacity 0.2s var(--ease); }
@media (max-width: 1100px) {
  .nav-logo .wordmark { display: none; }
}
/* Brand logo lockup (mark + wordmark) */
.brand-logo {
  position: relative;
  display: block;
  flex-shrink: 0;
  height: 28px;
  aspect-ratio: 920 / 194;
  overflow: hidden;
}
.brand-logo-ink,
.brand-logo-accent {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.brand-logo-ink {
  background: var(--fg);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
  transition: background-color 0.3s var(--ease);
}
.brand-logo-accent { display: block; max-width: none; }
.brand-logo--nav { height: 28px; }
.brand-logo--footer { height: 40px; }
.brand-logo--hero { height: clamp(40px, 5vw, 72px); }
.hero-eyebrow--logo { margin-top: clamp(32px, 6vh, 72px); margin-bottom: clamp(32px, 4vw, 56px); }
.hero-eyebrow--logo::before { display: none; }
/* Narrow nav: show just the mark (crop the lockup to its first ~21.7%) */
@media (max-width: 1100px) {
  .brand-logo--nav { aspect-ratio: 200 / 194; }
  .brand-logo--nav .brand-logo-ink,
  .brand-logo--nav .brand-logo-accent { width: 460%; }
}
.nav.scrolled {
  border-bottom-color: var(--rule);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-logo .mark {
  width: 22px; height: 22px;
  border: 1px solid var(--fg);
  display: grid;
  place-items: center;
  position: relative;
  flex-shrink: 0;
}
.nav-logo .mark::before {
  content: ""; position: absolute;
  inset: 4px;
  background: var(--fg);
  clip-path: polygon(0 0, 100% 0, 100% 60%, 60% 100%, 0 100%);
}
.nav-logo .mark::after {
  content: ""; position: absolute;
  width: 5px; height: 5px;
  background: var(--accent);
  bottom: 4px; right: 4px;
}
.nav-links {
  display: flex;
  gap: 36px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
}
.nav-links a {
  color: var(--fg-mute);
  position: relative;
  transition: color 0.2s var(--ease);
  padding: 4px 0;
}
.nav-links a:hover, .nav-links a.active {
  color: var(--fg);
}
.nav-links a.active::before {
  content: "";
  position: absolute;
  left: -10px; top: 50%;
  width: 4px; height: 4px;
  background: var(--accent);
  transform: translateY(-50%);
  border-radius: 50%;
}
.nav-cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  padding: 10px 18px;
  border: 1px solid var(--rule-2);
  color: var(--fg);
  background: transparent;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s var(--ease);
}
.nav-cta:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.nav-cta .arrow { transition: transform 0.2s var(--ease); }
.nav-cta:hover .arrow { transform: translate(2px, -2px); }

/* Theme toggle button */
.theme-toggle {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid var(--rule-2);
  color: var(--fg);
  position: relative;
  transition: all 0.2s var(--ease);
  padding: 0;
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.theme-toggle .ico {
  position: absolute;
  inset: 0;
  margin: auto;
  transition: opacity 0.25s var(--ease), transform 0.35s var(--ease);
}
[data-theme="light"] .theme-toggle .ico-sun { opacity: 1; transform: rotate(0deg) scale(1); }
[data-theme="light"] .theme-toggle .ico-moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .ico-sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
[data-theme="dark"] .theme-toggle .ico-moon { opacity: 1; transform: rotate(0deg) scale(1); }

@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ============================================
   Hero
   ============================================ */
.hero {
  min-height: 100vh;
  padding: 140px var(--gutter) 80px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}
.hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--rule) 1px, transparent 1px),
    linear-gradient(to bottom, var(--rule) 1px, transparent 1px);
  background-size: calc(100% / 12) 80px;
  opacity: 0.25;
  mask-image: radial-gradient(ellipse at 30% 40%, black 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 40%, black 30%, transparent 75%);
}
.hero-meta {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  position: relative;
  z-index: 2;
}
.hero-meta .live {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-mute);
}
.hero-meta .live .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
  70% { box-shadow: 0 0 0 10px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.hero-body {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr;
  gap: 64px;
  margin-top: auto;
}
.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-mute);
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 36px;
}
.hero-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(48px, 9.5vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.hero h1 .em {
  font-style: italic;
  font-weight: 300;
  color: var(--fg-mute);
}
.hero h1 .accent {
  color: var(--accent);
}

.hero-foot {
  display: grid;
  grid-template-columns: 1.5fr 1fr auto;
  gap: 48px;
  align-items: end;
  padding-top: 48px;
  border-top: 1px solid var(--rule);
}
.hero-foot .desc {
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.55;
  color: var(--fg-mute);
  max-width: 50ch;
  text-wrap: pretty;
}
.hero-foot .meta-block {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.hero-foot .meta-block .label { display: block; margin-bottom: 6px; }
.hero-foot .meta-block .value {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--fg);
}

@media (max-width: 800px) {
  .hero-foot { grid-template-columns: 1fr; gap: 24px; }
}

/* CTA primary */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: var(--fg);
  color: var(--bg);
  border: 1px solid var(--fg);
  transition: all 0.2s var(--ease);
}
.cta:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink);
}
.cta .arrow { transition: transform 0.2s var(--ease); }
.cta:hover .arrow { transform: translate(3px, -3px); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--rule-2);
  transition: all 0.2s var(--ease);
}
.cta-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.cta-ghost .arrow { transition: transform 0.2s var(--ease); }
.cta-ghost:hover .arrow { transform: translate(3px, -3px); }

/* ============================================
   Manifesto / About
   ============================================ */
.manifesto {
  display: grid;
  grid-template-columns: 1fr;
  gap: 80px;
}

/* Horizontal fused ASCII figure */
.manifesto-fig {
  border: 1px solid var(--rule);
  background: var(--bg-2);
  padding: 32px 24px 16px;
  overflow-x: auto;
  position: relative;
}
.manifesto-ascii {
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.85vw, 12px);
  line-height: 1.25;
  letter-spacing: 0;
  color: var(--fg-mute);
  margin: 0 0 16px;
  white-space: pre;
  user-select: none;
  text-align: center;
  min-width: 720px;
}
.manifesto-fig-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  border-top: 1px solid var(--rule);
  padding-top: 12px;
  gap: 16px;
  flex-wrap: wrap;
}
.manifesto-fig-foot .accent { color: var(--accent); }
.manifesto-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: end;
}
.manifesto-head h2 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.manifesto-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.manifesto-body > .manifesto-text {
  grid-column: 2;
}
.manifesto-visual {
  aspect-ratio: 4/5;
  background: var(--bg-2);
  border: 1px solid var(--rule);
  position: relative;
  overflow: hidden;
}
.manifesto-text p {
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.55;
  color: var(--fg-mute);
  margin: 0 0 24px;
  text-wrap: pretty;
  max-width: 56ch;
}
.manifesto-text p strong {
  color: var(--fg);
  font-weight: 500;
}

/* Centered manifesto layout */
.manifesto-centered {
  text-align: center;
}
.manifesto-image {
  margin: 0 auto 64px;
  max-width: 980px;
  background: transparent;
  border: none;
  overflow: visible;
  position: relative;
}
.manifesto-image img {
  width: 100%;
  height: auto;
  display: block;
  background: transparent;
  filter: none;
  mix-blend-mode: normal;
}
/* Image stays identical in light/dark mode and on hover */
[data-theme="dark"] .manifesto-image img,
.manifesto-image:hover img,
[data-theme="dark"] .manifesto-image:hover img {
  filter: none;
  mix-blend-mode: normal;
}
.eyebrow-centered {
  justify-content: center;
}
.eyebrow-centered::before {
  display: none;
}
.manifesto-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-weight: 400;
  margin: 0 0 80px;
  text-wrap: balance;
}
.manifesto-text-centered {
  margin: 0 auto;
}
.manifesto-text-centered p {
  margin-left: auto;
  margin-right: auto;
  max-width: 64ch;
}
.accent-line-centered {
  border-left: none !important;
  padding-left: 0 !important;
  padding-top: 36px;
  padding-bottom: 36px;
  border-top: 1px solid var(--accent);
  border-bottom: 1px solid var(--accent);
  margin: 56px auto !important;
  max-width: 64ch !important;
  text-align: center;
}
.manifesto-text .accent-line {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 40px 0;
  padding-left: 24px;
  border-left: 1px solid var(--accent);
  text-wrap: balance;
}

@media (max-width: 900px) {
  .manifesto-head, .manifesto-body { grid-template-columns: 1fr; gap: 32px; }
}

/* ============================================
   Competencies grid
   ============================================ */
.comp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-left: 1px solid var(--rule);
}
.comp-card {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 36px 32px;
  position: relative;
  background: transparent;
  transition: background 0.3s var(--ease);
  cursor: pointer;
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.comp-card:hover {
  background: var(--bg-2);
}
.comp-card .index {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--fg-dim);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
}
.comp-card .index .accent { color: var(--accent); }
.comp-card .ascii {
  flex: 1;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  line-height: 1.1;
  letter-spacing: 0;
  color: var(--fg-mute);
  white-space: pre;
  margin: 12px 0 24px;
  transition: color 0.3s var(--ease);
  user-select: none;
}
.comp-card:hover .ascii { color: var(--accent); }
.comp-card h3 {
  font-family: var(--font-display);
  font-size: clamp(20px, 1.7vw, 26px);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 500;
  margin: 0 0 10px;
}
.comp-card p {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-mute);
  margin: 0;
  text-wrap: pretty;
}
.comp-card::after {
  content: "↗";
  position: absolute;
  top: 32px;
  right: 32px;
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--fg-dim);
  opacity: 0;
  transition: all 0.3s var(--ease);
}
.comp-card:hover::after {
  opacity: 1;
  color: var(--accent);
  transform: translate(2px, -2px);
}

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

/* ============================================
   Capabilities — list style
   ============================================ */
.cap-list {
  border-top: 1px solid var(--rule);
}
.cap-row {
  display: grid;
  grid-template-columns: 80px 1.2fr 1fr 0.8fr auto;
  gap: 32px;
  padding: 36px 0;
  align-items: center;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  transition: padding 0.3s var(--ease);
  position: relative;
}
.cap-row::before {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 0; height: 100%;
  background: var(--accent);
  opacity: 0;
  transition: all 0.3s var(--ease);
}
.cap-row:hover {
  padding-left: 24px;
}
.cap-row:hover::before {
  width: 3px;
  opacity: 1;
}
.cap-row .num {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--fg-dim);
}
.cap-row:hover .num { color: var(--accent); }
.cap-row .name {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 36px);
  line-height: 1;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.cap-row .desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--fg-mute);
  max-width: 38ch;
}
.cap-row .tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex;
  align-items: center;
  gap: 8px;
}
.cap-row .tag .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--fg-dim);
}
.cap-row.active-tag .tag .dot { background: var(--accent); }
.cap-row .arrow-cell {
  font-family: var(--font-mono);
  color: var(--fg-dim);
  font-size: 18px;
  transition: all 0.3s var(--ease);
}
.cap-row:hover .arrow-cell {
  color: var(--accent);
  transform: translate(2px, -2px);
}

@media (max-width: 900px) {
  .cap-row { grid-template-columns: 60px 1fr auto; }
  .cap-row .desc, .cap-row .tag { display: none; }
}

/* ============================================
   Services — split layout
   ============================================ */
.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
}
.service {
  padding: 48px 40px 48px 0;
  border-right: 1px solid var(--rule);
  position: relative;
}
.service:last-child { border-right: none; padding-right: 0; }
.service:not(:first-child) { padding-left: 40px; }

.service .num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.service .num::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.service h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.2vw, 32px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  font-weight: 400;
  margin: 0 0 20px;
  text-wrap: balance;
}
.service p {
  font-size: 15px;
  line-height: 1.55;
  color: var(--fg-mute);
  margin: 0 0 28px;
  text-wrap: pretty;
}
.service .meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  display: flex;
  gap: 18px;
}

@media (max-width: 900px) {
  .services { grid-template-columns: 1fr; }
  .service { border-right: none; border-bottom: 1px solid var(--rule); padding: 36px 0; }
  .service:not(:first-child) { padding-left: 0; }
  .service:last-child { border-bottom: none; }
}

/* ============================================
   Stats
   ============================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin-top: 96px;
}
.stat {
  padding: 48px 32px;
  border-right: 1px solid var(--rule);
  position: relative;
}
.stat:last-child { border-right: none; }
.stat .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 24px;
}
.stat .value {
  font-family: var(--font-display);
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.04em;
  font-weight: 300;
  color: var(--fg);
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.stat .value .unit {
  font-size: 0.45em;
  color: var(--accent);
  font-weight: 400;
  letter-spacing: -0.02em;
}

@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--rule); }
  .stat:last-child { border-bottom: none; }
}

/* ============================================
   Contact
   ============================================ */
.contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: end;
  padding: var(--section-py) 0;
}
.contact h2 {
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 144px);
  line-height: 0.92;
  letter-spacing: -0.04em;
  font-weight: 400;
  margin: 0;
  text-wrap: balance;
}
.contact h2 .em { font-style: italic; color: var(--fg-mute); font-weight: 300; }
.contact-info {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-info .row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--rule);
}
.contact-info .row:last-child { border-bottom: none; padding-bottom: 0; }
.contact-info .label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding-top: 4px;
}
.contact-info .value {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.3vw, 19px);
  line-height: 1.4;
  color: var(--fg);
}
.contact-info .value a:hover { color: var(--accent); }

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

/* ============================================
   Footer
   ============================================ */
footer {
  border-top: 1px solid var(--rule);
  padding: 56px var(--gutter) 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 64px;
}
.footer-col h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-dim);
  font-weight: 400;
  margin: 0 0 20px;
}
.footer-col ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--fg-mute);
  font-size: 14px;
  transition: color 0.2s var(--ease);
}
.footer-col a:hover { color: var(--accent); }
.footer-col p {
  color: var(--fg-mute);
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  max-width: 36ch;
}
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid var(--rule);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
}
.footer-bottom .build { display: flex; gap: 16px; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* ============================================
   Reveal animations
   ============================================ */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Manifesto visual (animated grid)
   ============================================ */
.mvis {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(10, 1fr);
}
.mvis div {
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.mvis div:nth-child(8n) { border-right: none; }
.mvis div.fill { background: var(--accent-soft); }
.mvis div.dot::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  width: 4px; height: 4px;
  background: var(--fg-mute);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.mvis-label {
  position: absolute;
  bottom: 16px; left: 16px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--fg-dim);
  background: var(--bg-2);
  padding: 6px 10px;
  border: 1px solid var(--rule);
  z-index: 2;
}
.mvis-label .accent { color: var(--accent); }

/* mark for inline accent in headings */
mark {
  background: transparent;
  color: var(--accent);
}
