/* ===========================
   DINWOODIE MOTORS – style.css
   Dark Industrial Garage
   =========================== */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:          #111212;
  --bg-2:        #181a1a;
  --bg-3:        #1f2121;
  --surface:     #242727;
  --border:      #2e3232;
  --text:        #d4d8d6;
  --text-muted:  #7a8380;
  --text-faint:  #404846;
  --accent:      #c0c8c4;
  --gold:        #b89a5a;
  --gold-light:  #d4b87a;
  --red:         #8b3030;
  --white:       #eef0ef;

  --font-display: 'Bebas Neue', Impact, sans-serif;
  --font-body:    'Barlow', 'Helvetica Neue', sans-serif;

  --nav-h:       70px;
  --section-gap: 100px;
  --max-w:       1140px;
  --radius:      4px;
  --transition:  0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
  scroll-behavior: smooth;
  font-size: 1.2rem;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

ul { list-style: none; }

/* ========================
   UTILITY
   ======================== */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: var(--section-gap) 0;
}

.section-label {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 40px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  border-radius: var(--radius);
  white-space: nowrap;
  max-width: 100%;
}

.btn-primary {
  background: var(--gold);
  color: #0e0e0e;
  border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: var(--border);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--white);
}

.inline-link {
  color: var(--gold);
  border-bottom: 1px solid currentColor;
  transition: color var(--transition);
}
.inline-link:hover { color: var(--gold-light); }

/* ========================
   HEADER / NAV
   ======================== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(17, 18, 18, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.nav-logo img {
  height: 42px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition);
  border-radius: var(--radius);
}
.nav-link:hover,
.nav-link.active {
  color: var(--white);
}

.nav-link.cta {
  background: var(--gold);
  color: #0e0e0e;
  margin-left: 8px;
}
.nav-link.cta:hover {
  background: var(--gold-light);
  color: #0e0e0e;
}
/* ========================
   HERO
   ======================== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  overflow: hidden;
}

.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to bottom, transparent 60%, var(--bg) 100%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 59px,
      var(--border) 60px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 59px,
      var(--border) 60px
    );
  background-size: 100%, 60px 60px, 60px 60px;
  opacity: 0.35;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}

.hero-eyebrow {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.6s 0.2s forwards;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--white);
  margin-bottom: 32px;
}

.hero-title .line {
  display: block;
  opacity: 0;
  animation: fadeUp 0.7s forwards;
}
.hero-title .line:nth-child(1) { animation-delay: 0.35s; }
.hero-title .line:nth-child(2) { animation-delay: 0.45s; }
.hero-title .line:nth-child(3) { animation-delay: 0.55s; }
.hero-title .line:nth-child(4) { animation-delay: 0.65s; }

.hero-title .accent {
  color: var(--gold);
  -webkit-text-stroke: 0;
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 40px;
  line-height: 1.8;
  max-width: 480px;
  opacity: 0;
  animation: fadeUp 0.6s 0.75s forwards;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.6s 0.85s forwards;
}

/* Badge */
.hero-badge {
  position: absolute;
  right: 8%;
  bottom: 14%;
  z-index: 2;
  opacity: 0;
  animation: fadeIn 0.8s 1.1s forwards;
}

.badge-ring {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  color: var(--gold);
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  text-align: center;
  position: relative;
}

.badge-classes {
  font-family: var(--font-body);
  font-size: 0.6rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-muted);
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  animation: fadeIn 1s 1.5s both;
}
.scroll-hint span {
  display: block;
  width: 1.5px;
  height: 50px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  margin: 0 auto;
  animation: scrollPulse 2s 1.5s infinite;
}

/* ========================
   ABOUT
   ======================== */
.about {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 60px;
  align-items: start;
}

.about-label-col {
  padding-top: 8px;
}

.about-stripe {
  width: 2px;
  height: 80px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  margin-top: 16px;
}

.about-text-col p {
  margin-bottom: 18px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.8;
}

/* ========================
   SERVICES
   ======================== */
.services {
  background: var(--bg);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2px;
  border: 1px solid var(--border);
}

.service-card {
  position: relative;
  background: var(--bg-2);
  padding: 40px 32px;
  transition: background var(--transition);
  overflow: hidden;
}

.service-card::before {
  content: attr(data-index);
  position: absolute;
  top: 20px;
  right: 24px;
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--text-faint);
  line-height: 1;
  transition: color var(--transition);
}

.service-card:hover {
  background: var(--bg-3);
}
.service-card:hover::before {
  color: var(--border);
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0;
  height: 2px;
  background: var(--gold);
  transition: width 0.4s ease;
}
.service-card:hover::after {
  width: 100%;
}

.service-icon {
  width: 48px;
  height: 48px;
  color: var(--gold);
  margin-bottom: 20px;
}
.service-icon svg { width: 100%; height: 100%; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 12px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.7;
}

.service-card ul li {
  position: relative;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding-left: 16px;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.service-card ul li::before {
  content: '–';
  position: absolute;
  left: 0;
  color: var(--gold);
}

/* ========================
   TEAM CAROUSEL
   ======================== */
.team {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.team-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 0;
  gap: 16px;
}

.team-header .section-title {
  margin-bottom: 0;
}

.carousel-controls {
  display: flex;
  gap: 8px;
  padding-bottom: 4px; /* align with title baseline */
  flex-shrink: 0;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-3);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), color var(--transition), background var(--transition);
  flex-shrink: 0;
}
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--surface);
}
.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  border-color: var(--border);
  color: var(--text-faint);
  background: var(--bg-3);
}

/* The outer wrapper clips the scroll track */
.team-carousel-wrap {
  overflow: hidden;
  margin-top: 40px;
  /* Extend slightly past container on both sides for peek effect */
  margin-left: -8px;
  margin-right: -8px;
}

/* The scrollable track — CSS scroll snap */
.team-carousel {
  display: flex;
  gap: 24px;
  padding: 4px 8px 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Firefox */
  cursor: grab;
}
.team-carousel:active { cursor: grabbing; }
.team-carousel::-webkit-scrollbar { display: none; }

.team-card {
  background: var(--bg-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--transition), transform var(--transition);
  /* Snap each card; show a peek of next card */
  flex: 0 0 calc(33.333% - 16px);
  scroll-snap-align: center;
  min-width: 260px;
}
.team-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

.team-photo {
  width: 100%;
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.team-photo.placeholder svg {
  width: 80px;
  height: 80px;
  color: var(--text-faint);
}

.team-info {
  padding: 28px 28px 32px;
}

.team-info h3 {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.05em;
  color: var(--white);
  margin-bottom: 4px;
}

.team-role {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.team-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
}

/* Dot indicators */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
}

.carousel-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition);
}
.carousel-dot.active {
  background: var(--gold);
  transform: scale(1.4);
}

/* ========================
   HOURS
   ======================== */
.hours {
  background: var(--bg);
}

.hours-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.hours-table {
  border-top: 1px solid var(--border);
  margin-top: 8px;
}

.hours-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.hours-row .day {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  color: var(--text);
}

.hours-row .time {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

.hours-row.closed .day {
  color: var(--text-faint);
}
.hours-row.closed .time {
  color: var(--red);
  font-weight: 400;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.hours-cta-block {
  padding-top: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.hours-cta-text {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 280px;
}

/* ========================
   CONTACT
   ======================== */
.contact {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
  align-items: start;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.contact-item {
  display: flex;
  gap: 18px;
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  margin-top: 2px;
}
.contact-icon svg {
  width: 18px;
  height: 18px;
}

.contact-label-small {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 0.95rem;
  color: var(--text);
  line-height: 1.6;
  transition: color var(--transition);
}
a.contact-value:hover {
  color: var(--gold);
}

.map-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface);
}

.map-wrap iframe {
  display: block;
  width: 100%;
  height: 380px;
  border: 0;
  filter: grayscale(60%) invert(90%) hue-rotate(180deg) brightness(0.8);
}

.map-link {
  display: block;
  text-align: center;
  padding: 14px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  border-top: 1px solid var(--border);
  transition: background var(--transition);
}
.map-link:hover {
  background: var(--bg-3);
}

/* ========================
   FOOTER
   ======================== */
.site-footer {
  background: #0c0d0d;
  border-top: 1px solid var(--border);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-logo {
  height: 36px;
  width: auto;
  opacity: 0.7;
}

.footer-copy {
  font-size: 0.78rem;
  color: var(--text-faint);
  line-height: 1.7;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.footer-links a {
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--gold); }

/* ========================
   ANIMATIONS
   ======================== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.7; transform: scaleY(1); }
  50%       { opacity: 0.2; transform: scaleY(0.5); }
}

/* Reveal on scroll */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .about-label-col {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 0;
  }
  .about-stripe {
    width: 40px;
    height: 2px;
    margin-top: 0;
  }

  .hours-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hours-cta-block {
    padding-top: 0;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-badge {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
    text-align: center;
  }
  .footer-links { text-align: center; }
}

@media (max-width: 640px) {
  :root { --section-gap: 64px; }

  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 16px 20px;
    gap: 5px;
    z-index: 99;
    /* Hidden state */
    visibility: hidden;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
    height: calc(100vh - var(--nav-h));
  }
  .nav-links.open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0s;
  }
  .nav-link {
    padding: 12px 16px;
    border-radius: var(--radius);
  }
  .nav-link.cta {
    margin-left: 0;
    margin-top: 10px;
    text-align: center;
    position: relative;
    top: 15px;
    left: 10px;
    border-radius: var(--radius);
    /* padding-bottom: 20px;
    padding-bottom: 20px; */
  }
  .team-info {
    padding: 20px 20px 24px;
  }

  .hours-cta-block {
    align-items: stretch;
  }
  .hours-cta-block .btn {
    text-align: center;
    justify-content: center;
  }

  /* Long email / address shouldn't bust out of container */
  .contact-value {
    word-break: break-word;
  }

  .footer-links {
    text-align: center;
  }
  .footer-links a {
    word-break: break-word;
  }
}
