/*
 * Hallmark Auto Service — Main Stylesheet
 * Mobile-first. BEM. CSS custom properties from critical.css.
 * Import order matches paint order — layout → components → utilities.
 */

@import url('./components/header.css');
@import url('./components/footer.css');
@import url('./components/hero.css');
@import url('./components/cards.css');
@import url('./components/forms.css');
@import url('./components/faq.css');
@import url('./components/breadcrumbs.css');
@import url('./components/sections.css');
@import url('./components/process.css');
@import url('./components/benefits.css');
@import url('./components/brands.css');
@import url('./components/contacts.css');
@import url('./components/about.css');
@import url('./components/404.css');
@import url('./components/prose.css');

/* ── Fonts (@font-face — local, no CDN) ─────────────────────────────── */
/*
 * Chakra Petch — headings, navigation, buttons, labels
 * Source: https://fonts.google.com/specimen/Chakra+Petch
 * Download woff2 from Google Fonts and place in assets/fonts/
 */
@font-face {
  font-family: 'Chakra Petch';
  src: url('../fonts/chakra-petch-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('../fonts/chakra-petch-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Chakra Petch';
  src: url('../fonts/chakra-petch-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/*
 * Mulish — body text, descriptions, labels
 * Source: https://fonts.google.com/specimen/Mulish
 * Download woff2 from Google Fonts and place in assets/fonts/
 */
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Mulish';
  src: url('../fonts/mulish-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── Base typography ─────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-white);
}
/* Live site verified: H1=66px, H2=48px — use clamp() for fluid scaling */
h1 { font-size: clamp(2.5rem, 5vw, 4.125rem); }   /* 40px → 66px */
h2 { font-size: clamp(1.75rem, 3.5vw, 3rem);  }   /* 28px → 48px */
h3 { font-size: clamp(1.25rem, 2.5vw, 1.75rem); }
h4 { font-size: clamp(1.125rem, 2vw, 1.375rem); }
h5 { font-size: 1rem; font-weight: 700; }

p { color: var(--color-text); line-height: 1.7; }

strong, b { font-weight: 700; }
em, i { font-style: italic; }

/* ── Sections ────────────────────────────────────────────────────────── */
/*
 * Live site section padding: ~127–145px top, ~134–137px bottom.
 * Using clamp: 60px mobile → 130px desktop.
 */
.section {
  padding-block: clamp(3.75rem, 8vw, 8.125rem); /* 60px → 130px */
}

/* Section header pattern (used in grids, process, etc.) */
.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}
.section-header__title {
  font-size: var(--text-3xl);
  font-weight: 800;
  letter-spacing: -0.01em;
}
.section-footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-10);
}

/*
 * Service single page sections use 42px h2 (vs 48px on home grids).
 * Applied contextually to .service-* and .faq / .contact-form sections.
 */
.service-features .section-header__title,
.service-process   .section-header__title,
.faq               .section-header__title,
.contact-form__title {
  font-size: clamp(1.625rem, 3vw, 2.625rem);   /* 26px → 42px */
}

/* ── Service grids — capped at 3 columns to match design ────────────── */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8) var(--space-8);
}
@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); }
}
/* Diagnostic cards have no top divider, so reduce gap; service+brand keep wider gap */
.services-grid--diagnostics { gap: var(--space-6); }

/* ── Brands grid ─────────────────────────────────────────────────────── */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-4);
}
@media (min-width: 480px) {
  .brands-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 768px) {
  .brands-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1280px) {
  .brands-grid { grid-template-columns: repeat(6, 1fr); }
}

/* ── Icons ───────────────────────────────────────────────────────────── */
.icon {
  width: 1em;
  height: 1em;
  fill: currentColor;
  flex-shrink: 0;
}
.icon--phone    { width: 1.1em; height: 1.1em; }
.icon--whatsapp { width: 1.2em; height: 1.2em; }
.icon--arrow-right { width: 0.9em; }

/* ── Hamburger ───────────────────────────────────────────────────────── */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: var(--space-2);
  transition: border-color var(--transition);
}
.hamburger:hover { border-color: var(--color-accent); }
.hamburger__bar {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] .hamburger__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 1024px) {
  .hamburger { display: none; }
}

/* ── Page hero (catalog, static pages) ──────────────────────────────── */
.page-hero {
  padding-block: var(--space-16) var(--space-12);
  background-color: var(--color-bg-section);
  border-bottom: 1px solid var(--color-border);
}
.page-hero__title {
  font-size: var(--text-4xl);
  font-weight: 800;
  margin-top: var(--space-4);
  max-width: 20ch;
}
.page-hero__intro {
  margin-top: var(--space-4);
  max-width: 65ch;
  color: var(--color-text-muted);
}

/* ── Service hero — 2-column on desktop, stacks on mobile ────────────── */
/*
 * Layout: text + breadcrumbs + CTA on the left, photo on the right.
 * On <1024px, the photo stacks above the text. .service-hero acts as the
 * outer container (max-width + padding-inline), and the inner `.container`
 * is overridden so it does not double-up the constraints.
 */
.service-hero {
  position: relative;
  background-color: var(--color-bg-section);
  padding-block: var(--space-12);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--container-px);
  overflow: hidden;
}
.service-hero__bg {
  position: relative;
  margin: 0;
  width: 100%;
  aspect-ratio: 16 / 11;
  max-height: 520px;
  overflow: hidden;
}
.service-hero__bg img,
.service-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
/* Overlay no longer needed in 2-column mode (image is contained, not bleeding) */
.service-hero__overlay { display: none; }
/* Override .container styles when it is the inner wrapper of .service-hero */
.service-hero > .container.service-hero__container {
  max-width: none;
  margin-inline: 0;
  padding-inline: 0;
  width: 100%;
  position: relative;
  z-index: 1;
}
.service-hero__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 4.5vw, 4.125rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--color-white);
  max-width: 16ch;
  margin-top: var(--space-4);
}
.service-hero__intro {
  margin-top: var(--space-4);
  max-width: 50ch;
  color: var(--color-text);
  font-size: var(--text-lg);
  line-height: 1.7;
}
.service-hero__cta { margin-top: var(--space-8); }

@media (min-width: 1024px) {
  .service-hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    gap: var(--space-12);
    align-items: center;
    padding-block: var(--space-20);
    min-height: clamp(420px, 60vh, 640px);
  }
  .service-hero__bg {
    order: 2;
    aspect-ratio: auto;
    height: 100%;
    min-height: 360px;
    max-height: none;
  }
  .service-hero > .container.service-hero__container { order: 1; }
}

/* ── Search form ─────────────────────────────────────────────────────── */
.search-form__row {
  display: flex;
  gap: 0;
  max-width: 520px;
}
.search-form__input {
  flex: 1;
  height: 52px;
  padding: 0 var(--space-4);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  outline: none;
  transition: border-color var(--transition);
}
.search-form__input:focus { border-bottom-color: var(--color-accent); }
.search-form__btn {
  flex-shrink: 0;
  padding: 14px 20px 12px;
  clip-path: polygon(14px 0%, 100% 0%, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0% 100%, 0% 14px);
}

/* ── Search / archive entry card ────────────────────────────────────── */
.entry {
  padding: var(--space-6);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: 0;
}
.entry__title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-white);
  margin-bottom: var(--space-3);
}
.entry__title a:hover { color: var(--color-accent); }
.entry__excerpt { color: var(--color-text-muted); font-size: var(--text-sm); line-height: 1.7; }

/* ── Pagination ──────────────────────────────────────────────────────── */
.nav-links {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  margin-top: var(--space-10);
  flex-wrap: wrap;
}
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding-inline: var(--space-3);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: border-color var(--transition), color var(--transition);
}
.page-numbers:hover,
.page-numbers.current {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

/* ── Scroll-reveal utility ───────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 600ms var(--ease), transform 600ms var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── Reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
