/* Shared site styles used by every page. */

:root {
  color-scheme: dark;
  --red: #c8102e;
  --red-dark: #9b0c23;
  --red-glow: rgba(200, 16, 46, 0.25);
  --black: #080808;
  --surface: #131313;
  --surface2: #1c1c1c;
  --border: #2a2a2a;
  --text: #f0f0f0;
  --text-muted: #888;
  --white: #ffffff;
  --nav-height: 80px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--black);
  color: var(--text);
  font-family: "Barlow", sans-serif;
}

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #000;
  border-bottom: 1px solid var(--border);
  height: clamp(70px, 8vw, 80px);
  margin: 0;
  border-top: none;
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.burger {
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 1002;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  margin-left: auto;
  background: none;
  border: none;
  cursor: pointer;
}

.burger span {
  display: block;
  width: 100%;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: all 0.3s ease;
}

.burger.open span:nth-child(1) {
  transform: translateY(10.8px) rotate(45deg);
}

.burger.open span:nth-child(2) {
  opacity: 0;
}

.burger.open span:nth-child(3) {
  transform: translateY(-10.8px) rotate(-45deg);
}

.nav-inner {
  max-width: 1280px;
  width: 100%;
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
}

.nav-logo {
  display: flex;
  align-items: center;
  height: 100%;
  flex-shrink: 0;
  margin-right: clamp(24px, 4vw, 64px);
}

.nav-logo img {
  height: clamp(30px, 4vw, 48px);
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  gap: clamp(16px, 2vw, 36px);
  list-style: none;
  flex: 1;
  justify-content: flex-start;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 600;
  font-size: clamp(8px, 2vw, 20px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--red);
}

.nav-links a.active {
  color: var(--red);
}

.nav-cta {
  background: var(--red);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 3px;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--red-dark);
}

.mobile-menu {
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  flex-direction: row;
  background: #56000e;
  z-index: 999;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.3s ease,
    opacity 0.3s ease;
}

.mobile-menu.open {
  max-height: 48px;
  opacity: 1;
}

.mobile-menu a {
  flex: 1;
  padding: 12px 6px;
  color: white;
  text-decoration: none;
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  transition: background 0.25s ease;
}

.mobile-menu a:last-child {
  border-right: none;
}

.mobile-menu a:hover {
  background: #991229;
}

.floating-book-btn {
  position: fixed;
  top: calc(var(--nav-height) + 48px);
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 22px;
  background: var(--red);
  color: #fff;
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-top: none;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  transition:
    top 0.3s ease,
    right 0.3s ease,
    background 0.25s ease,
    transform 0.25s ease;
}

.floating-book-btn:hover {
  background: var(--white);
  border-color: var(--red-dark);
  color: var(--red);
}

.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
}

.section-label {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(15px, 1.3vw, 18px);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.section-title {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  font-size: clamp(36px, 5vw, 56px);
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 16px;
}

.section-title span {
  color: var(--red);
}

@media (max-width: 800px) {
  nav .nav-links {
    display: none;
  }

  .burger {
    display: flex;
  }
}

/* Shared modal styles */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  width: min(700px, 92vw);
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 900;
  font-size: clamp(24px, 6vw, 34px);
  line-height: 1;
  text-transform: uppercase;
}

.modal-close {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--red);
}

.modal-body {
  padding: clamp(20px, 5vw, 28px);
}

.modal-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-bottom: 20px;
  border-radius: 4px;
  background: var(--black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  opacity: 0.95;
}

.modal-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.modal-detail {
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 12px 14px;
}

.modal-detail label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.modal-job-tag,
.modal-job-link {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.modal-job-tag {
  display: inline-block;
  margin-bottom: 16px;
  padding: 5px 12px;
  border-radius: 3px;
  background: var(--red);
  color: var(--white);
  font-size: 12px;
}

.modal-job-link {
  display: inline-block;
  margin-top: 20px;
  color: var(--red);
  text-decoration: none;
}

.modal-review-section {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.service-card {
  cursor: pointer;
}

@media (max-width: 520px) {
  .modal-details {
    grid-template-columns: 1fr;
  }
}


/* Garage color accents */
.review-stars,
.review-cat,
.modal-stars {
  color: #ffd700;
}

.modal-vehicle {
  color: var(--text-muted);
}

.review-vehicle,
.review-meta .vehicle-name,
.job-vehicle {
  color: var(--red);
}

.review-meta,
.review-author,
.job-meta {
  gap: 12px;
}

.service-cat {
  color: #28d17c;
}

.job-image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 10px;
  margin: -6px 0 20px;
}

.job-image-gallery img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 4px;
}


.modal-review-card {
  margin-top: 14px;
  background: var(--black);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: clamp(18px, 4vw, 24px);
}

.modal-review-card .review-stars {
  margin-bottom: 0;
}

.modal-review-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-review-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(200, 16, 46, 0.15);
  border: 2px solid var(--red);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--red);
  flex-shrink: 0;
}

.review-name {
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  font-size: 16px;
  color: var(--white);
  text-transform: uppercase;
}

.modal-review-card .review-vehicle {
  color: var(--text-muted);
  font-size: 12px;
}

.modal-review-card .review-text {
  margin-bottom: 18px;
}


.modal-review-card .review-title {
  color: var(--red);
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 4vw, 22px);
  line-height: 1.15;
  text-transform: uppercase;
}


/* Theme toggle */
html[data-theme="light"] {
  color-scheme: light;
  --black: #f7f7f5;
  --surface: #ffffff;
  --surface2: #ececea;
  --border: #d7d7d2;
  --text: #171717;
  --text-muted: #5f5f5f;
  --white: #080808;
  --red-glow: rgba(200, 16, 46, 0.14);
}

html[data-theme="light"] body,
html[data-theme="light"] nav,
html[data-theme="light"] .mobile-menu {
  background: var(--black);
}

.theme-toggle {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 6000;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--red);
  background: var(--red);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: #080808;
}

/* Light mode launch polish */
html[data-theme="light"] .floating-book-btn,
html[data-theme="light"] .nav-cta,
html[data-theme="light"] .modal-job-tag {
  color: #ffffff !important;
}

html[data-theme="light"] .modal-close,
html[data-theme="light"] .review-close {
  color: #080808 !important;
}

html[data-theme="light"] .modal-close:hover,
html[data-theme="light"] .review-close:hover {
  color: var(--red) !important;
}

html[data-theme="light"] .job-image-gallery img,
html[data-theme="light"] .modal-img {
  opacity: 1 !important;
  filter: none !important;
}

/* Light mode nav polish */
html[data-theme="light"] nav {
  background: #ffffff;
  border-bottom-color: #deded8;
}

html[data-theme="light"] .mobile-menu {
  background: #ffffff;
  border-bottom: 1px solid #deded8;
}

html[data-theme="light"] .mobile-menu a {
  color: #171717;
  border-color: #deded8;
}

html[data-theme="light"] .mobile-menu a:hover,
html[data-theme="light"] .mobile-menu a.active {
  color: var(--red);
  background: #f1f1ee;
}

/* Light mode filter and burger polish */
html[data-theme="light"] .filter-btn.active,
html[data-theme="light"] .admin-filter-bar .filter-btn.active {
  color: #ffffff !important;
}

html[data-theme="light"] .burger span,
html[data-theme="light"] .burger.open span {
  background: #080808;
}

/* Desktop theme toggle sizing */
@media (min-width: 801px) {
  .theme-toggle {
    right: 24px;
    bottom: 24px;
    width: 58px;
    height: 58px;
    font-size: 26px;
    border-radius: 999px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.3);
  }
}

@media (max-width: 800px) {
  .theme-toggle {
    right: 14px;
    bottom: 14px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    border-radius: 999px;
  }
}

/* Touch press affordances */
@media (hover: none) and (pointer: coarse) {
  .floating-book-btn:active,
  .theme-toggle:active,
  .nav-cta:active,
  .mobile-menu a:active,
  button:active,
  a[class*="btn"]:active,
  .filter-btn:active,
  .review-arrow:active,
  .modal-close:active,
  .review-close:active {
    transform: translateY(-2px) scale(0.98);
  }
}

/* Touch hover affordances */
@media (hover: none) and (pointer: coarse) {
  .floating-book-btn.touch-hover,
  .theme-toggle.touch-hover,
  .nav-cta.touch-hover,
  .mobile-menu a.touch-hover,
  button.touch-hover,
  a[class*="btn"].touch-hover,
  .filter-btn.touch-hover,
  .review-arrow.touch-hover,
  .modal-close.touch-hover,
  .review-close.touch-hover {
    transform: translateY(-2px) scale(0.98);
  }
}

/* Viewport-clamped shared modals */
.modal-overlay {
  padding: clamp(12px, 3vw, 24px);
}

.modal {
  width: min(100%, 760px);
  max-width: calc(100vw - clamp(24px, 6vw, 48px));
  max-height: calc(100dvh - clamp(24px, 6vw, 48px));
  overflow-y: auto;
  overscroll-behavior: contain;
}

.modal-img,
.job-modal-photo {
  max-height: min(46dvh, 420px);
  object-fit: cover;
}

@media (max-width: 800px) {
  .modal {
    width: min(100%, 430px);
    max-width: calc(100vw - 24px);
    max-height: calc(100dvh - 24px);
  }
}
