/* ============================================================
   AnsarTech — Main Site
   Builds on /assets/css/tokens.css (AnsarTech design system)
   Concept: Engineered Minimalism. Dark canvas, red scalpel.
   ============================================================ */

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--at-black);
  color: var(--at-white);
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Custom cursor takes over — hide native (kept on inputs by override) */
  cursor: none;
}
@media (hover: none) and (pointer: coarse) {
  body { cursor: auto; }
}
input, textarea { cursor: text; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

::selection { background: var(--at-red); color: var(--at-white); }

/* ============================================================
   SCROLL PROGRESS BAR
   ============================================================ */
.at-progress {
  position: fixed; top: 0; left: 0;
  height: 2px; width: 0%;
  background: var(--at-red);
  z-index: 200;
  transition: width 80ms linear;
  box-shadow: 0 0 12px rgba(217,7,29,0.6);
}

/* ============================================================
   SCROLL REVEAL — base state + revealed state
   Applied via JS observer in App.jsx
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.reveal.r-delay-1 { transition-delay: 80ms; }
.reveal.r-delay-2 { transition-delay: 160ms; }
.reveal.r-delay-3 { transition-delay: 240ms; }
.reveal.r-delay-4 { transition-delay: 320ms; }

/* Case-studies card reveal — directional slide-in */
.at-reveal-card {
  opacity: 0;
  transition: opacity 1100ms var(--ease-out), transform 1100ms var(--ease-out);
}
.at-case-featured.at-reveal-card { transform: translate(-40px, 50px) scale(0.97); }
.at-case-mini.at-reveal-card     { transform: translate(40px, 40px)  scale(0.97); }
.at-reveal-card.is-revealed {
  opacity: 1;
  transform: translate(0, 0) scale(1);
}
.at-case-mini.at-reveal-card:nth-of-type(2) { transition-delay: 220ms; }
/* Stagger stat cells inside the featured card */
.at-case-stat {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms var(--ease-out), transform 600ms var(--ease-out);
}
.at-case-stat.is-revealed { opacity: 1; transform: translateY(0); }
.at-case-stat:nth-child(1) { transition-delay: 240ms; }
.at-case-stat:nth-child(2) { transition-delay: 380ms; }
.at-case-stat:nth-child(3) { transition-delay: 520ms; }
.at-case-stat:nth-child(4) { transition-delay: 660ms; }

/* Floaty drift for big headings */
@keyframes at-float-drift {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}
/* Floaty drift was conflicting with the reveal transform on re-trigger,
   causing a flicker when scrolling back into view. Disabled. */
/* .at-h-section.is-revealed { animation: at-float-drift 7s var(--ease-std) infinite; animation-delay: 1.2s; } */

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   CUSTOM CURSOR
   ============================================================ */
.at-cursor-dot,
.at-cursor-ring {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate3d(-50%, -50%, 0);
  will-change: transform, width, height, background, border-color;
}
.at-cursor-dot {
  width: 4px; height: 4px;
  background: var(--at-off-white);
  border-radius: 999px;
  mix-blend-mode: difference;
}
.at-cursor-ring {
  width: 28px; height: 28px;
  border: 1px solid rgba(247,247,245,0.4);
  border-radius: 999px;
  transition:
    width 220ms var(--ease-out),
    height 220ms var(--ease-out),
    border-color 180ms var(--ease-out),
    background-color 180ms var(--ease-out),
    border-radius 180ms var(--ease-out);
}
.at-cursor-ring.is-hover {
  width: 44px; height: 44px;
  border-color: var(--at-red);
  background: rgba(217,7,29,0.08);
}
.at-cursor-ring.is-text {
  width: 4px; height: 24px;
  border-radius: 2px;
  border-color: var(--at-red);
  background: var(--at-red);
}
.at-cursor-dot.is-hover { background: var(--at-red); mix-blend-mode: normal; }
.at-cursor-label {
  position: fixed; top: 0; left: 0;
  pointer-events: none; z-index: 9999;
  transform: translate3d(-50%, calc(-50% + 32px), 0);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  background: var(--at-red);
  color: var(--at-white);
  padding: 3px 8px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 140ms var(--ease-out);
  white-space: nowrap;
}
.at-cursor-label.is-visible { opacity: 1; }

/* Fading chain-trail behind the cursor */
.at-cursor-trail {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9997;
  background: var(--at-off-white);
  border-radius: 999px;
  transform: translate3d(-50%, -50%, 0);
  transition: background 260ms var(--ease-out);
  will-change: transform;
}
.at-cursor-trail.is-hover {
  background: var(--at-red);
}

/* When the cursor is over a LIGHT section, switch dot + ring + trail to red */
body.cursor-on-light .at-cursor-dot {
  background: var(--at-red);
  mix-blend-mode: normal;
}
body.cursor-on-light .at-cursor-ring {
  border-color: rgba(217,7,29,0.55);
}
body.cursor-on-light .at-cursor-trail {
  background: var(--at-red);
}
/* On the red CTA section, flip everything back to white */
body.cursor-on-red .at-cursor-dot {
  background: var(--at-white);
  mix-blend-mode: normal;
}
body.cursor-on-red .at-cursor-ring {
  border-color: rgba(255,255,255,0.7);
}
body.cursor-on-red .at-cursor-trail {
  background: var(--at-white);
}

@media (hover: none) and (pointer: coarse) {
  .at-cursor-dot, .at-cursor-ring, .at-cursor-label, .at-cursor-trail { display: none; }
}

/* ============================================================
   PAGE LAYOUT PRIMITIVES
   ============================================================ */
.at-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
  z-index: 2;
}
.at-section {
  padding: clamp(80px, 12vh, 144px) 0;
  position: relative;
}
.at-section--light { background: var(--at-off-white); color: var(--at-black); }
.at-section--red { background: var(--at-red); color: var(--at-white); }

.at-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--at-red);
  margin: 0 0 24px;
}
.at-eyebrow::before {
  content: "";
  width: 18px; height: 1px;
  background: var(--at-red);
  display: inline-block;
}
.at-section--light .at-eyebrow { color: var(--at-red); }

.at-h-display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 8vw, 120px);
  line-height: 0.96;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.at-h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.022em;
  margin: 0 0 24px;
  text-wrap: balance;
  color: var(--at-white);
}
/* Light sections — black headings */
.at-cases .at-h-section,
.at-process .at-h-section,
.at-testi .at-h-section,
.at-section--light .at-h-section { color: var(--at-black); }
.at-h3 {
  font-family: var(--font-primary);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  margin: 0;
}
.at-body {
  font-size: 16px;
  line-height: 1.6;
  color: rgba(247,247,245,0.7);
  max-width: 60ch;
  text-wrap: pretty;
}
.at-section--light .at-body { color: var(--at-mid-gray); }
.at-body--lg { font-size: 19px; }
.at-mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Buttons */
.at-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 13px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  cursor: none;
  transition: background 140ms var(--ease-out), border-color 140ms var(--ease-out), color 140ms var(--ease-out);
}
.at-btn i, .at-btn svg { width: 14px; height: 14px; stroke-width: 1.75; }
.at-btn--primary {
  background: var(--at-red);
  color: var(--at-white);
  box-shadow: var(--shadow-red), var(--shadow-inset);
}
.at-btn--primary:hover { background: var(--accent-hover); }
.at-btn--primary:active { background: var(--accent-press); }
.at-btn--ghost {
  background: transparent;
  color: var(--at-white);
  border-color: rgba(255,255,255,0.18);
}
.at-btn--ghost:hover { border-color: var(--at-white); }
.at-btn--ghost-dark {
  background: transparent;
  color: var(--at-black);
  border-color: rgba(14,14,14,0.18);
}
.at-btn--ghost-dark:hover { border-color: var(--at-black); }
.at-btn--icon {
  padding: 11px;
  border-radius: 8px;
  color: rgba(255,255,255,0.7);
  border-color: rgba(255,255,255,0.14);
}
.at-btn--icon:hover { color: var(--at-white); border-color: rgba(255,255,255,0.35); }
.at-btn--icon i, .at-btn--icon svg { width: 16px; height: 16px; }

/* ============================================================
   NAV — solid charcoal, no fade. Red hairline bottom.
   ============================================================ */
.at-nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: var(--at-charcoal);
  border-bottom: 1px solid rgba(217,7,29,0.55);
  transition: padding 220ms var(--ease-out);
}
.at-nav.is-scrolled {
  padding: 12px 32px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.4);
}
.at-nav-brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--at-white);
  font-weight: 600;
  letter-spacing: -0.015em;
  font-size: 16px;
}
.at-nav-brand img {
  width: 32px; height: 32px;
  /* logo-mark.png has red + black on transparent bg — it sits cleanly on charcoal */
}
.at-nav-brand-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.45);
  padding: 3px 8px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  margin-left: 6px;
}
.at-nav-center {
  position: absolute; left: 50%; transform: translateX(-50%);
  display: flex; gap: 30px;
}
.at-nav-center a {
  position: relative;
  font-size: 14px; font-weight: 500;
  color: rgba(255,255,255,0.62);
  padding: 6px 0;
  transition: color 160ms var(--ease-out);
}
.at-nav-center a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 1.5px; background: var(--at-red);
  transition: right 240ms var(--ease-out);
}
.at-nav-center a:hover { color: var(--at-white); }
.at-nav-center a:hover::after { right: 0; }
.at-nav-center a.is-active { color: var(--at-white); }
.at-nav-center a.is-active::after { right: 0; }

.at-nav-right { display: flex; align-items: center; gap: 8px; }

/* ============================================================
   HERO  — left-aligned content, video visible on the right
   ============================================================ */
.at-hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex; align-items: flex-start; justify-content: flex-start;
  padding: clamp(220px, 30vh, 320px) 0 100px;
}
.at-hero-video {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  filter: contrast(1.05) saturate(0.92) brightness(0.7);
  animation: hero-video-drift 30s var(--ease-std) infinite alternate;
}
@keyframes hero-video-drift {
  from { transform: scale(1.04) translateX(0); }
  to   { transform: scale(1.08) translateX(-1.5%); }
}
.at-hero-veil {
  position: absolute; inset: 0; z-index: 1;
  background:
    /* dark on left where text lives, fading right where video shows */
    linear-gradient(90deg, rgba(14,14,14,0.92) 0%, rgba(14,14,14,0.78) 30%, rgba(14,14,14,0.35) 65%, rgba(14,14,14,0.15) 100%),
    /* top & bottom edge protection */
    linear-gradient(180deg, rgba(14,14,14,0.55) 0%, rgba(14,14,14,0) 22%, rgba(14,14,14,0) 70%, rgba(14,14,14,0.95) 100%);
}
/* Ambient red orb — slow drift behind text */
.at-hero-orb {
  position: absolute; z-index: 1;
  width: 720px; height: 720px;
  left: -180px; top: 40%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(217,7,29,0.18), rgba(217,7,29,0) 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: hero-orb-drift 14s var(--ease-std) infinite alternate;
}
@keyframes hero-orb-drift {
  0%   { transform: translate(-20px, -52%) scale(1); opacity: 0.85; }
  100% { transform: translate(40px, -48%) scale(1.12); opacity: 1; }
}
.at-hero-grid {
  position: absolute; inset: 0; z-index: 2;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, black 0%, black 50%, transparent 95%);
  -webkit-mask-image: linear-gradient(90deg, black 0%, black 50%, transparent 95%);
}

.at-hero-inner {
  position: relative; z-index: 3;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0 32px 0 clamp(32px, 6vw, 96px);
  text-align: left;
}
.at-hero-content {
  max-width: 640px;
  text-align: left;
}

/* Status ticker */
.at-ticker {
  display: inline-flex; align-items: center; gap: 12px;
  animation: at-fade-up 600ms var(--ease-out) both;
  animation-delay: 200ms;
  padding: 8px 14px 8px 12px;
  background: rgba(14,14,14,0.55);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  margin-bottom: 28px;
  backdrop-filter: blur(8px);
}
.at-ticker-dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #2EA84A;
  box-shadow: 0 0 0 0 rgba(46,168,74,0.6);
  animation: at-pulse-dot 1.8s var(--ease-std) infinite;
}
@keyframes at-pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(46,168,74,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(46,168,74,0); }
  100% { box-shadow: 0 0 0 0 rgba(46,168,74,0); }
}
.at-ticker-divider { opacity: 0.3; }
.at-ticker-clients {
  display: inline-flex; gap: 18px;
  overflow: hidden;
  width: 320px;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, black 12%, black 88%, transparent 100%);
}
.at-ticker-track {
  display: inline-flex; gap: 18px;
  white-space: nowrap;
  animation: at-marquee 30s linear infinite;
}
@keyframes at-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Hero title with typing animation */
.at-hero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6.4vw, 88px);
  line-height: 0.98;
  letter-spacing: -0.028em;
  margin: 0 0 24px;
  color: var(--at-white);
  /* No text-wrap balance/pretty — the typewriter changes the string every
     keystroke, and dynamic balancing causes words to bounce lines. */
  text-wrap: normal;
  animation: at-fade-up 700ms var(--ease-out) both;
  animation-delay: 380ms;
  text-align: left;
}
@keyframes at-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
.at-hero-title .at-typed {
  display: inline;
}
.at-hero-title .at-typed-accent { color: var(--at-red); }
.at-caret {
  display: inline-block;
  width: 3px; height: 0.85em;
  background: var(--at-red);
  vertical-align: text-bottom;
  margin-left: 6px;
  animation: at-blink 1s steps(2, end) infinite;
  transform: translateY(0.05em);
}
@keyframes at-blink { 50% { opacity: 0; } }

.at-hero-sub {
  font-size: clamp(16px, 1.4vw, 19px);
  line-height: 1.55;
  color: rgba(247,247,245,0.78);
  margin: 0 0 36px;
  max-width: 540px;
  text-align: left;
  animation: at-fade-up 700ms var(--ease-out) both;
  animation-delay: 520ms;
}
.at-hero-sub .at-caret { background: rgba(247,247,245,0.6); height: 0.85em; width: 2px; }

.at-hero-ctas {
  display: inline-flex; align-items: center; gap: 12px;
  margin-bottom: 56px;
  animation: at-fade-up 700ms var(--ease-out) both;
  animation-delay: 680ms;
}

.at-hero-meta {
  display: inline-flex; align-items: center; gap: 24px;
  flex-wrap: wrap;
  animation: at-fade-up 700ms var(--ease-out) both;
  animation-delay: 820ms;
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.4);
}
.at-hero-meta span { display: inline-flex; align-items: center; gap: 8px; }

/* Scroll indicator */
.at-scroll-hint {
  position: absolute;
  bottom: 32px; left: 50%; transform: translateX(-50%);
  z-index: 3;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
}
.at-scroll-hint-line {
  width: 1px; height: 32px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: at-scroll-line 2.2s var(--ease-std) infinite;
}
@keyframes at-scroll-line {
  0% { transform: translateY(-8px); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: translateY(8px); opacity: 0; }
}

/* ============================================================
   "WHAT WE BUILD" — sticky-stack of dark cards
   Each row sticks at a progressively-larger top offset, so they
   pile on top of one another as you scroll past them.
   ============================================================ */
.at-build {
  background: var(--at-charcoal);
  position: relative;
}
.at-build::before {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 15%, black 85%, transparent);
}
.at-build-stack {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 32px;
}
.at-build-row {
  position: sticky;
  top: calc(96px + var(--i, 0) * 22px);
  cursor: none;
  will-change: transform;
}
.at-build-card {
  position: relative;
  background: linear-gradient(180deg, #1A1A1A 0%, #131313 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 56px 56px 48px;
  min-height: 460px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 28px;
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0,0,0,0.55), 0 0 0 1px rgba(217,7,29,0) inset;
  transition:
    border-color 720ms var(--ease-out),
    box-shadow 720ms var(--ease-out),
    transform 520ms var(--ease-out);
}
/* Red overlay that fades in on hover — lives behind text but above the card bg */
.at-build-card::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--at-red) 0%, #9A0814 100%);
  border-radius: inherit;
  opacity: 0;
  transition: opacity 720ms var(--ease-out);
  pointer-events: none;
  z-index: 0;
}
.at-build-row:hover .at-build-card::after { opacity: 1; }
.at-build-row:hover .at-build-card {
  border-color: var(--at-red);
  box-shadow: 0 32px 90px rgba(217,7,29,0.4), 0 0 0 1px rgba(255,255,255,0.08) inset;
  transform: translateY(-4px);
}
/* Slow color fade of every text element to white when card goes red */
.at-build-card-title,
.at-build-card-desc,
.at-build-card-num,
.at-build-card-link,
.at-build-card-tag,
.at-build-card-ghost,
.at-build-card-arrow {
  transition:
    color 720ms var(--ease-out),
    background 720ms var(--ease-out),
    border-color 720ms var(--ease-out);
}
.at-build-row:hover .at-build-card-num {
  color: rgba(255,255,255,0.9);
}
.at-build-row:hover .at-build-card-num::before {
  background: var(--at-white);
  transition: background 720ms var(--ease-out);
}
.at-build-row:hover .at-build-card-tag {
  color: var(--at-white);
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.32);
}
/* Ghost number etched into the card — the visual heavyweight */
.at-build-card-ghost {
  position: absolute;
  right: -20px; bottom: -80px;
  font-family: var(--font-display);
  font-size: 420px;
  font-weight: 600;
  line-height: 0.8;
  color: rgba(255,255,255,0.025);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transition: color 720ms var(--ease-out), transform 600ms var(--ease-out);
}
.at-build-row:hover .at-build-card-ghost {
  color: rgba(255,255,255,0.1);
  transform: translate(-8px, -8px);
}
/* Top row: number + tags */
.at-build-card-top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  position: relative; z-index: 2;
}
.at-build-card-num {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--at-red);
}
.at-build-card-num::before {
  content: ""; display: inline-block;
  width: 22px; height: 1px;
  background: var(--at-red);
}
.at-build-card-tags {
  display: inline-flex; gap: 8px;
}
.at-build-card-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  padding: 5px 10px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
}
/* Middle: title + description */
.at-build-card-body {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 16px;
  align-self: end;
}
.at-build-card-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4.4vw, 56px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.024em;
  color: var(--at-white);
  margin: 0;
  max-width: 18ch;
}
.at-build-row:hover .at-build-card-title { color: var(--at-white); }
.at-build-card-desc {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,0.65);
  margin: 0;
  max-width: 56ch;
}
/* Bottom: link + arrow */
.at-build-card-foot {
  display: flex; justify-content: space-between; align-items: center;
  position: relative; z-index: 2;
}
.at-build-card-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-white);
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.at-build-row:hover .at-build-card-link {
  color: var(--at-white);
  border-color: rgba(255,255,255,0.7);
}
.at-build-card-link svg { transition: transform 380ms var(--ease-out); }
.at-build-row:hover .at-build-card-link svg { transform: translate(4px, -4px); }
.at-build-card-arrow {
  width: 44px; height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.7);
  transition:
    background 720ms var(--ease-out),
    border-color 720ms var(--ease-out),
    color 720ms var(--ease-out),
    transform 520ms var(--ease-out);
}
.at-build-row:hover .at-build-card-arrow {
  background: var(--at-white);
  border-color: var(--at-white);
  color: var(--at-red);
  transform: rotate(45deg);
}

/* ============================================================
   INTEGRATIONS MARQUEE
   ============================================================ */
/* ============================================================
   INTEGRATIONS — DARK (kept dark per user)
   ============================================================ */
.at-int {
  background: var(--at-black);
  color: var(--at-white);
  padding: 80px 0;
  border-top: 1px solid rgba(217,7,29,0.45);
  border-bottom: 1px solid rgba(217,7,29,0.45);
  overflow: hidden;
}
.at-int .at-body { color: rgba(255,255,255,0.6); }
.at-int-head {
  display: flex; align-items: baseline; gap: 24px;
  padding: 0 32px 32px;
  max-width: 1280px;
  margin: 0 auto;
}
.at-int-head .at-eyebrow { margin: 0; }
.at-int-row {
  display: flex; gap: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
  padding: 12px 0;
}
.at-int-track {
  display: flex; gap: 16px;
  white-space: nowrap;
  animation: at-marquee 50s linear infinite;
}
.at-int-track--reverse { animation: at-marquee 60s linear infinite reverse; }
.at-int-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 999px;
  background: rgba(255,255,255,0.02);
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.75);
  transition: border-color 180ms var(--ease-out), color 180ms var(--ease-out);
}
.at-int-chip:hover { border-color: var(--at-red); color: var(--at-white); }
.at-int-chip-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--at-red);
  opacity: 0.85;
}
.at-int-chip-dot--muted {
  background: rgba(255,255,255,0.4);
  opacity: 0.7;
}

/* ============================================================
   CASE STUDIES — LIGHT section (off-white)
   Layout: left = Apex featured (4.2× in red), right = sticky stack.
   Cards stay dark to provide visual anchor on the light surface.
   ============================================================ */
.at-cases {
  background: var(--at-off-white);
  color: var(--at-black);
  position: relative;
  overflow: hidden;
}
.at-cases::before {
  content: "";
  position: absolute;
  top: -120px; left: -120px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(217,7,29,0.1), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.at-cases-head { color: var(--at-black); }
.at-cases-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 24px;
  align-items: start;
}

/* Featured (left) */
.at-case-featured {
  background: linear-gradient(180deg, #1A1A1A 0%, #131316 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 22px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 760px;
  transition: border-color 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.at-case-featured:hover {
  border-color: rgba(217,7,29,0.45);
  box-shadow: 0 32px 80px rgba(0,0,0,0.5);
}
.at-case-featured .at-case-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  margin-bottom: 32px;
}
.at-case-featured .at-case-meta .tag {
  padding: 4px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
}
.at-case-big-num {
  font-family: var(--font-display);
  font-size: clamp(140px, 16vw, 200px);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.88;
  color: var(--at-red);
  margin: 12px 0 4px;
  display: flex; align-items: flex-start; gap: 4px;
}
.at-case-big-num small {
  font-size: 38%;
  font-weight: 500;
  margin-top: 18px;
  letter-spacing: -0.02em;
}
.at-case-big-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-bottom: 36px;
}
.at-case-featured .at-case-h {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.6vw, 36px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--at-white);
  margin: 0 0 18px;
  max-width: 22ch;
}
.at-case-featured .at-case-desc {
  font-size: 16px;
  line-height: 1.55;
  color: rgba(255,255,255,0.7);
  margin: 0 0 28px;
  max-width: 56ch;
}
.at-case-featured .at-case-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-red);
  margin-bottom: 32px;
  align-self: flex-start;
}
.at-case-featured .at-case-link svg { width: 14px; height: 14px; transition: transform 220ms; }
.at-case-featured:hover .at-case-link svg { transform: translate(4px, -4px); }
.at-case-featured .at-case-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 32px;
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.at-case-featured .at-case-stat-num {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--at-white);
  letter-spacing: -0.02em;
  line-height: 1;
}
.at-case-featured .at-case-stat-lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 6px;
}

/* Right column — sticky stack of mini case cards */
.at-cases-stack {
  display: flex; flex-direction: column;
  gap: 18px;
}
.at-case-mini {
  position: sticky;
  top: calc(96px + var(--i, 0) * 18px);
  background: linear-gradient(180deg, #1A1A1A 0%, #131316 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 32px;
  min-height: 370px;
  display: flex; flex-direction: column;
  transition: border-color 320ms var(--ease-out), transform 320ms var(--ease-out), box-shadow 320ms var(--ease-out);
}
.at-case-mini:hover {
  border-color: rgba(217,7,29,0.5);
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(0,0,0,0.5);
}
.at-case-mini-meta {
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-bottom: 28px;
}
.at-case-mini-meta .tag {
  padding: 3px 10px;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 999px;
}
.at-case-mini-num {
  font-family: var(--font-display);
  font-size: clamp(64px, 7vw, 88px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--at-red);
  margin: 0 0 8px;
  display: flex; align-items: flex-start; gap: 6px;
}
.at-case-mini-num small {
  font-size: 32%;
  font-weight: 500;
  margin-top: 10px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.5);
}
.at-case-mini-h {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.22;
  letter-spacing: -0.014em;
  color: var(--at-white);
  margin: 0 0 12px;
  max-width: 22ch;
}
.at-case-mini-desc {
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255,255,255,0.65);
  margin: 0 0 auto;
}
.at-case-mini-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-red);
  margin-top: 24px;
  align-self: flex-start;
}
.at-case-mini-link svg { width: 12px; height: 12px; transition: transform 220ms; }
.at-case-mini:hover .at-case-mini-link svg { transform: translate(3px, -3px); }

/* ============================================================
   STATEMENT — DARK + pulsing red halo
   ============================================================ */
.at-statement {
  background: #07070A;
  color: var(--at-white);
  position: relative;
  padding: 160px 0;
  overflow: hidden;
}
.at-statement::before {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  width: 1200px; height: 1200px;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(217,7,29,0.22) 0%, rgba(217,7,29,0.08) 30%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: statement-halo 8s var(--ease-std) infinite;
}
@keyframes statement-halo {
  0%, 100% { opacity: 0.7; transform: translate(-50%, -50%) scale(1); }
  50%      { opacity: 1;   transform: translate(-50%, -50%) scale(1.08); }
}
.at-statement-frame {
  max-width: 1080px; margin: 0 auto;
  position: relative;
  padding: 0 80px;
  text-align: center;
}
/* The section itself gets .reveal from the observer so we can hook label/attr
   animations off its .is-revealed state — but we don't actually want the whole
   section to fade in. Cancel the parent fade; children still animate. */
.at-statement.reveal { opacity: 1; transform: none; }

.at-statement-label {
  position: absolute;
  top: 50%;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  writing-mode: vertical-rl;
  opacity: 0;
  transition: opacity 800ms var(--ease-out) 200ms, transform 800ms var(--ease-out) 200ms;
}
.at-statement-label--left  { left: 0;  transform: translateY(-50%) rotate(180deg) translateX(-30px); }
.at-statement-label--right { right: 0; transform: translateY(-50%) translateX(30px); }
.at-statement.is-revealed .at-statement-label--left  { opacity: 1; transform: translateY(-50%) rotate(180deg) translateX(0); }
.at-statement.is-revealed .at-statement-label--right { opacity: 1; transform: translateY(-50%) translateX(0); }

/* Quote container: the .reveal global class would fade the whole thing in;
   we override so the parent stays visible and the inner words animate. */
.at-statement-quote.reveal {
  opacity: 1;
  transform: none;
}
.at-statement-quote {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.08;
  color: var(--at-white);
  margin: 0;
}
.at-statement-quote .at-red { color: var(--at-red); }
.at-statement-quote .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.at-statement-quote.is-revealed .word { opacity: 1; transform: translateY(0); }

.at-statement-attr {
  margin-top: 40px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 700ms var(--ease-out) 1200ms, transform 700ms var(--ease-out) 1200ms;
}
.at-statement.is-revealed .at-statement-attr { opacity: 1; transform: translateY(0); }

/* ============================================================
   PROCESS — LIGHT off-white + animated red ticks
   ============================================================ */
.at-process {
  background: var(--at-off-white);
  color: var(--at-black);
  position: relative;
}
.at-process::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(90deg, rgba(14,14,14,0.05) 1px, transparent 1px);
  background-size: 80px 100%;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 20%, black 80%, transparent);
}
.at-process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
/* Dashed connector that draws across as section enters */
.at-process-connector {
  height: 1px;
  width: 0;
  margin: 0 0 24px;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(14,14,14,0.18) 0 8px,
    transparent 8px 16px
  );
  transition: width 1500ms var(--ease-out) 200ms;
}
.at-process-connector.is-revealed { width: 100%; }

.at-process-step {
  background: var(--at-white);
  border: 1px solid var(--at-light-gray);
  border-radius: 16px;
  padding: 36px 28px 32px;
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(48px) rotateX(6deg);
  transform-origin: 50% 100%;
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out),
    border-color 280ms var(--ease-out),
    box-shadow 280ms var(--ease-out);
}
.at-process-step.is-revealed {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}
/* Stagger entrance by index */
.at-process-step:nth-child(1).is-revealed { transition-delay: 80ms, 80ms, 0ms, 0ms; }
.at-process-step:nth-child(2).is-revealed { transition-delay: 240ms, 240ms, 0ms, 0ms; }
.at-process-step:nth-child(3).is-revealed { transition-delay: 400ms, 400ms, 0ms, 0ms; }
.at-process-step:nth-child(4).is-revealed { transition-delay: 560ms, 560ms, 0ms, 0ms; }

.at-process-step:hover {
  border-color: rgba(217,7,29,0.45);
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(14,14,14,0.08);
}
/* Ghost number — visual heavyweight inside the card */
.at-process-ghost {
  position: absolute;
  right: -18px; bottom: -42px;
  font-family: var(--font-display);
  font-size: 180px;
  font-weight: 600;
  line-height: 0.8;
  color: rgba(14,14,14,0.04);
  letter-spacing: -0.04em;
  pointer-events: none;
  user-select: none;
  transition: color 320ms var(--ease-out), transform 480ms var(--ease-out);
}
.at-process-step:hover .at-process-ghost {
  color: rgba(217,7,29,0.1);
  transform: translate(-6px, -6px);
}
.at-process-step::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 0; height: 3px;
  background: var(--at-red);
  transition: width 800ms var(--ease-out);
}
.at-process-step.is-revealed::before { width: 56px; }
.at-process-step:hover::before { width: 100%; transition-duration: 480ms; }
.at-process-step:nth-child(1).is-revealed::before { transition-delay: 0ms; }
.at-process-step:nth-child(2).is-revealed::before { transition-delay: 160ms; }
.at-process-step:nth-child(3).is-revealed::before { transition-delay: 320ms; }
.at-process-step:nth-child(4).is-revealed::before { transition-delay: 480ms; }
.at-process-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--at-red);
  margin-bottom: 24px;
}
.at-process-h {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--at-black);
  margin: 0 0 12px;
}
.at-process-d {
  font-size: 14px; line-height: 1.55;
  color: var(--at-mid-gray);
  margin: 0 0 16px;
}
.at-process-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(14,14,14,0.5);
}

/* ============================================================
   COMPARISON — DARK (mid-tone) + corner red glow
   ============================================================ */
.at-compare {
  background: #131316;
  color: var(--at-white);
  position: relative;
  overflow: hidden;
}
.at-compare::after {
  content: "";
  position: absolute;
  right: -200px; bottom: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(217,7,29,0.12), transparent 70%);
  pointer-events: none;
  filter: blur(20px);
}
.at-compare-rows {
  display: flex; flex-direction: column; gap: 20px;
  margin-top: 48px;
}
.at-compare-row {
  display: grid;
  grid-template-columns: 260px 1fr 100px;
  gap: 24px;
  align-items: center;
}
.at-compare-label {
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 500;
  color: var(--at-white);
}
.at-compare-label small {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  margin-top: 4px;
}
.at-compare-bar-wrap {
  height: 40px;
  background: rgba(255,255,255,0.04);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}
.at-compare-bar {
  height: 100%;
  width: 0;
  background: rgba(255,255,255,0.12);
  border-radius: 6px;
  transition: width 1200ms var(--ease-out);
}
.at-compare-bar--ours { background: var(--at-red); box-shadow: 0 0 24px rgba(217,7,29,0.4); }
.at-compare-row.is-visible .at-compare-bar { width: var(--w); }
.at-compare-value {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--at-white);
  text-align: right;
}
.at-compare-footer {
  display: flex; gap: 24px; align-items: center;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
}
.at-compare-footer .red { color: var(--at-red); }

/* ============================================================
   TESTIMONIALS — LIGHT + soft red halo
   ============================================================ */
.at-testi {
  background: var(--at-off-white);
  color: var(--at-black);
  border-top: 1px solid var(--at-light-gray);
  position: relative;
  overflow: hidden;
}
.at-testi::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 900px; height: 600px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(217,7,29,0.08), transparent 70%);
  pointer-events: none;
  animation: testi-spotlight 14s var(--ease-std) infinite alternate;
}
@keyframes testi-spotlight {
  from { transform: translate(calc(-50% - 120px), 0); opacity: 0.6; }
  to   { transform: translate(calc(-50% + 120px), 60px); opacity: 1; }
}
.at-testi-card {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 800ms var(--ease-out), transform 800ms var(--ease-out), border-color 200ms, background 200ms;
}
.at-testi-card.is-revealed {
  opacity: 1;
  transform: translateY(0);
}
.at-testi-card:nth-child(1).is-revealed { transition-delay: 0ms, 0ms, 0ms, 0ms; }
.at-testi-card:nth-child(2).is-revealed { transition-delay: 160ms, 160ms, 0ms, 0ms; }
.at-testi-card:nth-child(3).is-revealed { transition-delay: 320ms, 320ms, 0ms, 0ms; }

/* Quote heading word reveal */
.at-testi-quote.reveal { opacity: 1; transform: none; }
.at-testi-quote .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.at-testi-quote.is-revealed .word { opacity: 1; transform: translateY(0); }
@keyframes testi-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-4px); }
}
.at-testi-quote {
  font-family: var(--font-display);
  font-size: clamp(28px, 3.6vw, 48px);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--at-black);
  margin: 0 0 32px;
  text-wrap: balance;
  max-width: 22ch;
}
.at-testi-stack {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 48px;
}
.at-testi-card {
  display: grid;
  grid-template-columns: 200px 1fr 160px;
  align-items: center;
  gap: 32px;
  padding: 28px 32px;
  border: 1px solid var(--at-light-gray);
  border-radius: 16px;
  background: var(--at-white);
}
.at-testi-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.at-testi-author {
  display: flex; flex-direction: column; gap: 4px;
}
.at-testi-name { font-size: 15px; font-weight: 600; color: var(--at-black); }
.at-testi-role { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--at-mid-gray); }
.at-testi-body {
  font-size: 15px; line-height: 1.55;
  color: var(--at-mid-gray);
  margin: 0;
}
.at-testi-meta {
  text-align: right;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(14,14,14,0.45);
  line-height: 1.6;
}
.at-testi-meta .big {
  display: block;
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--at-red);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  text-transform: none;
}
.at-testi-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-red);
  padding: 6px 12px;
  border: 1px solid rgba(217,7,29,0.35);
  border-radius: 999px;
  background: rgba(217,7,29,0.06);
}

/* ============================================================
   FAQ — DARK
   ============================================================ */
.at-faq {
  background: #18181B;
  color: var(--at-white);
  position: relative;
}
.at-faq::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(180deg, transparent 31px, rgba(255,255,255,0.025) 32px);
  background-size: 100% 32px;
  pointer-events: none;
  mask-image: linear-gradient(180deg, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(180deg, transparent, black 15%, black 85%, transparent);
}
.at-faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 80px;
}
.at-faq-list {
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.at-faq-row {
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
  cursor: none;
}
.at-faq-q {
  display: grid;
  grid-template-columns: 80px 1fr 24px;
  align-items: baseline;
  gap: 16px;
  color: var(--at-white);
}
.at-faq-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-red);
}
.at-faq-q-text {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.014em;
  line-height: 1.25;
  color: var(--at-white);
}
.at-faq-toggle {
  font-family: var(--font-mono);
  font-size: 20px;
  color: rgba(255,255,255,0.55);
  transition: transform 220ms var(--ease-out), color 220ms var(--ease-out);
  display: inline-block;
  text-align: center;
  line-height: 1;
}
.at-faq-row.is-open .at-faq-toggle {
  transform: rotate(45deg);
  color: var(--at-red);
}
.at-faq-a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 280ms var(--ease-out);
}
.at-faq-row.is-open .at-faq-a { grid-template-rows: 1fr; }
.at-faq-a-inner {
  overflow: hidden;
  display: grid;
  grid-template-columns: 80px 1fr 24px;
  gap: 16px;
}
.at-faq-a-text {
  grid-column: 2;
  padding-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.7);
  max-width: 60ch;
}

/* ============================================================
   FINAL CTA — LIGHT (off-white) with red accents
   ============================================================ */
.at-final {
  background: var(--at-off-white);
  color: var(--at-black);
  padding: clamp(96px, 14vh, 160px) 32px;
  position: relative;
  overflow: hidden;
}
.at-final::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(217,7,29,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217,7,29,0.05) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 40%, black, transparent);
  animation: final-grid-drift 30s linear infinite;
}
.at-final::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -200px;
  width: 1200px; height: 800px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(217,7,29,0.18), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: statement-halo 9s var(--ease-std) infinite;
}
@keyframes final-grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 56px 56px, 56px 56px; }
}
.at-final-inner {
  position: relative;
  max-width: 1080px; margin: 0 auto;
  text-align: center;
}
.at-final-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--at-red);
  margin-bottom: 28px;
}
.at-final-eyebrow .dot {
  width: 7px; height: 7px; background: var(--at-red); border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(217,7,29,0.25);
}
.at-final-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(48px, 7vw, 104px);
  line-height: 0.98;
  letter-spacing: -0.025em;
  margin: 0 0 36px;
  color: var(--at-black);
  text-wrap: balance;
}
.at-final-ctas {
  display: flex; justify-content: center; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 40px;
}
.at-btn--on-red {
  background: var(--at-red);
  color: var(--at-white);
  box-shadow: var(--shadow-red), var(--shadow-inset);
}
.at-btn--on-red:hover { background: var(--accent-hover); }
.at-btn--ghost-on-red {
  background: transparent;
  color: var(--at-black);
  border-color: rgba(14,14,14,0.18);
}
.at-btn--ghost-on-red:hover { border-color: var(--at-black); background: rgba(14,14,14,0.04); }
.at-final-meta {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 14px 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-mid-gray);
}
.at-final-meta span { display: inline-flex; align-items: center; gap: 8px; }

/* ============================================================
   FOOTER — deepest tone
   ============================================================ */
.at-footer {
  background: #08080A;
  color: var(--at-white);
  border-top: 2px solid var(--at-red);
  padding: 64px 32px 28px;
}
.at-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 2fr;
  gap: 64px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.at-footer-brand-row {
  display: flex; gap: 14px; align-items: flex-start;
  margin-bottom: 24px;
}
.at-footer-brand-row img { width: 38px; height: 38px; }
.at-footer-brand-name { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.at-footer-brand-tag {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}
.at-footer-tag-big {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.18;
  color: var(--at-white);
  margin: 20px 0 0;
  max-width: 24ch;
}
.at-footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.at-footer-h {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.4);
  margin-bottom: 14px;
}
.at-footer-cols a {
  display: block;
  font-size: 14px;
  color: rgba(255,255,255,0.78);
  padding: 5px 0;
  transition: color 140ms;
}
.at-footer-cols a:hover { color: var(--at-white); }
.at-footer-base {
  max-width: 1280px; margin: 0 auto;
  padding-top: 24px;
  display: flex; justify-content: space-between; align-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.42);
}
.at-footer-base .status {
  display: inline-flex; align-items: center; gap: 8px;
}
.at-footer-base .status .dot {
  width: 7px; height: 7px; border-radius: 999px;
  background: #2EA84A;
  box-shadow: 0 0 8px rgba(46,168,74,0.6);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet / small laptop ---- */
@media (max-width: 980px) {
  .at-nav-center { display: none; }

  /* Nav: drop social icons + version tag, keep brand + CTA */
  .at-nav-right .at-btn--icon { display: none; }
  .at-nav-brand-tag { display: none; }

  /* What we build — sticky cards relax to normal flow */
  .at-build-row { position: relative; top: auto; }
  .at-build-card { min-height: 0; padding: 40px 28px 32px; }
  .at-build-card-ghost { font-size: 260px; bottom: -48px; right: -8px; }

  /* Case studies — single column, drop sticky on minis */
  .at-cases-grid { grid-template-columns: 1fr; }
  .at-case-featured { min-height: 0; padding: 36px 28px; }
  .at-case-mini { position: relative; top: auto; min-height: 0; }
  .at-case-featured .at-case-stats { grid-template-columns: 1fr 1fr; }

  /* Process — 2-up cards */
  .at-process-grid { grid-template-columns: 1fr 1fr; }

  /* FAQ / footer / testimonials / comparison */
  .at-faq-grid { grid-template-columns: 1fr; gap: 40px; }
  .at-footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .at-footer-cols { grid-template-columns: 1fr 1fr; }
  .at-testi-card { grid-template-columns: 1fr; gap: 16px; }
  .at-testi-meta { text-align: left; }
  .at-compare-row { grid-template-columns: 1fr; gap: 8px; }
  .at-compare-value { text-align: left; }
  .at-compare-footer { flex-wrap: wrap; gap: 12px 16px; }
  .at-statement-label { display: none; }
  .at-statement-frame { padding: 0 24px; }
}

/* ---- Phone ---- */
@media (max-width: 600px) {
  .at-container { padding: 0 20px; }

  /* Hero — lighter top offset, full-width text, edge padding,
     darken the veil across the whole frame since video is full-bleed */
  .at-hero { padding: 128px 0 72px; min-height: 92vh; }
  .at-hero-inner { padding: 0 20px; }
  .at-hero-content { max-width: 100%; }
  .at-hero-veil {
    background:
      linear-gradient(90deg, rgba(14,14,14,0.9) 0%, rgba(14,14,14,0.7) 60%, rgba(14,14,14,0.5) 100%),
      linear-gradient(180deg, rgba(14,14,14,0.6) 0%, rgba(14,14,14,0) 25%, rgba(14,14,14,0) 65%, rgba(14,14,14,0.97) 100%);
  }
  .at-hero-grid { mask-image: none; -webkit-mask-image: none; opacity: 0.5; }
  .at-hero-sub { max-width: 100%; }
  .at-hero-ctas { flex-wrap: wrap; gap: 10px; margin-bottom: 40px; }
  .at-hero-ctas .at-btn { flex: 1 1 auto; justify-content: center; }
  .at-hero-meta { gap: 10px 16px; font-size: 10px; }

  /* Nav — shrink brand, tighten CTA */
  .at-nav, .at-nav.is-scrolled { padding: 12px 20px; }
  .at-nav-brand { font-size: 15px; gap: 8px; }
  .at-nav-brand img { width: 26px; height: 26px; }
  .at-nav-right .at-btn--primary { padding: 11px 14px; font-size: 11px; letter-spacing: 0.06em; }

  /* Section headers stack */
  .at-cases-head { flex-direction: column; align-items: flex-start; gap: 20px; }

  /* What we build */
  .at-build-card { padding: 32px 22px 28px; border-radius: 16px; }
  .at-build-card-title { font-size: clamp(28px, 9vw, 38px); }
  .at-build-card-ghost { font-size: 180px; opacity: 0.6; }
  .at-build-card-tags { flex-wrap: wrap; justify-content: flex-end; }

  /* Case studies */
  .at-case-big-num { font-size: clamp(96px, 30vw, 140px); }
  .at-case-featured .at-case-stats { grid-template-columns: 1fr 1fr; gap: 20px; }
  .at-case-mini-num { font-size: clamp(52px, 18vw, 72px); }

  /* Process — single column */
  .at-process-grid { grid-template-columns: 1fr; gap: 14px; }
  .at-process-connector { display: none; }
  .at-process-ghost { font-size: 140px; bottom: -30px; }

  /* Statement quote breathing room */
  .at-statement { padding: 96px 0; }
  .at-statement-frame { padding: 0 4px; }

  /* Testimonials card — restack inner grid */
  .at-testi-card { padding: 24px; }

  /* Comparison */
  .at-compare-bar-wrap { height: 32px; }

  /* FAQ rows — tighten the number column */
  .at-faq-q { grid-template-columns: 48px 1fr 24px; gap: 10px; }
  .at-faq-q-text { font-size: 19px; }
  .at-faq-a-inner { grid-template-columns: 48px 1fr 24px; gap: 10px; }

  /* Final CTA */
  .at-final-ctas { flex-wrap: wrap; gap: 10px; }
  .at-final-ctas .at-btn { flex: 1 1 auto; justify-content: center; }
  .at-final-meta { flex-direction: column; gap: 12px; align-items: center; }

  /* Footer */
  .at-footer-cols { grid-template-columns: 1fr 1fr; gap: 28px; }
  .at-footer-base { flex-direction: column; gap: 12px; text-align: center; }
  .at-footer-tag-big { font-size: 24px; }

  /* Integrations marquee — smaller chips */
  .at-int-head { flex-direction: column; gap: 10px; align-items: flex-start; }
  .at-int-chip { font-size: 12px; padding: 11px 16px; }
}

/* ---- Tiny phones ---- */
@media (max-width: 380px) {
  .at-nav-brand span { display: none; }
  .at-footer-cols { grid-template-columns: 1fr; }
}

