/* ============================================================
   CAVALLO — Variant C · Visual
   Pure black + white + red, cinematic, full-bleed photography
   ============================================================ */

:root {
  --bg: #050505;
  --bg-2: #0a0a0a;
  --ink: #ffffff;
  --ink-2: #d8d8d8;
  --ink-3: #888888;
  --rule: rgba(255, 255, 255, 0.08);
  --rule-2: rgba(255, 255, 255, 0.18);
  --red: #b8341a;
  --red-2: #ff3b1f;

  --sans: 'Inter', -apple-system, sans-serif;
  --display: '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.55;
  -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(--red); color: white; }

/* Loader */
.loader { position: fixed; inset: 0; background: var(--bg); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.6s 0.2s, visibility 0s 0.8s; }
.loader.is-done { opacity: 0; visibility: hidden; }
.loader-mark { font-family: var(--display); font-size: 56px; font-weight: 900; letter-spacing: -0.04em; color: var(--ink); line-height: 1; }
.loader-mark em { color: var(--red); font-style: normal; }
.loader-tag { margin-top: 20px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--ink-3); }

/* Nav */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 20px 0; transition: background 0.3s, padding 0.3s, backdrop-filter 0.3s; }
.nav.is-stuck { background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); padding: 14px 0; border-bottom: 1px solid 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: baseline; gap: 8px; font-family: var(--display); font-size: 22px; font-weight: 900; letter-spacing: -0.04em; color: var(--ink); text-transform: uppercase; }
.brand-c { color: var(--red); font-size: 28px; line-height: 1; }
.brand-meta { font-family: var(--mono); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); border-left: 1px solid var(--rule-2); padding-left: 10px; margin-left: 4px; }
.primary-nav { display: flex; align-items: center; gap: 32px; }
.nav-link { font-family: var(--mono); font-size: 12px; font-weight: 500; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-2); padding: 8px 0; transition: color 0.2s; }
.nav-link:hover { color: var(--red); }
.nav-cta { background: var(--red); color: white; padding: 12px 22px; font-weight: 700; font-size: 13px; letter-spacing: 0.04em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.2s, background 0.2s; }
.nav-cta:hover { background: var(--red-2); transform: translateY(-1px); }
.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(5, 5, 5, 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: 120px 0 80px; }
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) brightness(0.4) contrast(1.2); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.7) 60%, var(--bg) 100%); }
.hero-grain { position: absolute; inset: 0; z-index: 1; pointer-events: none; opacity: 0.3; mix-blend-mode: overlay; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/></filter><rect width='200' height='200' filter='url(%23n)' opacity='0.4'/></svg>"); }
.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(--red); 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(--red); }
.hero-headline { font-family: var(--display); font-size: clamp(56px, 11vw, 200px); line-height: 0.85; letter-spacing: -0.05em; font-weight: 900; color: var(--ink); text-transform: uppercase; margin-bottom: 32px; max-width: 1400px; opacity: 0; transform: translateY(40px); animation: fadeUp 1s 0.4s forwards; }
.hero-headline em { color: var(--red); font-style: normal; }
.hero-headline .cv-stroke { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.hero-deck { font-family: var(--sans); font-size: 22px; 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-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(--mono); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer; transition: transform 0.2s, background 0.2s, color 0.2s; }
.btn-primary { background: var(--red); color: white; }
.btn-primary:hover { background: var(--ink); color: var(--red); transform: translateY(-2px); }
.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 card */
.hero-side { position: absolute; right: 32px; bottom: 60px; z-index: 3; background: rgba(10, 10, 10, 0.8); backdrop-filter: blur(20px); border: 1px solid var(--rule-2); border-radius: 4px; padding: 20px 24px; display: flex; align-items: center; gap: 14px; max-width: 340px; opacity: 0; transform: translateY(20px); animation: fadeUp 1s 1.1s forwards; }
.hero-side-icon { width: 44px; height: 44px; background: var(--red); color: white; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.hero-side-h { font-family: var(--display); font-size: 14px; font-weight: 800; color: var(--ink); text-transform: uppercase; letter-spacing: 0.02em; display: block; margin-bottom: 2px; }
.hero-side-p { font-family: var(--mono); font-size: 11px; 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(--red); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-kicker::before { content: ''; width: 32px; height: 1px; background: var(--red); }
.section-headline { font-family: var(--display); font-size: clamp(48px, 7vw, 120px); line-height: 0.9; letter-spacing: -0.04em; font-weight: 900; color: var(--ink); text-transform: uppercase; margin-bottom: 24px; max-width: 1200px; }
.section-headline em { color: var(--red); font-style: normal; }
.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-num { font-family: var(--display); font-size: clamp(48px, 5vw, 80px); font-weight: 900; line-height: 1; color: var(--ink); display: block; margin-bottom: 16px; letter-spacing: -0.04em; }
.stat-num em { color: var(--red); font-style: normal; }
.stat-lbl { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 8px; }
.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; cursor: pointer; }
.svc-card-bg { position: absolute; inset: 0; z-index: 0; }
.svc-card-bg img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.6) brightness(0.55) contrast(1.1); transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s; }
.svc-card:hover .svc-card-bg img { transform: scale(1.08); filter: grayscale(0.2) brightness(0.7); }
.svc-card-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,5,5,0.4) 0%, rgba(5,5,5,0.85) 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(--red); display: block; margin-bottom: 8px; }
.svc-card-title { font-family: var(--display); font-size: 36px; font-weight: 900; line-height: 0.95; letter-spacing: -0.03em; 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(--red); 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(--ink); }
@media (max-width: 700px) { .svc-grid { grid-template-columns: 1fr; } }

/* Pull quote */
.pq { padding: 140px 0; text-align: center; position: relative; }
.pq-text { font-family: var(--display); font-size: clamp(28px, 4vw, 64px); line-height: 1.1; font-weight: 900; letter-spacing: -0.03em; color: var(--ink); text-transform: uppercase; max-width: 1100px; margin: 0 auto 32px; }
.pq-text em { color: var(--red); font-style: normal; }
.pq-cite { font-family: var(--mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-3); }

/* Gallery — full bleed */
.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; cursor: pointer; }
.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(0.8); transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s; }
.gallery-item:hover img { transform: scale(1.05); filter: grayscale(0); }
.gallery-caption { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 24px; background: linear-gradient(180deg, transparent 50%, rgba(5,5,5,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(--red); display: block; margin-bottom: 6px; }
.gallery-caption-h { font-family: var(--display); font-size: 22px; font-weight: 900; color: var(--ink); text-transform: uppercase; line-height: 1.1; }
@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: grayscale(0.5); }
.split-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 50%, rgba(5,5,5,0.4) 100%); z-index: 1; }
.split-img-badge { position: absolute; bottom: 20px; left: 20px; z-index: 2; background: var(--red); color: white; padding: 8px 14px; font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 700; }
.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(--red); font-style: normal; }
.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(184, 52, 26, 0.18) 0%, 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 { color: var(--red); 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(--red); font-weight: 600; }

/* 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(--red); 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(--red); border-color: var(--red); }
.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; } }
