/* ============================================================
   CAVALLO — Variant F · AdaptUs
   Cream + warm orange + deep cyan, MSP-family premium
   ============================================================ */

:root {
  --bg: #faf6ee;
  --bg-2: #f3ede0;
  --bg-3: #ffffff;
  --ink: #1c1917;
  --ink-soft: #57534e;
  --ink-3: #a8a29e;
  --rule: rgba(28, 25, 23, 0.08);
  --rule-2: rgba(28, 25, 23, 0.16);
  --orange: #f57c00;
  --orange-2: #e65100;
  --orange-soft: #fff4e6;
  --cyan-deep: #0c4a6e;
  --cyan-light: #06b6d4;
  --dark-grad: linear-gradient(135deg, #0f172a 0%, #1e3a5f 50%, #0c4a6e 100%);

  --display: 'Instrument Serif', 'Playfair Display', Georgia, serif;
  --body: '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(--body);
  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(--orange); color: white; }

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* 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-style: italic; color: var(--orange-2); line-height: 1; }
.loader-bar { width: 200px; 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(--orange); 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; background: rgba(250, 246, 238, 0.7); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); transition: background 0.3s, padding 0.3s, border-color 0.3s; border-bottom: 1px solid transparent; }
.nav.is-stuck { padding: 14px 0; background: rgba(250, 246, 238, 0.95); border-bottom-color: var(--rule); }
.nav-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.brand-mark { width: 40px; height: 40px; background: var(--orange); color: white; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 24px; font-style: italic; font-weight: 400; border-radius: 8px; }
.brand-name { font-family: var(--display); font-size: 18px; font-weight: 400; line-height: 1; letter-spacing: -0.01em; }
.brand-name em { font-style: italic; color: var(--ink-soft); font-size: 14px; display: block; margin-top: 2px; }
.primary-nav { display: flex; align-items: center; gap: 32px; }
.nav-link { font-family: var(--body); font-size: 14px; font-weight: 500; color: var(--ink-soft); padding: 8px 0; transition: color 0.2s; }
.nav-link:hover { color: var(--orange); }
.nav-cta { background: var(--orange); color: white; padding: 12px 22px; font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; transition: background 0.2s, transform 0.2s; }
.nav-cta:hover { background: var(--orange-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); border-radius: 8px; }
  .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); padding: 24px 32px 32px; border-bottom: 1px solid var(--rule); gap: 16px; align-items: flex-start; }
}

/* Hero */
.hero { position: relative; overflow: hidden; padding: 160px 0 100px; }
.hero-photo { position: absolute; inset: 0; z-index: 0; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(0.3) brightness(0.95); }
.hero-photo::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(250, 246, 238, 0.4) 0%, rgba(250, 246, 238, 0.85) 50%, var(--bg) 100%); }
.hero-inner { position: relative; z-index: 1; max-width: 1280px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; align-items: center; }
.hero-content { max-width: 620px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; border: 1px solid var(--orange); border-radius: 100px; background: var(--orange-soft); font-family: var(--accent-font); font-size: 12px; font-weight: 500; letter-spacing: 0.04em; color: var(--orange-2); margin-bottom: 24px; }
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.hero-headline { font-family: var(--display); font-size: clamp(48px, 6.5vw, 96px); line-height: 0.95; font-weight: 400; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 20px; }
.hero-headline em { color: var(--orange); font-style: italic; font-weight: 400; }
.hero-sub { font-family: var(--display); font-size: 22px; font-style: italic; color: var(--ink-soft); margin-bottom: 24px; line-height: 1.3; }
.hero-deck { font-family: var(--body); font-size: 17px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 32px; }
.hero-deck strong { color: var(--ink); font-weight: 600; }
.hero-deck .orange { color: var(--orange); font-weight: 600; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 16px 28px; font-family: var(--body); font-size: 15px; font-weight: 600; border-radius: 8px; cursor: pointer; transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s; border: 0; }
.btn-primary { background: var(--orange); color: white; box-shadow: 0 8px 24px -8px rgba(245, 124, 0, 0.4); }
.btn-primary:hover { background: var(--orange-2); transform: translateY(-2px); box-shadow: 0 12px 28px -8px rgba(245, 124, 0, 0.5); }
.btn-ghost { background: white; color: var(--ink); border: 1px solid var(--rule-2); }
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink); transform: translateY(-2px); }
@media (max-width: 1000px) { .hero-inner { grid-template-columns: 1fr; gap: 48px; } }

/* Hero dashboard mock */
.hero-visual { position: relative; }
.dash-ai { position: absolute; top: -20px; right: -10px; z-index: 5; background: white; border: 1px solid var(--rule); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 12px; box-shadow: 0 12px 32px -12px rgba(28, 25, 23, 0.18); }
.dash-ai-icon { width: 32px; height: 32px; background: var(--orange); color: white; display: flex; align-items: center; justify-content: center; font-size: 14px; border-radius: 6px; }
.dash-ai-lbl { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.dash-ai-meta { font-family: var(--mono); font-size: 10px; color: var(--ink-3); letter-spacing: 0.04em; }
.dash-card { background: white; border: 1px solid var(--rule); border-radius: 16px; overflow: hidden; box-shadow: 0 24px 60px -20px rgba(28, 25, 23, 0.18); }
.dash-bar { display: flex; align-items: center; gap: 8px; padding: 14px 18px; background: var(--bg-2); border-bottom: 1px solid var(--rule); }
.dash-dot { width: 10px; height: 10px; border-radius: 50%; }
.dash-dot.r { background: #ff5f57; } .dash-dot.y { background: #ffbd2e; } .dash-dot.g { background: #28c840; }
.dash-url { margin-left: 16px; font-family: var(--mono); font-size: 11px; color: var(--ink-soft); background: white; padding: 4px 12px; border-radius: 4px; flex: 1; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px; background: var(--rule); }
.dash-stat { padding: 20px; background: white; }
.dash-stat-1 { background: var(--orange); color: white; }
.dash-stat-2 { background: var(--dark-grad); color: white; }
.dash-stat-1 .dash-stat-lbl, .dash-stat-2 .dash-stat-lbl { color: rgba(255,255,255,0.8); }
.dash-stat-1 .dash-stat-meta, .dash-stat-2 .dash-stat-meta { color: rgba(255,255,255,0.6); }
.dash-stat-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 8px; }
.dash-stat-val { font-family: var(--display); font-size: 32px; font-weight: 400; line-height: 1; color: var(--ink); display: block; margin-bottom: 6px; }
.dash-stat-val span { font-size: 12px; font-weight: 500; }
.dash-stat-1 .dash-stat-val, .dash-stat-2 .dash-stat-val { color: white; }
.dash-stat-meta { font-family: var(--body); font-size: 11px; color: var(--ink-soft); }
.dash-chart { padding: 20px; background: var(--dark-grad); }
.dash-chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.dash-chart-title { font-family: var(--body); font-size: 12px; color: white; font-weight: 600; }
.dash-chart-pct { font-family: var(--mono); font-size: 11px; color: var(--orange); }
.dash-bars { display: flex; align-items: flex-end; justify-content: space-between; height: 80px; gap: 4px; }
.dash-bar-b { flex: 1; background: var(--orange); border-radius: 2px 2px 0 0; transition: height 0.6s; }
@media (max-width: 1000px) { .hero-visual { max-width: 480px; margin: 0 auto; } .dash-ai { right: 0; } }

/* Sections */
.section { padding: 120px 0; position: relative; }
.section-wide { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.section-kicker { font-family: var(--accent-font); font-size: 12px; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--orange); display: inline-flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-kicker::before { content: ''; width: 24px; height: 1.5px; background: var(--orange); }
.section-headline { font-family: var(--display); font-size: clamp(40px, 5vw, 80px); line-height: 1; font-weight: 400; letter-spacing: -0.03em; color: var(--ink); margin-bottom: 20px; }
.section-headline em { color: var(--orange); font-style: italic; }
.section-deck { font-family: var(--body); font-size: 18px; line-height: 1.6; color: var(--ink-soft); max-width: 640px; margin-bottom: 60px; }

/* Why strip */
.why-strip { padding: 60px 0; background: white; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.why-grid { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.why-item { display: flex; align-items: flex-start; gap: 14px; }
.why-icon { width: 40px; height: 40px; background: var(--orange-soft); color: var(--orange); display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 18px; flex-shrink: 0; }
.why-h { font-family: var(--body); font-size: 15px; font-weight: 600; color: var(--ink); display: block; margin-bottom: 4px; }
.why-p { font-family: var(--body); font-size: 13px; color: var(--ink-soft); line-height: 1.5; }
@media (max-width: 900px) { .why-grid { grid-template-columns: 1fr 1fr; } }

/* Stats */
.stats { padding: 100px 0; background: var(--bg-2); }
.stats-grid { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.stat-num { font-family: var(--display); font-size: 56px; font-style: italic; font-weight: 400; color: var(--orange-2); line-height: 1; display: block; margin-bottom: 12px; }
.stat-lbl { font-family: var(--accent-font); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); display: block; margin-bottom: 10px; }
.stat-p { font-family: var(--body); font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
@media (max-width: 900px) { .stats-grid { grid-template-columns: 1fr 1fr; } }

/* Services split */
.services { padding: 120px 0; }
.services-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; }
.section-head { margin-bottom: 60px; }
.split-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 900px) { .split-grid { grid-template-columns: 1fr; } }
.service-block { padding: 40px; border-radius: 18px; position: relative; }
.service-block-light { background: white; border: 1px solid var(--rule); }
.service-block-dark { background: var(--dark-grad); color: white; position: relative; overflow: hidden; }
.service-block-dark::after { content: ''; position: absolute; right: -50px; top: -50px; width: 200px; height: 200px; background: radial-gradient(circle, rgba(6, 182, 212, 0.4), transparent 70%); }
.block-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.block-icon { width: 48px; height: 48px; background: var(--orange-soft); color: var(--orange); display: flex; align-items: center; justify-content: center; border-radius: 10px; font-size: 20px; }
.service-block-dark .block-icon { background: rgba(255,255,255,0.1); color: var(--cyan-light); }
.block-tag { font-family: var(--accent-font); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); padding: 4px 12px; border: 1px solid var(--rule-2); border-radius: 100px; }
.service-block-dark .block-tag { color: rgba(255,255,255,0.7); border-color: rgba(255,255,255,0.2); }
.block-title { font-family: var(--display); font-size: 36px; line-height: 1; font-weight: 400; letter-spacing: -0.02em; color: var(--ink); margin-bottom: 12px; }
.service-block-dark .block-title { color: white; }
.block-title em { color: var(--orange); font-style: italic; }
.service-block-dark .block-title em { color: var(--cyan-light); }
.block-deck { font-family: var(--body); font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin-bottom: 28px; }
.service-block-dark .block-deck { color: rgba(255,255,255,0.75); }
.feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 28px; }
.feature { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--bg); border-radius: 8px; font-family: var(--body); font-size: 13px; color: var(--ink); font-weight: 500; }
.service-block-dark .feature { background: rgba(255,255,255,0.06); color: white; }
.feature-ico { width: 16px; height: 16px; color: var(--orange); }
.service-block-dark .feature-ico { color: var(--cyan-light); }
.block-cta { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--orange); display: inline-flex; align-items: center; gap: 8px; }
.service-block-dark .block-cta { color: var(--cyan-light); }

/* Gallery */
.gallery { padding: 120px 0; background: var(--bg-2); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
.gallery-card { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 16px; background: var(--bg-3); }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.gallery-card:hover img { transform: scale(1.05); }
.gallery-card-cap { position: absolute; bottom: 0; left: 0; right: 0; padding: 20px; background: linear-gradient(180deg, transparent, rgba(0,0,0,0.7)); color: white; }
.gallery-card-cap-cat { font-family: var(--accent-font); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; opacity: 0.85; margin-bottom: 4px; }
.gallery-card-cap-h { font-family: var(--display); font-size: 22px; font-style: italic; line-height: 1.1; }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .gallery-grid { grid-template-columns: 1fr; } }

/* Trusted */
.trusted { padding: 100px 0; }
.trusted-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; text-align: center; }
.trusted-pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 16px; background: white; border: 1px solid var(--rule); border-radius: 100px; font-family: var(--accent-font); font-size: 12px; color: var(--ink-soft); margin-bottom: 20px; }
.trusted-pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); }
.trusted-h { font-family: var(--display); font-size: clamp(32px, 4vw, 56px); font-weight: 400; line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 16px; }
.trusted-h em { color: var(--orange); font-style: italic; }
.trusted-p { font-family: var(--body); font-size: 17px; color: var(--ink-soft); max-width: 640px; margin: 0 auto 40px; }
.client-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; max-width: 900px; margin: 0 auto 60px; }
.client-card { display: flex; align-items: center; gap: 12px; padding: 16px 20px; background: white; border: 1px solid var(--rule); border-radius: 12px; text-align: left; transition: border-color 0.2s, transform 0.2s; }
.client-card:hover { border-color: var(--orange); transform: translateY(-2px); }
.client-mark { width: 36px; height: 36px; background: var(--ink); color: white; display: flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 18px; font-style: italic; border-radius: 8px; flex-shrink: 0; }
.client-name { font-family: var(--body); font-size: 13px; font-weight: 600; color: var(--ink); display: block; }
.client-cat { font-family: var(--accent-font); font-size: 11px; color: var(--ink-3); letter-spacing: 0.04em; }
@media (max-width: 700px) { .client-grid { grid-template-columns: 1fr 1fr; } }

.alliances-row { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; justify-content: center; padding-top: 32px; border-top: 1px solid var(--rule); }
.alliances-tag { display: flex; align-items: center; gap: 12px; }
.alliances-icon { width: 32px; height: 32px; background: var(--orange-soft); color: var(--orange); display: flex; align-items: center; justify-content: center; border-radius: 8px; font-size: 14px; }
.alliances-h { font-family: var(--body); font-size: 14px; font-weight: 600; color: var(--ink); display: block; }
.alliances-sub { font-family: var(--accent-font); font-size: 11px; color: var(--ink-3); }
.alliances-logos { display: flex; gap: 8px; flex-wrap: wrap; }
.partner-pill { font-family: var(--accent-font); font-size: 12px; font-weight: 500; padding: 6px 12px; background: var(--bg-2); color: var(--ink-soft); border-radius: 100px; border: 1px solid var(--rule); }
.partner-pill.red { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.partner-pill.blue { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.partner-pill.outline { background: transparent; border-color: var(--ink-3); }

/* CTA */
.cta { padding: 140px 0; text-align: center; }
.cta-inner { max-width: 900px; margin: 0 auto; padding: 0 32px; }
.cta-h { font-family: var(--display); font-size: clamp(48px, 7vw, 96px); line-height: 1; font-weight: 400; font-style: italic; letter-spacing: -0.03em; margin-bottom: 24px; }
.cta-h em { color: var(--orange); }
.cta-p { font-family: var(--body); font-size: 18px; color: var(--ink-soft); max-width: 580px; margin: 0 auto 36px; }
.cta-ctas { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-meta { margin-top: 24px; font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.cta-meta strong { color: var(--orange); font-weight: 600; }

/* Footer */
.footer { background: var(--ink); color: white; padding: 80px 0 32px; }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 0 32px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 60px; }
.footer .brand-name { color: white; }
.footer .brand-name em { color: rgba(255,255,255,0.5); }
.footer .brand-mark { background: var(--orange); }
.footer-line { font-family: var(--body); font-size: 14px; line-height: 1.7; color: rgba(255,255,255,0.7); margin-top: 20px; max-width: 320px; }
.footer-h { font-family: var(--accent-font); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--orange); margin-bottom: 18px; display: block; }
.footer-list li { margin-bottom: 10px; }
.footer-list a { font-family: var(--body); font-size: 14px; color: rgba(255,255,255,0.7); border-bottom: 1px solid transparent; transition: color 0.2s, border-color 0.2s; }
.footer-list a:hover { color: var(--orange); border-color: var(--orange); }
.footer-base { max-width: 1280px; margin: 0 auto; padding: 24px 32px 0; border-top: 1px solid rgba(255,255,255,0.1); display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 12px; }
@media (max-width: 900px) { .footer-inner { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .footer-inner { grid-template-columns: 1fr; } }

/* Reveal */
[data-reveal] { opacity: 0; transform: translateY(20px); transition: opacity 0.8s ease, transform 0.8s ease; }
[data-reveal].is-in { opacity: 1; transform: translateY(0); }
.reveal-stagger > * { opacity: 0; transform: translateY(20px); transition: opacity 0.7s, transform 0.7s; }
.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) { [data-reveal], .reveal-stagger > * { opacity: 1 !important; transform: none !important; transition: none !important; } }
