/* ─────────────────────────────────────────────
   Aakash R. — aakashr.com
   Monochrome, quiet, engineering-first.
   ───────────────────────────────────────────── */

:root {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --bg-card: #ffffff;
  --text: #111111;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #2563eb;
  --border: rgba(17, 17, 17, 0.09);
  --border-strong: rgba(17, 17, 17, 0.16);
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.03), 0 4px 16px rgba(17, 17, 17, 0.03);
  --shadow-hover: 0 2px 4px rgba(17, 17, 17, 0.04), 0 12px 32px rgba(17, 17, 17, 0.07);
  --nav-bg: rgba(255, 255, 255, 0.72);
  --grid-line: rgba(17, 17, 17, 0.045);
  --grid-line-strong: rgba(17, 17, 17, 0.13);
  --page-bg: #ffffff;
  --code-bg: #0d0f14;
  --radius: 16px;
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --font-sans: "Geist", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

:root[data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-alt: #0f0f10;
  --bg-card: #111113;
  --text: #f5f5f5;
  --text-secondary: #9b9b9b;
  --text-muted: #6e6e6e;
  --accent: #4f83f1;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.25), 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.4);
  --nav-bg: rgba(10, 10, 10, 0.72);
  --grid-line: rgba(255, 255, 255, 0.05);
  --grid-line-strong: rgba(255, 255, 255, 0.15);
  --page-bg: #0a0a0a;
  --code-bg: #0d0f14;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  overflow-x: clip;
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.mono { font-family: var(--font-mono); }

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.container.narrow { max-width: 760px; }

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

::selection { background: rgba(37, 99, 235, 0.15); }

/* Keyboard focus — visible ring, never on mouse click */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.hero :focus-visible { outline-color: var(--glitch-cyan); }
:focus:not(:focus-visible) { outline: none; }

/* Skip link */
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 200;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  font-size: 14px;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus { transform: none; }

/* ───────────── Reveal animations ───────────── */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ───────────── Navigation ───────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease);
}

.nav.scrolled { border-bottom-color: var(--border); }

.nav-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.nav-logo-mark {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: var(--text);
  color: var(--bg);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.nav-links {
  display: flex;
  gap: 4px;
}

.nav-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border-radius: 8px;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active {
  color: var(--text);
  background: var(--border);
}

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

.theme-toggle {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.theme-toggle:hover { color: var(--text); border-color: var(--border-strong); }

.icon-moon { display: none; }
:root[data-theme="dark"] .icon-moon { display: block; }
:root[data-theme="dark"] .icon-sun { display: none; }

/* Mobile menu button + panel */

.nav-burger {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.nav-burger span {
  width: 15px;
  height: 1.6px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
}

.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(5.6px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-5.6px) rotate(-45deg); }

.mobile-menu {
  border-top: 1px solid var(--border);
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  overflow: hidden;
}

.mobile-menu[hidden] { display: none; }

.mobile-menu nav {
  display: flex;
  flex-direction: column;
  padding: 8px 24px 16px;
}

.mobile-menu a {
  padding: 13px 4px;
  font-size: 16px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  transition: color 0.2s var(--ease);
}

.mobile-menu a:last-child { border-bottom: none; }
.mobile-menu a:hover, .mobile-menu a:focus-visible { color: var(--text); }

.mobile-menu.open nav > a {
  animation: menu-item-in 0.4s var(--ease) backwards;
}

@keyframes menu-item-in {
  from { opacity: 0; transform: translateY(-6px); }
}

/* ───────────── Buttons ───────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease), border-color 0.2s var(--ease),
              color 0.2s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--text);
  color: var(--bg);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  transform: translateY(-1px);
}

.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 8px; }

@media (max-width: 800px) {
  .nav-links { display: none; }
  .nav-cta { display: inline-flex; }
  .nav-burger { display: flex; }
}

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

/* ───────────── Hero ───────────── */

/* The hero is always dark — a deliberate cyberpunk break from the theme */
.hero {
  --bg: #0b0d12;
  --bg-alt: #10131a;
  --bg-card: #10131a;
  --text: #f5f5f5;
  --text-secondary: #9ba1ad;
  --text-muted: #6e7480;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --grid-line: rgba(255, 255, 255, 0.05);
  --grid-line-strong: rgba(255, 255, 255, 0.16);
  --glitch-cyan: #2dd9f0;
  --glitch-magenta: #ff2ec4;
  position: relative;
  padding: 120px 0 48px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.g-cyan { color: var(--glitch-cyan); }

/* Ease the dark hero into the page below it */
.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 72px;
  background: linear-gradient(to bottom, transparent, var(--page-bg));
  pointer-events: none;
  z-index: 3;
}

.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 90% 80% at 50% 0%, black 30%, transparent 75%);
  pointer-events: none;
}

/* Cursor spotlight: a second, stronger grid revealed around the pointer */
.hero-grid-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line-strong) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(260px at var(--mx, -999px) var(--my, -999px), black, transparent 70%);
  mask-image: radial-gradient(260px at var(--mx, -999px) var(--my, -999px), black, transparent 70%);
}

/* CRT scanlines */
.glitch-scan {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 4px);
  opacity: 0.75;
}

/* Animated static */
.glitch-noise {
  position: absolute;
  inset: -12%;
  pointer-events: none;
  opacity: 0.09;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='240' height='240' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: noise-shift 0.4s steps(4) infinite;
}

@keyframes noise-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-2%, 1%); }
  50% { transform: translate(1%, -2%); }
  75% { transform: translate(-1%, 2%); }
  100% { transform: translate(2%, -1%); }
}

/* Flickering glitch bands */
.glitch-bars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.glitch-bars i {
  position: absolute;
  left: -5%;
  width: 110%;
  height: 3px;
  opacity: 0;
  background: linear-gradient(90deg, transparent 5%, rgba(45, 217, 240, 0.55) 30%, rgba(255, 46, 196, 0.5) 70%, transparent 95%);
  animation: bar-flicker 3.2s linear infinite;
}

.glitch-bars i:nth-child(1) { top: 16%; animation-delay: 0s; }
.glitch-bars i:nth-child(2) { top: 34%; height: 2px; animation-delay: 1.3s; }
.glitch-bars i:nth-child(3) { top: 52%; height: 5px; animation-delay: 2.4s; }
.glitch-bars i:nth-child(4) { top: 68%; height: 2px; animation-delay: 3.1s; }
.glitch-bars i:nth-child(5) { top: 84%; height: 4px; animation-delay: 4.2s; }

@keyframes bar-flicker {
  0%, 88%, 100% { opacity: 0; transform: none; }
  89% { opacity: 1; transform: translateX(-28px) scaleY(1.6); }
  91% { opacity: 0.55; transform: translateX(18px); }
  93% { opacity: 0.8; transform: translateX(-8px); }
  94% { opacity: 0; }
}

.hero-inner {
  position: relative;
}

.hero-copy { max-width: 700px; }

/* Cyan/magenta glitch copies of the headline (injected by JS) */
.hero-title { position: relative; }

.hero-title .g-copy {
  position: absolute;
  inset: 0;
  pointer-events: none;
  user-select: none;
  opacity: 0;
  mix-blend-mode: screen;
  text-shadow: none;
}

.hero-title .g-copy.c1 { color: var(--glitch-cyan); animation: glitch-a 2.6s linear infinite; }
.hero-title .g-copy.c2 { color: var(--glitch-magenta); animation: glitch-b 2.6s linear infinite 0.08s; }

.hero-title:hover .g-copy.c1 { animation-duration: 0.8s; }
.hero-title:hover .g-copy.c2 { animation-duration: 0.8s; }

@keyframes glitch-a {
  0%, 84.9%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  85% { opacity: 1; clip-path: inset(4% 0 68% 0); transform: translate(-9px, -3px); }
  88% { opacity: 1; clip-path: inset(58% 0 12% 0); transform: translate(8px, 2px); }
  91% { opacity: 1; clip-path: inset(28% 0 42% 0); transform: translate(-6px, 0); }
  94% { opacity: 1; clip-path: inset(74% 0 4% 0); transform: translate(9px, 3px); }
  95% { opacity: 0; }
}

@keyframes glitch-b {
  0%, 84.9%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 0 0); }
  85% { opacity: 0.95; clip-path: inset(62% 0 8% 0); transform: translate(9px, 3px); }
  88% { opacity: 0.95; clip-path: inset(10% 0 64% 0); transform: translate(-8px, -2px); }
  91% { opacity: 0.95; clip-path: inset(44% 0 30% 0); transform: translate(6px, 0); }
  94% { opacity: 0.95; clip-path: inset(2% 0 80% 0); transform: translate(-9px, -3px); }
  95% { opacity: 0; }
}

/* base headline snaps sideways during the burst window */
@keyframes glitch-skew {
  0%, 84.9%, 95.1%, 100% { transform: none; }
  85% { transform: skewX(-2.5deg) translateX(-2px); }
  88% { transform: skewX(1.8deg) translateX(2px); }
  91% { transform: skewX(-1deg); }
  95% { transform: none; }
}

.eyebrow-cursor {
  height: 12px;
  width: 7px;
  background: var(--glitch-cyan);
}

@media (prefers-reduced-motion: reduce) {
  .glitch-noise, .glitch-bars i, .hero-title, .hero-title .g-copy { animation: none; }
  .hero-title .g-copy { opacity: 0; }
  .hero-title { text-shadow: none; }
}

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.hero-title {
  font-family: "Orbitron", var(--font-sans);
  text-transform: uppercase;
  font-size: clamp(26px, 3.6vw, 46px);
  line-height: 1.22;
  letter-spacing: 0.02em;
  font-weight: 700;
  margin-bottom: 24px;
  /* permanent chromatic aberration */
  text-shadow:
    1.5px 0 rgba(45, 217, 240, 0.4),
    -1.5px 0 rgba(255, 46, 196, 0.35);
  animation: glitch-skew 2.6s linear infinite;
}

.hero-sub {
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 20px;
}

.hero-tags {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 36px;
}

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Trust bar */

.trust-bar {
  margin-top: 56px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
}

.trust-item {
  font-size: 13.5px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.trust-item strong { color: var(--text); font-weight: 600; }

.trust-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

.stars {
  color: var(--accent);
  letter-spacing: 2px;
  font-size: 13px;
}

/* ───────────── Sections ───────────── */

.section { padding: 112px 0; }
.section-tight { padding: 88px 0; }

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head { margin-bottom: 56px; max-width: 640px; }

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  font-weight: 700;
}

/* ───────────── Cards ───────────── */

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              border-color 0.25s var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--border-strong);
}

/* ───────────── About ───────────── */

.about-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.6fr;
  gap: 64px;
  align-items: start;
}

.about-text p {
  color: var(--text-secondary);
  font-size: 16.5px;
  margin-bottom: 20px;
}

.about-text p:first-child {
  color: var(--text);
  font-size: 19px;
  font-weight: 500;
}

/* Reading sweep: lead sentence fills from muted to full as you scroll */
.about-text p.sweep {
  color: transparent;
  background-image: linear-gradient(
    90deg,
    var(--text) var(--sweep, 0%),
    var(--text-muted) calc(var(--sweep, 0%) + 8%)
  );
  -webkit-background-clip: text;
  background-clip: text;
}

.about-facts {
  display: grid;
  gap: 24px;
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-alt);
}

.fact-label {
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.fact-value { font-size: 15px; font-weight: 500; }

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  margin-right: 8px;
  animation: pulse-dot 2.4s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ───────────── Services ───────────── */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.service-card { padding: 32px; }

.service-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text);
  display: grid;
  place-items: center;
  margin-bottom: 20px;
}

.service-card h3 {
  font-size: 18px;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.service-card > p {
  font-size: 14.5px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.service-tags, .tech-tags, .stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-tags li, .tech-tags li, .stack-tags li {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
  background: var(--bg);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease);
}

.service-tags li:hover, .stack-tags li:hover { border-color: var(--text-muted); color: var(--text); }

/* ───────────── Case studies ───────────── */

.latest-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 22px;
  margin-bottom: 24px;
}

.latest-strip:hover { transform: none; }

.latest-badge {
  flex-shrink: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
}

.latest-strip p { font-size: 14px; color: var(--text-secondary); }

.latest-strip strong { color: var(--text); font-weight: 600; }

.case {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 24px;
}

.case-visual {
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px) 0 0 calc(var(--radius) - 1px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  min-height: 320px;
}

.case-reverse .case-visual {
  order: 2;
  border-right: none;
  border-left: 1px solid var(--border);
  border-radius: 0 calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0;
}

.case-body { padding: 40px; }

.case-kicker {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 12px;
}

.case-body h3, .case-sm-body h3 {
  font-size: 22px;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.case-summary {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 22px;
}

.case-meta {
  display: grid;
  gap: 14px;
  margin-bottom: 22px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-alt);
}

.case-meta dt {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 2px;
}

.case-meta dd { font-size: 14px; color: var(--text-secondary); }

.case .tech-tags { margin-bottom: 24px; }

.case-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.case-cta span { transition: transform 0.2s var(--ease); }
.case-cta:hover span { transform: translateX(3px); }

/* Architecture diagram */

.arch-diagram { width: 100%; max-width: 560px; }

.arch-node rect {
  fill: var(--bg-card);
  stroke: var(--border-strong);
  stroke-width: 1;
}

.arch-node-accent rect { stroke: var(--accent); }

.arch-title {
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 600;
  fill: var(--text);
}

.arch-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  fill: var(--text-muted);
}

.arch-arrow { stroke: var(--text-muted); stroke-width: 1.2; }
.arch-arrowhead { fill: var(--text-muted); }
.arch-dashed { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 3 4; }

/* Terminal detection-report mock */

.term-mock {
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: var(--code-bg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.term-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.term-head .table-dot { background: rgba(255, 255, 255, 0.15); }

.term-title { margin-left: 8px; }

.term-body { padding: 18px; }

.term-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 7px;
}

.term-label { font-size: 11.5px; color: #d4d8e0; }

.term-verdict { font-size: 11px; white-space: nowrap; }
.term-verdict.ok { color: #4ade80; }
.term-verdict.bad { color: #f87171; }

.term-bar {
  height: 6px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.07);
  margin-bottom: 16px;
  overflow: hidden;
}

.term-bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: 3px;
}

.term-bar i.ok { background: #4ade80; }
.term-bar i.bad { background: #f87171; }

.term-signals {
  font-size: 10px;
  line-height: 1.8;
  color: #e5c07b;
  margin-bottom: 14px;
}

.term-foot {
  display: flex;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
}

/* Revenue dashboard mock */

.dash-mock {
  width: 100%;
  max-width: 380px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  padding: 20px 22px;
  box-shadow: var(--shadow);
}

.dash-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.dash-label, .dash-range {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.dash-value {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 14px;
}

.dash-chart { width: 100%; height: 90px; display: block; }

.dash-area { fill: var(--accent); opacity: 0.08; }

.dash-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.dash-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Mini pipeline mock */

.pipe-mock {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
}

.pipe-node {
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--bg-card);
  padding: 7px 12px;
  color: var(--text-secondary);
}

.pipe-node.pipe-accent { border-color: var(--accent); color: var(--text); }

.pipe-arrow { color: var(--text-muted); }

.pipe-stat {
  width: 100%;
  text-align: center;
  margin-top: 10px;
  color: var(--accent);
  font-size: 10.5px;
}

/* Table mock */

.table-mock {
  width: 100%;
  max-width: 440px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  overflow: hidden;
  font-size: 11.5px;
  box-shadow: var(--shadow);
}

.table-mock-head, .code-panel-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11px;
}

.table-mock-title { margin-left: 8px; }

.table-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border-strong);
}

.table-mock table { width: 100%; border-collapse: collapse; }

.table-mock th {
  text-align: left;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
}

.table-mock td {
  padding: 7px 14px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}

.table-mock td.ok { color: #16a34a; }

.table-mock-foot {
  display: flex;
  justify-content: space-between;
  padding: 9px 14px;
  color: var(--text-muted);
  font-size: 10.5px;
}

/* Compact case grid */

.case-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.case-sm { position: relative; }

.case-sm-visual {
  height: 170px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.case-sm-body { padding: 28px; }

.case-sm-body h3 { font-size: 18px; }

.case-sm-body > p {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}

.w40 { width: 40%; } .w45 { width: 45%; } .w55 { width: 55%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; }

/* Kanban mock */

.kanban-mock { display: flex; gap: 12px; }

.kanban-col {
  width: 74px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
}

.kanban-label {
  display: block;
  font-size: 9.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.kanban-card {
  height: 22px;
  border-radius: 6px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  margin-bottom: 6px;
}

.kanban-card.accent { border-color: var(--accent); background: rgba(37, 99, 235, 0.07); }

/* Steps mock */

.steps-mock { display: grid; gap: 14px; width: 220px; }

.steps-mock-row { display: flex; align-items: center; gap: 12px; }

.check {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  background: var(--text);
  color: var(--bg);
}

.check.pending {
  background: transparent;
  border: 1px dashed var(--text-muted);
  color: var(--text-muted);
}

.steps-line { height: 7px; border-radius: 4px; background: var(--border-strong); }

/* Chart mock */

.chart-mock {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 110px;
}

.chart-bar {
  width: 26px;
  height: var(--h);
  border-radius: 6px 6px 2px 2px;
  background: var(--border-strong);
  transition: height 0.8s var(--ease);
}

.chart-bar.accent { background: var(--accent); opacity: 0.85; }

/* ───────────── Gift wrap (injected by JS) ─────────────
   Each project ships wrapped in monochrome paper; scrolling tears it away. */

.giftwrap {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
}

.giftwrap-half {
  position: absolute;
  top: -1%;
  bottom: -1%;
  width: 56%;
  background-color: #f6f4ef;
  background-size: 56px 56px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  will-change: transform;
}

.giftwrap-half.gw-left {
  left: -1%;
  z-index: 2;
  border-radius: var(--radius) 0 0 var(--radius);
  clip-path: polygon(0 0, 94% 0, 100% 4%, 95% 10%, 100% 16%, 94% 22%, 99% 28%, 94% 34%, 100% 40%, 95% 46%, 100% 52%, 94% 58%, 99% 64%, 95% 70%, 100% 76%, 94% 82%, 99% 88%, 95% 94%, 100% 100%, 0 100%);
}

.giftwrap-half.gw-right {
  right: -1%;
  z-index: 1;
  border-radius: 0 var(--radius) var(--radius) 0;
  clip-path: polygon(100% 0, 6% 0, 0% 4%, 5% 10%, 0% 16%, 6% 22%, 1% 28%, 6% 34%, 0% 40%, 5% 46%, 0% 52%, 6% 58%, 1% 64%, 5% 70%, 0% 76%, 6% 82%, 1% 88%, 5% 94%, 0% 100%, 100% 100%);
}

.gw-dark { background-color: #141414; }

/* Royal monochrome papers — one per project */

.gw-damask {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 6 46 28 28 50 10 28Z' fill='none' stroke='%23141414' stroke-width='1.4'/%3E%3Cpath d='M28 16 38 28 28 40 18 28Z' fill='none' stroke='%23141414'/%3E%3Ccircle cx='28' cy='28' r='2.5' fill='%23141414'/%3E%3Ccircle cx='0' cy='0' r='2' fill='%23141414'/%3E%3Ccircle cx='56' cy='0' r='2' fill='%23141414'/%3E%3Ccircle cx='0' cy='56' r='2' fill='%23141414'/%3E%3Ccircle cx='56' cy='56' r='2' fill='%23141414'/%3E%3C/svg%3E");
}

.gw-fleur {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 8c4 8 10 10 10 17a10 10 0 0 1-20 0c0-7 6-9 10-17z' fill='none' stroke='%23f6f4ef' stroke-width='1.4'/%3E%3Cpath d='M18 42h20M28 35v10' stroke='%23f6f4ef' stroke-width='1.4'/%3E%3C/svg%3E");
}

.gw-quatrefoil {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23141414' stroke-width='1.3'%3E%3Ccircle cx='28' cy='17' r='10'/%3E%3Ccircle cx='39' cy='28' r='10'/%3E%3Ccircle cx='28' cy='39' r='10'/%3E%3Ccircle cx='17' cy='28' r='10'/%3E%3C/g%3E%3C/svg%3E");
}

.gw-medallion {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23141414' stroke-width='1.3'%3E%3Ccircle cx='28' cy='28' r='17'/%3E%3Ccircle cx='28' cy='28' r='10'/%3E%3Ccircle cx='28' cy='28' r='3.5'/%3E%3Cpath d='M28 4v7M28 45v7M4 28h7M45 28h7'/%3E%3C/g%3E%3C/svg%3E");
}

.gw-chevron {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23f6f4ef' stroke-width='1.4'%3E%3Cpath d='M0 14 14 4l14 10L42 4l14 10'/%3E%3Cpath d='M0 34 14 24l14 10 14-10 14 10'/%3E%3Cpath d='M0 54 14 44l14 10 14-10 14 10'/%3E%3C/g%3E%3C/svg%3E");
}

.gw-scallop {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg fill='none' stroke='%23141414' stroke-width='1.3'%3E%3Cpath d='M0 14a14 14 0 0 1 28 0 14 14 0 0 1 28 0'/%3E%3Cpath d='M-14 42a14 14 0 0 1 28 0 14 14 0 0 1 28 0 14 14 0 0 1 28 0'/%3E%3C/g%3E%3C/svg%3E");
}

.gw-vine {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M-4 60 60-4M-4 32 32-4M24 60 60 24' fill='none' stroke='%23141414' stroke-width='1.2'/%3E%3Ccircle cx='14' cy='42' r='2.5' fill='%23141414'/%3E%3Ccircle cx='42' cy='14' r='2.5' fill='%23141414'/%3E%3C/svg%3E");
}

.gw-star {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cg stroke='%23f6f4ef' stroke-width='1.3' fill='none'%3E%3Cpath d='M28 14v28M14 28h28M18 18l20 20M38 18 18 38'/%3E%3C/g%3E%3Ccircle cx='28' cy='28' r='3' fill='%23f6f4ef'/%3E%3C/svg%3E");
}

/* ───────────── Stats ───────────── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.stat {
  background: var(--bg);
  padding: 40px 32px;
  transition: background 0.25s var(--ease);
}

.stat:hover { background: var(--bg-alt); }

.stat-value {
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 8px;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ───────────── Approach ───────────── */

.approach-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px 32px;
  margin-bottom: 64px;
}

.approach-num {
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 14px;
}

.approach-step h3 {
  font-size: 16.5px;
  letter-spacing: -0.015em;
  margin-bottom: 10px;
}

.approach-step p {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Code panel */

.code-panel {
  background: var(--code-bg);
  border-color: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.code-panel:hover { transform: none; }

.code-panel-head {
  border-bottom-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
}

.code-panel-head .table-dot { background: rgba(255, 255, 255, 0.15); }

.code-panel pre {
  padding: 24px 28px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.75;
  color: #d4d8e0;
}

.code-panel .c { color: #5c6370; }
.code-panel .k { color: #c678dd; }
.code-panel .f { color: #61afef; }
.code-panel .t { color: #e5c07b; }
.code-panel .s { color: #98c379; }
.code-panel .n { color: #d19a66; }

/* ───────────── Stack ───────────── */

.stack-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}

.stack-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Terminal print-out */

.stack-terminal {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin: -28px 0 44px;
}

.stack-prompt { color: var(--accent); }

.stack-cursor {
  display: inline-block;
  width: 8px;
  height: 15px;
  margin-left: 3px;
  vertical-align: -2px;
  background: var(--text-secondary);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink { 50% { opacity: 0; } }

.print-hidden {
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}

.print-hidden.printed {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .stack-cursor { animation: none; }
  .print-hidden { opacity: 1; transform: none; transition: none; }
}

/* ───────────── Testimonials ───────────── */

/* Cycling marquee — big, bold, linear */

.marquee {
  overflow: hidden;
  margin: 0 calc(50% - 50vw) 56px;
  padding: 8px 0 16px;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 28s linear infinite;
}

.marquee-group {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-right: 48px;
  white-space: nowrap;
}

.marquee-group span {
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.m-outline {
  color: transparent;
  -webkit-text-stroke: 1.5px var(--text);
}

.m-star {
  color: var(--accent);
  font-size: clamp(22px, 2.6vw, 32px) !important;
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Testimonials as a slow horizontal feed */

.testimonial-feed {
  overflow: hidden;
  margin: 0 calc(50% - 50vw);
  padding: 8px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 6%, black 94%, transparent);
}

.feed-track {
  display: flex;
  width: max-content;
  animation: marquee 52s linear infinite;
}

.testimonial-feed:hover .feed-track { animation-play-state: paused; }

.feed-group {
  display: flex;
  gap: 20px;
  padding-right: 20px;
}

.testimonial {
  padding: 36px;
  width: min(520px, 82vw);
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .feed-track { animation: none; }
  .testimonial-feed { overflow-x: auto; }
}

.testimonial .stars { font-size: 15px; margin-bottom: 18px; }

.testimonial blockquote {
  font-size: 16.5px;
  line-height: 1.7;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}

.testimonial figcaption {
  display: grid;
  gap: 2px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}

.testimonial-name { font-size: 14px; font-weight: 600; }

.testimonial-role { font-size: 13px; color: var(--text-muted); }

/* ───────────── Beyond ───────────── */

.beyond-text {
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 640px;
}

/* ───────────── Contact ───────────── */

.contact-panel {
  position: relative;
  padding: 72px 64px;
  text-align: center;
  overflow: hidden;
}

.contact-panel:hover { transform: none; }

.contact-grid-bg {
  -webkit-mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, black 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 90% at 50% 50%, black 20%, transparent 75%);
}

.contact-panel > * { position: relative; }

.contact-panel .section-title { margin: 0 auto 18px; }

.contact-sub {
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 32px;
}

.contact-panel .hero-actions { justify-content: center; margin-bottom: 48px; }

.contact-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}

.contact-links a {
  display: grid;
  gap: 2px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease),
              box-shadow 0.2s var(--ease);
}

.contact-links a:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.contact-links strong { font-size: 14px; font-weight: 600; }

.contact-links span { font-size: 12.5px; color: var(--text-muted); }

/* ───────────── Paper plane ───────────── */

#paper-plane {
  position: fixed;
  top: 0;
  left: 0;
  width: 34px;
  height: 34px;
  fill: var(--accent);
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  filter: drop-shadow(0 4px 10px rgba(37, 99, 235, 0.25));
}

#paper-plane.flying { opacity: 1; }

#paper-plane.landed {
  position: absolute;
  opacity: 1;
  animation: perch 3.4s ease-in-out infinite;
}

@keyframes perch {
  0%, 100% { transform: rotate(-12deg) translateY(0); }
  50% { transform: rotate(-12deg) translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
  #paper-plane { display: none; }
}

/* ───────────── Footer ───────────── */

.footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}

.footer-note { font-size: 11.5px; }

/* ───────────── Responsive ───────────── */

@media (max-width: 960px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .approach-grid { grid-template-columns: repeat(2, 1fr); }
  .stack-grid { grid-template-columns: repeat(2, 1fr); gap: 40px 24px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid .stat:last-child { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .section { padding: 80px 0; }
  .hero { padding: 64px 0 40px; }
  .services-grid, .case-grid { grid-template-columns: 1fr; }
  .case { grid-template-columns: 1fr; }
  .case-visual {
    border-right: none;
    border-bottom: 1px solid var(--border);
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
    min-height: 240px;
  }
  .case-reverse .case-visual {
    order: 0;
    border-left: none;
    border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0;
  }
  .case-body { padding: 28px; }
  .contact-panel { padding: 48px 24px; }
  .contact-links { grid-template-columns: 1fr; }
  .trust-bar { justify-content: flex-start; }
  .trust-sep { display: none; }
}

@media (max-width: 480px) {
  .approach-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat { padding: 28px 24px; }
}
