/* ============================================================
   CAVALLO — Variant E · Brutalist
   Pure black + white hairline + acid green, structural type
   ============================================================ */

:root {
  --bg: #0a0a0a;
  --bg-2: #111111;
  --ink: #ffffff;
  --ink-2: #c8c8c8;
  --ink-3: #6a6a6a;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.24);
  --rule-hair: rgba(255, 255, 255, 0.5);
  --acid: #ccff00;
  --acid-2: #b3e600;
  --red: #ff2e1f;

  --sans: 'Inter', -apple-system, sans-serif;
  --display: 'Space Grotesk', 'Inter', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--display);
  font-size: 16px;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { background: none; border: 0; cursor: pointer; font: inherit; color: inherit; }
::selection { background: var(--acid); color: var(--bg); }

html.lenis, html.lenis body { height: auto; }

/* 4px border grid */
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 999; background-image: linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px); background-size: 80px 80px; mix-blend-mode: overlay; }

/* Loader */
.loader { position: fixed; inset: 0; background: var(--bg); z-index: 9999; display: flex; align-items: center; justify-content: center; flex-direction: column; transition: opacity 0.7s 0.2s, visibility 0s 0.9s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-mark { font-family: var(--display); font-size: 96px; font-weight: 700; line-height: 0.9; color: var(--ink); letter-spacing: -0.04em; }
.loader-mark em { color: var(--acid); font-style: normal; }
.loader-bar { width: 200px; height: 4px; background: var(--rule-2); margin: 24px 0 16px; position: relative; overflow: hidden; border: 1px solid var(--ink); }
.loader-bar::after { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--acid); animation: loader 1.1s 0.2s ease-out forwards; }
@keyframes loader { to { width: 100%; } }
.loader-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-3); }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 16px 0; background: var(--bg); border-bottom: 1px solid var(--ink); transition: padding 0.3s, background 0.3s; }
.nav.is-stuck { padding: 10px 0; background: rgba(10, 10, 10, 0.95); }
.nav-inner { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: flex; align-items: stretch; justify-content: space-between; gap: 0; border: 1px solid var(--ink); margin: 0 24px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; padding: 14px 20px; border-right: 1px solid var(--ink); }
.brand-box { width: 32px; height: 32px; background: var(--acid); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; }
.primary-nav { display: flex; align-items: stretch; gap: 0; }
.nav-link { font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink); padding: 14px 20px; border-right: 1px solid var(--ink); transition: background 0.2s, color 0.2s; display: flex; align-items: center; }
.nav-link:hover { background: var(--ink); color: var(--bg); }
.nav-cta { background: var(--acid); color: var(--bg); padding: 14px 24px; font-weight: 700; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; transition: background 0.2s; }
.nav-cta:hover { background: var(--ink); color: var(--acid); }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; width: 50px; height: 100%; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border-left: 1px solid var(--ink); }
  .nav-toggle span { display: block; width: 18px; height: 2px; background: var(--ink); }
  .primary-nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--ink); }
  .primary-nav.open .nav-link { border-right: 0; border-bottom: 1px solid var(--ink); width: 100%; }
}

/* Marquee */
.marquee { background: var(--acid); color: var(--bg); padding: 14px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); overflow: hidden; }
.marquee-track { display: flex; gap: 48px; animation: scroll 30s linear infinite; white-space: nowrap; align-items: center; }
.marquee-item { font-family: var(--display); font-size: 16px; font-weight: 700; letter-spacing: 0.04em; display: flex; align-items: center; gap: 24px; }
.marquee-item::after { content: '◆'; font-size: 12px; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Hero */
.hero { position: relative; min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; }
.hero-left { display: flex; flex-direction: column; justify-content: center; padding: 140px 60px 100px; border-right: 1px solid var(--ink); position: relative; }
.hero-right { position: relative; background: var(--bg-2); overflow: hidden; }
.hero-right img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.2) brightness(0.7); }
.hero-right::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(204, 255, 0, 0.15), transparent 40%); mix-blend-mode: screen; }
.hero-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--acid); margin-bottom: 32px; display: inline-flex; align-items: center; gap: 12px; opacity: 0; transform: translateY(20px); animation: fadeUp 0.8s 0.2s forwards; }
.hero-meta::before { content: ''; width: 24px; height: 2px; background: var(--acid); }
.hero-headline { font-family: var(--display); font-size: clamp(56px, 8vw, 130px); line-height: 0.9; letter-spacing: -0.04em; font-weight: 700; color: var(--ink); margin-bottom: 32px; max-width: 100%; opacity: 0; transform: translateY(40px); animation: fadeUp 1s 0.4s forwards; }
.hero-headline em { color: var(--acid); font-style: normal; }
.hero-headline .stroke { -webkit-text-stroke: 1.5px var(--ink); color: transparent; }
.hero-deck { font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 540px; margin-bottom: 40px; letter-spacing: 0.04em; opacity: 0; transform: translateY(30px); animation: fadeUp 1s 0.6s forwards; }
.hero-deck strong { color: var(--ink); font-weight: 700; }
.hero-ctas { display: flex; gap: 0; flex-wrap: wrap; opacity: 0; transform: translateY(30px); animation: fadeUp 1s 0.8s forwards; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 18px 32px; font-family: var(--display); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: background 0.2s, color 0.2s; border: 1px solid var(--ink); }
.btn-primary { background: var(--acid); color: var(--bg); border-color: var(--ink); }
.btn-primary:hover { background: var(--ink); color: var(--acid); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }
@media (max-width: 900px) { .hero { grid-template-columns: 1fr; } .hero-left { padding: 140px 32px 60px; border-right: 0; border-bottom: 1px solid var(--ink); } .hero-right { min-height: 60vh; } }

/* Hero right HUD */
.hero-right-tag { position: absolute; top: 32px; left: 32px; z-index: 2; background: var(--acid); color: var(--bg); padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; font-weight: 700; text-transform: uppercase; }
.hero-right-no { position: absolute; bottom: 32px; right: 32px; z-index: 2; font-family: var(--mono); font-size: 11px; color: var(--ink); letter-spacing: 0.18em; text-transform: uppercase; background: rgba(10, 10, 10, 0.85); padding: 6px 12px; border: 1px solid var(--rule-2); }
.hero-right-status { position: absolute; bottom: 32px; left: 32px; z-index: 2; background: var(--bg); color: var(--acid); padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; font-weight: 700; text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.hero-right-status::before { content: ''; width: 8px; height: 8px; background: var(--acid); border-radius: 50%; animation: blink 1.4s infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }

/* Sections */
.section { padding: 120px 0; position: relative; border-top: 1px solid var(--ink); }
.section-wide { max-width: 1600px; margin: 0 auto; padding: 0 24px; }
.section-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--acid); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-kicker::before { content: ''; width: 24px; height: 2px; background: var(--acid); }
.section-headline { font-family: var(--display); font-size: clamp(40px, 6vw, 100px); line-height: 0.9; letter-spacing: -0.04em; font-weight: 700; color: var(--ink); margin-bottom: 24px; max-width: 1200px; }
.section-headline em { color: var(--acid); font-style: normal; }
.section-deck { font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 720px; margin-bottom: 80px; letter-spacing: 0.04em; }
.section-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; margin-bottom: 80px; align-items: end; border-bottom: 1px solid var(--rule-2); padding-bottom: 40px; }
.section-head .section-deck { margin-bottom: 0; }
@media (max-width: 900px) { .section-head { grid-template-columns: 1fr; gap: 24px; margin-bottom: 48px; } }

/* Stats */
.stats { background: var(--bg-2); padding: 60px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 24px; border-right: 1px solid var(--ink); }
.stat:last-child { border-right: 0; }
.stat-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 12px; }
.stat-num { font-family: var(--display); font-size: clamp(40px, 4.5vw, 72px); font-weight: 700; line-height: 1; color: var(--ink); display: block; margin-bottom: 12px; letter-spacing: -0.04em; }
.stat-num em { color: var(--acid); font-style: normal; }
.stat-p { font-family: var(--mono); font-size: 12px; color: var(--ink-2); line-height: 1.5; letter-spacing: 0.04em; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr 1fr; } .stat { border-right: 0; border-bottom: 1px solid var(--ink); } }

/* Service cards */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0; }
.svc-card { position: relative; overflow: hidden; background: var(--bg-2); aspect-ratio: 4/3; display: block; border: 1px solid var(--ink); }
.svc-card-bg { position: absolute; inset: 0; z-index: 0; }
.svc-card-bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.4) contrast(1.2); transition: filter 0.4s, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.svc-card:hover .svc-card-bg img { transform: scale(1.05); filter: grayscale(1) brightness(0.7) contrast(1.2); }
.svc-card-body { position: relative; z-index: 1; height: 100%; padding: 28px; display: flex; flex-direction: column; justify-content: space-between; }
.svc-card-no { font-family: var(--mono); font-size: 11px; letter-spacing: 0.2em; color: var(--acid); display: block; margin-bottom: 8px; }
.svc-card-title { font-family: var(--display); font-size: 40px; font-weight: 700; line-height: 0.95; letter-spacing: -0.03em; color: var(--ink); text-transform: uppercase; margin-bottom: 12px; }
.svc-card-blurb { font-family: var(--mono); font-size: 12px; line-height: 1.5; color: var(--ink-2); max-width: 380px; margin-bottom: 24px; letter-spacing: 0.04em; }
.svc-card-link { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--acid); display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; transition: gap 0.2s; }
.svc-card:hover .svc-card-link { gap: 14px; }
@media (max-width: 700px) { .svc-grid { grid-template-columns: 1fr; } }

/* Pull quote */
.pq { padding: 120px 0; text-align: center; position: relative; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.pq-text { font-family: var(--display); font-size: clamp(28px, 4vw, 64px); line-height: 1; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); text-transform: uppercase; max-width: 1100px; margin: 0 auto 32px; }
.pq-text em { color: var(--acid); font-style: normal; }
.pq-cite { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }

/* Gallery */
.gallery { padding: 120px 0; background: var(--bg); border-top: 1px solid var(--ink); }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.gallery-item { position: relative; overflow: hidden; background: var(--bg-2); aspect-ratio: 1/1; border: 1px solid var(--ink); }
.gallery-item:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: 1/1; }
.gallery-item:nth-child(5) { grid-column: span 2; aspect-ratio: 2/1; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.7) contrast(1.2); transition: filter 0.4s, transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.gallery-item:hover img { transform: scale(1.05); filter: grayscale(0.5) brightness(0.8); }
.gallery-caption { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 20px; background: linear-gradient(180deg, transparent 50%, rgba(10, 10, 10, 0.95) 100%); z-index: 2; opacity: 0; transition: opacity 0.4s; }
.gallery-item:hover .gallery-caption { opacity: 1; }
.gallery-caption-no { font-family: var(--mono); font-size: 10px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--acid); display: block; margin-bottom: 6px; }
.gallery-caption-h { font-family: var(--display); font-size: 20px; font-weight: 700; text-transform: uppercase; line-height: 1.1; color: var(--ink); }
@media (max-width: 900px) { .gallery-grid { grid-template-columns: 1fr 1fr; } .gallery-item:nth-child(1), .gallery-item:nth-child(5) { grid-column: auto; grid-row: auto; aspect-ratio: 1/1; } }
@media (max-width: 600px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--ink); }
.split-img { position: relative; aspect-ratio: 4/5; overflow: hidden; border-right: 1px solid var(--ink); }
.split-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.7) contrast(1.2); }
.split-img-badge { position: absolute; bottom: 20px; left: 20px; z-index: 2; background: var(--acid); color: var(--bg); padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; }
.split-body { padding: 60px; display: flex; flex-direction: column; justify-content: center; }
.split-body h2 { font-family: var(--display); font-size: clamp(32px, 4vw, 64px); line-height: 0.95; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); text-transform: uppercase; margin-bottom: 24px; }
.split-body h2 em { color: var(--acid); font-style: normal; }
.split-body p { font-family: var(--mono); font-size: 13px; line-height: 1.7; color: var(--ink-2); margin-bottom: 20px; letter-spacing: 0.04em; }
.split-body strong { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } .split-img { border-right: 0; border-bottom: 1px solid var(--ink); aspect-ratio: 4/3; } .split-body { padding: 32px; } }

/* CTA */
.cta { padding: 120px 0; text-align: center; position: relative; overflow: hidden; background: var(--bg); border-top: 1px solid var(--ink); }
.cta-inner { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: 0 32px; }
.cta-headline { font-family: var(--display); font-size: clamp(48px, 8vw, 140px); line-height: 0.85; font-weight: 700; letter-spacing: -0.04em; color: var(--ink); text-transform: uppercase; margin-bottom: 32px; }
.cta-headline em { color: var(--acid); font-style: normal; }
.cta-deck { font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 620px; margin: 0 auto 40px; letter-spacing: 0.04em; }
.cta-ctas { display: flex; gap: 0; justify-content: center; flex-wrap: wrap; margin-bottom: 32px; }
.cta-meta { font-family: var(--mono); font-size: 12px; letter-spacing: 0.06em; color: var(--ink-3); }
.cta-meta strong { color: var(--acid); font-weight: 700; }

/* Footer */
.footer { background: var(--bg); border-top: 1px solid var(--ink); padding: 60px 0 24px; }
.footer-inner { max-width: 1600px; margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 0; margin-bottom: 40px; border: 1px solid var(--ink); }
.footer-cell { padding: 32px; border-right: 1px solid var(--ink); }
.footer-cell:last-child { border-right: 0; }
.footer-cell-brand { padding: 32px; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: 0.02em; margin-bottom: 20px; }
.footer-line { font-family: var(--mono); font-size: 12px; line-height: 1.7; color: var(--ink-2); letter-spacing: 0.04em; }
.footer-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--acid); margin-bottom: 16px; display: block; }
.footer-list li { margin-bottom: 8px; }
.footer-list a { font-family: var(--display); font-size: 13px; color: var(--ink-2); transition: color 0.2s; }
.footer-list a:hover { color: var(--acid); }
.footer-base { max-width: 1600px; margin: 0 auto; padding: 16px 24px 0; display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } .footer-cell, .footer-cell-brand { border-right: 0; border-bottom: 1px solid var(--ink); } }

/* Reveal */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.is-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(40px); transition: opacity 0.8s, transform 0.8s; }
.reveal-stagger.is-in > * { opacity: 1; transform: translateY(0); }
.reveal-stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger.is-in > *:nth-child(2) { transition-delay: 0.15s; }
.reveal-stagger.is-in > *:nth-child(3) { transition-delay: 0.25s; }
.reveal-stagger.is-in > *:nth-child(4) { transition-delay: 0.35s; }
.reveal-stagger.is-in > *:nth-child(5) { transition-delay: 0.45s; }
.reveal-stagger.is-in > *:nth-child(6) { transition-delay: 0.55s; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal-stagger > * { opacity: 1; transform: none; transition: none; } }
