/* =========================================================
   Royal Auto Service — Design tokens
   ========================================================= */
:root {
  --ink: #17120d;
  --charcoal: #241d16;
  --charcoal-2: #2e251b;
  --cream: #f3ecdf;
  --cream-dim: #cdc3b1;
  --crimson: #c2272c;
  --crimson-dark: #8c1a1e;
  --brass: #c9a227;
  --brass-light: #e2c463;
  --steel: #a89e8d;
  --line: rgba(243, 236, 223, 0.12);

  --font-head: 'Oswald', sans-serif;
  --font-body: 'Archivo', sans-serif;

  --container: 1180px;
  --radius: 4px;
  --shadow: 0 20px 50px rgba(0,0,0,0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--cream);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 700; letter-spacing: 0.2px; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; color: var(--cream-dim); max-width: 62ch; }

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

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

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--brass-light);
  margin-bottom: 0.9em;
}

button { font-family: inherit; cursor: pointer; }

*:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* =========================================================
   Layout helpers
   ========================================================= */
.section-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }

.section-head { max-width: 620px; margin-bottom: 44px; }
.section-head p { margin-top: 8px; }

/* =========================================================
   Buttons
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn-primary {
  background: var(--crimson);
  color: var(--cream);
  border-color: var(--crimson);
}
.btn-primary:hover { background: var(--crimson-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  color: var(--cream);
  border-color: var(--line);
}
.btn-outline:hover { border-color: var(--brass); color: var(--brass-light); }
.btn-block { width: 100%; }

/* =========================================================
   Top bar + header
   ========================================================= */
.topbar {
  background: var(--charcoal-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}
.topbar-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--steel);
}
.topbar-item { display: inline-flex; align-items: center; gap: 6px; }
.topbar-item svg { color: var(--brass); }
.topbar-hours { display: none; }
.topbar-social { margin-left: auto; }
@media (min-width: 720px) { .topbar-hours { display: inline-flex; } }

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(23, 18, 13, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; object-fit: cover; border-radius: 50%; border: 2px solid var(--brass); }
.brand-text { font-family: var(--font-head); font-size: 1.05rem; line-height: 1.1; letter-spacing: 0.4px; }
.brand-text em { font-style: normal; color: var(--brass-light); display: block; font-size: 1.2em; }

.main-nav { margin-left: auto; display: none; align-items: center; gap: 28px; }
.main-nav a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--cream-dim);
  position: relative;
  padding: 6px 0;
}
.main-nav a.active, .main-nav a:hover { color: var(--cream); }
.main-nav a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--crimson);
}
.nav-cta {
  background: var(--brass);
  color: var(--ink);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 0.85rem;
}
.nav-cta:hover { background: var(--brass-light); }

.nav-toggle {
  margin-left: auto;
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--cream); display: block; }

@media (min-width: 960px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

.main-nav.open {
  display: flex;
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--charcoal);
  flex-direction: column;
  align-items: flex-start;
  padding: 20px 24px 28px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}

/* =========================================================
   Floating action buttons
   ========================================================= */
.floating-actions {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.fab {
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 999px;
  padding: 13px 18px;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
}
.fab-call { background: var(--brass); color: var(--ink); }
.fab-book { background: var(--crimson); color: var(--cream); animation: pulse-glow 2.6s ease-in-out infinite; }

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 39, 44, 0.55), var(--shadow); }
  50% { box-shadow: 0 0 0 10px rgba(194, 39, 44, 0), var(--shadow); }
}

/* =========================================================
   Alert banner (form success)
   ========================================================= */
.alert-banner {
  background: var(--brass);
  color: var(--ink);
  text-align: center;
  padding: 12px 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

/* =========================================================
   Hero
   ========================================================= */
.hero { position: relative; overflow: hidden; padding-top: 56px; }
.hero-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px 80px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}
.hero-copy { max-width: 560px; }
.hero-copy h1 {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-reveal 0.7s ease forwards 0.15s;
}
.hero-copy p {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-reveal 0.7s ease forwards 0.32s;
}
.hero-actions {
  opacity: 0;
  transform: translateY(16px);
  animation: hero-reveal 0.7s ease forwards 0.48s;
  display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 40px;
}
@keyframes hero-reveal { to { opacity: 1; transform: translateY(0); } }

.hero-stats { display: flex; gap: 32px; }
.hero-stats strong { display: block; font-family: var(--font-head); font-size: 1.6rem; color: var(--brass-light); }
.hero-stats span { font-size: 0.8rem; color: var(--steel); }

.hero-media { position: relative; }
.hero-media img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  object-position: top center;
  border: 1px solid var(--line);
}
.hero-media::before {
  content: '';
  position: absolute;
  top: -16px; left: -16px;
  right: 16px; bottom: 16px;
  border: 2px solid var(--brass);
  z-index: -1;
}

.hero-stripe {
  height: 10px;
  background: repeating-linear-gradient(-45deg, var(--crimson) 0 26px, var(--brass) 26px 30px, var(--ink) 30px 56px, var(--ink) 56px 60px);
  opacity: 0.9;
}

@media (min-width: 860px) {
  .hero-inner { grid-template-columns: 1fr 1fr; }
  .hero-media img { height: 520px; }
}

/* =========================================================
   Service cards (work-order ticket motif)
   ========================================================= */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.service-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-top: 3px solid var(--brass);
  padding: 28px 24px;
  transition: transform 0.18s ease, border-color 0.18s ease;
}
.service-card:hover { transform: translateY(-4px); border-top-color: var(--crimson); }
.service-icon {
  width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  color: var(--brass-light);
  margin-bottom: 16px;
}
.service-icon svg { width: 100%; height: 100%; }
.service-icon-lg { width: 60px; height: 60px; }
.service-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.service-card p { font-size: 0.92rem; margin-bottom: 14px; }
.service-link { font-size: 0.85rem; font-weight: 600; color: var(--brass-light); }

/* =========================================================
   About teaser + page
   ========================================================= */
.about-teaser-grid, .about-page-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  align-items: center;
}
.about-teaser-media img, .about-page-media img { width: 100%; height: 360px; object-fit: cover; border: 1px solid var(--line); }
@media (min-width: 860px) {
  .about-teaser-grid, .about-page-grid { grid-template-columns: 1fr 1fr; }
  .about-teaser-media img, .about-page-media img { height: 440px; }
}

.trust-strip { background: var(--charcoal-2); padding: 48px 0; }
.trust-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  text-align: center;
}
.trust-item strong { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--brass-light); }
.trust-item span { font-size: 0.85rem; color: var(--steel); }
@media (min-width: 720px) { .trust-grid { grid-template-columns: repeat(4, 1fr); } }

.photo-strip { display: grid; grid-template-columns: 1fr; gap: 16px; }
.photo-strip img { width: 100%; height: 280px; object-fit: cover; border: 1px solid var(--line); }
@media (min-width: 720px) { .photo-strip { grid-template-columns: repeat(3, 1fr); } }

/* =========================================================
   Articles
   ========================================================= */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.article-card {
  background: var(--charcoal);
  border: 1px solid var(--line);
  padding: 26px 24px;
  transition: border-color 0.18s ease;
}
.article-card:hover { border-color: var(--brass); }
.article-card h3 { font-size: 1.1rem; margin-bottom: 10px; }
.article-card p { font-size: 0.9rem; margin-bottom: 16px; }
.article-date { font-size: 0.78rem; color: var(--steel); }

.article-single-inner { max-width: 760px; }
.article-featured-image { width: 100%; height: 340px; object-fit: cover; margin: 20px 0; border: 1px solid var(--line); }
.article-content { color: var(--cream-dim); }
.article-content h2 { font-size: 1.35rem; margin-top: 1.4em; color: var(--brass-light); }
.article-content p { max-width: none; }
.article-cta {
  margin-top: 40px;
  padding: 28px;
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-left: 3px solid var(--crimson);
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.article-cta p { margin: 0; margin-right: auto; color: var(--cream); font-weight: 600; }

/* =========================================================
   Service detail
   ========================================================= */
.service-hero-row { display: flex; align-items: center; gap: 18px; margin: 12px 0 6px; }
.page-hero { padding: 56px 0 28px; }
.page-hero-sub { max-width: 560px; margin-top: 10px; }
.service-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 900px) { .service-detail-grid { grid-template-columns: 2fr 1fr; } }
.service-sidebar {
  background: var(--charcoal);
  border: 1px solid var(--line);
  padding: 24px;
  align-self: start;
}
.service-sidebar h4 { font-size: 0.95rem; margin-bottom: 14px; color: var(--brass-light); }
.service-sidebar ul { list-style: none; margin: 0 0 24px; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.service-sidebar a { font-size: 0.9rem; color: var(--cream-dim); }
.service-sidebar a:hover { color: var(--cream); }
.sidebar-cta { border-top: 1px solid var(--line); padding-top: 20px; }
.sidebar-cta p { font-size: 0.85rem; margin-bottom: 12px; }

/* =========================================================
   Gallery + lightbox
   ========================================================= */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.gallery-item { border: none; padding: 0; background: none; aspect-ratio: 4/3; overflow: hidden; border: 1px solid var(--line); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-item:hover img { transform: scale(1.06); }

.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(10, 8, 6, 0.94);
  display: none;
  align-items: center; justify-content: center;
  flex-direction: column;
  padding: 40px 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: min(90vw, 900px); max-height: 76vh; object-fit: contain; }
.lightbox p { color: var(--cream-dim); margin-top: 14px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  background: none; border: none; color: var(--cream);
  font-size: 2rem; line-height: 1;
}

/* =========================================================
   Contact section + forms
   ========================================================= */
.contact-section { background: var(--charcoal-2); padding: 80px 0; }
.contact-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 44px;
}
@media (min-width: 900px) { .contact-inner { grid-template-columns: 1fr 1fr; } }

.contact-details { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 14px; }
.contact-details strong { display: block; font-size: 0.78rem; color: var(--brass-light); margin-bottom: 2px; }
.contact-details a { color: var(--cream-dim); }
.contact-details a:hover { color: var(--cream); }

.contact-form, .booking-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 520px) { .form-row { grid-template-columns: 1fr 1fr; } }

label { font-size: 0.82rem; color: var(--cream-dim); display: flex; flex-direction: column; gap: 6px; font-weight: 500; }
input, select, textarea {
  font-family: var(--font-body);
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--cream);
  padding: 12px 14px;
  border-radius: var(--radius);
  font-size: 0.95rem;
}
input:focus, select:focus, textarea:focus { border-color: var(--brass); outline: none; }
textarea { resize: vertical; }

/* =========================================================
   Booking modal
   ========================================================= */
.modal-overlay {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 8, 6, 0.72);
  display: none;
  align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--charcoal);
  border: 1px solid var(--line);
  border-top: 3px solid var(--crimson);
  max-width: 460px;
  width: 100%;
  padding: 32px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-close {
  position: absolute; top: 14px; right: 16px;
  background: none; border: none; color: var(--cream-dim);
  font-size: 1.6rem; line-height: 1;
}
.modal-sub { font-size: 0.88rem; margin-bottom: 20px; }

/* =========================================================
   Footer
   ========================================================= */
.site-footer { background: var(--ink); border-top: 1px solid var(--line); padding: 56px 0 0; }
.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
@media (min-width: 760px) { .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.footer-brand img { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--brass); margin-bottom: 12px; }
.footer-brand p { font-size: 0.85rem; }
.footer-links, .footer-contact { display: flex; flex-direction: column; gap: 10px; }
.footer-links h4, .footer-contact h4 { font-size: 0.8rem; color: var(--brass-light); margin-bottom: 4px; }
.footer-links a, .footer-contact a, .footer-contact span { font-size: 0.88rem; color: var(--cream-dim); }
.footer-links a:hover, .footer-contact a:hover { color: var(--cream); }
.footer-bottom {
  margin-top: 44px;
  border-top: 1px solid var(--line);
  padding: 18px 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--steel);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
}
.footer-sitemap-link { color: var(--steel); text-decoration: underline; text-underline-offset: 3px; }
.footer-sitemap-link:hover { color: var(--cream); }

/* =========================================================
   404 page
   ========================================================= */
.not-found-hero { text-align: left; }
.not-found-hero .hero-actions { margin-top: 28px; opacity: 1; animation: none; }

/* =========================================================
   Thank-you / confirmation page
   ========================================================= */
.thank-you-inner { max-width: 620px; text-align: center; margin: 0 auto; }
.success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 76px; height: 76px;
  border-radius: 50%;
  background: rgba(201, 162, 39, 0.12);
  border: 2px solid var(--brass);
  color: var(--brass-light);
  margin-bottom: 24px;
}
.success-icon svg { width: 40px; height: 40px; }
.thank-you-inner .page-hero-sub { margin-left: auto; margin-right: auto; }
.thank-you-actions { justify-content: center; margin-top: 28px; }
.thank-you-hours { margin-top: 32px; font-size: 0.85rem; color: var(--steel); }

/* =========================================================
   HTML Sitemap page
   ========================================================= */
.sitemap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 40px;
}
.sitemap-col h3 { color: var(--brass-light); font-size: 0.95rem; margin-bottom: 16px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.sitemap-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sitemap-col a { font-size: 0.92rem; color: var(--cream-dim); }
.sitemap-col a:hover { color: var(--cream); }
.sitemap-empty { font-size: 0.88rem; color: var(--steel); }
