/* =============================================
   EXPERT AUTO REPAIRS — full design composition
   Palette: bleached cream + oxblood + navy
   Typography: monospace body, display serif H1
   Layout: book spread with spine gutter
   Motion: marquee ticker band
   Signature: dictated-quote animation
   Background: solid paper, no treatment
   ============================================= */

/* --- RESET & BASE --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }

:root {
  --bg: #f4ecdc;
  --ink: #1a1b2e;
  --accent: #6b1f1a;
  --secondary: #1e2a4a;
  --accent-soft: #8a3a35;
  --secondary-soft: #2c3d63;
  --line: #d6cdb8;
  --card-bg: #ede4d0;
  --white: #faf6ed;

  --body-font: 'JetBrains Mono', ui-monospace, monospace;
  --display-font: 'Fraunces', 'Playfair Display', serif;

  --gutter: clamp(1rem, 3vw, 2.5rem);
  --page-max: 600px;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 0.875rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 3rem;
}

/* --- TYPOGRAPHY --- */
h1 {
  font-family: var(--display-font);
  font-size: clamp(2.2rem, 6vw, 3.8rem);
  font-weight: 500;
  font-variation-settings: 'SOFT' 80;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

h2 {
  font-family: var(--display-font);
  font-size: 1.3rem;
  font-weight: 500;
  font-variation-settings: 'SOFT' 60;
  color: var(--accent);
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
}

a { color: var(--accent); text-underline-offset: 2px; }
a:hover { color: var(--accent-soft); }

/* --- MARQUEE TICKER BAND --- */
.marquee-band {
  background: var(--secondary);
  color: var(--white);
  overflow: hidden;
  padding: 0.55rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
  font-size: 0.78rem;
  letter-spacing: 0.02em;
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee-scroll 40s linear infinite;
  padding: 0 1.5rem;
}

.marquee-item {
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes marquee-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track {
    animation: none;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    width: auto;
  }
}

/* --- BOOK SPREAD LAYOUT --- */
.spread {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 4px minmax(0, 1fr);
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--gutter);
  gap: 0;
  min-height: calc(100vh - 3rem);
}

.spine {
  background: var(--line);
  width: 4px;
  height: 100%;
  align-self: stretch;
  position: sticky;
  top: 3rem;
}

.page {
  padding: 2.5rem 1.5rem 3rem;
  max-width: var(--page-max);
}

.page-left {
  justify-self: end;
}

.page-right {
  justify-self: start;
}

/* --- SHOP HEADER --- */
.shop-header {
  margin-bottom: 2rem;
}

.tagline {
  font-size: 0.85rem;
  color: var(--secondary-soft);
  margin: 0.25rem 0 0;
  line-height: 1.5;
}

/* --- DICTATED QUOTE SIGNATURE --- */
.dictated-quote {
  font-family: var(--display-font);
  font-size: clamp(1.1rem, 2.5vw, 1.5rem);
  font-weight: 400;
  font-variation-settings: 'SOFT' 70;
  color: var(--accent);
  margin: 1.5rem 0 2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  min-height: 2.8em;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.15em;
}

.dq-word {
  display: inline-block;
  opacity: 0;
  animation: dq-appear 0.3s ease-out forwards;
  animation-delay: calc(var(--i) * 0.12s);
}

@keyframes dq-appear {
  to { opacity: 1; }
}

.dq-cursor {
  display: inline-block;
  font-family: var(--body-font);
  font-weight: 300;
  color: var(--accent);
  animation: dq-blink 0.8s step-end infinite;
  margin-left: 0.1em;
}

@keyframes dq-blink {
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dq-word { opacity: 1; animation: none; }
  .dq-cursor { animation: none; opacity: 1; }
}

/* --- ABOUT --- */
.about p {
  margin: 0 0 0.75rem;
  font-size: 0.82rem;
}

/* --- SERVICES --- */
.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.service-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.8rem;
}

.service-name {
  font-weight: 500;
  color: var(--ink);
}

.service-note {
  color: var(--secondary-soft);
  font-size: 0.72rem;
  white-space: nowrap;
}

/* --- REVIEWS --- */
.reviews {
  margin-top: 2rem;
}

.review-card {
  background: var(--card-bg);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  margin-bottom: 0.75rem;
  border-radius: 0 4px 4px 0;
}

.review-text {
  margin: 0 0 0.4rem;
  font-size: 0.78rem;
  line-height: 1.6;
  font-style: italic;
}

.review-attribution {
  margin: 0;
  font-size: 0.72rem;
  color: var(--secondary-soft);
}

.review-stars {
  color: #b8860b;
  letter-spacing: 0.1em;
  font-size: 0.75rem;
}

.google-rating {
  font-size: 0.8rem;
  color: var(--secondary);
  margin: 0.75rem 0 0;
  font-weight: 500;
}

/* --- CONTACT INFO --- */
.contact-info {
  margin-bottom: 2rem;
}

.vcard p {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  line-height: 1.6;
}

.address-line.phone {
  margin-top: 0.5rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.address-line.phone a {
  color: var(--accent);
  text-decoration: none;
}

.address-line.phone a:hover {
  text-decoration: underline;
}

/* --- HOURS --- */
.hours {
  margin-bottom: 2rem;
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.hours-table td {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--line);
}

.hours-table td:last-child {
  text-align: right;
  font-weight: 500;
}

.hours-table .closed {
  color: var(--accent-soft);
  font-style: italic;
}

.hours-note {
  font-size: 0.75rem;
  color: var(--secondary-soft);
  margin: 0.5rem 0 0;
}

/* --- MAP --- */
.map-section {
  margin-bottom: 2rem;
}

.map-container {
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.map-container iframe {
  display: block;
}

/* --- CONTACT FORM --- */
.contact-form-section {
  margin-bottom: 2rem;
}

.contact-form {
  display: grid;
  gap: 0.75rem;
}

.form-row {
  display: grid;
  gap: 0.25rem;
}

.form-row label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--secondary-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-row .optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.7rem;
  color: var(--secondary-soft);
}

.form-row input,
.form-row textarea {
  font-family: var(--body-font);
  font-size: 0.82rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  color: var(--ink);
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(107, 31, 26, 0.15);
}

.btn {
  font-family: var(--body-font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
  justify-self: start;
}

.btn:hover {
  background: var(--accent-soft);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.form-status {
  font-size: 0.78rem;
  margin: 0;
  color: var(--secondary);
}

/* --- PAGE FOOTER --- */
.page-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.72rem;
  color: var(--secondary-soft);
}

.page-footer p {
  margin: 0;
}

/* --- KWAKU ATTRIBUTION (free tier) --- */
.attribution {
  position: fixed;
  bottom: 0.5rem;
  right: 0.75rem;
  font-size: 0.7rem;
  opacity: 0.5;
  font-family: var(--body-font);
  z-index: 200;
}

.attribution a {
  color: var(--ink);
  text-decoration: none;
}

.attribution a:hover {
  text-decoration: underline;
}

/* --- RESPONSIVE: collapse spread to single column --- */
@media (max-width: 800px) {
  .spread {
    grid-template-columns: 1fr;
    max-width: 600px;
  }

  .spine {
    display: none;
  }

  .page {
    padding: 1.5rem 0;
    max-width: 100%;
    justify-self: auto;
  }

  .page-left {
    justify-self: auto;
  }

  .page-right {
    justify-self: auto;
  }

  .marquee-band {
    font-size: 0.7rem;
  }

  .marquee-track {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  .page {
    padding: 1rem 0;
  }

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

  .service-note {
    white-space: normal;
  }
}

/* --- REDUCED MOTION (global) --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
