/* =========================================================
   THE AV BROS — Design System
   Built around the real brand mark: a bold geometric wordmark
   (Nexa Bold) in a steel-slate gradient against dark charcoal.
   The scene toggle in the hero is the one place color moves —
   everywhere else the brand's own steel accent stays fixed.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500;600;700&display=swap');

:root {
  /* Color */
  --charcoal-950: #121316;
  --charcoal-900: #17181C;
  --charcoal-850: #1C1E23;
  --charcoal-750: #262930;
  --charcoal-700: #33363D;
  --brand: #7C908F;       /* sampled from the real AV Bros logo (steel/slate) */
  --brand-bright: #9DB0AE;
  --brass: #C89B5C;
  --amber-glow: #E8A857;
  --paper: #EDEEEC;
  --paper-dim: #A6ABAA;
  --paper-faint: #6C7170;
  --line: rgba(237, 238, 236, 0.09);

  /* Type */
  --font-display: 'Poppins', 'Nexa', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  /* Scene state defaults (Evening) — scoped to the hero only */
  --scene-glow-1: var(--brass);
  --scene-glow-2: var(--amber-glow);
  --scene-bg-tint: 201, 155, 92;
}

/* Scene states — the interactive signature element on the hero */
body.scene-morning {
  --scene-glow-1: #7FB3A8;
  --scene-glow-2: #E8D8A8;
  --scene-bg-tint: 127, 179, 168;
}
body.scene-evening {
  --scene-glow-1: var(--brass);
  --scene-glow-2: var(--amber-glow);
  --scene-bg-tint: 201, 155, 92;
}
body.scene-night {
  --scene-glow-1: #4A5B8A;
  --scene-glow-2: #7A6AA8;
  --scene-bg-tint: 74, 91, 138;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--charcoal-950);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.8s ease;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 32px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--brand);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 4.6vw, 3.9rem); font-weight: 700; }
h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); }
h3 { font-size: 1.25rem; }

p.lede {
  font-size: 1.15rem;
  color: var(--paper-dim);
  max-width: 46ch;
}

/* ---------------- Nav ---------------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 19, 25, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.brand { display: flex; align-items: center; }
.brand img.brand-logo { height: 52px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: 0.01em;
  color: var(--paper-dim);
}
.nav-links a { transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--brand-bright); }

.nav-cta {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12.5px;
  letter-spacing: 0.05em;
  border: 1px solid var(--brand);
  color: var(--brand);
  padding: 10px 18px;
  border-radius: 2px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-cta:hover { background: var(--brand); color: var(--charcoal-950); }

/* ---------------- Hero ---------------- */
.hero {
  position: relative;
  padding: 100px 0 80px;
  overflow: hidden;
}

/* Background photo slider — crossfades with a slow Ken Burns drift */
.hero-slider { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1);
  transition: opacity 1.8s ease;
}
.hero-slide.is-active {
  opacity: 0.82;
  z-index: 1;
  animation: heroKenBurns 6s ease-out forwards;
}
@keyframes heroKenBurns {
  from { transform: scale(1); }
  to { transform: scale(1.07); }
}

/* Color mood overlay — shifts with the Morning/Evening/Night scene toggle */
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(100deg,
      rgba(18,19,22,0.95) 0%,
      rgba(18,19,22,0.78) 30%,
      rgba(18,19,22,0.4) 58%,
      rgba(18,19,22,0.16) 100%),
    radial-gradient(ellipse at 78% 28%, rgba(var(--scene-bg-tint), 0.4), transparent 62%);
  transition: background 0.8s ease;
}

.hero .wrap { position: relative; z-index: 2; }
.hero-top { max-width: 640px; margin-bottom: 56px; }
.hero-top .eyebrow { margin-bottom: 18px; display: block; }
.hero-top p.lede { margin-top: 20px; }

.hero-cta-row { margin-top: 32px; display: flex; gap: 16px; flex-wrap: wrap; }
.btn-primary, .btn-ghost {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.05em;
  padding: 14px 26px;
  border-radius: 2px;
  display: inline-block;
  transition: all 0.2s ease;
}
.btn-primary {
  background: var(--brand);
  color: var(--charcoal-950);
  transition: background 0.8s ease, transform 0.2s ease;
}
.btn-primary:hover { transform: translateY(-2px); }
.hero .btn-primary { background: var(--scene-glow-1); }
.btn-ghost {
  border: 1px solid var(--line);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--paper-dim); }

/* Scene control — signature interactive element */
.scene-control {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 22px 26px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), transparent);
}
.scene-control .sc-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 14px;
  display: block;
}
.scene-buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.scene-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.05em;
  padding: 10px 20px;
  border: 1px solid var(--charcoal-700);
  border-radius: 20px;
  color: var(--paper-dim);
  background: transparent;
  cursor: pointer;
  transition: all 0.25s ease;
}
.scene-btn:hover { border-color: var(--paper-dim); color: var(--paper); }
.scene-btn.is-active {
  border-color: var(--scene-glow-1);
  color: var(--scene-glow-1);
  background: rgba(var(--scene-bg-tint), 0.08);
}
.scene-readout {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--paper-faint);
  min-height: 18px;
}
.scene-readout .val { color: var(--scene-glow-1); transition: color 0.8s ease; }

/* ---------------- Sections ---------------- */
section { padding: 88px 0; border-top: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head .eyebrow { display: block; margin-bottom: 14px; }

/* Process steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; counter-reset: step; }
.step { position: relative; padding-top: 28px; border-top: 1px solid var(--line); }
.step .num {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--brand);
  display: block;
  margin-bottom: 16px;
}
.step p { color: var(--paper-dim); margin-top: 10px; font-size: 0.96rem; }

/* Cards grid */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 36px;
  background: var(--charcoal-900);
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.card:hover { border-color: var(--charcoal-700); }
.card { transition: border-color 0.25s ease, transform 0.25s ease; }
.card .tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand); }
.card h3 { margin-top: 14px; }
.card p { color: var(--paper-dim); margin-top: 12px; font-size: 0.95rem; }
.card .go { margin-top: 20px; font-family: var(--font-mono); font-size: 12.5px; color: var(--brand); display: inline-block; }

.card-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

/* Partners strip */
.partners { display: flex; gap: 48px; flex-wrap: wrap; align-items: center; }
.partner-badge {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  color: var(--paper-faint);
  border: 1px solid var(--line);
  padding: 12px 22px;
  border-radius: 2px;
}

/* Newsletter / contact band */
.band {
  background: var(--charcoal-900);
  border-radius: 6px;
  padding: 56px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.band h2 { max-width: 480px; }
.band-form { display: flex; gap: 10px; }
.band-form input {
  background: var(--charcoal-950);
  border: 1px solid var(--charcoal-700);
  color: var(--paper);
  padding: 13px 16px;
  border-radius: 2px;
  font-family: var(--font-body);
  min-width: 240px;
}
.band-form input::placeholder { color: var(--paper-faint); }

/* Contact info block */
.contact-block { display: flex; gap: 64px; flex-wrap: wrap; }
.contact-block .item .eyebrow { margin-bottom: 8px; }
.contact-block .item a, .contact-block .item div { font-family: var(--font-body); font-weight: 600; font-size: 1.3rem; }

/* Footer */
footer { border-top: 1px solid var(--line); padding: 64px 0 40px; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 56px;
}
.footer-grid h4 {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 18px;
}
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-grid a { color: var(--paper-dim); font-size: 0.92rem; transition: color 0.2s ease; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 28px; border-top: 1px solid var(--line);
  font-size: 0.85rem; color: var(--paper-faint); flex-wrap: wrap; gap: 16px;
}
.footer-socials { display: flex; gap: 18px; font-family: var(--font-mono); font-size: 12px; }
.footer-socials a:hover { color: var(--brand); }

/* Inner page hero (smaller) */
.page-hero { padding: 90px 0 80px; position: relative; overflow: hidden; }
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero .eyebrow { margin-bottom: 16px; display: block; }
.page-hero p.lede { margin-top: 18px; }

.divider-list { display: flex; flex-direction: column; }
.divider-item {
  padding: 28px 0;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}
.divider-item:last-child { border-bottom: 1px solid var(--line); }
.divider-item .di-label { font-family: var(--font-mono); font-size: 12px; color: var(--paper-faint); min-width: 140px; }
.divider-item .di-image {
  width: 88px; height: 88px;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.divider-item .di-body { max-width: 640px; flex: 1; }
.divider-item .di-body h3 { margin-bottom: 8px; }
.divider-item .di-body p { color: var(--paper-dim); font-size: 0.95rem; }

.card .card-image {
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
}

.media-split {
  display: flex;
  gap: 56px;
  align-items: center;
  flex-wrap: wrap;
}
.media-split .media-text { flex: 1; min-width: 280px; }
.media-split img {
  flex: 1;
  min-width: 280px;
  max-width: 480px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: cover;
  max-height: 340px;
  width: 100%;
}

/* Responsive */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .steps, .card-grid, .card-grid-3, .process-grid, .stat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .band { padding: 36px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.01ms !important; }
}

/* Focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

/* =========================================================
   MOTION SYSTEM — scroll reveals, kinetic type, tilt, glow
   ========================================================= */

/* Nav: shrinks and gains depth on scroll */
.site-nav { transition: box-shadow 0.3s ease; }
.site-nav .wrap { transition: height 0.3s ease; }
.site-nav.scrolled { box-shadow: 0 10px 34px rgba(0,0,0,0.4); }
.site-nav.scrolled .wrap { height: 66px; }

/* Reveal-on-scroll: applied to steps, cards, divider items, etc. */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(.16,.84,.44,1), transform 0.7s cubic-bezier(.16,.84,.44,1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* Kinetic hero heading — words rise in on load */
.kinetic-heading .kw-mask { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.08em; }
.kinetic-heading .kw {
  display: inline-block;
  transform: translateY(112%);
  opacity: 0;
  transition: transform 0.75s cubic-bezier(.16,.84,.44,1), opacity 0.5s ease;
}
.kinetic-heading .kw.in { transform: translateY(0); opacity: 1; }

/* Card tilt — JS sets transform on mousemove */
.card { will-change: transform; }

/* Hero cursor glow */
.cursor-glow {
  position: absolute;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--scene-bg-tint), 0.22), transparent 70%);
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.35s ease, background 0.8s ease;
  z-index: 1;
}
.hero .wrap { position: relative; z-index: 2; }

/* Button press feedback */
.btn-primary, .nav-cta, .scene-btn { transition: transform 0.15s ease, background 0.8s ease, border-color 0.2s ease, color 0.2s ease; }
.btn-primary:active, .nav-cta:active, .scene-btn:active { transform: scale(0.95); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .kinetic-heading .kw { opacity: 1 !important; transform: none !important; }
  .card { transform: none !important; }
  .cursor-glow { display: none; }
}

/* Colorful category accents for service tags */
.tag-blue   { color: #6FA8DC !important; }
.tag-amber  { color: #E8A857 !important; }
.tag-violet { color: #A88FE0 !important; }
.tag-coral  { color: #E08A7D !important; }
.tag-green  { color: #7FBF8F !important; }

/* =========================================================
   Section background image (Solutions section, etc.)
   ========================================================= */
.section-with-bg { position: relative; overflow: hidden; }
.section-bg-image {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.7;
  z-index: 0;
}
.section-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,19,22,0.62) 0%, rgba(18,19,22,0.5) 40%, rgba(18,19,22,0.72) 100%);
  z-index: 0;
}
.section-with-bg .wrap { position: relative; z-index: 1; }

/* =========================================================
   Colorful contact section
   ========================================================= */
.contact-colorful {
  background: linear-gradient(135deg, rgba(124,144,143,0.14), rgba(200,155,92,0.08));
  position: relative;
}
.contact-colorful .contact-block .item a {
  transition: color 0.2s ease, text-shadow 0.2s ease;
}
.contact-colorful .contact-block .item a:hover {
  color: var(--brand-bright);
}
.social-icons { display: flex; gap: 14px; margin-top: 4px; }
.social-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--paper-dim);
  transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), color 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.social-icon:hover { transform: translateY(-4px) scale(1.08); }
.social-fb:hover { color: #ffffff; background: #1877F2; border-color: #1877F2; }
.social-li:hover { color: #ffffff; background: #0A66C2; border-color: #0A66C2; }
.social-ig:hover {
  color: #ffffff;
  border-color: transparent;
  background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
}

/* =========================================================
   Brand click-reveal (Residential > Platforms)
   ========================================================= */
.brand-reveal {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
}
.brand-reveal-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  transition: opacity 0.35s ease;
  z-index: 0;
}
.brand-reveal-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(18,19,22,0.15) 0%, rgba(18,19,22,0.95) 88%);
  z-index: 1;
}
.brand-buttons { position: relative; z-index: 2; display: flex; gap: 10px; flex-wrap: wrap; }
.brand-btn {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  padding: 10px 20px;
  border: 1px solid var(--charcoal-700);
  border-radius: 20px;
  color: var(--paper-dim);
  background: rgba(18,19,22,0.5);
  cursor: pointer;
  transition: all 0.25s ease;
}
.brand-btn:hover { border-color: var(--paper-dim); color: var(--paper); }
.brand-btn.is-active { border-color: var(--brand); color: var(--brand-bright); background: rgba(18,19,22,0.75); }
.brand-caption {
  position: relative; z-index: 2;
  margin-top: 18px;
  color: var(--paper-dim);
  max-width: 52ch;
  font-size: 0.95rem;
}

/* =========================================================
   Our Way: process cards + stat cards
   ========================================================= */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.process-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 28px 22px;
  background: var(--charcoal-900);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.process-card:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: 0 16px 34px rgba(0,0,0,0.32); }
.process-icon { width: 52px; height: 52px; object-fit: contain; margin-bottom: 16px; }
.process-card .num { font-family: var(--font-mono); font-size: 12px; color: var(--brand); display: block; margin-bottom: 8px; }
.process-card p { color: var(--paper-dim); font-size: 0.92rem; margin-top: 8px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.stat-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px;
  background: var(--charcoal-900);
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--brand); box-shadow: 0 16px 34px rgba(0,0,0,0.32); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--brand-bright);
  display: block;
  margin-bottom: 14px;
}
.stat-card h3 { margin-bottom: 10px; }
.stat-card p { color: var(--paper-dim); font-size: 0.92rem; }

/* Solutions section cards: let the background photo show through */
#solutions .card {
  background: rgba(23, 24, 28, 0.5);
  backdrop-filter: blur(2px);
}
