/* ============================================
   Gustin Automotive — Styles
   ============================================ */

:root {
  --ink: #0f172a;
  --ink-2: #1e293b;
  --ink-3: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --accent: #dc2626;
  --accent-dark: #b91c1c;
  --accent-glow: rgba(220, 38, 38, 0.2);
  --gold: #f59e0b;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.08), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 10px 30px -15px rgba(15, 23, 42, 0.2), 0 4px 12px -4px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 25px 50px -20px rgba(15, 23, 42, 0.3);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Barlow Condensed", "Inter", sans-serif;
  --container: 1160px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  font-family: var(--font-sans);
  color: var(--ink-2);
  background: var(--card);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

ul {
  list-style: none;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3rem);
  font-weight: 700;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  font-family: var(--font-sans);
  text-transform: none;
  letter-spacing: 0;
}

p {
  font-size: 1rem;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 clamp(1rem, 3vw, 2rem);
}

.section {
  padding: clamp(4rem, 8vw, 7rem) 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3.5rem;
}

.section-head .eyebrow {
  justify-content: center;
}

.section-sub {
  color: var(--muted);
  font-size: 1.05rem;
  margin-top: 0.75rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 1rem;
}

.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--accent);
  display: inline-block;
}

/* Accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 1rem;
  background: var(--ink);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  z-index: 100;
}

.skip-link:focus {
  left: 1rem;
}

/* ============================================
   HEADER
   ============================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink);
  font-weight: 700;
}

.brand:hover {
  color: var(--ink);
}

.brand-icon {
  width: 36px;
  height: 36px;
  color: var(--accent);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-main {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
  font-weight: 500;
  margin-top: 0.2rem;
}

.primary-nav ul {
  display: flex;
  gap: 2rem;
}

.primary-nav a {
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 0.5rem 0;
  position: relative;
}

.primary-nav a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.primary-nav a:hover {
  color: var(--ink);
}

.primary-nav a:hover::after {
  transform: scaleX(1);
}

.cta-call {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cta-call:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.cta-call .icon {
  width: 18px;
  height: 18px;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav {
  display: none;
  background: #fff;
  border-top: 1px solid var(--line);
}

.mobile-nav ul {
  display: flex;
  flex-direction: column;
  padding: 1rem 0;
}

.mobile-nav a {
  display: block;
  padding: 1rem clamp(1rem, 3vw, 2rem);
  color: var(--ink-2);
  font-weight: 500;
  border-bottom: 1px solid var(--line);
}

.mobile-nav li:last-child a {
  border-bottom: 0;
}

.mobile-call {
  color: var(--accent) !important;
  font-weight: 600 !important;
}

@media (max-width: 900px) {
  .primary-nav,
  .cta-call {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .mobile-nav[data-open="true"] {
    display: block;
  }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  position: relative;
  background: var(--ink);
  color: #fff;
  padding: clamp(4rem, 8vw, 7rem) 0 clamp(5rem, 10vw, 9rem);
  overflow: hidden;
  isolation: isolate;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 85% 10%, rgba(220, 38, 38, 0.25) 0%, transparent 50%),
    radial-gradient(circle at 20% 90%, rgba(220, 38, 38, 0.15) 0%, transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #020617 100%);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(circle at center, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(circle at center, #000 40%, transparent 80%);
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero .eyebrow {
  color: #f87171;
}

.hero .eyebrow::before {
  background: #f87171;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.5rem;
}

.hero h1 .accent {
  color: var(--accent);
  display: inline-block;
}

.hero .lead {
  font-size: 1.15rem;
  color: #cbd5e1;
  max-width: 32rem;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn .icon {
  width: 18px;
  height: 18px;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  box-shadow: 0 10px 30px -10px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.btn-dark:hover {
  background: var(--ink-2);
  color: #fff;
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.btn-outline:hover {
  border-color: var(--ink);
  color: var(--ink);
  transform: translateY(-2px);
}

/* Hero card */
.hero-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 2rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.badge-top {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #f87171;
  text-transform: uppercase;
}

.badge-big {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin: 0.5rem 0;
}

.badge-bottom {
  font-size: 0.8rem;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.trust-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.trust-list li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.trust-list strong {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-list span {
  color: #94a3b8;
  font-size: 0.85rem;
}

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

  .hero-card {
    max-width: 420px;
  }
}

/* ============================================
   SERVICES
   ============================================ */

.services {
  background: var(--bg);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--accent);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.25s ease;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent);
}

.service-card:hover::before {
  transform: scaleY(1);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 20px -8px var(--accent-glow);
}

.service-icon svg {
  width: 28px;
  height: 28px;
  color: #fff;
}

.service-card h3 {
  color: var(--ink);
  margin-bottom: 0.5rem;
}

.service-card p {
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.services-footnote {
  text-align: center;
  color: var(--muted);
  margin-top: 3rem;
  font-size: 1rem;
}

/* ============================================
   ABOUT
   ============================================ */

.about {
  background: var(--card);
}

.about-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 4rem;
  align-items: center;
}

.about-copy h2 {
  margin-bottom: 1.25rem;
}

.about-copy p {
  color: var(--ink-3);
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

.about-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.stat {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  text-align: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1;
}

.stat-unit {
  font-size: 1.75rem;
  color: var(--accent);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-top: 0.6rem;
}

@media (max-width: 860px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
}

/* ============================================
   REVIEWS
   ============================================ */

.reviews {
  background: var(--ink);
  color: #fff;
  position: relative;
  overflow: hidden;
}

.reviews::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center top, rgba(220, 38, 38, 0.12) 0%, transparent 60%);
  pointer-events: none;
}

.reviews .container {
  position: relative;
}

.reviews h2 {
  color: #fff;
}

.reviews .section-sub {
  color: #94a3b8;
}

.reviews-summary {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 3rem;
  text-align: center;
}

.rating-big {
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.rating-stars {
  display: inline-flex;
  gap: 0.25rem;
  color: var(--gold);
  font-size: 1.5rem;
}

.rating-count {
  color: #94a3b8;
  font-size: 0.95rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.review-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius);
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.review-card:hover {
  transform: translateY(-3px);
  border-color: rgba(220, 38, 38, 0.4);
}

.review-stars {
  display: flex;
  gap: 0.15rem;
  color: var(--gold);
  font-size: 1.1rem;
}

.review-text {
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.65;
  flex: 1;
  /* Clamp long reviews */
  display: -webkit-box;
  -webkit-line-clamp: 7;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.review-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
  overflow: hidden;
}

.review-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.review-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.review-author-name {
  color: #fff;
  font-weight: 600;
  font-size: 0.92rem;
}

.review-time {
  color: #94a3b8;
  font-size: 0.8rem;
}

.reviews-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: #94a3b8;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius);
  border: 1px dashed rgba(255, 255, 255, 0.15);
}

.reviews-cta {
  text-align: center;
}

/* ============================================
   CONTACT
   ============================================ */

.contact {
  background: var(--bg);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  align-items: stretch;
}

.contact-info h2 {
  margin-bottom: 2rem;
}

.info-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-bottom: 2.5rem;
}

.info-list li {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.info-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  color: var(--muted);
}

.info-value {
  font-size: 1.1rem;
  color: var(--ink);
  font-weight: 600;
  line-height: 1.4;
}

.info-value:hover {
  color: var(--accent);
}

.hours h3 {
  margin-bottom: 1rem;
  color: var(--ink);
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.hours dl {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 320px;
}

.hours div {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--line);
  font-size: 0.95rem;
}

.hours dt {
  font-weight: 500;
  color: var(--ink-3);
}

.hours dd {
  color: var(--ink);
  font-weight: 600;
}

.hours-note {
  margin-top: 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  max-width: 320px;
}

.contact-map {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  min-height: 420px;
}

.contact-map iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
}

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

  .contact-map {
    min-height: 320px;
  }

  .contact-map iframe {
    min-height: 320px;
  }
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  background: #020617;
  color: #94a3b8;
  padding: 3rem 0 2rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  color: #fff;
}

.footer-brand .brand-main {
  color: #fff;
}

.footer-brand .brand-sub {
  color: #94a3b8;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.85rem;
  margin-top: 0.25rem;
}

.site-footer nav ul {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer nav a {
  color: #94a3b8;
  font-size: 0.9rem;
}

.site-footer nav a:hover {
  color: #fff;
}

.copy {
  grid-column: 1 / -1;
  padding-top: 1.75rem;
  margin-top: 1.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

@media (max-width: 700px) {
  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .site-footer nav ul {
    justify-content: center;
  }
}

/* ============================================
   MOTION
   ============================================ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
