/* ===========================================================
   Downing's Collision — Design System
   Palette: navy / steel / oxide red / cool off-white
   Type: Zilla Slab (display) + Inter (body) + IBM Plex Mono (data)
   =========================================================== */

@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@500;600&display=swap');

:root {
  --navy: #1B365D;
  --navy-deep: #142943;
  --steel: #5C6E85;
  --steel-light: #D6DCE3;
  --paper: #F9F9F9;
  --paper-dim: #EFEFEF;
  --accent: #D9A74A;
  --accent-hover: #C1913A;
  --white: #FFFFFF;
  --pewter: #5C6E85;
  --pewter-light: #94A2B3;

  --font-display: 'Poppins', -apple-system, sans-serif;
  --font-body: 'Inter', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 4px;
  --max-width: 1180px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--paper);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 32px;
}

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

h1 { font-size: clamp(2.4rem, 4.5vw, 3.6rem); }
h2 { font-size: clamp(1.8rem, 3vw, 2.4rem); }
h3 { font-size: 1.3rem; }

p { color: var(--steel); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 14px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-primary {
  background: var(--accent);
  color: var(--navy-deep);
  font-weight: 700;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline {
  background: transparent;
  border-color: var(--steel-light);
  color: var(--navy);
}
.btn-outline:hover { border-color: var(--navy); }
.btn-outline-light {
  background: transparent;
  border-color: rgba(255,255,255,0.35);
  color: var(--white);
}
.btn-outline-light:hover { border-color: var(--white); }

/* ---------- Header / Nav ---------- */
.topbar {
  background: var(--navy);
  color: var(--steel-light);
  font-size: 0.82rem;
}
.topbar .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
  flex-wrap: wrap;
  gap: 8px;
}
.topbar-left { display: flex; gap: 24px; flex-wrap: wrap; }
.topbar a { color: var(--steel-light); }
.topbar a:hover { color: var(--white); }
.topbar-item { display: flex; align-items: center; gap: 6px; }

header.site-header {
  background: var(--white);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--paper-dim);
}
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  max-width: var(--max-width);
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.logo svg { flex-shrink: 0; }
.logo .sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--pewter-light);
  text-transform: uppercase;
  margin-top: 2px;
}
nav.main-nav ul {
  display: flex;
  gap: 32px;
}
nav.main-nav a {
  color: var(--steel);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
  position: relative;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--navy); }
nav.main-nav a.active::after {
  content: '';
  position: absolute;
  bottom: -19px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}
.header-right { display: flex; align-items: center; gap: 20px; }
.header-phone {
  font-family: var(--font-mono);
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 600;
}
.nav-toggle { display: none; }

@media (max-width: 860px) {
  nav.main-nav { display: none; }
  .header-phone { display: none; }
  .topbar-left { display: none; }
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--navy);
    font-size: 1.4rem;
    cursor: pointer;
  }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(155deg, var(--navy) 0%, #4A5A68 100%);
  color: var(--white);
  padding: 84px 0 96px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero p.lead {
  color: var(--steel-light);
  font-size: 1.08rem;
  max-width: 480px;
  margin-bottom: 32px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-trust {
  display: flex;
  gap: 28px;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel-light);
  flex-wrap: wrap;
}
.hero-trust strong {
  color: var(--white);
  display: block;
  font-size: 1.1rem;
  font-family: var(--font-display);
  font-weight: 600;
}

@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
}

/* ---------- Before/After Slider (signature element) ---------- */
.compare {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.5);
  cursor: ew-resize;
  user-select: none;
  border: 1px solid rgba(255,255,255,0.12);
}
.compare-panel {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.compare-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}
.compare-before {
  background: #2b2f32;
}
.compare-after {
  background: #1C2B3A;
  overflow: hidden;
}
.compare-panel .compare-tag {
  position: relative;
  z-index: 2;
}
.compare-after-inner {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.compare-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: rgba(0,0,0,0.45);
  padding: 6px 12px;
  border-radius: 2px;
  color: var(--white);
}
.compare-tag.after-tag { background: var(--accent); }
.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  background: var(--white);
  transform: translateX(-50%);
  box-shadow: 0 0 0 1px rgba(0,0,0,0.2);
}
.compare-handle::after {
  content: '⇔';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  background: var(--white);
  color: var(--navy);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.compare-hint {
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--steel-light);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-top: 14px;
}

/* ---------- Sections ---------- */
section { padding: 104px 0; }
.section-head {
  max-width: 620px;
  margin-bottom: 60px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.bg-alt { background: var(--white); }
.bg-navy { background: var(--navy); color: var(--white); }
.bg-navy p { color: var(--steel-light); }
.bg-navy h2 { color: var(--white); }

/* ---------- Cards ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; }
@media (max-width: 860px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--white);
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--steel-light); transform: translateY(-2px); }
.card .icon-mark {
  width: 44px; height: 44px;
  border-radius: var(--radius);
  background: var(--paper);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 20px;
  color: var(--accent);
}
.card h3 { margin-bottom: 10px; }
.card p { font-size: 0.94rem; }

/* ---------- Placeholder photo blocks ---------- */
.ph-photo {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: repeating-linear-gradient(135deg, var(--paper-dim), var(--paper-dim) 12px, #dde1e4 12px, #dde1e4 24px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--steel-light);
}
.ph-photo span {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  background: rgba(255,255,255,0.85);
  padding: 6px 12px;
  border-radius: 2px;
}

/* ---------- Trust strip ---------- */
.trust-strip {
  background: var(--white);
  border-top: 1px solid var(--paper-dim);
  border-bottom: 1px solid var(--paper-dim);
  padding: 34px 0;
}
.trust-strip .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}
.trust-item {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.trust-item strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--navy);
  font-weight: 600;
}

/* ---------- Testimonial ---------- */
.testimonial-block {
  background: var(--white);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 40px;
}
.testimonial-block p.quote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--navy);
  line-height: 1.45;
  margin-bottom: 20px;
}
.testimonial-name {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--steel);
  letter-spacing: 0.04em;
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--navy-deep);
  color: var(--white);
  padding: 64px 0;
  text-align: center;
}
.cta-band h2 { color: var(--white); margin-bottom: 14px; }
.cta-band p { color: var(--steel-light); margin-bottom: 30px; }

/* ---------- Footer ---------- */
footer.site-footer {
  background: var(--navy-deep);
  color: var(--steel-light);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
.footer-grid h4 {
  color: var(--white);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  margin-bottom: 18px;
}
.footer-grid ul li { margin-bottom: 10px; font-size: 0.9rem; }
.footer-grid a:hover { color: var(--white); }
.footer-logo {
  background: var(--white);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: inline-block;
  margin-bottom: 16px;
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--steel);
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero {
  background: var(--navy);
  color: var(--white);
  padding: 56px 0;
}
.page-hero h1 { color: var(--white); }
.page-hero p { color: var(--steel-light); max-width: 560px; margin-top: 14px; }

/* ---------- Forms ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--paper-dim);
  border-radius: var(--radius);
  padding: 40px;
}
.form-row { margin-bottom: 22px; }
.form-row label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 8px;
}
.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1.5px solid var(--steel-light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--navy);
  background: var(--paper);
  transition: border-color 0.15s ease;
}
.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 600px) { .form-row-2 { grid-template-columns: 1fr; } }

.upload-box {
  border: 1.5px dashed var(--steel-light);
  border-radius: var(--radius);
  padding: 36px 20px;
  text-align: center;
  background: var(--paper);
  cursor: pointer;
  transition: border-color 0.15s ease;
}
.upload-box:hover { border-color: var(--accent); }
.upload-box p { font-size: 0.85rem; margin-top: 8px; }
.upload-box .upload-icon { color: var(--steel); }

/* ---------- Gallery ---------- */
.gallery-caption {
  font-size: 0.85rem;
  color: var(--steel);
  margin-top: 12px;
  line-height: 1.5;
}

.gallery-filter {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 40px;
}
.filter-pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 9px 18px;
  border-radius: 20px;
  border: 1.5px solid var(--steel-light);
  background: var(--white);
  cursor: pointer;
  transition: all 0.15s ease;
}
.filter-pill.active, .filter-pill:hover {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* ---------- Contact ---------- */
.contact-info-item {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
}
.contact-info-item .icon-mark {
  width: 40px; height: 40px;
  background: var(--paper);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-info-item h4 { font-size: 0.95rem; margin-bottom: 4px; }
.contact-info-item p { font-size: 0.88rem; }

/* focus visibility for accessibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ===========================================================
   Premium polish: reveals, motion, depth
   =========================================================== */

/* ---------- Header scroll state ---------- */
header.site-header {
  transition: box-shadow 0.25s ease, padding 0.25s ease;
}
header.site-header.scrolled {
  box-shadow: 0 8px 30px -12px rgba(46, 57, 68, 0.18);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s cubic-bezier(.16,.8,.24,1), transform 0.75s cubic-bezier(.16,.8,.24,1);
  will-change: opacity, transform;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Hero entrance ---------- */
@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero .eyebrow,
.hero h1,
.hero p.lead,
.hero-actions,
.hero-trust {
  opacity: 0;
  animation: heroFadeUp 0.8s cubic-bezier(.16,.8,.24,1) forwards;
}
.hero .eyebrow { animation-delay: 0.05s; }
.hero h1 { animation-delay: 0.15s; }
.hero p.lead { animation-delay: 0.28s; }
.hero-actions { animation-delay: 0.4s; }
.hero-trust { animation-delay: 0.52s; }

@keyframes heroImageIn {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.hero > .wrap > div:last-child {
  opacity: 0;
  animation: heroImageIn 0.9s cubic-bezier(.16,.8,.24,1) forwards;
  animation-delay: 0.3s;
}

/* ---------- Showroom shine sweep on compare slider ---------- */
.compare { position: relative; }
.compare::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 35%;
  height: 100%;
  background: linear-gradient(115deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-18deg);
  animation: shineSweep 7s ease-in-out infinite;
  pointer-events: none;
  z-index: 5;
}
@keyframes shineSweep {
  0% { left: -60%; }
  35% { left: 130%; }
  100% { left: 130%; }
}

/* ---------- Shimmering placeholder photos ---------- */
.ph-photo {
  background: linear-gradient(110deg, var(--paper-dim) 10%, #eef1f2 24%, var(--paper-dim) 38%);
  background-size: 250% 100%;
  animation: shimmer 3s linear infinite;
  overflow: hidden;
  transition: transform 0.4s ease;
}
@keyframes shimmer {
  to { background-position: -250% 0; }
}
.gallery-item, .card { overflow: visible; }
.gallery-item:hover .ph-photo {
  transform: scale(1.015);
}

/* ---------- Richer card hover ---------- */
.card {
  transition: border-color 0.25s ease, transform 0.3s cubic-bezier(.16,.8,.24,1), box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 44px -18px rgba(46, 57, 68, 0.22);
  border-color: var(--accent);
}
.card .icon-mark {
  transition: background 0.25s ease, color 0.25s ease, transform 0.25s ease;
}
.card:hover .icon-mark {
  background: var(--accent);
  color: var(--white);
  transform: scale(1.08);
}

/* ---------- Button micro-interactions ---------- */
.btn-primary {
  box-shadow: 0 4px 16px rgba(217, 167, 74, 0.35);
  transition: background 0.15s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(217, 167, 74, 0.45);
}
.btn-primary:active { transform: translateY(0); }
.btn-outline, .btn-outline-light {
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.btn-outline:hover, .btn-outline-light:hover { transform: translateY(-2px); }

/* ---------- Testimonial hover ---------- */
.testimonial-block {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.testimonial-block:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -16px rgba(46, 57, 68, 0.16);
}

/* ---------- Trust marquee (homepage) ---------- */
.trust-strip { overflow: hidden; }
.trust-track {
  display: flex;
  gap: 64px;
  width: max-content;
  padding-left: 32px;
  animation: marquee 26s linear infinite;
}
.trust-strip:hover .trust-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- Nav link underline sweep ---------- */
nav.main-nav a::before {
  content: '';
  position: absolute;
  bottom: -19px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
nav.main-nav a:hover::before { transform: scaleX(1); }
nav.main-nav a.active::before { display: none; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  .hero .eyebrow, .hero h1, .hero p.lead, .hero-actions, .hero-trust, .hero > .wrap > div:last-child {
    opacity: 1 !important; transform: none !important;
  }
}

