/* ============================================
   METABRAKET v2 — Premium Engineering Theme
   Inspired by Legrand AV refinement
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300;0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,300;1,9..144,400&family=JetBrains+Mono:wght@300;400;500&family=Manrope:wght@300;400;500;600;700&display=swap');

/* ---------- LIGHT THEME (default) ---------- */
:root {
  /* Backgrounds */
  --bg:           #FAF8F5;        /* warm off-white, less yellow than before */
  --bg-elev:      #FFFFFF;        /* elevated card */
  --bg-soft:      #F0EDE7;        /* hover / subtle */

  /* Ink / text */
  --ink:          #11161C;        /* deep midnight near-black */
  --ink-soft:     #2A3340;        /* secondary text */
  --muted:        #6B7785;        /* tertiary text */
  --rule:         #E2DDD3;        /* dividers */
  --rule-soft:    #EFEAE0;

  /* Brand accent — refined metallic copper (Legrand-inspired) */
  --accent:       #C9582C;        /* signature copper */
  --accent-soft:  #E07A4D;        /* lighter hover */
  --accent-deep:  #A1421E;        /* deeper press */
  --accent-tint:  rgba(201, 88, 44, 0.08);

  /* Secondary accent — refined steel blue for technical lines */
  --steel:        #3F5263;
  --steel-soft:   #6B7785;

  /* Shadows */
  --shadow-sm:    0 1px 2px rgba(17, 22, 28, 0.04);
  --shadow:       0 12px 32px -16px rgba(17, 22, 28, 0.12);
  --shadow-lg:    0 28px 64px -28px rgba(17, 22, 28, 0.20);

  /* Typography */
  --serif: 'Fraunces', Georgia, serif;
  --sans:  'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  --mono:  'JetBrains Mono', 'SF Mono', Consolas, monospace;

  /* Sizing */
  --radius-sm: 4px;
  --radius:    8px;
  --radius-lg: 16px;
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- DARK THEME ---------- */
[data-theme="dark"] {
  --bg:           #0B0F14;        /* deep midnight */
  --bg-elev:      #131922;        /* elevated card */
  --bg-soft:      #1A222D;        /* hover */

  --ink:          #F2EFE9;        /* warm white */
  --ink-soft:     #C8C2B5;
  --muted:        #8A8578;
  --rule:         #232C38;
  --rule-soft:    #1A222D;

  --accent:       #E07A4D;        /* slightly brighter copper for dark */
  --accent-soft:  #ED9772;
  --accent-deep:  #C9582C;
  --accent-tint:  rgba(224, 122, 77, 0.12);

  --steel:        #8FA2B4;
  --steel-soft:   #6B7785;

  --shadow-sm:    0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow:       0 12px 32px -16px rgba(0, 0, 0, 0.5);
  --shadow-lg:    0 28px 64px -28px rgba(0, 0, 0, 0.7);
}

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
  font-weight: 400;
  letter-spacing: -0.005em;
  transition: background var(--transition), color var(--transition);
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ============================================
   GRID BACKGROUND
   ============================================ */
.grid-bg {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--rule-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule-soft) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

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

/* ============================================
   NAVIGATION
   ============================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 40px;
  display: flex; justify-content: space-between; align-items: center;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: padding 0.3s, border-color 0.3s, background 0.3s;
}
.nav.scrolled {
  padding: 14px 40px;
  border-bottom-color: var(--rule);
}

.nav-logo {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-weight: 600;
  font-size: 19px; letter-spacing: -0.02em;
  color: var(--ink);
}
.nav-logo .logo-mark {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: var(--ink); border-radius: var(--radius-sm);
  color: var(--bg);
  transition: background var(--transition);
}
.nav-logo .logo-mark svg { width: 18px; height: 18px; }

.nav-links {
  display: flex; gap: 32px; align-items: center;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  position: relative;
  padding: 8px 0;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: ''; position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px; background: var(--accent);
  border-radius: 1px;
}

.nav-actions { display: flex; align-items: center; gap: 14px; }

/* Theme toggle switch */
.theme-toggle {
  position: relative;
  width: 56px; height: 28px;
  border-radius: 28px;
  background: var(--bg-soft);
  border: 1px solid var(--rule);
  cursor: pointer;
  display: flex; align-items: center;
  padding: 0 4px;
  transition: background var(--transition), border-color var(--transition);
}
.theme-toggle::before {
  content: '';
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), background var(--transition);
}
[data-theme="dark"] .theme-toggle::before {
  transform: translateX(28px);
  background: var(--accent);
}
.theme-toggle .icon-sun, .theme-toggle .icon-moon {
  position: absolute;
  width: 12px; height: 12px;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  pointer-events: none;
  transition: opacity var(--transition);
}
.theme-toggle .icon-sun { left: 8px; }
.theme-toggle .icon-moon { right: 8px; }
[data-theme="dark"] .theme-toggle .icon-sun { opacity: 0.3; }
:root .theme-toggle .icon-moon, [data-theme="light"] .theme-toggle .icon-moon { opacity: 0.3; }

/* CTA button */
.nav-cta {
  padding: 10px 18px;
  background: var(--ink);
  color: var(--bg);
  font-size: 13px; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.nav-cta:hover {
  background: var(--accent);
  transform: translateY(-1px);
}

.nav-toggle {
  display: none;
  background: none; border: none;
  width: 32px; height: 32px;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-toggle span {
  display: block; height: 2px; width: 24px;
  background: var(--ink); transition: 0.3s;
  border-radius: 2px;
}

.mobile-bottom-nav {
  display: none;
}

@media (max-width: 960px) {
  body {
    padding-bottom: 82px;
  }
  .nav {
    z-index: 140;
    height: 64px;
    padding: 0 16px;
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--rule) 80%, transparent);
    box-shadow: 0 4px 20px rgba(17, 22, 28, 0.07);
  }
  .nav.scrolled {
    padding: 0 16px;
  }
  .nav-logo {
    gap: 10px;
    font-size: 20px;
  }
  .nav-logo .logo-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .nav-actions {
    gap: 8px;
  }
  .theme-toggle {
    width: 52px;
    height: 30px;
    border-radius: 12px;
    background: var(--bg-soft);
  }
  .nav-links {
    position: fixed;
    top: 64px;
    right: 0;
    bottom: 0;
    left: auto;
    width: min(86vw, 340px);
    min-height: calc(100svh - 64px);
    flex-direction: column; gap: 0;
    align-items: stretch;
    background: var(--bg);
    border-left: 1px solid var(--rule);
    border-top: 1px solid var(--rule);
    padding: 22px 18px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    box-shadow: none;
    transition: transform 0.38s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.38s ease, visibility 0.38s;
    z-index: 142;
  }
  .nav-links.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
    box-shadow: -10px 0 36px rgba(17, 22, 28, 0.16);
  }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 16px 18px;
    border-bottom: 1px solid var(--rule-soft);
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
    background: color-mix(in srgb, var(--bg-elev) 60%, transparent);
  }
  .nav-links a::before {
    display: inline-block;
    width: 24px;
    margin-right: 10px;
    color: var(--accent);
    font-size: 17px;
    vertical-align: -1px;
  }
  .nav-links li:nth-child(1) a::before { content: '⌂'; }
  .nav-links li:nth-child(2) a::before { content: '◱'; }
  .nav-links li:nth-child(3) a::before { content: '⚙'; }
  .nav-links li:nth-child(4) a::before { content: '▣'; }
  .nav-links li:nth-child(5) a::before { content: '☎'; }
  .nav-links a:hover,
  .nav-links a.active {
    background: var(--accent-tint);
    color: var(--accent);
  }
  .nav-links a.active::after {
    display: none;
  }
  .nav-toggle {
    display: flex;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border-radius: 10px;
    background: var(--bg-soft);
    border: 1px solid var(--rule);
  }
  .nav-toggle span {
    width: 20px;
  }
  .nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle.active span:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  .nav-cta { display: none; }
  .nav-backdrop {
    position: fixed;
    inset: 64px 0 0;
    z-index: 120;
    background: rgba(17, 22, 28, 0.18);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s ease, visibility 0.35s;
  }
  .nav-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    height: 76px;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 96%, transparent);
    border-top: 1px solid var(--rule);
    box-shadow: 0 -8px 28px rgba(17, 22, 28, 0.1);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
  }
  .mobile-bottom-nav a {
    display: grid;
    place-items: center;
    gap: 3px;
    min-width: 0;
    color: var(--ink-soft);
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
    border-radius: 12px;
    padding: 5px 2px;
    transition: color var(--transition), background var(--transition), transform var(--transition);
  }
  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a.active {
    color: var(--accent);
    background: var(--accent-tint);
  }
  .mobile-bottom-nav a.active {
    transform: translateY(-2px);
  }
  .mobile-bottom-nav .mbn-icon {
    display: block;
    font-size: 21px;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(17, 22, 28, 0.12));
  }
  .go-top {
    bottom: 96px;
    right: 18px;
  }
}

/* ============================================
   GO TO TOP BUTTON
   ============================================ */
.go-top {
  position: fixed;
  bottom: 32px; right: 32px;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  border: none;
  display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow);
  z-index: 90;
  opacity: 0; visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background var(--transition);
}
.go-top.visible {
  opacity: 1; visibility: visible;
  transform: translateY(0);
}
.go-top:hover {
  background: var(--accent);
  transform: translateY(-3px);
}
.go-top svg { width: 18px; height: 18px; }

/* ============================================
   LAYOUT
   ============================================ */
.page { position: relative; z-index: 1; }
.section { padding: 120px 40px; position: relative; }
.section-tight { padding: 80px 40px; position: relative; }
.container { max-width: 1280px; margin: 0 auto; }
.container-narrow { max-width: 920px; margin: 0 auto; }

@media (max-width: 720px) {
  .section { padding: 80px 20px; }
  .section-tight { padding: 60px 20px; }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--mono);
  font-size: 11px; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}
.eyebrow::before {
  content: ''; width: 20px; height: 1px; background: var(--accent);
}
.eyebrow.center { justify-content: center; }

/* Display - hero only */
.display {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  color: var(--ink);
}
.display em {
  font-style: italic;
  font-weight: 300;
  color: var(--accent);
}

/* H1 (page heads) */
.h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.04em;
}
.h1 em { font-style: italic; font-weight: 300; color: var(--accent); }

/* H2 — section headers */
.h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(30px, 3.6vw, 48px);
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--ink);
}
.h2 em { font-style: italic; font-weight: 300; color: var(--accent); }

/* H3 */
.h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(20px, 1.9vw, 24px);
  line-height: 1.25;
  letter-spacing: -0.012em;
  color: var(--ink);
}

/* Lead */
.lead {
  font-family: var(--sans);
  font-size: clamp(16px, 1.2vw, 18px);
  line-height: 1.65;
  color: var(--ink-soft);
  font-weight: 400;
  max-width: 60ch;
}

p { color: var(--ink-soft); font-size: 15px; line-height: 1.65; }

.mono-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 24px;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  border: none; cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--ink); color: var(--bg);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px var(--accent-tint);
}
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover {
  background: var(--ink); color: var(--bg);
  transform: translateY(-2px);
}
.btn-accent {
  background: var(--accent); color: #fff;
}
.btn-accent:hover {
  background: var(--accent-deep);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -8px var(--accent-tint);
}
.btn .arrow { transition: transform 0.3s; }
.btn:hover .arrow { transform: translateX(4px); }

/* ============================================
   HERO
   ============================================ */
.hero {
  min-height: 100vh;
  padding: 130px 40px 80px;
  display: flex; align-items: center;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
  width: 100%; max-width: 1340px; margin: 0 auto;
  position: relative; z-index: 2;
}
.hero-meta {
  display: flex; gap: 28px; margin-bottom: 28px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-tint);
  animation: pulse 2s ease-in-out infinite;
}

.hero h1 { margin-bottom: 28px; }
.hero .lead { margin-bottom: 36px; max-width: 52ch; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-visual {
  position: relative;
  aspect-ratio: 1;
  width: 100%;
  max-width: 720px;
  margin-left: auto;
  margin-right: 0;
}

@media (max-width: 960px) {
  .hero { padding: 110px 20px 60px; min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; }
  .hero-visual { max-width: 480px; margin: 0 auto; }
}

@media (max-width: 720px) {
  .display {
    font-size: clamp(44px, 13vw, 64px);
    line-height: 0.98;
    letter-spacing: -0.025em;
  }
  .hero {
    padding: 96px 16px 44px;
    overflow: hidden;
  }
  .hero-grid {
    gap: 38px;
  }
  .hero-meta {
    gap: 12px;
    margin-bottom: 22px;
    font-size: 10px;
    line-height: 1.6;
  }
  .hero-meta span {
    width: 100%;
  }
  .hero .lead {
    margin-bottom: 28px;
    font-size: 16px;
    line-height: 1.62;
  }
  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-height: 52px;
    border-radius: 10px;
    font-weight: 600;
  }
  .hero-visual {
    width: min(100%, 430px);
  }
  .gear-stage {
    border: 1px solid var(--rule);
    border-radius: 18px;
    overflow: hidden;
    background: color-mix(in srgb, var(--bg-elev) 72%, transparent);
    box-shadow: var(--shadow);
  }
  .gear-stage svg {
    overflow: hidden;
  }
  .stat {
    padding: 30px 22px;
  }
  .section {
    padding: 72px 20px;
  }
  .section-tight {
    padding: 56px 20px;
  }
  .cap,
  .product-card {
    border-radius: 14px;
  }
  .big-cta {
    padding: 82px 20px;
  }
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-tint); }
  50% { box-shadow: 0 0 0 6px transparent; }
}

/* ============================================
   GEAR ANIMATION (hero centerpiece)
   ============================================ */
.gear-stage {
  position: relative;
  width: 100%; height: 100%;
}
.gear-stage svg {
  width: 100%; height: 100%;
  overflow: visible;
}

.gear-label-plate {
  fill: rgba(8, 10, 12, 0.86);
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 0.7;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.55));
}

.gear-hub-label {
  font-family: var(--sans);
  font-weight: 900;
  letter-spacing: 0.015em;
  paint-order: stroke fill;
  stroke: rgba(0, 0, 0, 0.82);
  stroke-width: 0.85px;
  stroke-linejoin: round;
  text-transform: uppercase;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.62));
}

.gear-brand-script {
  paint-order: stroke fill;
  stroke: rgba(10, 13, 17, 0.82);
  stroke-width: 1.1px;
  stroke-linejoin: round;
}

.gear-brand-label {
  paint-order: stroke fill;
  stroke: rgba(10, 13, 17, 0.8);
  stroke-width: 1.4px;
  stroke-linejoin: round;
}

/* ============================================
   GEAR ROTATION
   Central Z=42 → period T_central
   Satellite rotation period = T_central * (Z_sat / Z_central)
   Direction: alternates (mesh = opposite direction)
   Central spins CCW slow; satellites spin CW (opposite of central)
   relative_period = (Z_sat / 42) * 28s (base)
   - Innovation Z=24 → 16s
   - Analysis   Z=18 → 12s
   - Creative   Z=20 → 13.3s
   - Research   Z=16 → 10.7s
   - Success    Z=22 → 14.7s
   We round to clean values that feel correct.
   ============================================ */

/* Central — slow CCW */
.gear-spin-ccw-slow {
  animation: spin-ccw 28s linear infinite;
  transform-origin: 0 0;
}
.text-counter-spin-cw-slow {
  animation: spin-cw 28s linear infinite;
  transform-origin: 0 0;
}

/* Satellites — direction OPPOSITE central (i.e. CW), period scales with tooth count */
.gear-spin-cw-slow      { animation: spin-cw  14.7s linear infinite; transform-origin: 0 0; }
.text-counter-spin-ccw-slow { animation: spin-ccw 14.7s linear infinite; transform-origin: 0 0; }

.gear-spin-ccw-med      { animation: spin-cw  16s   linear infinite; transform-origin: 0 0; }
.text-counter-spin-cw-med   { animation: spin-ccw 16s   linear infinite; transform-origin: 0 0; }

.gear-spin-cw-fast      { animation: spin-cw  12s   linear infinite; transform-origin: 0 0; }
.text-counter-spin-ccw-fast { animation: spin-ccw 12s   linear infinite; transform-origin: 0 0; }

.gear-spin-ccw-med2     { animation: spin-cw  13.3s linear infinite; transform-origin: 0 0; }
.text-counter-spin-cw-med2  { animation: spin-ccw 13.3s linear infinite; transform-origin: 0 0; }

.gear-spin-cw-fastest   { animation: spin-cw  10.7s linear infinite; transform-origin: 0 0; }
.text-counter-spin-ccw-fastest { animation: spin-ccw 10.7s linear infinite; transform-origin: 0 0; }

@keyframes spin-cw {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes spin-ccw {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

.spark {
  animation: spark 2s ease-in-out infinite;
  transform-origin: center;
  transform-box: fill-box;
}
.spark.s1 { animation-delay: 0s; }
.spark.s2 { animation-delay: 0.6s; }
.spark.s3 { animation-delay: 1.2s; }
.spark.s4 { animation-delay: 1.8s; }
@keyframes spark {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  20%, 80% { opacity: 1; transform: scale(1); }
}

.dim-pulse {
  stroke-dasharray: 4 3;
  animation: dash-flow 8s linear infinite;
}
@keyframes dash-flow {
  to { stroke-dashoffset: -100; }
}

/* ============================================
   STAT STRIP
   ============================================ */
.stat-strip {
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: var(--bg);
}
.stat-strip-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.stat {
  padding: 36px 28px;
  border-right: 1px solid var(--rule);
  position: relative;
  transition: background var(--transition);
}
.stat:hover { background: var(--bg-soft); }
.stat:last-child { border-right: none; }
.stat-num {
  font-family: var(--serif);
  font-size: clamp(32px, 3.4vw, 44px);
  font-weight: 400; line-height: 1;
  letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 8px;
}
.stat-num em { font-style: italic; color: var(--accent); font-weight: 300; }
.stat-label {
  font-family: var(--mono); font-size: 10.5px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted);
}
@media (max-width: 720px) {
  .stat-strip-inner { grid-template-columns: 1fr 1fr; }
  .stat:nth-child(2) { border-right: none; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--rule); }
}

/* ============================================
   CAPABILITY CARDS
   ============================================ */
.cap-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 56px;
}
.cap {
  background: var(--bg-elev);
  padding: 36px 32px 40px;
  position: relative;
  transition: background var(--transition);
}
.cap:hover { background: var(--bg-soft); }
.cap-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.14em;
  margin-bottom: 28px;
  text-transform: uppercase;
}
.cap-icon {
  width: 44px; height: 44px;
  margin-bottom: 24px;
  color: var(--ink);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color var(--transition);
}
.cap:hover .cap-icon {
  transform: scale(1.1) rotate(-4deg);
  color: var(--accent);
}
.cap h3 { margin-bottom: 12px; font-size: 22px; }
.cap p { font-size: 14.5px; line-height: 1.6; }

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

/* ============================================
   SPLIT SECTIONS
   ============================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px; align-items: center;
}
.split-narrow { gap: 56px; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 48px; }
}

/* ============================================
   DARK BACKGROUND SECTION
   ============================================ */
.dark-section {
  background: var(--ink);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
[data-theme="dark"] .dark-section {
  background: #060A0E;
}
.dark-section::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(242, 239, 233, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(242, 239, 233, 0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}
.dark-section .display,
.dark-section .h1,
.dark-section .h2,
.dark-section .h3 { color: var(--bg); }
.dark-section .lead { color: rgba(242, 239, 233, 0.72); }
.dark-section p { color: rgba(242, 239, 233, 0.66); }
.dark-section .mono-tag { color: rgba(242, 239, 233, 0.5); }
.dark-section .container,
.dark-section .container-narrow { position: relative; z-index: 1; }

[data-theme="dark"] .dark-section .display,
[data-theme="dark"] .dark-section .h1,
[data-theme="dark"] .dark-section .h2,
[data-theme="dark"] .dark-section .h3 { color: var(--ink); }
[data-theme="dark"] .dark-section .lead { color: var(--ink-soft); }
[data-theme="dark"] .dark-section p { color: var(--ink-soft); }

/* Cap cards inside dark — keep light cards */
.dark-section .cap { background: var(--bg-elev); color: var(--ink); }
.dark-section .cap h3 { color: var(--ink); }
.dark-section .cap p { color: var(--ink-soft); }
.dark-section .cap-icon { color: var(--ink); }
.dark-section .cap-grid {
  background: rgba(242, 239, 233, 0.1);
  border-color: rgba(242, 239, 233, 0.1);
}

/* ============================================
   PROCESS TIMELINE
   ============================================ */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin-top: 64px;
  position: relative;
}
.process::before {
  content: ''; position: absolute;
  top: 26px; left: 6%; right: 6%;
  height: 1px;
  background-image: linear-gradient(to right, var(--rule) 50%, transparent 50%);
  background-size: 12px 1px;
}
.dark-section .process::before {
  background-image: linear-gradient(to right, rgba(242, 239, 233, 0.3) 50%, transparent 50%);
}
.proc-step { position: relative; padding: 0 14px; }
.proc-bullet {
  width: 52px; height: 52px;
  background: var(--bg);
  border: 1.5px solid var(--rule);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 24px;
  position: relative; z-index: 1;
  transition: all var(--transition);
}
.proc-step:hover .proc-bullet {
  border-color: var(--accent);
  transform: scale(1.05);
}
.dark-section .proc-bullet {
  background: var(--ink);
  border-color: rgba(242, 239, 233, 0.3);
}
.proc-step h4 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 10px;
  color: inherit;
}
.dark-section .proc-step h4 { color: var(--bg); }
[data-theme="dark"] .dark-section .proc-step h4 { color: var(--ink); }
.proc-step p { font-size: 14px; line-height: 1.6; }

@media (max-width: 900px) {
  .process { grid-template-columns: 1fr; gap: 28px; }
  .process::before { display: none; }
}

/* ============================================
   PRODUCT CARDS
   ============================================ */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 56px;
}
.product-card {
  background: var(--bg-elev);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}
.product-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
}
.product-img {
  aspect-ratio: 4 / 3;
  background: var(--bg-soft);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
}
.product-card:hover .product-img { background: var(--bg); }
.product-img svg { width: 100%; height: 100%; transition: transform 0.6s; }
.product-card:hover .product-img svg { transform: scale(1.05); }
.product-body { padding: 22px 24px 26px; }
.product-cat {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 8px;
}
.product-card h3 { margin-bottom: 8px; font-size: 21px; }
.product-card p { font-size: 14px; line-height: 1.55; }

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

/* ============================================
   BIG CTA
   ============================================ */
.big-cta {
  text-align: center;
  padding: 130px 40px;
}
.big-cta .display { max-width: 18ch; margin: 0 auto 28px; }
.big-cta .lead { margin: 0 auto 36px; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--ink);
  color: var(--bg);
  padding: 80px 40px 32px;
  position: relative;
}
[data-theme="dark"] .footer { background: #060A0E; }
.footer-grid {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(242, 239, 233, 0.12);
}
.footer-brand h3 {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 500;
  margin-bottom: 14px;
  color: var(--bg);
}
[data-theme="dark"] .footer-brand h3 { color: var(--ink); }
.footer-brand p {
  font-size: 14px;
  color: rgba(242, 239, 233, 0.62);
  max-width: 38ch;
  line-height: 1.65;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(242, 239, 233, 0.48);
  margin-bottom: 18px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a {
  color: rgba(242, 239, 233, 0.78);
  font-size: 14px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: 1280px; margin: 0 auto;
  padding-top: 28px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--mono); font-size: 11px;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(242, 239, 233, 0.45);
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: column; gap: 14px; text-align: center; }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ============================================
   PAGE HEAD (interior pages)
   ============================================ */
.page-head {
  padding: 170px 40px 90px;
  background: var(--bg);
  position: relative;
  border-bottom: 1px solid var(--rule);
}
.page-head-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: end;
}
.page-head .lead { margin-top: 14px; }
.breadcrumb {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
}
.breadcrumb a { color: var(--muted); transition: color var(--transition); }
.breadcrumb a:hover { color: var(--accent); }

@media (max-width: 900px) {
  .page-head { padding: 120px 20px 70px; }
  .page-head-inner { grid-template-columns: 1fr; gap: 28px; }
}

/* ============================================
   SERVICE LIST
   ============================================ */
.service-list { border-top: 1px solid var(--rule); }
.service-row {
  display: grid;
  grid-template-columns: 80px 1fr 2.5fr;
  gap: 40px;
  padding: 36px 0;
  border-bottom: 1px solid var(--rule);
  align-items: start;
  transition: padding var(--transition), background var(--transition);
}
.service-row:hover {
  background: var(--accent-tint);
  padding-left: 16px; padding-right: 16px;
}
.service-row .num {
  font-family: var(--mono);
  font-size: 12px; color: var(--accent);
  letter-spacing: 0.12em;
}
.service-row h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.012em;
}
.service-row p { font-size: 15px; line-height: 1.65; }

@media (max-width: 720px) {
  .service-row { grid-template-columns: 1fr; gap: 10px; padding: 24px 0; }
}

/* ============================================
   PRINCIPLES
   ============================================ */
.principle-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px;
  margin-top: 56px;
}
.principle h3 {
  display: flex; align-items: baseline; gap: 14px;
  margin-bottom: 14px;
}
.principle h3 .num {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 0.1em;
  flex-shrink: 0;
}
.principle p { font-size: 15px; line-height: 1.65; max-width: 42ch; }

@media (max-width: 720px) { .principle-grid { grid-template-columns: 1fr; gap: 36px; } }

/* ============================================
   CONTACT
   ============================================ */
.contact-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 80px;
}
.contact-info h2 { margin-bottom: 28px; }
.contact-detail {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule);
}
.contact-detail:last-child { border-bottom: none; }
.contact-detail .mono-tag { display: block; margin-bottom: 6px; }
.contact-detail .val {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.contact-detail a {
  color: var(--ink);
  transition: color var(--transition);
}
.contact-detail a:hover { color: var(--accent); }

.form { display: flex; flex-direction: column; gap: 22px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input, .field textarea, .field select {
  padding: 12px 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  transition: border-color var(--transition);
  outline: none;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-bottom-color: var(--accent);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted); }
.field textarea { resize: vertical; min-height: 100px; }
.field-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 22px;
}
@media (max-width: 720px) {
  .field-row { grid-template-columns: 1fr; gap: 22px; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.reveal.visible {
  opacity: 1; transform: translateY(0);
}
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }
.reveal.delay-5 { transition-delay: 0.5s; }

.hero h1, .hero .lead, .hero-actions, .hero-meta {
  opacity: 0;
  animation: fadeUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.hero-meta { animation-delay: 0.1s; }
.hero h1 { animation-delay: 0.25s; }
.hero .lead { animation-delay: 0.45s; }
.hero-actions { animation-delay: 0.6s; }
