/* ==========================================================================
   MCG Labs — mcg-labs.ai
   MCG grey + orange re-skin of the mcgllc.com house style, hexagon motif,
   terminal-wall velocity motif, data-correlation / implied-math motif.
   Static, dependency-free. See SPEC.md.
   ========================================================================== */

:root {
  /* Core brand */
  --mcg-orange:        #F26F27;
  --mcg-orange-light:  #FF8C4A;
  --mcg-orange-dark:   #D45A15;

  /* MCG grey scale (from the logo) */
  --grey-900: #22262A;
  --grey-800: #2B2F33;
  --grey-700: #434A51;
  --grey-500: #6B7177;
  --grey-300: #B9BEC3;
  --grey-150: #E2E5E8;
  --grey-100: #F4F5F6;
  --white:    #FFFFFF;

  /* Text */
  --text-dark:        #2B2F33;
  --text-muted:       #5B6168;
  --text-on-dark:     rgba(255,255,255,0.90);
  --text-on-dark-mut: rgba(255,255,255,0.65);

  /* Functional */
  --term-green: #58C06A;

  /* Layout */
  --container-width: 1170px;
  --section-padding: 80px;
  --nav-gap: 20px;

  /* Hexagon lattice tiles — punched-foil look (fill + lit top edge + shadowed bottom edge),
     rows staggered like the logo. 58x120 tile: row A centered, row B offset by half. */
  --hex-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='120'%3E%3Cpolygon points='29,6 49.8,18 49.8,42 29,54 8.2,42 8.2,18' fill='%23F26F27' fill-opacity='0.018' stroke='%23FFFFFF' stroke-opacity='0.08' stroke-width='1'/%3E%3Cpolyline points='8.2,18 29,6 49.8,18' fill='none' stroke='%23F26F27' stroke-opacity='0.24' stroke-width='1.3'/%3E%3Cpolyline points='8.2,42 29,54 49.8,42' fill='none' stroke='%23000000' stroke-opacity='0.28' stroke-width='1.3'/%3E%3Cpolygon points='0,66 20.8,78 20.8,102 0,114 -20.8,102 -20.8,78' fill='%23FFFFFF' fill-opacity='0.022' stroke='%23FFFFFF' stroke-opacity='0.08' stroke-width='1'/%3E%3Cpolyline points='-20.8,78 0,66 20.8,78' fill='none' stroke='%23FFFFFF' stroke-opacity='0.18' stroke-width='1.3'/%3E%3Cpolyline points='-20.8,102 0,114 20.8,102' fill='none' stroke='%23000000' stroke-opacity='0.28' stroke-width='1.3'/%3E%3Cpolygon points='58,66 78.8,78 78.8,102 58,114 37.2,102 37.2,78' fill='%23FFFFFF' fill-opacity='0.022' stroke='%23FFFFFF' stroke-opacity='0.08' stroke-width='1'/%3E%3Cpolyline points='37.2,78 58,66 78.8,78' fill='none' stroke='%23FFFFFF' stroke-opacity='0.18' stroke-width='1.3'/%3E%3Cpolyline points='37.2,102 58,114 78.8,102' fill='none' stroke='%23000000' stroke-opacity='0.28' stroke-width='1.3'/%3E%3C/svg%3E");
  --hex-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='58' height='120'%3E%3Cpolygon points='29,6 49.8,18 49.8,42 29,54 8.2,42 8.2,18' fill='none' stroke='%236B7177' stroke-opacity='0.16' stroke-width='1'/%3E%3Cpolyline points='8.2,42 29,54 49.8,42' fill='none' stroke='%236B7177' stroke-opacity='0.28' stroke-width='1.1'/%3E%3Cpolygon points='0,66 20.8,78 20.8,102 0,114 -20.8,102 -20.8,78' fill='none' stroke='%236B7177' stroke-opacity='0.16' stroke-width='1'/%3E%3Cpolyline points='-20.8,102 0,114 20.8,102' fill='none' stroke='%236B7177' stroke-opacity='0.28' stroke-width='1.1'/%3E%3Cpolygon points='58,66 78.8,78 78.8,102 58,114 37.2,102 37.2,78' fill='none' stroke='%236B7177' stroke-opacity='0.16' stroke-width='1'/%3E%3Cpolyline points='37.2,102 58,114 78.8,102' fill='none' stroke='%236B7177' stroke-opacity='0.28' stroke-width='1.1'/%3E%3C/svg%3E");
}

/* Reset */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Ubuntu', sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dark);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 700;
  color: var(--grey-700);
  line-height: 1.2;
}
h1 { font-size: clamp(38px, 5vw, 60px); margin-bottom: 20px; }
h2 { font-size: clamp(30px, 3.4vw, 42px); margin-bottom: 15px; }
h3 { font-size: clamp(20px, 2vw, 28px); margin-bottom: 12px; }

p { margin-bottom: 1em; }
a { color: var(--mcg-orange-dark); }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.mono { font-family: 'JetBrains Mono', 'Ubuntu Mono', ui-monospace, monospace; }
.text-center { text-align: center; }
.text-orange { color: var(--mcg-orange); }

/* ====================== Header / Nav ====================== */
.site-header {
  background: var(--grey-900);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.18);
}
.site-header .container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--nav-gap);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand svg { height: 38px; width: auto; display: block; }
.brand .wordmark {
  font-family: 'Josefin Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.5px;
  line-height: 1;
}
.brand .wm-mcg  { color: var(--white); }
.brand .wm-labs { color: var(--mcg-orange); }

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; flex-wrap: wrap; list-style: none; gap: var(--nav-gap); align-items: center; }
.main-nav a {
  color: var(--white);
  text-decoration: none;
  font-family: 'Josefin Sans', sans-serif;
  font-weight: 600;
  font-size: 13.5px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  transition: color 0.25s;
}
.main-nav a:hover, .main-nav a.active { color: var(--mcg-orange); }
.main-nav a::after {
  content: ''; position: absolute; bottom: -6px; left: 0;
  width: 0; height: 2px; background: var(--mcg-orange); transition: width 0.25s;
}
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  padding: 8px; flex-direction: column; gap: 5px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--white); display: block; transition: 0.25s; }

/* ====================== Hero ====================== */
.hero {
  background: linear-gradient(135deg, var(--grey-900) 0%, var(--grey-800) 100%);
  color: var(--white);
  padding: 100px 0 70px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(130% 95% at 22% -10%, rgba(255,255,255,0.08), rgba(255,255,255,0) 55%), var(--hex-dark);
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 58px 120px;
  opacity: 0.95;
  z-index: 1;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 820px; }
.hero h1 { color: var(--white); margin-bottom: 22px; }
.hero .eyebrow {
  font-family: 'Josefin Sans', sans-serif; font-weight: 600; text-transform: uppercase;
  letter-spacing: 3px; font-size: 13px; color: var(--mcg-orange); margin-bottom: 18px; display: block;
}
.hero-subtitle { font-size: 20px; color: var(--text-on-dark); margin-bottom: 36px; line-height: 1.6; max-width: 680px; }
.hero-cta { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 56px; }

.hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; z-index: 2; }
.stat-box {
  padding: 26px 28px; background: rgba(255,255,255,0.05);
  border-left: 3px solid var(--mcg-orange); backdrop-filter: blur(6px);
}
.stat-number { font-family: 'Josefin Sans', sans-serif; font-size: 38px; font-weight: 700; color: var(--mcg-orange); margin-bottom: 6px; line-height: 1.1; }
.stat-label { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-on-dark-mut); }

/* compact page hero (inner pages) */
.page-hero { padding: 80px 0 60px; }
.page-hero .hero-subtitle { margin-bottom: 0; }

/* ====================== Buttons ====================== */
.btn-primary, .btn-secondary, .btn-primary-large {
  display: inline-block; padding: 14px 32px;
  font-family: 'Josefin Sans', sans-serif; font-weight: 700; font-size: 14px;
  text-transform: uppercase; letter-spacing: 1px; text-decoration: none;
  border-radius: 4px; transition: all 0.25s; cursor: pointer;
}
.btn-primary, .btn-primary-large {
  background: var(--mcg-orange); color: var(--white); border: 2px solid var(--mcg-orange);
}
.btn-primary:hover, .btn-primary-large:hover {
  background: var(--mcg-orange-dark); border-color: var(--mcg-orange-dark);
  transform: translateY(-2px); box-shadow: 0 6px 18px rgba(242,111,39,0.32);
}
.btn-primary-large { padding: 18px 46px; font-size: 16px; }
.btn-secondary { background: transparent; color: var(--white); border: 2px solid rgba(255,255,255,0.6); }
.btn-secondary:hover { background: var(--white); color: var(--grey-900); border-color: var(--white); }

/* ====================== Sections ====================== */
section { padding: var(--section-padding) 0; }
.section-title { text-align: center; margin-bottom: 18px; }
.section-intro { text-align: center; max-width: 820px; margin: 0 auto 54px; font-size: 18px; color: var(--text-muted); }
.bg-gray-light { background: var(--grey-100); }

/* ====================== Pillar / service cards ====================== */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.services-grid.two { grid-template-columns: repeat(2, 1fr); }
.pillar-card {
  background: var(--white); padding: 38px 34px; border-radius: 4px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.07); border-top: 4px solid var(--mcg-orange);
  transition: all 0.25s; position: relative; overflow: hidden;
}
.pillar-card:hover { transform: translateY(-5px); box-shadow: 0 12px 32px rgba(0,0,0,0.14); }
/* faint hex watermark */
.pillar-card::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 116px; height: 120px;
  background-image: var(--hex-light); background-size: 58px 120px; opacity: 0.55; pointer-events: none;
}
.pillar-card h3 { position: relative; z-index: 2; }
.pillar-card p { color: var(--text-muted); position: relative; z-index: 2; }
.tech-list { list-style: none; margin: 0 0 22px; position: relative; z-index: 2; }
.tech-list li { padding: 7px 0 7px 24px; position: relative; color: var(--text-dark); font-size: 15px; }
.tech-list li::before {
  content: ''; position: absolute; left: 0; top: 13px; width: 10px; height: 11px;
  background: var(--mcg-orange);
  clip-path: polygon(50% 0, 100% 27%, 100% 73%, 50% 100%, 0 73%, 0 27%);
}
.service-link {
  color: var(--mcg-orange-dark); text-decoration: none; font-weight: 700;
  font-family: 'Josefin Sans', sans-serif; text-transform: uppercase; font-size: 13px; letter-spacing: 0.5px;
  position: relative; z-index: 2;
}
.service-link:hover { color: var(--mcg-orange); }

/* ====================== Method items ====================== */
.why-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.method-item { padding: 26px 30px; border-left: 4px solid var(--grey-500); }
.method-item h3 { margin-bottom: 12px; }
.method-item p { color: var(--text-muted); margin: 0; line-height: 1.8; }

/* ====================== Dark feature band ====================== */
.band-dark { background: var(--grey-900); color: var(--white); position: relative; overflow: hidden; }
.band-dark::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(120% 90% at 80% -20%, rgba(255,255,255,0.06), rgba(255,255,255,0) 55%), var(--hex-dark);
  background-repeat: no-repeat, repeat;
  background-size: 100% 100%, 58px 120px;
  opacity: 0.8;
  pointer-events: none;
}
.band-dark .container { position: relative; z-index: 2; }
.band-dark .section-title, .band-dark h2, .band-dark h3 { color: var(--white); }
.band-dark .section-intro { color: var(--text-on-dark-mut); }

.casestudy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.cs-card {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 4px; padding: 34px; text-decoration: none; color: var(--white); transition: all 0.25s;
  position: relative;
}
.cs-card:hover { background: rgba(255,255,255,0.08); border-color: var(--mcg-orange); transform: translateY(-4px); }
.cs-tag {
  display: inline-block; font-family: 'Josefin Sans', sans-serif; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px; color: var(--mcg-orange); margin-bottom: 14px;
}
.cs-card h3 { color: var(--white); font-size: 24px; }
.cs-card p { color: var(--text-on-dark-mut); margin-bottom: 18px; }
.cs-card .service-link { color: var(--mcg-orange); }

/* ====================== Metrics ====================== */
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin: 36px 0; }
.metric { text-align: center; padding: 26px 20px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10); }
.band-dark .metric .metric-num { color: var(--mcg-orange); }
.metric-num { font-family: 'Josefin Sans', sans-serif; font-size: 44px; font-weight: 700; color: var(--mcg-orange); line-height: 1; margin-bottom: 8px; }
.metric-label { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--text-on-dark-mut); }

/* on light metric rows */
.metric.light { background: var(--grey-100); border: 1px solid var(--grey-150); }
.metric.light .metric-label { color: var(--text-muted); }

/* ====================== Callout ====================== */
.note { background: rgba(242,111,39,0.08); border-left: 4px solid var(--mcg-orange); padding: 22px 26px; border-radius: 0 4px 4px 0; margin: 28px 0; }
.note p { margin: 0; color: var(--text-dark); font-size: 17px; }
.pull { font-size: 20px; line-height: 1.6; color: var(--grey-700); border-left: 4px solid var(--mcg-orange); padding: 8px 0 8px 24px; margin: 30px 0; font-family: 'Josefin Sans', sans-serif; font-weight: 600; }

/* ====================== Article / prose ====================== */
.prose { max-width: 820px; margin: 0 auto; }
.prose h2 { margin-top: 44px; }
.prose ul { margin: 0 0 1.2em 1.2em; }
.prose li { margin-bottom: 8px; }
.article-cta { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 44px; }

/* ====================== CTA band ====================== */
.cta-band { background: linear-gradient(135deg, var(--mcg-orange) 0%, var(--mcg-orange-dark) 100%); color: var(--white); text-align: center; }
.cta-band h2 { color: var(--white); }
.cta-band p { font-size: 18px; margin-bottom: 28px; color: rgba(255,255,255,0.95); }
.cta-band .btn-primary-large { background: var(--white); color: var(--mcg-orange-dark); border-color: var(--white); }
.cta-band .btn-primary-large:hover { background: var(--grey-900); color: var(--white); border-color: var(--grey-900); }

/* ====================== Footer ====================== */
.site-footer { background: var(--grey-900); color: var(--text-on-dark-mut); padding: 58px 0 28px; }
.footer-content { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 36px; margin-bottom: 36px; }
.footer-col h4 { color: var(--white); font-size: 17px; margin-bottom: 16px; }
.footer-col p, .footer-col li { font-size: 14px; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: var(--text-on-dark-mut); text-decoration: none; transition: color 0.25s; }
.footer-col a:hover { color: var(--mcg-orange); }
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-brand svg { height: 30px; }
.footer-bottom { text-align: center; padding-top: 26px; border-top: 1px solid rgba(255,255,255,0.1); }
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.55); margin: 0; }

/* ====================== Terminal-wall velocity motif ====================== */
.terminal-wall {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  position: relative;
}
.terminal-wall.feature { margin-top: 10px; }
.term-pane {
  background: var(--grey-800); border: 1px solid rgba(255,255,255,0.08); border-radius: 6px;
  overflow: hidden; height: 180px; position: relative; box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}
.term-bar { display: flex; gap: 6px; padding: 9px 12px; background: rgba(0,0,0,0.25); }
.term-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--grey-500); display: block; }
.term-bar i:first-child { background: var(--mcg-orange); }
.term-body {
  position: relative; height: calc(180px - 33px); overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
          mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent);
}
.term-stream {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 11px; line-height: 1.55;
  color: var(--grey-300); padding: 8px 12px; white-space: pre;
  animation: term-scroll linear infinite;
}
.term-stream .g { color: var(--term-green); }
.term-stream .o { color: var(--mcg-orange-light); }
.term-pane:nth-child(1) .term-stream { animation-duration: 6.5s; }
.term-pane:nth-child(2) .term-stream { animation-duration: 4.5s; }
.term-pane:nth-child(3) .term-stream { animation-duration: 8s; }
.term-pane:nth-child(4) .term-stream { animation-duration: 5.5s; }
.term-pane:nth-child(5) .term-stream { animation-duration: 9s; }
.term-pane:nth-child(6) .term-stream { animation-duration: 3.8s; }
@keyframes term-scroll { from { transform: translateY(0); } to { transform: translateY(-50%); } }

/* ====================== Data-correlation + implied-math motif ====================== */
.corr-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.corr-visual { position: relative; }
.corr-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; max-width: 320px; }
.corr-grid span { aspect-ratio: 1; border-radius: 2px; background: var(--mcg-orange); }
/* intensity classes */
.corr-grid .i0 { background: var(--grey-150); }
.corr-grid .i1 { background: rgba(242,111,39,0.18); }
.corr-grid .i2 { background: rgba(242,111,39,0.38); }
.corr-grid .i3 { background: rgba(242,111,39,0.60); }
.corr-grid .i4 { background: rgba(242,111,39,0.85); }
.math-texture {
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 13px; color: var(--grey-500);
  opacity: 0.6; line-height: 2.1; margin-top: 18px; user-select: none;
}
.math-texture .op { color: var(--mcg-orange); opacity: 0.8; }

/* sort-on-reveal column */
.sort-col { display: flex; flex-direction: column; gap: 6px; max-width: 360px; }
.sort-row {
  display: flex; align-items: center; gap: 10px;
  font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-muted);
  transition: transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.sort-row .bar { height: 14px; background: var(--grey-300); border-radius: 2px; transition: width 0.7s, background 0.7s; }
.sort-row.pivot .bar { background: var(--mcg-orange); }
.sort-row .val { width: 36px; text-align: right; }
/* shuffled initial offsets (only with JS; removed when .sorted applied → animates into place) */
.js .sort-col:not(.sorted) .sort-row:nth-child(1) { transform: translateY(150px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(2) { transform: translateY(-20px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(3) { transform: translateY(80px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(4) { transform: translateY(-60px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(5) { transform: translateY(40px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(6) { transform: translateY(-100px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(7) { transform: translateY(20px); }
.js .sort-col:not(.sorted) .sort-row:nth-child(8) { transform: translateY(-40px); }

/* ====================== Scroll reveal (only when JS is on) ====================== */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ====================== Imagery ====================== */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.split.reverse > .media, .split.reverse > .figure { order: -1; }
.media, .figure .media { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--grey-150); box-shadow: 0 12px 34px rgba(0,0,0,0.14); }
.band-dark .media, .hero .media { border-color: rgba(255,255,255,0.14); }
.media img { display: block; width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.38) contrast(1.05) brightness(0.95); transition: filter 0.5s ease, transform 0.7s ease; }
.media:hover img { filter: grayscale(0) contrast(1.03) brightness(1); transform: scale(1.04); }
/* orange-grey duotone wash so photos read as part of the brand */
.media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(155deg, rgba(242,111,39,0.18) 0%, rgba(34,38,42,0.34) 72%); mix-blend-mode: multiply; pointer-events: none; transition: opacity 0.5s ease; }
.media:hover::after { opacity: 0.4; }
.media.wide { aspect-ratio: 16 / 9; }
.media.tall { aspect-ratio: 4 / 5; }
.media.square { aspect-ratio: 1 / 1; }
.media-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.figure figcaption { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12px; color: var(--text-muted); margin-top: 12px; letter-spacing: 0.3px; }
.band-dark .figure figcaption { color: var(--text-on-dark-mut); }

/* Hero photo depth */
.hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; z-index: 0; opacity: 0.13; filter: grayscale(1) contrast(1.15) brightness(0.9); pointer-events: none; }

/* Orchestrated hero entrance (JS on; falls back to static) */
@keyframes heroIn { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.js .hero-content > * { opacity: 0; animation: heroIn 0.7s cubic-bezier(0.2,0.7,0.3,1) forwards; }
.js .hero-content > *:nth-child(1) { animation-delay: 0.06s; }
.js .hero-content > *:nth-child(2) { animation-delay: 0.16s; }
.js .hero-content > *:nth-child(3) { animation-delay: 0.28s; }
.js .hero-content > *:nth-child(4) { animation-delay: 0.40s; }
.js .hero-stats .stat-box { opacity: 0; animation: heroIn 0.7s cubic-bezier(0.2,0.7,0.3,1) forwards; }
.js .hero-stats .stat-box:nth-child(1) { animation-delay: 0.42s; }
.js .hero-stats .stat-box:nth-child(2) { animation-delay: 0.52s; }
.js .hero-stats .stat-box:nth-child(3) { animation-delay: 0.62s; }

/* ====================== Responsive ====================== */
@media (max-width: 980px) {
  .services-grid, .services-grid.two, .why-grid, .casestudy-grid, .corr-wrap, .split, .media-duo, .footer-content { grid-template-columns: 1fr; }
  .split.reverse > .media, .split.reverse > .figure { order: 0; }
  .terminal-wall { grid-template-columns: repeat(2, 1fr); }
  .hero-stats, .metric-row { grid-template-columns: 1fr; }
  .footer-content { grid-template-columns: repeat(2, 1fr); }

  .nav-toggle { display: flex; }
  .main-nav { flex-basis: 100%; margin-left: 0; display: none; }
  .main-nav.open { display: block; }
  .main-nav ul { flex-direction: column; align-items: flex-start; gap: 14px; padding-top: 14px; }
}
@media (max-width: 768px) {
  .hero { padding: 64px 0 44px; }
  .hero-cta { flex-direction: column; }
  .hero-cta .btn-primary, .hero-cta .btn-secondary { text-align: center; }
  section { padding: 58px 0; }
  .footer-content { grid-template-columns: 1fr; }
  .terminal-wall { grid-template-columns: 1fr; }
}

/* ====================== Reduced motion ====================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .term-stream { animation: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .sort-col .sort-row { transform: none !important; transition: none !important; }
  .hero-content > *, .hero-stats .stat-box { animation: none !important; opacity: 1 !important; transform: none !important; }
  .media img { transition: none !important; }
  * { transition: none !important; }
}
