/* ============================================================
   CAVALLO — Variant B · Colorful
   Electric: cyan + magenta on near-black, stage-light energy
   ============================================================ */

:root {
  --bg: #08080f;
  --bg-2: #11111c;
  --bg-3: #1a1a2a;
  --ink: #ffffff;
  --ink-2: #c5c5d0;
  --ink-3: #6c6c80;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.18);
  --cyan: #00f0ff;
  --magenta: #ff2bd6;
  --acid: #fff200;
  --green: #00ff85;

  --sans: 'Inter', -apple-system, sans-serif;
  --display: 'Inter', -apple-system, sans-serif;
  --accent-font: '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(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
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(--cyan); color: var(--bg); }

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

/* 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: 80px; font-weight: 900; line-height: 1; color: var(--ink); letter-spacing: -0.05em; display: flex; gap: 4px; }
.loader-mark em { color: var(--cyan); font-style: normal; }
.loader-mark b { color: var(--magenta); font-weight: 900; }
.loader-bar { width: 220px; height: 1px; background: var(--rule-2); margin: 24px 0 16px; position: relative; overflow: hidden; }
.loader-bar::after { content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 0; background: linear-gradient(90deg, var(--cyan), var(--magenta), 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: 22px 0; transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav.is-stuck { background: rgba(8, 8, 15, 0.78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 14px 0; border-bottom-color: var(--rule); }
.nav-inner { max-width: 1600px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 22px; font-weight: 900; color: var(--ink); letter-spacing: -0.04em; }
.brand-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 16px var(--cyan); }
.brand-dot::after { content: ''; display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--cyan); }
.primary-nav { display: flex; align-items: center; gap: 32px; }
.nav-link { font-family: var(--accent-font); font-size: 13px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); padding: 8px 0; transition: color 0.2s; }
.nav-link:hover { color: var(--cyan); }
.nav-cta { background: linear-gradient(135deg, var(--cyan), var(--magenta)); color: var(--bg); padding: 12px 22px; font-weight: 800; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.2s, box-shadow 0.2s; }
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px -8px var(--cyan); }
.nav-toggle { display: none; }
@media (max-width: 900px) {
  .primary-nav { display: none; }
  .nav-toggle { display: flex; width: 40px; height: 40px; flex-direction: column; justify-content: center; align-items: center; gap: 5px; border: 1px solid var(--rule-2); }
  .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: rgba(8, 8, 15, 0.97); backdrop-filter: blur(20px); padding: 24px 32px 32px; border-bottom: 1px solid var(--rule); gap: 16px; align-items: flex-start; }
}

/* Hero */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; padding: 140px 0 100px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.4) contrast(1.2) saturate(1.3); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 15, 0.4) 0%, rgba(8, 8, 15, 0.5) 40%, var(--bg) 100%); }
.hero-inner { position: relative; z-index: 2; max-width: 1600px; margin: 0 auto; padding: 0 32px; width: 100%; }
.hero-meta { font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--cyan); 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: 32px; height: 1px; background: var(--cyan); }
.hero-headline { font-family: var(--display); font-size: clamp(56px, 10vw, 180px); line-height: 0.88; letter-spacing: -0.06em; font-weight: 900; color: var(--ink); margin-bottom: 32px; max-width: 1400px; opacity: 0; transform: translateY(40px); animation: fadeUp 1s 0.4s forwards; }
.hero-headline .word-1 { color: var(--ink); display: inline-block; }
.hero-headline .word-2 { background: linear-gradient(135deg, var(--cyan), var(--green)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: inline-block; }
.hero-headline .word-3 { background: linear-gradient(135deg, var(--magenta), var(--acid)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; display: inline-block; }
.hero-headline .word-4 { color: var(--ink); -webkit-text-stroke: 2px var(--ink); color: transparent; display: inline-block; }
.hero-headline .word-5 { color: var(--cyan); display: inline-block; }
.hero-deck { font-family: var(--sans); font-size: 21px; line-height: 1.5; color: var(--ink-2); max-width: 640px; margin-bottom: 40px; 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: 16px; 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(--accent-font); font-size: 14px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; transition: transform 0.2s, box-shadow 0.2s; border: 0; }
.btn-primary { background: linear-gradient(135deg, var(--cyan), var(--magenta)); color: var(--bg); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -8px var(--cyan); }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

.hero-side { position: absolute; right: 32px; bottom: 60px; z-index: 3; background: rgba(8, 8, 15, 0.85); backdrop-filter: blur(20px); border: 1px solid var(--rule-2); border-radius: 4px; padding: 18px 22px; display: flex; align-items: center; gap: 14px; max-width: 320px; opacity: 0; transform: translateY(20px); animation: fadeUp 1s 1.1s forwards; }
.hero-side-icon { width: 40px; height: 40px; background: var(--cyan); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; font-weight: 900; }
.hero-side-h { font-family: var(--display); font-size: 14px; font-weight: 800; color: var(--ink); display: block; margin-bottom: 2px; text-transform: uppercase; letter-spacing: 0.04em; }
.hero-side-p { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.04em; }
@media (max-width: 900px) { .hero-side { display: none; } }

/* Sections */
.section { padding: 140px 0; position: relative; }
.section-wide { max-width: 1600px; margin: 0 auto; padding: 0 32px; }
.section-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--cyan); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-kicker::before { content: ''; width: 32px; height: 1px; background: var(--cyan); }
.section-headline { font-family: var(--display); font-size: clamp(48px, 7vw, 120px); line-height: 0.9; letter-spacing: -0.05em; font-weight: 900; color: var(--ink); margin-bottom: 24px; max-width: 1200px; text-transform: uppercase; }
.section-headline em { color: var(--magenta); font-style: normal; }
.section-headline em.c { color: var(--cyan); }
.section-headline em.a { color: var(--acid); }
.section-deck { font-family: var(--sans); font-size: 20px; line-height: 1.55; color: var(--ink-2); max-width: 720px; margin-bottom: 80px; }
.section-head { display: grid; grid-template-columns: 1.4fr 1fr; gap: 60px; margin-bottom: 80px; align-items: end; }
.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: 80px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.stat { padding: 0 28px; border-right: 1px solid var(--rule-2); }
.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(48px, 5vw, 84px); font-weight: 900; line-height: 1; color: var(--ink); display: block; margin-bottom: 16px; letter-spacing: -0.04em; }
.stat-num em { color: var(--cyan); font-style: normal; }
.stat-num b { color: var(--magenta); font-weight: 900; }
.stat-p { font-family: var(--sans); font-size: 14px; color: var(--ink-2); line-height: 1.5; }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr 1fr; } .stat { border-right: 0; border-bottom: 1px solid var(--rule-2); padding: 24px 0; } }

/* Service cards */
.svc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.svc-card { position: relative; overflow: hidden; background: var(--bg-2); aspect-ratio: 4/3; display: block; }
.svc-card-bg { position: absolute; inset: 0; z-index: 0; }
.svc-card-bg img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.5) contrast(1.2) saturate(1.2); transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s; }
.svc-card:hover .svc-card-bg img { transform: scale(1.08); filter: brightness(0.7) contrast(1.3) saturate(1.4); }
.svc-card-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 8, 15, 0.3) 0%, rgba(8, 8, 15, 0.92) 100%); }
.svc-card-body { position: relative; z-index: 1; height: 100%; padding: 32px; 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(--cyan); display: block; margin-bottom: 8px; }
.svc-card-title { font-family: var(--display); font-size: 40px; font-weight: 900; line-height: 0.95; letter-spacing: -0.04em; color: var(--ink); text-transform: uppercase; margin-bottom: 12px; }
.svc-card-blurb { font-family: var(--sans); font-size: 15px; line-height: 1.5; color: var(--ink-2); max-width: 380px; margin-bottom: 24px; }
.svc-card-link { font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cyan); display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; transition: gap 0.2s, color 0.2s; }
.svc-card:hover .svc-card-link { gap: 14px; color: var(--magenta); }
@media (max-width: 700px) { .svc-grid { grid-template-columns: 1fr; } }

/* Pull quote */
.pq { padding: 160px 0; text-align: center; position: relative; overflow: hidden; }
.pq::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0, 240, 255, 0.08), transparent 60%); pointer-events: none; }
.pq-text { font-family: var(--display); font-size: clamp(28px, 4vw, 64px); line-height: 1.05; font-weight: 900; letter-spacing: -0.03em; color: var(--ink); text-transform: uppercase; max-width: 1100px; margin: 0 auto 32px; position: relative; }
.pq-text em { color: var(--magenta); 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: 140px 0; background: var(--bg); }
.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; }
.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: brightness(0.7) contrast(1.2) saturate(1.2); transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s; }
.gallery-item:hover img { transform: scale(1.05); filter: brightness(0.9) contrast(1.3) saturate(1.4); }
.gallery-caption { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 24px; background: linear-gradient(180deg, transparent 50%, rgba(8, 8, 15, 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(--cyan); display: block; margin-bottom: 6px; }
.gallery-caption-h { font-family: var(--display); font-size: 22px; font-weight: 900; 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: 80px; align-items: center; }
.split-img { position: relative; aspect-ratio: 4/5; overflow: hidden; }
.split-img img { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.7) contrast(1.2) saturate(1.2); }
.split-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(0, 240, 255, 0.2), rgba(255, 43, 214, 0.2), rgba(8, 8, 15, 0.4)); z-index: 1; mix-blend-mode: screen; }
.split-img-badge { position: absolute; bottom: 20px; left: 20px; z-index: 2; background: var(--cyan); color: var(--bg); padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800; }
.split-body h2 { font-family: var(--display); font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 900; letter-spacing: -0.04em; color: var(--ink); text-transform: uppercase; margin-bottom: 24px; }
.split-body h2 em { color: var(--cyan); font-style: normal; }
.split-body h2 em.m { color: var(--magenta); }
.split-body p { font-family: var(--sans); font-size: 18px; line-height: 1.65; color: var(--ink-2); margin-bottom: 20px; }
.split-body strong { color: var(--ink); font-weight: 700; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

/* CTA */
.cta { padding: 160px 0; text-align: center; position: relative; overflow: hidden; background: var(--bg); }
.cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse 50% 40% at 50% 50%, rgba(0, 240, 255, 0.15), transparent 60%), radial-gradient(ellipse 50% 40% at 30% 50%, rgba(255, 43, 214, 0.12), transparent 60%); pointer-events: none; }
.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.9; font-weight: 900; letter-spacing: -0.05em; color: var(--ink); text-transform: uppercase; margin-bottom: 32px; }
.cta-headline em { background: linear-gradient(135deg, var(--cyan), var(--magenta)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; font-style: normal; }
.cta-deck { font-family: var(--sans); font-size: 21px; line-height: 1.5; color: var(--ink-2); max-width: 620px; margin: 0 auto 40px; }
.cta-ctas { display: flex; gap: 16px; 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(--cyan); font-weight: 700; }

/* Footer */
.footer { background: var(--bg); border-top: 1px solid var(--rule); padding: 80px 0 32px; }
.footer-inner { max-width: 1600px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 60px; }
.footer-brand .brand { margin-bottom: 20px; }
.footer-line { font-family: var(--sans); font-size: 14px; line-height: 1.6; color: var(--ink-2); max-width: 320px; }
.footer-h { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--cyan); margin-bottom: 18px; display: block; }
.footer-list li { margin-bottom: 8px; }
.footer-list a { font-family: var(--sans); font-size: 14px; color: var(--ink-2); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.footer-list a:hover { color: var(--cyan); border-color: var(--cyan); }
.footer-base { max-width: 1600px; margin: 0 auto; padding: 24px 32px 0; border-top: 1px solid var(--rule); 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; gap: 32px; } }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* 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; } }
