/* ============================================================
   Sam Truck & Trailer Repair — Mobile Services, Brampton
   Risograph two-ink composition: fluorescent pink + royal blue
   on paper white, with deliberate misregister offsets.
   ============================================================ */

:root {
  --bg: #f7f5ea;
  --paper: #fffdf6;
  --ink-a: #ff48b0;      /* fluorescent pink */
  --ink-b: #1f3fff;      /* royal blue */
  --ink: #14142b;
  --ink-soft: #4a4a63;
  --rule: rgba(20, 20, 43, 0.16);
  --rule-strong: rgba(20, 20, 43, 0.34);
  --shadow: 0 1px 0 rgba(20, 20, 43, 0.08);
  --maxw: 1180px;
  --pad: clamp(1.15rem, 4vw, 3rem);
  --font-display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Crimson Pro", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101020;
    --paper: #17172c;
    --ink-a: #ff6cc2;
    --ink-b: #7d92ff;
    --ink: #f4f2e8;
    --ink-soft: #b9b7cc;
    --rule: rgba(244, 242, 232, 0.18);
    --rule-strong: rgba(244, 242, 232, 0.4);
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
  }
}

/* Manual theme override wins over system preference */
html[data-theme="light"] {
  --bg: #f7f5ea;
  --paper: #fffdf6;
  --ink-a: #ff48b0;
  --ink-b: #1f3fff;
  --ink: #14142b;
  --ink-soft: #4a4a63;
  --rule: rgba(20, 20, 43, 0.16);
  --rule-strong: rgba(20, 20, 43, 0.34);
  --shadow: 0 1px 0 rgba(20, 20, 43, 0.08);
}

html[data-theme="dark"] {
  --bg: #101020;
  --paper: #17172c;
  --ink-a: #ff6cc2;
  --ink-b: #7d92ff;
  --ink: #f4f2e8;
  --ink-soft: #b9b7cc;
  --rule: rgba(244, 242, 232, 0.18);
  --rule-strong: rgba(244, 242, 232, 0.4);
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.4);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(1.02rem, 0.55vw + 0.92rem, 1.16rem);
  line-height: 1.62;
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 70% 55% at 8% -6%, rgba(255, 72, 176, 0.20) 0, transparent 62%),
    radial-gradient(ellipse 65% 55% at 100% 12%, rgba(31, 63, 255, 0.16) 0, transparent 58%),
    radial-gradient(ellipse 80% 60% at 50% 108%, rgba(255, 72, 176, 0.10) 0, transparent 60%);
  background-attachment: fixed;
  text-wrap: pretty;
  overflow-x: hidden;
}

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

a { color: inherit; }

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

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

/* ---------- typography ---------- */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  text-transform: uppercase;
  font-variation-settings: "wdth" 88;
  animation: breathe 7s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { font-variation-settings: "wdth" 78; }
  50%      { font-variation-settings: "wdth" 122; }
}

h2 {
  font-size: clamp(1.85rem, 4.6vw, 3.1rem);
  text-transform: uppercase;
  font-variation-settings: "wdth" 92;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.9rem;
}

.lede {
  font-size: clamp(1.12rem, 1.4vw, 1.35rem);
  color: var(--ink-soft);
  max-width: 46ch;
}

/* ---------- misregister utility ---------- */

.misreg {
  position: relative;
  display: inline-block;
}

.misreg::before {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  color: var(--ink-a);
  transform: translate(-4px, 3px);
  z-index: -1;
  pointer-events: none;
}

.misreg--blue::before { color: var(--ink-b); transform: translate(4px, -3px); }

/* ---------- marquee ticker ---------- */

.ticker {
  background: var(--ink);
  color: var(--bg);
  border-bottom: 3px solid var(--ink-a);
  overflow: hidden;
  position: relative;
}

.ticker__track {
  display: flex;
  width: max-content;
  gap: 3rem;
  padding: 0.62rem 0;
  animation: scroll 34s linear infinite;
}

.ticker__track span {
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker__track span b { color: var(--ink-a); font-weight: 500; }

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

/* ---------- header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}

.site-head__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--ink-b);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
  box-shadow: 4px 4px 0 var(--ink-a);
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.1;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

.brand__sub {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  text-transform: uppercase;
}

.head-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.nav {
  display: none;
  gap: 1.4rem;
}

.nav a {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.4rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.nav a:hover { border-bottom-color: var(--ink-a); }

@media (min-width: 900px) {
  .nav { display: flex; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.7rem 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--bg);
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 var(--ink-a);
}

.btn--ghost {
  background: transparent;
  color: var(--ink);
}

.btn--ghost:hover { box-shadow: 4px 4px 0 var(--ink-b); }

.btn--pink {
  background: var(--ink-a);
  border-color: var(--ink-a);
  color: #14142b;
}

.btn--pink:hover { box-shadow: 4px 4px 0 var(--ink-b); }

.theme-toggle {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: transparent;
  border: 2px solid var(--rule-strong);
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover { border-color: var(--ink-a); background: color-mix(in srgb, var(--ink-a) 14%, transparent); }

.theme-toggle svg { width: 19px; height: 19px; }

.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
  html:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}

/* ---------- hero ---------- */

.hero {
  padding-block: clamp(2.6rem, 7vw, 5.5rem) clamp(2rem, 5vw, 3.5rem);
  position: relative;
}

.hero__grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3.2rem);
  align-items: end;
}

@media (min-width: 940px) {
  .hero__grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 { margin-bottom: 1.1rem; }

.hero h1 .line-2 {
  display: block;
  color: var(--ink-b);
  font-variation-settings: "wdth" 108;
}

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-top: 1.6rem;
  padding-top: 1.2rem;
  border-top: 2px solid var(--rule-strong);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero__meta strong { color: var(--ink); font-weight: 500; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 1.6rem;
}

.hero__figure {
  position: relative;
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 10px 10px 0 var(--ink-a);
}

.hero__figure img {
  width: 100%;
  height: clamp(230px, 34vw, 400px);
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}

.hero__figure figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.6rem 0.8rem;
  border-top: 2px solid var(--ink);
  background: var(--paper);
}

/* ---------- section shell ---------- */

.section { padding-block: clamp(2.6rem, 6vw, 4.6rem); }

.section__head {
  display: grid;
  gap: 0.8rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.6rem);
}

@media (min-width: 820px) {
  .section__head {
    grid-template-columns: 1fr 1fr;
    align-items: end;
    gap: 2.4rem;
  }
}

.rule-top { border-top: 3px solid var(--ink); padding-top: 1.4rem; }

/* ---------- service menu ---------- */

.menu {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
}

@media (min-width: 880px) {
  .menu { grid-template-columns: repeat(2, 1fr); }
}

.menu section h3 {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 0.55rem;
  margin-bottom: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
}

.menu section h3 em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  color: var(--ink-a);
  text-transform: uppercase;
}

.menu .item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.35rem 1rem;
  padding-block: 0.72rem;
  border-bottom: 1px dotted var(--rule-strong);
}

.menu .item:last-child { border-bottom: 0; }

.menu .item dt {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.menu .item dd {
  margin: 0;
  grid-column: 1 / -1;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.menu .price {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-b);
  white-space: nowrap;
  padding-top: 0.15rem;
}

.menu-note {
  margin-top: 1.6rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
  border-left: 4px solid var(--ink-a);
  padding-left: 0.9rem;
}

/* ---------- photo strip ---------- */

.strip {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 780px) {
  .strip { grid-template-columns: repeat(3, 1fr); }
}

.strip figure {
  margin: 0;
  border: 2px solid var(--ink);
  background: var(--paper);
  overflow: hidden;
}

.strip img {
  width: 100%;
  height: clamp(150px, 20vw, 230px);
  object-fit: cover;
}

.strip figcaption {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  padding: 0.5rem 0.65rem;
  border-top: 2px solid var(--ink);
}

/* ---------- about ---------- */

.about__grid {
  display: grid;
  gap: clamp(1.6rem, 4vw, 3rem);
}

@media (min-width: 900px) {
  .about__grid { grid-template-columns: 1.1fr 0.9fr; }
}

.about p { margin: 0 0 1rem; }

.about p:last-child { margin-bottom: 0; }

.factbox {
  border: 3px solid var(--ink);
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--ink-b);
  padding: 1.3rem 1.4rem;
}

.factbox h3 { margin-bottom: 0.9rem; }

.factbox dl {
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.factbox dt {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.factbox dd {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

/* ---------- footer cards ---------- */

.footer-cards {
  display: grid;
  gap: 1.2rem;
}

@media (min-width: 820px) {
  .footer-cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  border: 2px solid var(--ink);
  background: var(--paper);
  padding: 1.3rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.card h3 {
  font-size: 1rem;
  border-bottom: 2px solid var(--ink-a);
  padding-bottom: 0.5rem;
}

.card p { margin: 0; font-size: 0.98rem; color: var(--ink-soft); }

.hours {
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.hours li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.34rem;
  border-bottom: 1px dotted var(--rule-strong);
}

.hours li:last-child { border-bottom: 0; }

.hours .open { color: var(--ink-b); font-weight: 500; }

.card .phone {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  text-decoration: none;
  letter-spacing: -0.02em;
  border-bottom: 3px solid var(--ink-a);
  align-self: flex-start;
  padding-bottom: 0.1rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.card .phone:hover { color: var(--ink-b); border-bottom-color: var(--ink-b); }

.map-link {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: 2px solid var(--ink-b);
  align-self: flex-start;
  padding-bottom: 0.15rem;
  transition: color 0.2s ease;
}

.map-link:hover { color: var(--ink-b); }

/* ---------- closing quote ---------- */

.quote {
  padding-block: clamp(2.4rem, 6vw, 4.4rem);
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  margin-top: clamp(2rem, 5vw, 3.4rem);
}

.quote blockquote {
  margin: 0;
  max-width: 34ch;
}

.quote p {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.5rem, 4.4vw, 2.7rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.quote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.site-foot {
  padding-block: clamp(2rem, 4vw, 3rem) 2.4rem;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

.foot-grid {
  display: grid;
  gap: 1.4rem;
  margin-bottom: 2rem;
}

@media (min-width: 760px) {
  .foot-grid { grid-template-columns: 1.4fr 1fr 1fr; }
}

.site-foot h4 {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.7rem;
}

.site-foot ul { list-style: none; margin: 0; padding: 0; }

.site-foot li { padding-block: 0.22rem; }

.site-foot a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }

.site-foot a:hover { border-bottom-color: var(--ink-a); }

.claim-banner {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink-b) 8%, transparent);
  border: 1px solid var(--rule);
  padding: 0.55rem 0.8rem;
  margin-bottom: 0.9rem;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.claim-banner:hover { color: var(--ink); border-color: var(--ink-b); }

.attribution {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.attribution a { text-decoration: none; border-bottom: 1px solid var(--rule-strong); }

/* ---------- motion preferences ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  h1 { animation: none; font-variation-settings: "wdth" 92; }

  .ticker__track { animation: none; }

  .btn:hover { transform: none; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
