/* ============================================================
   CAVALLO — Variant A · Animated
   Dark editorial, cream + gold accent, real motion
   ============================================================ */

:root {
  --bg: #0a0e1a;
  --bg-2: #111726;
  --bg-3: #1a2236;
  --ink: #f5f0e6;
  --ink-2: #b8b2a6;
  --ink-3: #6b6960;
  --rule: rgba(245, 240, 230, 0.08);
  --rule-2: rgba(245, 240, 230, 0.18);
  --cream: #f5e6c8;
  --gold: #c4a674;
  --gold-2: #b89456;

  --sans: 'Inter', -apple-system, sans-serif;
  --display: 'Playfair Display', Georgia, 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(--gold); color: var(--bg); }

/* Lenis smooth scroll */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

/* 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; font-style: italic; line-height: 1; color: var(--ink); letter-spacing: -0.04em; }
.loader-mark em { color: var(--gold); font-style: italic; }
.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: var(--gold); 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(10, 14, 26, 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: baseline; gap: 6px; font-family: var(--display); font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: -0.04em; color: var(--ink); text-transform: none; }
.brand-c { color: var(--gold); font-size: 28px; line-height: 1; font-style: italic; }
.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; font-style: normal; }
.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(--gold); }
.nav-cta { background: var(--gold); color: var(--bg); 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(--cream); 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(10, 14, 26, 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.45) contrast(1.1) saturate(0.7); }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 26, 0.5) 0%, rgba(10, 14, 26, 0.75) 50%, 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(--gold); 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(--gold); }
.hero-headline { font-family: var(--display); font-size: clamp(56px, 10vw, 180px); line-height: 0.88; letter-spacing: -0.05em; 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 em { color: var(--gold); font-style: italic; }
.hero-headline .stroke { -webkit-text-stroke: 2px var(--ink); color: transparent; }
.hero-deck { font-family: var(--sans); font-size: 21px; line-height: 1.55; 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: 600; }
.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; border: 0; }
.btn-primary { background: var(--gold); color: var(--bg); }
.btn-primary:hover { background: var(--cream); 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 { position: absolute; right: 32px; bottom: 60px; z-index: 3; background: rgba(17, 23, 38, 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(--gold); color: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; font-family: var(--display); font-style: italic; font-weight: 900; }
.hero-side-h { font-family: var(--display); font-size: 14px; font-weight: 700; color: var(--ink); display: block; margin-bottom: 2px; }
.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; } }

.hero-scroll { position: absolute; left: 50%; bottom: 32px; transform: translateX(-50%); z-index: 3; font-family: var(--mono); font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 12px; opacity: 0; animation: fadeUp 1s 1.3s forwards; }
.hero-scroll-line { width: 1px; height: 48px; background: linear-gradient(180deg, var(--ink-3), transparent); animation: scrollPulse 2s infinite; }
@keyframes scrollPulse { 0%, 100% { opacity: 0.3; } 50% { opacity: 1; } }
@media (max-width: 700px) { .hero-scroll { 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(--gold); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.section-kicker::before { content: ''; width: 32px; height: 1px; background: var(--gold); }
.section-headline { font-family: var(--display); font-size: clamp(48px, 7vw, 120px); line-height: 0.92; letter-spacing: -0.04em; font-weight: 900; color: var(--ink); margin-bottom: 24px; max-width: 1200px; }
.section-headline em { color: var(--gold); font-style: italic; }
.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; font-style: italic; }
.stat-num em { color: var(--gold); font-style: italic; }
.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: grayscale(0.4) brightness(0.55) contrast(1.1); 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: grayscale(0) brightness(0.7); }
.svc-card-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 14, 26, 0.3) 0%, rgba(10, 14, 26, 0.9) 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(--gold); 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); font-style: italic; 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(--gold); 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: 160px 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; font-style: italic; letter-spacing: -0.03em; color: var(--ink); max-width: 1100px; margin: 0 auto 32px; }
.pq-text em { color: var(--gold); font-style: italic; }
.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: grayscale(0.7) brightness(0.7); transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s; }
.gallery-item:hover img { transform: scale(1.05); filter: grayscale(0) brightness(0.9); }
.gallery-caption { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: 24px; background: linear-gradient(180deg, transparent 50%, rgba(10, 14, 26, 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(--gold); display: block; margin-bottom: 6px; }
.gallery-caption-h { font-family: var(--display); font-size: 22px; font-weight: 900; font-style: italic; color: var(--ink); 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.4) brightness(0.7); }
.split-img::before { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 50%, rgba(10, 14, 26, 0.4) 100%); z-index: 1; }
.split-img-badge { position: absolute; bottom: 20px; left: 20px; z-index: 2; background: var(--gold); 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 h2 { font-family: var(--display); font-size: clamp(40px, 5vw, 72px); line-height: 1; font-weight: 900; font-style: italic; letter-spacing: -0.04em; color: var(--ink); margin-bottom: 24px; }
.split-body h2 em { color: var(--gold); font-style: italic; }
.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(196, 166, 116, 0.12) 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; font-style: italic; letter-spacing: -0.05em; color: var(--ink); margin-bottom: 32px; }
.cta-headline em { color: var(--gold); font-style: italic; }
.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(--gold); 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(--gold); 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(--gold); border-color: var(--gold); }
.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; } }
