/* ============================================================
   Roadsafe Mobile Tires & Auto — warm earth editorial
   Palette: paper #f5efe4 / espresso ink #2b1e14 / terracotta
   #c25a37 / moss #6a7a4a. Diagonal split hero, expandable
   index, scroll-following glow, kinetic H1.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  --bg:        #f5efe4;
  --bg-2:      #efe6d6;
  --surface:   #fbf7ef;
  --ink:       #2b1e14;
  --ink-soft:  #5c4a3a;
  --ink-faint: #8a7663;
  --accent:    #c25a37;
  --accent-dk: #9d4527;
  --secondary: #6a7a4a;
  --line:      #ddd0bb;
  --line-soft: #e8ddca;
  --warm-light: rgba(226, 168, 96, 0.30);
  --glow-y:    18%;
  --shadow:    0 1px 2px rgba(43, 30, 20, .05), 0 12px 32px -18px rgba(43, 30, 20, .28);
  --radius:    3px;
  --maxw:      1180px;
  --serif:     'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --sans:      'DM Sans', 'Inter', system-ui, -apple-system, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:        #17110c;
    --bg-2:      #1e1710;
    --surface:   #221a13;
    --ink:       #f2e8da;
    --ink-soft:  #c3b3a0;
    --ink-faint: #93826f;
    --accent:    #e07a52;
    --accent-dk: #f0916b;
    --secondary: #9aab74;
    --line:      #3a2d21;
    --line-soft: #2c2218;
    --warm-light: rgba(200, 130, 60, 0.20);
    --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  --bg:        #17110c;
  --bg-2:      #1e1710;
  --surface:   #221a13;
  --ink:       #f2e8da;
  --ink-soft:  #c3b3a0;
  --ink-faint: #93826f;
  --accent:    #e07a52;
  --accent-dk: #f0916b;
  --secondary: #9aab74;
  --line:      #3a2d21;
  --line-soft: #2c2218;
  --warm-light: rgba(200, 130, 60, 0.20);
  --shadow:    0 1px 2px rgba(0, 0, 0, .4), 0 14px 34px -18px rgba(0, 0, 0, .7);
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.05rem;
  line-height: 1.7;
  font-weight: 400;
  overflow-x: hidden;
  text-wrap: pretty;
}

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  text-wrap: balance;
}

h1 { font-size: clamp(2.4rem, 6.4vw, 4.6rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 1.05em; max-width: 68ch; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-dk); }

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

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: .7rem 1.1rem;
  font-size: .9rem; text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(1.15rem, 5vw, 3rem);
}

.eyebrow {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .17em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

.section-head { margin-bottom: clamp(2rem, 5vw, 3.4rem); }
.section-sub { color: var(--ink-soft); font-size: 1.02rem; }

/* ---------- topbar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  border-bottom: 1px solid var(--line-soft);
}

.topbar__inner {
  max-width: var(--maxw);
  margin-inline: auto;
  padding: .7rem clamp(1.15rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 1.2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  text-decoration: none;
  color: var(--ink);
  flex-shrink: 0;
}
.brand:hover { color: var(--ink); }

.brand__mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--serif);
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .02em;
  border-radius: var(--radius);
  flex-shrink: 0;
}

.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--serif); font-size: 1.12rem; font-weight: 600; }
.brand__sub { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }

.topnav {
  display: none;
  gap: 1.5rem;
  margin-left: auto;
  font-size: .92rem;
}
.topnav a { color: var(--ink-soft); text-decoration: none; }
.topnav a:hover { color: var(--accent); }

.topbar__actions { display: flex; align-items: center; gap: .6rem; margin-left: auto; }

.theme-toggle {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  color: var(--ink);
  padding: 0;
}
.theme-toggle:hover { border-color: var(--accent); }
.theme-toggle__icon {
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: inset -5px -3px 0 0 var(--bg);
  transition: transform .3s ease, box-shadow .3s ease;
}
:root[data-theme="dark"] .theme-toggle__icon {
  box-shadow: inset 0 0 0 0 var(--bg), 0 0 0 3px color-mix(in srgb, var(--accent) 45%, transparent);
  background: var(--accent);
  transform: rotate(180deg);
}

.callbtn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .55rem 1rem;
  background: var(--accent);
  color: #fff;
  font-size: .92rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  white-space: nowrap;
}
.callbtn:hover { background: var(--accent-dk); color: #fff; }
.callbtn__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #fff;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .45; transform: scale(.75); }
}

/* ---------- hero: diagonal split ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  inset: -10% -10% 0;
  z-index: -1;
  background: radial-gradient(circle at 50% var(--glow-y), var(--warm-light) 0, transparent 62%);
  pointer-events: none;
}

.hero__split { display: grid; }

.hero__panel { padding: clamp(2.6rem, 7vw, 5.5rem) clamp(1.15rem, 5vw, 3rem); }

.hero__panel--paper { background: var(--bg); }
.hero__paper-inner { max-width: 42rem; margin-inline: auto; }

.hero__panel--ink {
  background: var(--ink);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 4vw, 2.6rem);
  justify-content: center;
}
.hero__panel--ink .hero__quote { color: var(--bg); }

.hero h1 { margin-bottom: .5em; }

.lede {
  font-size: clamp(1.02rem, 1.5vw, 1.14rem);
  color: var(--ink-soft);
  max-width: 40rem;
}

.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.8rem 0 2.4rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .8rem 1.5rem;
  font-size: .95rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.btn--solid { background: var(--accent); color: #fff; }
.btn--solid:hover { background: var(--accent-dk); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }

.hero__facts {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
}
.hero__facts li { display: flex; flex-direction: column; gap: .1rem; }
.hero__facts strong { font-family: var(--serif); font-size: 1.1rem; font-weight: 600; }
.hero__facts span { font-size: .88rem; color: var(--ink-faint); }

.hero__figure { margin: 0; }
.hero__figure img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(.92) contrast(1.03);
}
.hero__figure figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem .8rem;
  align-items: baseline;
  margin-top: .8rem;
  font-size: .8rem;
  color: color-mix(in srgb, var(--bg) 62%, transparent);
}
.figcap__label {
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-size: .68rem;
  color: var(--accent);
}

.hero__quote {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  line-height: 1.45;
  font-style: italic;
  margin: 0 0 .5rem;
  max-width: 34rem;
}
.hero__cite {
  font-size: .85rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--bg) 60%, transparent);
  margin: 0;
}

/* kinetic H1 — weight shifts with scroll */
@keyframes weigh {
  from { font-variation-settings: 'wght' 220, 'opsz' 120; }
  to   { font-variation-settings: 'wght' 820, 'opsz' 40; }
}
.kinetic {
  font-variation-settings: 'wght' 300, 'opsz' 100;
  animation: weigh linear both;
  animation-timeline: scroll(root);
  animation-range: 0 32vh;
}

/* ---------- marquee strip ---------- */
.strip {
  background: var(--ink);
  color: var(--bg);
  overflow: hidden;
  padding: .85rem 0;
  border-block: 1px solid var(--ink);
}
.strip__track {
  display: flex;
  gap: 1.6rem;
  width: max-content;
  animation: slide 42s linear infinite;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  white-space: nowrap;
}
.strip__track span { color: color-mix(in srgb, var(--bg) 78%, transparent); }
.strip__track span[aria-hidden] { color: var(--accent); }
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- section rhythm ---------- */
.index-section,
.how,
.coverage,
.visit { padding: clamp(3.4rem, 9vw, 6.5rem) 0; }

.how { background: var(--bg-2); border-block: 1px solid var(--line-soft); }

/* ---------- expandable index ---------- */
.index { border-top: 1px solid var(--line); }

.entry { border-bottom: 1px solid var(--line); }

.entry > summary {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: .9rem 1.1rem;
  padding: 1.35rem .35rem;
  cursor: pointer;
  list-style: none;
  min-height: 44px;
  transition: color .2s ease, background-color .2s ease;
}
.entry > summary::-webkit-details-marker { display: none; }
.entry > summary:hover { color: var(--accent); }
.entry > summary:hover .entry__num { color: var(--accent); }

.entry__num {
  font-family: var(--sans);
  font-size: .74rem;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--ink-faint);
  transition: color .2s ease;
}

.entry__title {
  font-family: var(--serif);
  font-size: clamp(1.12rem, 2.4vw, 1.6rem);
  font-weight: 500;
  line-height: 1.2;
}

.entry__meta {
  font-size: .78rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
  white-space: nowrap;
}

.entry__chev {
  width: 11px; height: 11px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .28s ease;
  color: var(--ink-faint);
}
.entry[open] .entry__chev { transform: rotate(225deg) translate(-2px, -2px); color: var(--accent); }

.entry__body {
  display: grid;
  gap: clamp(1.4rem, 4vw, 2.6rem);
  padding: .4rem .35rem 2.4rem;
  animation: unfold .38s ease both;
}
@keyframes unfold {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.entry__text p { color: var(--ink-soft); }
.entry__text p:first-child { font-size: 1.06rem; }

.entry__fig { margin: 0; }
.entry__fig img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  filter: saturate(.92) contrast(1.03);
}

.ticks {
  list-style: none;
  margin: 1.4rem 0 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.ticks li {
  position: relative;
  padding-left: 1.5rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
.ticks li::before {
  content: "";
  position: absolute;
  left: 0; top: .62em;
  width: 8px; height: 8px;
  background: var(--secondary);
  border-radius: 50%;
}

/* ---------- how it works ---------- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.6rem);
  counter-reset: step;
}
.steps li {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}
.steps__n {
  display: block;
  font-family: var(--serif);
  font-size: 2.4rem;
  font-weight: 300;
  color: var(--accent);
  line-height: 1;
  margin-bottom: .5rem;
}
.steps h3 { margin-bottom: .4rem; }
.steps p { color: var(--ink-soft); margin-bottom: 0; }

/* ---------- coverage ---------- */
.coverage__grid { display: grid; gap: clamp(2rem, 5vw, 3.4rem); }
.coverage__copy p { color: var(--ink-soft); }

.coverage__list {
  list-style: none;
  margin: 1.8rem 0;
  padding: 0;
  display: grid;
  gap: .8rem;
}
.coverage__list li {
  font-size: .96rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: .8rem;
}
.coverage__list strong {
  font-family: var(--serif);
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--ink);
  margin-right: .35rem;
}

.coverage__note {
  font-size: .92rem;
  color: var(--ink-faint);
  border-left: 2px solid var(--accent);
  padding-left: 1rem;
  margin-bottom: 0;
}

.coverage__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 4vw, 2.2rem);
  box-shadow: var(--shadow);
  align-self: start;
}
.coverage__card h3 { margin-bottom: 1rem; }

.kit { list-style: none; margin: 0 0 1.4rem; padding: 0; display: grid; gap: .6rem; }
.kit li {
  font-size: .93rem;
  color: var(--ink-soft);
  padding-left: 1.3rem;
  position: relative;
}
.kit li::before {
  content: "";
  position: absolute;
  left: 0; top: .68em;
  width: 10px; height: 1px;
  background: var(--accent);
}
.coverage__card-note {
  font-size: .86rem;
  color: var(--ink-faint);
  margin: 0;
  border-top: 1px solid var(--line-soft);
  padding-top: 1rem;
}

/* ---------- visit ---------- */
.visit { background: var(--bg-2); border-top: 1px solid var(--line-soft); }

.visit__grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 2.4rem);
  margin-bottom: clamp(2.6rem, 6vw, 4rem);
}

.visit__block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 3.5vw, 2rem);
  box-shadow: var(--shadow);
}
.visit__block h3 {
  font-size: .74rem;
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1rem;
}

.visit__phone {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.1rem);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.15;
  margin-bottom: .5rem;
}
.visit__phone:hover { color: var(--accent); }

.visit__block address {
  font-style: normal;
  font-size: 1.05rem;
  color: var(--ink);
  line-height: 1.55;
  margin-bottom: .6rem;
}

.visit__hint { font-size: .88rem; color: var(--ink-faint); margin-bottom: .8rem; }

.visit__maplink { font-size: .9rem; font-weight: 600; text-decoration: none; }
.visit__maplink:hover { text-decoration: underline; }

.hours { width: 100%; border-collapse: collapse; font-size: .93rem; }
.hours th, .hours td { text-align: left; padding: .38rem 0; }
.hours th { font-weight: 500; color: var(--ink-soft); }
.hours td { text-align: right; color: var(--secondary); font-weight: 600; }
.hours tr + tr th, .hours tr + tr td { border-top: 1px solid var(--line-soft); }

.visit__reviews h3 { margin-bottom: 1.4rem; }

.reviews { display: grid; gap: 1.4rem; }
.reviews blockquote {
  margin: 0;
  border-left: 2px solid var(--secondary);
  padding-left: 1.2rem;
}
.reviews blockquote p {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: .5rem;
}
.reviews cite {
  font-style: normal;
  font-size: .82rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* ---------- footer ---------- */
.sitefoot {
  background: var(--ink);
  color: color-mix(in srgb, var(--bg) 82%, transparent);
  padding: clamp(2.4rem, 6vw, 3.6rem) 0 1.6rem;
}
.sitefoot a { color: color-mix(in srgb, var(--bg) 88%, transparent); }

.sitefoot__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.6rem;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1.8rem;
  border-bottom: 1px solid color-mix(in srgb, var(--bg) 16%, transparent);
}
.sitefoot__brand { display: flex; align-items: center; gap: .8rem; }
.sitefoot__brand .brand__mark {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  color: var(--ink);
}
.sitefoot__name { font-family: var(--serif); font-size: 1.05rem; margin: 0; color: var(--bg); }
.sitefoot__meta { font-size: .85rem; margin: 0; }

.sitefoot__nav { display: flex; flex-wrap: wrap; gap: 1.2rem; font-size: .88rem; }
.sitefoot__nav a { text-decoration: none; }
.sitefoot__nav a:hover { color: var(--accent); }

.sitefoot__claim { padding-top: 1.4rem; }

.claim-banner {
  display: inline-block;
  font-size: .78rem;
  line-height: 1.4;
  padding: .45rem .8rem;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--bg) 18%, transparent);
  color: color-mix(in srgb, var(--bg) 78%, transparent);
  text-decoration: none;
}
.claim-banner:hover {
  background: color-mix(in srgb, var(--bg) 16%, transparent);
  color: var(--bg);
}

.sitefoot__attr { padding-top: 1rem; }
.attribution {
  position: static;
  margin: 0;
  font-size: .72rem;
  opacity: .55;
  font-family: var(--sans);
}
.attribution a { color: inherit; }

/* ---------- responsive ---------- */
@media (min-width: 620px) {
  .hero__facts { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
  .reviews { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 860px) {
  .topnav { display: flex; }
  .topbar__actions { margin-left: 0; }

  /* the diagonal: paper panel clipped, ink panel behind it */
  .hero__split {
    grid-template-columns: 1fr;
    grid-template-areas: "stack";
    min-height: min(88vh, 780px);
  }
  .hero__panel { grid-area: stack; }
  .hero__panel--paper {
    background: transparent;
    z-index: 2;
    clip-path: polygon(0 0, 62% 0, 48% 100%, 0 100%);
    display: flex;
    align-items: center;
  }
  .hero__panel--paper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--bg);
    z-index: -1;
  }
  .hero__panel--ink {
    z-index: 1;
    padding-left: clamp(46%, 48vw, 52%);
    background: var(--ink);
  }
  .hero__paper-inner { max-width: 34rem; margin-inline: 0; }

  .entry__body { grid-template-columns: 1.35fr 1fr; align-items: start; }
  .entry__fig { position: sticky; top: 6rem; }

  .coverage__grid { grid-template-columns: 1.5fr 1fr; }
  .visit__grid { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1080px) {
  .hero__panel--paper { padding-right: 4rem; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .kinetic { font-variation-settings: 'wght' 560, 'opsz' 60; animation: none; }
  .strip__track { animation: none; transform: none; }
  .callbtn__dot { animation: none; }
  .entry__body { animation: none; }
}
