/* ==========================================================================
   OnCall Mobile Repair — style.css
   One design system: tokens below drive every color, space and radius.
   ========================================================================== */

:root {
  /* Color */
  --ink: #1f2328;
  --ink-soft: #4a5260;
  --bg: #ffffff;
  --bg-tint: #f3f6fb;
  --line: #dde3ed;
  --blue: #1652cc;
  --blue-dark: #0f3a94;
  --blue-wash: #e8effd;

  /* Space */
  --s-1: 0.5rem;
  --s-2: 0.75rem;
  --s-3: 1rem;
  --s-4: 1.5rem;
  --s-5: 2rem;
  --s-6: 3.5rem;
  --s-7: 5.5rem;

  /* Radius & shadow */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, 0.06), 0 2px 8px rgba(20, 30, 50, 0.05);
  --shadow-md: 0 4px 18px rgba(20, 30, 50, 0.10);

  /* Layout */
  --wrap: 1120px;
  --header-h: 64px;
  --bar-h: 64px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  /* Keeps the fixed mobile action bar from covering the footer */
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3, p, ul, figure, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

.sprite { position: absolute; }

.skip-link {
  position: absolute;
  left: var(--s-3);
  top: -100px;
  z-index: 100;
  padding: var(--s-2) var(--s-3);
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: var(--s-2); }

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: currentColor;
  flex: none;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--s-3);
}

/* ---------- Type ---------- */
h1 {
  font-size: clamp(2.1rem, 8vw, 3.75rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 800;
}
h2 {
  font-size: clamp(1.6rem, 5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  font-weight: 800;
  margin-bottom: var(--s-3);
}
h3 { font-size: 1.125rem; line-height: 1.3; font-weight: 700; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: 0 var(--s-4);
  border: 2px solid transparent;
  border-radius: var(--r-pill);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s;
}
.btn-primary { background: var(--blue); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-secondary { background: var(--blue-wash); color: var(--blue-dark); }
.btn-secondary:hover { background: #d6e3fb; }

.cta-row {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.97);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  min-height: var(--header-h);
}
.brand {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  line-height: 1.15;
}
.brand-mark {
  position: relative;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--blue);
}
.brand-mark::after { /* tiny phone outline */
  content: "";
  position: absolute;
  inset: 5px 8px;
  border: 2px solid #fff;
  border-radius: 3px;
}
.brand-text { font-size: 0.95rem; }
.brand-text span { color: var(--blue); }
.btn-call { min-height: 44px; padding: 0 var(--s-3); flex: none; }

/* ---------- Hero ---------- */
.hero {
  padding-block: var(--s-5) var(--s-6);
  background:
    radial-gradient(900px 320px at 100% 0%, var(--blue-wash), transparent 70%),
    var(--bg);
}
.hero-grid { display: grid; gap: var(--s-5); }

.location-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: var(--s-3);
  padding: 6px var(--s-3) 6px var(--s-2);
  background: var(--ink);
  color: #fff;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.9rem;
}
.hero-lead {
  max-width: 54ch;
  margin-top: var(--s-3);
  font-size: 1.125rem;
  color: var(--ink-soft);
}


/* ---------- Photo slider (native scroll-snap; JS only adds arrows and dots) ---------- */
.slider {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--blue-wash);
  box-shadow: var(--shadow-md);
}
.slider-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.slider-track::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1 / 1; }
.slide img { width: 100%; height: 100%; object-fit: cover; }

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-1) var(--s-2);
  background: #fff;
}
.slider-controls[hidden] { display: none; }
.slider-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--blue-wash);
  color: var(--blue-dark);
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}
.slider-btn:hover { background: #d6e3fb; }
.slider-dots {
  display: flex;
  gap: 6px;
}
.slider-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #b7c0cf;
  cursor: pointer;
}
.slider-dot[aria-current="true"] { background: var(--blue); }

/* Hero: portrait flyer image in a rounded card */
.hero-photo {
  max-width: 380px;
  margin-inline: auto;
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--blue-wash);
  box-shadow: var(--shadow-md);
}
.hero-photo img { width: 100%; height: auto; }

.trust-row {
  display: grid;
  gap: var(--s-2);
  margin-top: var(--s-5);
}
.trust-row li {
  display: flex;
  align-items: center;
  gap: var(--s-1);
  min-height: 48px;
  padding: var(--s-1) var(--s-3);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  font-weight: 600;
  font-size: 0.95rem;
}
.trust-row .icon { color: var(--blue); }

/* ---------- Sections ---------- */
.section { padding-block: var(--s-6); }
.section-tint { background: var(--bg-tint); }

.about-grid { display: grid; gap: var(--s-5); align-items: center; }
.about-grid p { color: var(--ink-soft); max-width: 56ch; }
.about-grid p + p { margin-top: var(--s-3); }

.grid { display: grid; gap: var(--s-3); margin-top: var(--s-4); }
.card {
  padding: var(--s-4);
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--blue);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-sm);
}
.card h3 { margin-bottom: var(--s-1); }
.card p { color: var(--ink-soft); font-size: 0.975rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: var(--s-5); }
.info-list { display: grid; gap: var(--s-3); margin-top: var(--s-3); }
.info-list strong { color: var(--ink); }
.info-list p { color: var(--ink-soft); }
.info-list a { overflow-wrap: anywhere; }

.map-box {
  min-height: 300px;
  border-radius: var(--r-lg);
  background: var(--bg-tint);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}
.map-box iframe { display: block; width: 100%; height: 100%; min-height: 300px; border: 0; }

/* ---------- Legal pages ---------- */
.wrap-narrow { max-width: 760px; }
.legal { padding-block: var(--s-6) var(--s-7); }
.legal h1 { font-size: clamp(2rem, 7vw, 3rem); margin-bottom: var(--s-1); }
.legal h2 { font-size: 1.25rem; margin: var(--s-5) 0 var(--s-2); }
.legal p, .legal li { color: var(--ink-soft); }
.legal p + p { margin-top: var(--s-2); }
.legal ul { list-style: disc; padding-left: 1.25rem; display: grid; gap: var(--s-1); }
.legal-updated { font-size: 0.9rem; margin-bottom: var(--s-4); }
.legal-contact {
  margin-top: var(--s-3);
  padding: var(--s-4);
  background: var(--bg-tint);
  border: 1px solid var(--line);
  border-left: 4px solid var(--blue);
  border-radius: var(--r-md);
}
.legal-contact p + p { margin-top: var(--s-2); }
.legal-contact strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer {
  padding-block: var(--s-6) var(--s-5);
  background: #171a1f;
  color: #d5dae3;
}
.site-footer a { color: #fff; }
.site-footer p + p { margin-top: 2px; }
.footer-grid { display: grid; gap: var(--s-4); }
.footer-brand { font-size: 1.25rem; font-weight: 800; color: #fff; margin-bottom: var(--s-1); }
.site-footer nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: none;
}
.site-footer nav a:hover { text-decoration: underline; }
.copyright { margin-top: var(--s-4); padding-top: var(--s-4); border-top: 1px solid #343a45; font-size: 0.85rem; color: #aeb6c4; }

/* ---------- Mobile action bar ---------- */
.action-bar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-1);
  padding: var(--s-1) var(--s-2) calc(var(--s-1) + env(safe-area-inset-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
  box-shadow: 0 -4px 16px rgba(20, 30, 50, 0.08);
}
.action-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  border-radius: var(--r-pill);
  background: var(--blue-wash);
  color: var(--blue-dark);
  font-weight: 700;
  text-decoration: none;
}
.action-bar a.is-primary { background: var(--blue); color: #fff; }

/* ---------- Small phones ---------- */
@media (max-width: 359px) {
  .brand-text { font-size: 0.85rem; }
  .btn-call .icon { display: none; }
}

/* ---------- Tablet ---------- */
@media (min-width: 600px) {
  .cta-row { display: flex; flex-wrap: wrap; }
  .trust-row { grid-template-columns: repeat(3, auto); justify-content: start; }
  .grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- Desktop ---------- */
@media (min-width: 900px) {
  :root { --header-h: 76px; }
  .brand-text { font-size: 1rem; }

  body { padding-bottom: 0; }
  .action-bar { display: none; }

  .hero { padding-block: var(--s-7) var(--s-6); }
  .hero-grid { grid-template-columns: 6fr 5fr; align-items: center; gap: var(--s-6); }
  .hero-photo { max-width: 440px; margin-inline: auto 0; }

  .section { padding-block: var(--s-7); }
  .about-grid { grid-template-columns: 5fr 6fr; gap: var(--s-6); }

  .contact-grid { grid-template-columns: 1fr 1fr; align-items: stretch; gap: var(--s-6); }
  .map-box { min-height: 400px; }

  .footer-grid { grid-template-columns: 2fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
