/* ============================================
   NEXCORE — Global styles
   Dark-first, electric blue/cyan accent
   ============================================ */

:root {
  /* THEME (overridden by [data-theme]) */
  --bg-0: #050810;
  --bg-1: #0a0f1c;
  --bg-2: #0e1526;
  --surface: rgba(255, 255, 255, 0.03);
  --surface-2: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --fg: #f4f7ff;
  --fg-muted: rgba(244, 247, 255, 0.62);
  --fg-dim: rgba(244, 247, 255, 0.38);

  /* ACCENTS — electric blue + cyan */
  --accent-1: #2bd2ff;       /* cyan */
  --accent-2: #4d7cff;       /* electric blue */
  --accent-3: #7c5cff;       /* violet edge */
  --accent-glow: rgba(43, 210, 255, 0.55);
  --accent-grad: linear-gradient(120deg, #2bd2ff 0%, #4d7cff 50%, #7c5cff 100%);
  --accent-grad-soft: linear-gradient(120deg, rgba(43,210,255,.18), rgba(124,92,255,.18));

  /* SPACING (overridden by density) */
  --section-pad: clamp(80px, 11vw, 160px);
  --container: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 18px;
  --radius-lg: 28px;

  /* TYPE */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

html[data-theme="light"] {
  --bg-0: #f6f7fb;
  --bg-1: #eef0f7;
  --bg-2: #e6e9f3;
  --surface: rgba(10, 15, 28, 0.04);
  --surface-2: rgba(10, 15, 28, 0.07);
  --border: rgba(10, 15, 28, 0.10);
  --border-strong: rgba(10, 15, 28, 0.20);
  --fg: #0a0f1c;
  --fg-muted: rgba(10, 15, 28, 0.68);
  --fg-dim: rgba(10, 15, 28, 0.42);
  --accent-glow: rgba(77, 124, 255, 0.45);
}

html[data-density="compact"] {
  --section-pad: clamp(56px, 7vw, 100px);
  --gutter: clamp(16px, 2.5vw, 28px);
  --container: 1240px;
}
html[data-density="airy"] {
  --section-pad: clamp(120px, 16vw, 220px);
  --gutter: clamp(28px, 5vw, 64px);
  --container: 1360px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg-0); color: var(--fg); }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  cursor: none;
}
@media (max-width: 900px) { body { cursor: auto; } }

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

::selection { background: var(--accent-1); color: #001020; }

/* ---------- BACKGROUND LAYERS ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 80px 80px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  opacity: .6;
}
#bg-orbs {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  width: 100%; height: 100%;
}
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: .04; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- CURSOR ---------- */
#cursor-glow {
  position: fixed; top: 0; left: 0; width: 360px; height: 360px;
  margin: -180px 0 0 -180px; pointer-events: none; z-index: 2;
  background: radial-gradient(circle, var(--accent-glow), transparent 60%);
  opacity: .55; transition: opacity .3s, transform .15s ease-out;
  mix-blend-mode: screen;
}
#cursor-dot {
  position: fixed; top: 0; left: 0; width: 10px; height: 10px;
  margin: -5px 0 0 -5px; pointer-events: none; z-index: 9999;
  border-radius: 50%; background: var(--accent-1);
  box-shadow: 0 0 12px var(--accent-1);
  transition: transform .15s ease, width .2s, height .2s, background .2s;
}
#cursor-dot.hover {
  width: 44px; height: 44px; margin: -22px 0 0 -22px;
  background: transparent; border: 1.5px solid var(--accent-1);
  box-shadow: 0 0 0 transparent;
}
@media (max-width: 900px) { #cursor-glow, #cursor-dot { display: none; } }

/* ---------- TICKER ---------- */
.ticker {
  position: relative; z-index: 5;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent);
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--fg-muted);
  padding: 10px 0;
}
.ticker-track {
  display: inline-flex; gap: 48px; white-space: nowrap;
  animation: tickerScroll 60s linear infinite;
}
.ticker-track span { display: inline-block; }
@keyframes tickerScroll {
  to { transform: translateX(-50%); }
}

/* ---------- LAYOUT ---------- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative; z-index: 3;
}
section {
  position: relative; z-index: 3;
  padding: var(--section-pad) 0;
}

/* ---------- TYPOGRAPHY ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--fg-muted);
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  backdrop-filter: blur(8px);
}
.eyebrow::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-1);
  box-shadow: 0 0 8px var(--accent-1);
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: .5; transform: scale(.85); }
}

.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 9vw, 168px);
  line-height: .9;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.h-section {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(40px, 6.5vw, 104px);
  line-height: .92;
  letter-spacing: -0.035em;
}
.h-card {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.text-grad {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.text-stroke {
  -webkit-text-stroke: 1.5px var(--fg);
  color: transparent;
}
html[data-theme="light"] .text-stroke {
  -webkit-text-stroke: 1.5px var(--fg);
}
.text-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-muted);
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 16px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  position: relative;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), background .3s;
  overflow: hidden;
  isolation: isolate;
}
.btn--primary {
  background: var(--accent-grad);
  color: #001020;
  box-shadow: 0 8px 30px -10px var(--accent-glow), 0 0 0 1px rgba(255,255,255,.12) inset;
}
.btn--primary:hover { transform: translateY(-2px) scale(1.02); }
.btn--ghost {
  border: 1px solid var(--border-strong);
  color: var(--fg);
  background: var(--surface);
  backdrop-filter: blur(10px);
}
.btn--ghost:hover {
  background: var(--surface-2);
  border-color: var(--accent-1);
  color: var(--accent-1);
}
.btn .arrow {
  display: inline-flex; width: 20px; height: 20px;
  align-items: center; justify-content: center;
  transition: transform .3s;
}
.btn:hover .arrow { transform: translate(3px, -3px) rotate(0deg); }

/* ---------- NAV ---------- */
.nav {
  position: fixed; top: 36px; left: 0; right: 0;
  z-index: 100;
  display: flex; justify-content: center;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  display: flex; align-items: center; gap: 6px;
  padding: 8px 8px 8px 22px;
  background: rgba(8, 12, 22, 0.65);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255,255,255,.02) inset;
}
html[data-theme="light"] .nav-inner {
  background: rgba(246, 247, 251, 0.7);
}
.nav-logo { display: flex; align-items: center; gap: 12px; padding-right: 16px; border-right: 1px solid var(--border); margin-right: 6px; }
.nav-logo svg { height: 18px; width: auto; color: var(--fg); }
.nav a.nav-link {
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--fg-muted);
  border-radius: 999px;
  position: relative;
  transition: color .25s;
}
.nav a.nav-link:hover { color: var(--fg); }
.nav a.nav-link::before {
  content: ''; position: absolute; inset: 0;
  border-radius: 999px;
  background: var(--surface-2);
  opacity: 0; transition: opacity .25s;
  z-index: -1;
}
.nav a.nav-link:hover::before { opacity: 1; }
.nav .nav-cta {
  margin-left: 6px;
  padding: 10px 18px;
  background: var(--accent-grad);
  color: #001020;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  display: flex; align-items: center;
  padding-top: 140px;
  padding-bottom: 60px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  position: relative;
}
.hero-meta {
  display: flex; flex-wrap: wrap;
  gap: 12px; align-items: center;
  margin-bottom: 32px;
}
.hero-title {
  position: relative;
}
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line span {
  display: inline-block;
  animation: lineRise .9s cubic-bezier(.2,.8,.2,1) both;
}
.hero-title .line:nth-child(2) span { animation-delay: .12s; }
.hero-title .line:nth-child(3) span { animation-delay: .24s; }
.hero-title .line:nth-child(4) span { animation-delay: .36s; }
@keyframes lineRise {
  from { transform: translateY(110%) rotate(2deg); opacity: 0; }
  to { transform: translateY(0) rotate(0); opacity: 1; }
}

.hero-orb {
  position: absolute;
  right: -8%;
  top: 50%;
  width: min(680px, 56vw);
  aspect-ratio: 1;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 0;
}
.hero-orb .ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  animation: orbSpin 30s linear infinite;
}
.hero-orb .ring:nth-child(2) { inset: 8%; animation-duration: 22s; animation-direction: reverse; border-style: dashed; }
.hero-orb .ring:nth-child(3) { inset: 18%; animation-duration: 18s; }
.hero-orb .core {
  position: absolute; inset: 24%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 30% 30%, rgba(43,210,255,.9), transparent 50%),
    radial-gradient(circle at 70% 70%, rgba(124,92,255,.8), transparent 55%),
    radial-gradient(circle at 50% 50%, rgba(77,124,255,.6), #050810 70%);
  filter: blur(.5px);
  box-shadow:
    0 0 80px var(--accent-glow),
    inset 0 0 80px rgba(124,92,255,.4),
    inset 0 0 200px rgba(0, 20, 40, .8);
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb .core::before {
  content: ''; position: absolute; inset: 10%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.35), transparent 40%);
  mix-blend-mode: overlay;
}
@keyframes orbSpin { to { transform: rotate(360deg); } }
@keyframes orbFloat {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-20px) scale(1.03); }
}

.hero-bottom {
  margin-top: 64px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 32px;
  align-items: end;
  border-top: 1px solid var(--border);
  padding-top: 28px;
}
.hero-bottom .lead {
  max-width: 520px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}
.hero-stat .num {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 56px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.03em;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--fg-muted);
  margin-top: 6px;
}

@media (max-width: 900px) {
  .hero-orb { right: -30%; width: 80vw; opacity: .5; }
  .hero-bottom { grid-template-columns: 1fr; gap: 20px; }
}

/* ---------- SECTION HEADER ---------- */
.sec-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: end;
  margin-bottom: 64px;
  position: relative;
}
.sec-head .num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: .2em;
  margin-bottom: 16px;
  display: block;
}
.sec-head .desc {
  max-width: 460px;
  color: var(--fg-muted);
  font-size: 15px;
  line-height: 1.6;
}
@media (max-width: 800px) {
  .sec-head { grid-template-columns: 1fr; }
}

/* ---------- ABOUT / STATS ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: start;
}
.about-copy {
  font-family: var(--font-display);
  font-size: clamp(24px, 2.5vw, 38px);
  line-height: 1.18;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--fg);
}
.about-copy .accent { color: var(--accent-1); }
.about-features {
  display: grid; gap: 14px;
  margin-top: 32px;
}
.about-features li {
  list-style: none;
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  font-size: 15px;
  transition: all .35s;
}
.about-features li:hover {
  background: var(--surface-2);
  border-color: var(--accent-1);
  transform: translateX(4px);
}
.about-features li::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-1); box-shadow: 0 0 10px var(--accent-1);
  flex-shrink: 0;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.stat {
  padding: 36px 32px;
  background: var(--bg-1);
  position: relative;
  transition: background .35s;
}
.stat:hover { background: var(--bg-2); }
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(48px, 5vw, 80px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--accent-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: flex; align-items: baseline; gap: 4px;
}
.stat .num .suffix { font-size: .5em; color: var(--fg-muted); -webkit-text-fill-color: currentColor; }
.stat .lbl {
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .14em;
  color: var(--fg-muted);
  margin-top: 14px;
}
.stat .bar {
  margin-top: 24px;
  height: 2px; background: var(--border);
  border-radius: 1px;
  position: relative; overflow: hidden;
}
.stat .bar::after {
  content: ''; position: absolute; inset: 0;
  background: var(--accent-grad);
  width: var(--w, 50%);
  animation: barGrow 1.6s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes barGrow { from { width: 0; } }

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

/* ---------- SERVICES ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.service {
  background: var(--bg-1);
  padding: 36px 32px;
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: background .4s;
  cursor: none;
}
.service::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(400px circle at var(--mx, 50%) var(--my, 50%), rgba(43,210,255,.12), transparent 50%);
  opacity: 0; transition: opacity .35s;
  pointer-events: none;
}
.service:hover::before { opacity: 1; }
.service:hover { background: var(--bg-2); }
.service-num {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--fg-dim);
  letter-spacing: .2em;
}
.service-icon {
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--accent-1);
  margin: 16px 0 24px;
  transition: all .35s;
}
.service:hover .service-icon {
  background: var(--accent-grad);
  color: #001020;
  border-color: transparent;
  transform: rotate(-6deg) scale(1.06);
}
.service-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.service-desc {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}
.service-arrow {
  position: absolute; top: 28px; right: 28px;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg-muted);
  transition: all .35s;
}
.service:hover .service-arrow {
  background: var(--accent-1);
  color: #001020;
  border-color: var(--accent-1);
  transform: rotate(-45deg);
}
@media (max-width: 1000px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- PROCESS ---------- */
.process {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  counter-reset: step;
}
.process-step {
  position: relative;
  padding: 28px 26px 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  backdrop-filter: blur(8px);
  overflow: hidden;
  transition: all .4s;
}
.process-step:hover {
  background: var(--surface-2);
  border-color: var(--accent-1);
  transform: translateY(-6px);
}
.process-step::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: var(--accent-grad);
  transform: scaleX(0); transform-origin: left;
  transition: transform .5s;
}
.process-step:hover::before { transform: scaleX(1); }
.process-step .step-num {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent-1);
  letter-spacing: .2em;
  margin-bottom: 56px;
  display: block;
}
.process-step h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.process-step p {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
}
@media (max-width: 1000px) { .process { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .process { grid-template-columns: 1fr; } }

/* ---------- PORTFOLIO ---------- */
.portfolio {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 20px;
}
.case {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: none;
  background: var(--bg-1);
  border: 1px solid var(--border);
  min-height: 360px;
  display: flex; flex-direction: column;
  isolation: isolate;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.case:hover { transform: translateY(-6px); }
.case .case-visual {
  flex: 1; min-height: 220px;
  position: relative;
  overflow: hidden;
}
.case .case-visual::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(0,0,0,.4));
  pointer-events: none;
}
.case .case-meta {
  padding: 24px 24px 26px;
  display: flex; flex-direction: column; gap: 10px;
  border-top: 1px solid var(--border);
  background: var(--bg-1);
}
.case .case-meta .row1 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
}
.case .case-meta h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
}
.case .case-meta .yr {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--fg-dim);
  letter-spacing: .14em;
}
.case .case-meta .tags {
  display: flex; gap: 6px; flex-wrap: wrap;
}
.case .case-meta .tag {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg-muted);
}
.case .arrow-pill {
  position: absolute; top: 20px; right: 20px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(8, 12, 22, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: var(--fg);
  z-index: 2;
  transition: all .35s;
}
.case:hover .arrow-pill {
  background: var(--accent-1);
  color: #001020;
  transform: rotate(-45deg);
  border-color: transparent;
}
.case .case-cat {
  position: absolute; top: 20px; left: 20px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 12px;
  background: rgba(8, 12, 22, 0.7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  z-index: 2;
}
.case-feature { grid-column: span 7; }
.case-half { grid-column: span 5; }
.case-third { grid-column: span 4; }
@media (max-width: 1000px) {
  .case-feature, .case-half, .case-third { grid-column: span 12; }
}

/* Visual canvases for case cards */
.viz {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.viz-1 {
  background:
    radial-gradient(ellipse at 30% 30%, rgba(43,210,255,.25), transparent 55%),
    radial-gradient(ellipse at 70% 70%, rgba(124,92,255,.25), transparent 55%),
    linear-gradient(135deg, #061a2c, #0a0f1c);
}
.viz-2 {
  background:
    radial-gradient(circle at 50% 50%, rgba(77,124,255,.3), transparent 60%),
    linear-gradient(160deg, #0a0f1c, #1a0a2c);
}
.viz-3 {
  background:
    conic-gradient(from 180deg at 60% 40%, rgba(43,210,255,.25), rgba(124,92,255,.18), rgba(43,210,255,.25)),
    #0a0f1c;
}
.viz-4 {
  background:
    radial-gradient(ellipse at 80% 20%, rgba(43,210,255,.35), transparent 50%),
    radial-gradient(ellipse at 20% 80%, rgba(124,92,255,.3), transparent 50%),
    #050810;
}

/* SVG decorative shapes inside viz */
.viz svg.deco {
  width: 80%; height: 80%;
  opacity: .9;
  animation: vizFloat 12s ease-in-out infinite;
}
@keyframes vizFloat {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-10px) rotate(2deg); }
}

/* ---------- TEAM ---------- */
.team {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.member {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-1);
  aspect-ratio: 3/4;
  cursor: none;
  transition: all .4s;
}
.member:hover {
  border-color: var(--accent-1);
  transform: translateY(-4px);
}
.member-portrait {
  position: absolute; inset: 0;
  overflow: hidden;
  transition: transform .6s cubic-bezier(.2,.8,.2,1), filter .4s;
}
.member-portrait::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.18), transparent 50%),
    linear-gradient(180deg, transparent 40%, rgba(5,8,16,.95) 95%);
  mix-blend-mode: normal;
  pointer-events: none;
}
.member:hover .member-portrait {
  transform: scale(1.04);
  filter: saturate(1.15);
}
.member-id {
  position: absolute; top: 18px; left: 18px;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 10px;
  background: rgba(8, 12, 22, .65);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--accent-1);
  z-index: 3;
}
.member-loc {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 10px;
}
.member-skills {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-top: 14px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .5s ease, opacity .5s ease, margin .5s ease;
}
.member:hover .member-skills { max-height: 60px; opacity: 1; }
.skill-pill {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  color: rgba(255,255,255,.85);
  background: rgba(255,255,255,.05);
  backdrop-filter: blur(6px);
}

/* keep old avatar rule but unused */
.member-avatar {
  position: absolute; inset: 0;
  background: var(--avatar-grad, linear-gradient(135deg, #2bd2ff, #4d7cff));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 96px; font-weight: 500;
  color: rgba(0, 16, 32, .85);
  letter-spacing: -0.05em;
}
.member-avatar::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,.25), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(0,0,40,.4), transparent 60%);
  mix-blend-mode: overlay;
}
.member-info {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 22px 24px;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 16, .92) 40%);
  z-index: 2;
}
.member-info h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #fff;
}
.member-info .role {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-top: 6px;
}
.member-info .bio {
  color: rgba(255,255,255,.7);
  font-size: 13px;
  line-height: 1.5;
  margin-top: 12px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height .5s ease, opacity .5s ease, margin .5s ease;
}
.member:hover .bio {
  max-height: 100px;
  opacity: 1;
}
.member-socials {
  position: absolute; top: 18px; right: 18px;
  display: flex; gap: 6px; z-index: 3;
}
.member-socials a {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(8, 12, 22, .7);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-strong);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  font-size: 12px;
  transition: all .25s;
  opacity: 0; transform: translateY(-4px);
}
.member:hover .member-socials a {
  opacity: 1; transform: translateY(0);
}
.member-socials a:hover { background: var(--accent-1); color: #001020; }
.member-socials a:nth-child(2) { transition-delay: .05s; }
.member-socials a:nth-child(3) { transition-delay: .1s; }

@media (max-width: 1000px) { .team { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .team { grid-template-columns: 1fr; aspect-ratio: auto; } }

/* ---------- TESTIMONIALS ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.testimonial {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  position: relative;
  transition: all .4s;
}
.testimonial:hover { background: var(--surface-2); border-color: var(--accent-1); }
.testimonial .quote {
  font-family: var(--font-display);
  font-size: 60px;
  line-height: 1;
  color: var(--accent-1);
  position: absolute;
  top: 16px; right: 24px;
  opacity: .3;
}
.testimonial .stars {
  color: var(--accent-1);
  margin-bottom: 18px;
  font-size: 14px; letter-spacing: 4px;
}
.testimonial .body {
  font-size: 16px;
  line-height: 1.55;
  color: var(--fg);
  margin-bottom: 24px;
}
.testimonial .author {
  display: flex; align-items: center; gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}
.testimonial .ava {
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--accent-grad);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; color: #001020;
}
.testimonial .meta strong { font-weight: 500; font-size: 14px; }
.testimonial .meta span { display: block; font-size: 12px; color: var(--fg-muted); font-family: var(--font-mono); letter-spacing: .12em; }
@media (max-width: 1000px) { .testimonials { grid-template-columns: 1fr; } }

/* ---------- BLOG ---------- */
.blog {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.blog-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-1);
  transition: all .4s;
  cursor: none;
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-1);
}
.blog-card .img {
  height: 200px;
  position: relative;
  overflow: hidden;
}
.blog-card .img-inner {
  position: absolute; inset: 0;
  transition: transform .6s cubic-bezier(.2,.8,.2,1);
}
.blog-card:hover .img-inner { transform: scale(1.05); }
.blog-card .body {
  padding: 24px;
}
.blog-card .meta {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 14px;
}
.blog-card .meta .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-1); }
.blog-card h4 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.blog-card p {
  color: var(--fg-muted);
  font-size: 14px;
  line-height: 1.55;
  margin-top: 12px;
}
@media (max-width: 1000px) { .blog { grid-template-columns: 1fr; } }

/* ---------- CTA ---------- */
.cta {
  position: relative;
  padding: clamp(80px, 12vw, 160px) 0;
  text-align: center;
  overflow: hidden;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 50% 50%, rgba(43,210,255,.25), transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 80%, rgba(124,92,255,.2), transparent 60%);
  pointer-events: none;
}
.cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(56px, 10vw, 180px);
  line-height: .9;
  letter-spacing: -0.045em;
  position: relative;
  margin-bottom: 32px;
}
.cta .tag {
  display: inline-flex;
  margin-bottom: 32px;
}
.cta .lead {
  max-width: 560px;
  margin: 0 auto 40px;
  color: var(--fg-muted);
  font-size: 17px;
  line-height: 1.55;
  position: relative;
}
.cta .actions {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px;
  position: relative;
}

/* ---------- FOOTER ---------- */
.footer {
  position: relative; z-index: 3;
  border-top: 1px solid var(--border);
  padding: 60px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 60px;
}
.footer-brand svg { height: 28px; color: var(--fg); margin-bottom: 18px; }
.footer-brand p { color: var(--fg-muted); font-size: 14px; max-width: 320px; line-height: 1.55; }
.footer-col h5 {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 14px;
  color: var(--fg-muted);
  transition: color .25s;
}
.footer-col a:hover { color: var(--accent-1); }

.footer-bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  color: var(--fg-dim);
}
.footer-mega {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(80px, 18vw, 320px);
  line-height: .85;
  letter-spacing: -0.05em;
  text-align: center;
  background: linear-gradient(180deg, var(--fg) 0%, transparent 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin: 60px 0 -20px;
  user-select: none;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- REVEAL ANIMATIONS ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity .9s cubic-bezier(.2,.8,.2,1), transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(30px); transition: opacity .8s cubic-bezier(.2,.8,.2,1), transform .8s cubic-bezier(.2,.8,.2,1); }
.reveal-stagger.in > *,
.reveal.in .reveal-stagger > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.in > *:nth-child(1),
.reveal.in .reveal-stagger > *:nth-child(1) { transition-delay: 0s; }
.reveal-stagger.in > *:nth-child(2),
.reveal.in .reveal-stagger > *:nth-child(2) { transition-delay: .07s; }
.reveal-stagger.in > *:nth-child(3),
.reveal.in .reveal-stagger > *:nth-child(3) { transition-delay: .14s; }
.reveal-stagger.in > *:nth-child(4),
.reveal.in .reveal-stagger > *:nth-child(4) { transition-delay: .21s; }
.reveal-stagger.in > *:nth-child(5),
.reveal.in .reveal-stagger > *:nth-child(5) { transition-delay: .28s; }
.reveal-stagger.in > *:nth-child(6),
.reveal.in .reveal-stagger > *:nth-child(6) { transition-delay: .35s; }
.reveal-stagger.in > *:nth-child(7),
.reveal.in .reveal-stagger > *:nth-child(7) { transition-delay: .42s; }
.reveal-stagger.in > *:nth-child(8),
.reveal.in .reveal-stagger > *:nth-child(8) { transition-delay: .49s; }
.reveal-stagger.in > *:nth-child(9),
.reveal.in .reveal-stagger > *:nth-child(9) { transition-delay: .56s; }

/* Marquee text inside cases for "live" feel */
.marquee-soft {
  position: absolute; bottom: 0; left: 0; right: 0;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em;
  color: rgba(255,255,255,.5);
  padding: 6px 0;
  border-top: 1px solid rgba(255,255,255,.06);
  background: rgba(0,0,0,.35);
  z-index: 3;
}
.marquee-soft span { display: inline-block; padding-right: 40px; animation: tickerScroll 25s linear infinite; }

/* ---------- TWEAKS PANEL ---------- */
.tweaks-panel {
  position: fixed; right: 20px; bottom: 20px;
  z-index: 200;
  background: rgba(8, 12, 22, 0.85);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  padding: 16px;
  width: 240px;
  font-family: var(--font-body);
  box-shadow: 0 20px 50px -10px rgba(0,0,0,.5);
}
html[data-theme="light"] .tweaks-panel { background: rgba(255,255,255,.85); }
.tweaks-head {
  font-family: var(--font-mono);
  font-size: 11px; letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--accent-1);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.tweaks-row { margin-bottom: 14px; }
.tweaks-row:last-child { margin-bottom: 0; }
.tweaks-label {
  display: block;
  font-size: 12px;
  color: var(--fg-muted);
  margin-bottom: 8px;
  font-family: var(--font-mono);
  letter-spacing: .12em;
  text-transform: uppercase;
}
.tweaks-radio {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  gap: 2px;
}
.tweaks-radio button {
  flex: 1;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  color: var(--fg-muted);
  cursor: none;
  transition: all .25s;
}
.tweaks-radio button.active {
  background: var(--accent-grad);
  color: #001020;
  font-weight: 600;
}
.tweaks-radio button:not(.active):hover { color: var(--fg); }

/* Print/reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001s !important;
    transition-duration: .001s !important;
  }
}

/* ============================================
   MOBILE NAV TOGGLE + MENU
   ============================================ */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  flex-direction: column; gap: 5px;
  border-radius: 999px;
  margin-left: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background .25s;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 1.5px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s;
  transform-origin: center;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.nav-toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0;
  z-index: 95;
  background: rgba(5, 8, 16, 0.96);
  backdrop-filter: blur(28px) saturate(160%);
  display: flex; flex-direction: column;
  justify-content: center;
  padding: 100px 24px 60px;
  gap: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity .4s ease, transform .4s cubic-bezier(.2,.8,.2,1), visibility .4s;
}
html[data-theme="light"] .mobile-menu { background: rgba(246,247,251,.97); }
.mobile-menu.open { opacity: 1; visibility: visible; transform: none; }
.mobile-menu .mm-link {
  display: flex; align-items: baseline; gap: 16px;
  padding: 18px 4px;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: clamp(28px, 7vw, 44px);
  font-weight: 500;
  letter-spacing: -0.025em;
  color: var(--fg);
  transition: color .25s, padding-left .35s;
}
.mobile-menu .mm-link:hover,
.mobile-menu .mm-link:active { color: var(--accent-1); padding-left: 16px; }
.mobile-menu .mm-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--fg-dim);
  min-width: 28px;
}
.mobile-menu .mm-cta {
  margin-top: 28px;
  padding: 16px 24px;
  background: var(--accent-grad);
  color: #001020;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  align-self: flex-start;
  box-shadow: 0 12px 40px -10px var(--accent-glow);
}
.mobile-menu .mm-foot {
  margin-top: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--fg-dim);
}

/* ============================================
   RESPONSIVE — TABLET (≤1024px)
   ============================================ */
@media (max-width: 1024px) {
  :root {
    --section-pad: clamp(64px, 9vw, 110px);
    --gutter: clamp(20px, 3.5vw, 36px);
  }
  .nav { top: 50px; }
  .hero { padding-top: 120px; }
  .h-display { font-size: clamp(42px, 8.5vw, 96px); }
  .h-section { font-size: clamp(36px, 6vw, 72px); }
}

/* ============================================
   RESPONSIVE — MOBILE LANDSCAPE / SMALL TABLET (≤820px)
   ============================================ */
@media (max-width: 820px) {
  /* Nav: hide inline links, show toggle */
  .nav { top: 50px; left: 14px; right: 14px; justify-content: flex-start; }
  .nav-inner {
    padding: 6px 6px 6px 16px;
    width: 100% ;
    max-width: 100%;
    justify-content: space-between;
    overflow: hidden;
  }
  .nav-logo { padding-right: 0; border-right: 0; margin-right: 0; min-width: 0; flex-shrink: 1; overflow: hidden; }
  .nav-logo svg { max-width: 160px; height: 16px; width: auto; }
  .nav .nav-link, .nav .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; flex-shrink: 0; }

  /* Cursor off on touch */
  html {
    overflow-x: hidden;
  }
  body { cursor: auto; overflow: hidden; }
  #cursor-glow, #cursor-dot { display: none; }
  a, button, .btn, .case, .service, .member, .blog-card,
  .nav-link, .nav-cta, .nav-toggle, .tweaks-radio button,
  .footer-col a, .member-socials a, .mobile-menu .mm-link, .mobile-menu .mm-cta { cursor: pointer; }

  /* Ticker */
  .ticker { font-size: 11px; padding: 8px 0; }
  .ticker-track { gap: 28px; }

  /* Hero */
  .hero { padding-top: 110px; padding-bottom: 40px; min-height: auto; }
  .hero-orb { right: -45%; top: 20%; width: 110vw; opacity: .35; transform: none; }
  .hero-meta { gap: 8px; margin-bottom: 24px; }
  .hero-meta .text-mono { display: none; }
  .h-display { font-size: clamp(40px, 11vw, 70px); }
  .hero-bottom .lead { font-size: 16px; }
  .hero-stat { display: none; }

  /* Section header */
  .sec-head { gap: 20px; margin-bottom: 40px; }
  .sec-head .desc { font-size: 14px; max-width: none; }
  .h-section { font-size: clamp(34px, 8vw, 56px); }

  /* About */
  .about-grid { gap: 32px; }
  .about-copy { font-size: clamp(20px, 3.5vw, 26px); }
  .about-features { gap: 10px; margin-top: 24px; }
  .about-features li { padding: 12px 16px; font-size: 14px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 24px 20px; }
  .stat .num { font-size: clamp(36px, 9vw, 56px); }
  .stat .lbl { font-size: 11px; margin-top: 10px; }
  .stat .bar { margin-top: 16px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr 1fr !important; }
  .service { padding: 22px; }
  .service-num { font-size: 11px; }
  .service-icon { width: 48px; height: 48px; margin: 14px 0; }
  .service-icon svg { width: 22px; height: 22px; }
  .service-title { font-size: 18px; }
  .service-desc { font-size: 13px; }

  /* Process */
  .process { grid-template-columns: 1fr 1fr !important; gap: 12px; }
  .process-step { padding: 22px; }
  .process-step h4 { font-size: 22px; }
  .process-step p { font-size: 13px; }

  /* Portfolio — all stack full */
  .portfolio { grid-template-columns: repeat(6, 1fr); gap: 14px; }
  .case-feature, .case-half, .case-third { grid-column: span 6; }
  .case { padding: 18px; }
  .case-visual { aspect-ratio: 16 / 11; }
  .case-meta .row1 h4 { font-size: 18px; }
  .arrow-pill { top: 14px; right: 14px; }

  /* Team */
  .team { grid-template-columns: 1fr 1fr; aspect-ratio: auto; gap: 14px; }
  .member-portrait { aspect-ratio: 4 / 5; }
  .member-info { padding: 16px 16px 18px; }
  .member-info h4 { font-size: 18px; }
  .member-info .bio { font-size: 12px; }
  /* On touch, show bio without hover */
  .member .bio { max-height: 80px; opacity: 1; }
  .member-socials a { opacity: 1; transform: none; width: 28px; height: 28px; font-size: 10px; }

  /* Testimonials */
  .testimonials { grid-template-columns: 1fr !important; gap: 14px; }
  .testimonial { padding: 26px 22px; }
  .testimonial .body { font-size: 16px; }

  /* Blog */
  .blog { grid-template-columns: 1fr !important; gap: 14px; }
  .blog-card .img { aspect-ratio: 16 / 10; }
  .blog-card .body { padding: 20px; }
  .blog-card h4 { font-size: 19px; }

  /* CTA */
  .cta h2 { font-size: clamp(46px, 13vw, 84px); margin-bottom: 24px; }
  .cta .lead { font-size: 15px; padding: 0 8px; }
  .cta .actions { gap: 10px; }
  .cta .actions .btn { width: 100%; max-width: 320px; justify-content: center; }

  /* Footer */
  .footer { padding: 48px 0 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px; margin-bottom: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-mega { font-size: clamp(64px, 22vw, 180px); margin: 32px 0 -10px; }
  .footer-bottom { font-size: 10px; gap: 8px; }

  /* Tweaks */
  .tweaks-panel {
    right: 12px; bottom: 12px; left: 12px;
    width: auto;
    padding: 14px;
    border-radius: 14px;
  }
  .tweaks-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
  .tweaks-label { margin-bottom: 0; flex-shrink: 0; min-width: 70px; font-size: 10px; }
  .tweaks-radio { flex: 1; }
  .tweaks-radio button { padding: 6px; font-size: 11px; }

  /* Buttons */
  .btn { padding: 12px 20px; font-size: 14px; }
}

/* ============================================
   RESPONSIVE — MOBILE PORTRAIT (≤560px)
   ============================================ */
@media (max-width: 560px) {
  :root {
    --section-pad: clamp(48px, 12vw, 80px);
    --gutter: 18px;
    --radius: 14px;
    --radius-lg: 22px;
  }

  /* Hero */
  .hero { padding-top: 100px; padding-bottom: 32px; }
  .hero-orb { right: -55%; width: 130vw; opacity: .28; }
  .h-display { font-size: clamp(38px, 12vw, 58px); letter-spacing: -0.035em; }
  .hero-bottom .lead { font-size: 15px; line-height: 1.55; }
  .hero-bottom > div:last-child { width: 100%; }
  .hero-bottom .btn { width: 100%; justify-content: center; }

  /* Section header */
  .sec-head { margin-bottom: 32px; }
  .sec-head .num { font-size: 11px; margin-bottom: 10px; }
  .h-section { font-size: clamp(32px, 10vw, 48px); }

  /* About */
  .about-copy { font-size: 19px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stat { padding: 20px 16px; }
  .stat .num { font-size: 38px; }

  /* Services single column */
  .services-grid { grid-template-columns: 1fr !important; }
  .service { padding: 20px; min-height: auto; }
  .service-icon { width: 44px; height: 44px; margin: 12px 0; }
  .service-arrow { width: 32px; height: 32px; }

  /* Process single column */
  .process { grid-template-columns: 1fr !important; }
  .process-step { padding: 20px; }
  .process-step h4 { font-size: 20px; }

  /* Portfolio */
  .portfolio { gap: 12px; }
  .case { padding: 16px; }
  .case-cat { font-size: 10px; padding: 5px 10px; }
  .case-visual { aspect-ratio: 4 / 3; }
  .case-meta .row1 { flex-direction: row; align-items: center; }
  .case-meta .row1 h4 { font-size: 17px; }
  .case-meta .yr { font-size: 11px; }
  .tag { font-size: 10px; padding: 4px 8px; }

  /* Team — single column compact */
  .team { grid-template-columns: 1fr; gap: 14px; }
  .member-portrait { aspect-ratio: 16 / 12; }
  .member-info { padding: 18px; }
  .member-info h4 { font-size: 19px; }
  .member-info .bio { max-height: none; opacity: 1; margin-top: 10px; font-size: 13px; }
  .member-skills { margin-top: 10px; }
  .member-id { font-size: 9px; padding: 3px 8px; top: 12px; left: 12px; }
  .member-loc { font-size: 10px; }

  /* Testimonials */
  .testimonial { padding: 22px 18px; }
  .testimonial .body { font-size: 15px; line-height: 1.6; }
  .testimonial .quote { font-size: 80px; }
  .testimonial .ava { width: 40px; height: 40px; font-size: 13px; }

  /* Blog */
  .blog-card .body { padding: 18px; }
  .blog-card h4 { font-size: 18px; }
  .blog-card p { font-size: 13px; }
  .blog-card .meta { font-size: 10px; }

  /* CTA */
  .cta { padding: 64px 0 80px; }
  .cta h2 { font-size: clamp(40px, 14vw, 68px); }
  .cta .tag { margin-bottom: 24px; }
  .cta .lead { font-size: 14px; margin-bottom: 28px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-brand { grid-column: auto; }
  .footer-bottom { justify-content: flex-start; }

  /* Mobile menu */
  .mobile-menu { padding: 90px 20px 40px; }
  .mobile-menu .mm-link { padding: 14px 0; font-size: clamp(26px, 7.5vw, 36px); }

  /* Tweaks panel — make rows stack again on very small */
  .tweaks-panel { padding: 12px; }
  .tweaks-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .tweaks-label { min-width: 0; }
}

/* ============================================
   RESPONSIVE — TINY (≤380px)
   ============================================ */
@media (max-width: 380px) {
  :root { --gutter: 14px; }
  .h-display { font-size: clamp(32px, 13vw, 50px); }
  .h-section { font-size: 30px; }
  .stats { grid-template-columns: 1fr; }
  .nav-inner { padding-left: 12px; }
}

/* ============================================
   LANDSCAPE PHONE
   ============================================ */
@media (max-height: 480px) and (orientation: landscape) {
  .hero { min-height: auto; padding-top: 90px; padding-bottom: 40px; }
  .h-display { font-size: clamp(32px, 7vw, 56px); }
  .mobile-menu { justify-content: flex-start; padding-top: 80px; overflow-y: auto; }
}
