/* Bowie's Automotive. All colors, fonts, and sizes live here at the top. */

@font-face { font-family: "Jost"; font-weight: 400; font-display: swap; src: url("../fonts/jost-400.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 600; font-display: swap; src: url("../fonts/jost-600.woff") format("woff"); }
@font-face { font-family: "Jost"; font-weight: 800; font-display: swap; src: url("../fonts/jost-800.woff") format("woff"); }

:root {
  color-scheme: dark;              /* The page is already dark, so a phone's forced dark leaves it alone. */
  --black: #060709;
  --dash: #14161b;
  --dash-hi: #262932;
  --amber: #ffb13d;
  --amber-lit: #ffbf5e;
  --amber-soft: #ffdcA6;
  --amber-off: #8b7650;
  --ink: #f4efe6;
  --ink-soft: #c9c2b4;
  --tan: #d8bc92;
  --tan-hi: #e6cfa9;
  --navy: #13203f;
  --flag-navy: #101a3a;
  --red: #b23a22;
  --lamp-red: #ff4a32;
  --lamp-amber: #ffb02e;
  --sans: "Jost", "Century Gothic", "Futura", "Segoe UI", sans-serif;
  --wrap: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--black); color: var(--ink); font: 400 19px/1.45 var(--sans); }
img, svg { display: block; }
a { color: inherit; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.nb { white-space: nowrap; }
:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* ---- The cab: the first screen ---- */
.cab {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(170px, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--black);
  --acc: 0;
}

.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 3px 12px; font-size: 16px; }
.links { display: flex; gap: 2px; }
.links a { padding: 9px 9px; text-decoration: none; color: var(--ink); }
.links a:hover { color: var(--amber-lit); }
.chip { font-size: 13px; color: var(--ink-soft); letter-spacing: .02em; white-space: nowrap; }

.shield {
  position: relative;
  overflow: hidden;
  margin: 0 5px;
  border-radius: 22px 22px 0 0;
  background: #05060a;
}
.shield canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.still { position: absolute; left: 50%; top: 40%; width: min(84%, 560px); height: auto; transform: translate(-50%, -50%); }
.js .still { filter: brightness(.3); }
.js .ready .still { visibility: hidden; }

/* The small controls on the hood. They come up once the engine has started. */
.hoodbar {
  position: absolute; left: 10px; right: 10px; bottom: 26px;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  opacity: 0; pointer-events: none; transition: opacity .7s;
}
.cab[data-stage="run"] .hoodbar { opacity: 1; pointer-events: auto; transition-delay: 1.4s; }
.hb-group { display: flex; gap: 3px; }
.tb {
  width: 36px; height: 36px; padding: 7px; border-radius: 9px; cursor: pointer;
  background: rgba(8, 9, 12, .66); border: 1px solid rgba(255, 255, 255, .18); color: #f1eadb;
}
.tb svg { width: 100%; height: 100%; }
.tb.wide { display: flex; align-items: center; gap: 7px; width: auto; padding: 6px 12px 6px 9px; font: 600 15px var(--sans); white-space: nowrap; }
.tb.wide svg { flex: none; width: 20px; height: 20px; }
#timeBtn .t-sun, #timeBtn.is-night .t-moon { display: none; }
#timeBtn.is-night .t-sun { display: block; }
#pauseBtn[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: #191208; }
#soundBtn[aria-pressed="true"] .s-off,
#soundBtn[aria-pressed="false"] .s-on { display: none; }
#soundBtn[aria-pressed="false"] { background: rgba(8, 9, 12, .66); border-color: rgba(255, 255, 255, .18); color: #f1eadb; }
#soundBtn[aria-pressed="true"] { background: rgba(8, 9, 12, .66); border-color: rgba(255, 255, 255, .18); color: var(--amber-lit); }

/* The dash */
.dash {
  position: relative; z-index: 2;
  margin-top: -18px;
  padding: 12px 12px calc(9px + env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "name name" "lights lights" "msg msg" "call key" "quick quick";
  gap: 6px 10px;
  align-items: center;
  border-radius: 50% 50% 0 0 / 18px 18px 0 0;
  background: linear-gradient(180deg, var(--dash-hi) 0, var(--dash) 26px, #0d0e12 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .13), 0 -8px 22px rgba(0, 0, 0, .55);
}

.name { grid-area: name; margin: 0; display: grid; justify-items: center; font-size: inherit; font-weight: inherit; }
.emblem {
  width: min(58%, 290px); height: auto; margin-bottom: -3.2%;
  position: relative; z-index: 1;
  filter: brightness(calc(.62 + .38 * var(--acc))) saturate(calc(.75 + .25 * var(--acc)));
}
.wm { display: block; width: 100%; max-width: 560px; }
.wm-svg { width: 100%; height: auto; overflow: visible; }
.wm-l { fill: currentColor; }
.wm-r { fill: none; stroke: currentColor; }
.wm-base { color: var(--amber-off); }
.wm-lit { opacity: var(--acc); }
.wm-top { color: var(--amber-lit); }
.wm-glow { color: #ff9a22; filter: blur(7px); opacity: .75; }
.wm-ticks line { stroke: #ffe1ae; stroke-width: 3; stroke-linecap: round; }
.wm-ticks .redline { stroke: var(--lamp-red); }
.needle line { stroke: #ff5a30; stroke-width: 5.5; stroke-linecap: round; }
.hub { fill: #17181d; stroke: var(--amber-lit); stroke-width: 2.2; }

.lights { grid-area: lights; display: flex; align-items: center; justify-content: center; gap: 2px; }
.lamp {
  width: 44px; height: 42px; padding: 6px 7px; border: 0; border-radius: 9px; cursor: pointer;
  background: none; color: #565963;
  transition: color .12s, background-color .12s;
}
.lamp svg { width: 100%; height: 100%; overflow: visible; }
.lamp[data-lamp="check"], .lamp[data-lamp="glow"] { --c: var(--lamp-amber); }
.lamp[data-lamp="oil"], .lamp[data-lamp="batt"], .lamp[data-lamp="temp"], .lamp[data-lamp="brake"] { --c: var(--lamp-red); }
.lamp.on { color: var(--c); }
.lamp.on svg { filter: drop-shadow(0 0 5px var(--c)); }
.lamp.sel { background: rgba(255, 255, 255, .09); }
.odo {
  margin-left: 6px; padding: 1px 5px 1px 6px; border-radius: 3px;
  font-size: 13px; font-weight: 600; letter-spacing: .16em; font-variant-numeric: tabular-nums lining-nums;
  background: #050506; color: #cfc8b8; box-shadow: inset 0 0 0 1px #30323a;
}

.msg {
  grid-area: msg; margin: 0; min-height: 3.2em;
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 17px; line-height: 1.25; color: var(--amber-soft);
}
.msg b { font-weight: 800; color: #fff; }
.msg span { display: block; }

.call {
  grid-area: call;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 72px; padding: 8px 12px; border-radius: 14px;
  background: var(--amber); color: #171008;
  font-size: 22px; font-weight: 600; line-height: 1.1; text-decoration: none; text-align: center;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .7), 0 6px 18px rgba(255, 170, 60, .22);
}
.call svg { flex: none; width: 26px; height: 26px; }
.call b { font-weight: 800; }
.call:hover { background: var(--amber-lit); }

.key {
  grid-area: key;
  width: 104px; height: 104px; padding: 0; border: 0; border-radius: 50%;
  background: none; cursor: grab; touch-action: none; -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none; user-select: none;
}
.key:active { cursor: grabbing; }
.key svg { width: 100%; height: 100%; overflow: visible; }
.arc { stroke: var(--amber); opacity: .28; }
.arc-tip { fill: var(--amber); opacity: .28; }
.ktx { font: 600 8.5px var(--sans); letter-spacing: .05em; fill: #c9c2b4; }
.cab[data-stage="off"] .arc, .cab[data-stage="off"] .arc-tip { animation: beckon 1.9s ease-in-out infinite; }
@keyframes beckon { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
html:not(.js) .key { display: none; }

.quick { grid-area: quick; margin: 0; text-align: center; font-size: 15px; line-height: 1.3; color: var(--ink-soft); }
.quick .tag { display: block; color: var(--ink); }
.quick .when { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 14px; }

@media (prefers-reduced-motion: reduce) {
  .cab[data-stage="off"] .arc, .cab[data-stage="off"] .arc-tip { animation: none; opacity: .9; }
}
@media (max-width: 370px) {
  .odo { display: none; }
  .call { font-size: 19px; min-height: 64px; padding: 8px; }
  .call svg { display: none; }
  .key { width: 92px; height: 92px; }
  .lamp { width: 41px; }
  .links a { padding: 9px 6px; }
}
@media (max-height: 640px) {
  .quick .tag { display: none; }
  .quick { font-size: 14px; }
  .msg { min-height: 2.6em; font-size: 16px; }
  .emblem { width: min(46%, 230px); }
  .call { min-height: 60px; }
  .key { width: 84px; height: 84px; }
}

/* Wide screens: call on the left, the name and lights in the middle, the key on the right, like a real dash. */
@media (min-width: 820px) {
  .shield { margin: 0 8px; border-radius: 30px 30px 0 0; }
  .dash {
    grid-template-columns: minmax(272px, 1fr) minmax(0, 560px) minmax(130px, 1fr);
    grid-template-areas:
      "call name key"
      "quick lights key"
      "quick msg key";
    padding: 14px 24px 12px;
    gap: 4px 22px;
    align-items: center;
  }
  .call { justify-self: end; width: min(100%, 320px); font-size: clamp(19px, 2.3vw, 22px); padding: 8px 10px; }
  .quick { align-self: start; justify-self: end; width: min(100%, 320px); text-align: left; }
  .quick .when { display: block; }
  .when .nb { display: block; }
  .quick i { display: none; }
  .when .nb { display: block; }
  .key { justify-self: start; width: 128px; height: 128px; margin-left: clamp(0px, calc(50% - 64px), 96px); }
  .emblem { width: min(48%, 270px); }
  .hoodbar { left: 26px; right: 26px; bottom: 30px; }
}

/* The biggest screens: the same dash, a size up. */
@media (min-width: 1800px) {
  .dash { grid-template-columns: minmax(340px, 1fr) minmax(0, 760px) minmax(180px, 1fr); }
  .wm { max-width: 760px; }
  .emblem { width: min(46%, 350px); }
  .call { width: min(100%, 420px); min-height: 92px; font-size: 28px; }
  .call svg { width: 32px; height: 32px; }
  .key { width: 170px; height: 170px; margin-left: clamp(0px, calc(50% - 85px), 125px); }
  .quick { width: min(100%, 420px); font-size: 18px; }
  .msg { font-size: 21px; }
  .lamp { width: 54px; height: 50px; }
  .top { font-size: 18px; }
}

/* ---- Bands of the sign's real paint, between sections ---- */
.band { height: 20px; background: #6d1f24 url("../img/stripes.webp") center / 1800px 100% repeat-x; }

/* ---- Sections ---- */
.wrap { width: min(100% - 40px, var(--wrap)); margin: 0 auto; }
section { padding: 46px 0 50px; scroll-margin-top: 0; }
h2 { margin: 0 0 6px; font-size: clamp(30px, 6.4vw, 44px); font-weight: 800; line-height: 1.08; letter-spacing: -.005em; }
.sub { margin: 0 0 8px; font-size: 21px; font-weight: 600; }
.lede { margin: 0 0 22px; max-width: 40em; }

/* The tan steel of the building. Soft ribs, so reading comes first. */
.wall {
  color: var(--navy);
  background-color: var(--tan);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(96, 66, 30, .17) 0 2px, rgba(255, 244, 222, .26) 2px 5px, rgba(255, 244, 222, 0) 5px 26px,
      rgba(96, 66, 30, .06) 26px 30px, rgba(255, 244, 222, 0) 30px 60px);
}
.wall h2 { color: var(--navy); }

.fix { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 0 28px; }
.fix li { padding: 10px 0; font-size: 21px; font-weight: 600; line-height: 1.2; border-top: 2px solid rgba(19, 32, 63, .28); }

/* The reviews sit on the blue field of the sign, on its real painted stars. */
.says {
  position: relative; color: #fff;
  background: var(--flag-navy) url("../img/stars.webp") center / cover;
}
.says::before { content: ""; position: absolute; inset: 0; background: rgba(12, 20, 46, .8); }
.says .wrap { position: relative; }
.says h2 { margin-bottom: 24px; }
.quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 26px 34px; }
.quotes figure { margin: 0; }
.quotes blockquote { margin: 0; font-size: 20px; line-height: 1.34; }
.quotes .big { grid-column: 1 / -1; }
.quotes .big blockquote { font-size: clamp(25px, 4.6vw, 33px); line-height: 1.2; font-weight: 600; }
.quotes figcaption { margin-top: 7px; font-size: 15px; color: #c3cbe0; }
.more { margin: 26px 0 0; }
.more a { color: var(--amber-lit); font-weight: 600; }

.pair { display: grid; gap: 18px; margin-top: 18px; }
.pair figure { margin: 0; }
@media (min-width: 820px) { .pair { grid-template-columns: 1fr 1fr; align-items: end; } }
.pair img { width: 100%; height: auto; border: 5px solid #f6efe2; box-shadow: 0 3px 12px rgba(40, 24, 8, .35); }
.pair figcaption { margin-top: 7px; font-weight: 600; font-size: 17px; }

/* Visit: back to the dash */
.visit { background: linear-gradient(180deg, var(--dash) 0, #0d0e12 100%); }
.visit h2 { color: var(--amber-lit); margin-bottom: 14px; }
.vgrid { display: grid; gap: 30px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.addr { margin: 0; font-size: 27px; font-weight: 800; line-height: 1.15; }
.near { margin: 6px 0 18px; color: var(--ink-soft); }
.acts { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 10px 20px; border-radius: 12px;
  font-size: 19px; font-weight: 600; text-decoration: none;
  box-shadow: inset 0 0 0 2px var(--amber); color: var(--amber-lit);
}
.btn.solid { background: var(--amber); color: #171008; font-weight: 800; box-shadow: none; }
.hours { width: 100%; border-collapse: collapse; font-size: 19px; }
.hours caption { text-align: left; font-size: 21px; font-weight: 800; padding-bottom: 6px; }
.hours th { text-align: left; font-weight: 400; padding: 7px 12px 7px 0; border-top: 1px solid #33363e; }
.hours td { text-align: right; padding: 7px 0; border-top: 1px solid #33363e; font-weight: 600; white-space: nowrap; }

/* The sticker off the office door */
.stuck { margin: 26px 0 0; width: min(100%, 300px); }
.stuck figcaption { margin-top: 9px; font-size: 14px; color: var(--ink-soft); }
.notice {
  transform: rotate(-1.4deg);
  background: #fbfaf6; color: #111; border: 2px solid #111; border-radius: 4px; overflow: hidden;
  box-shadow: 0 0 0 3px #fbfaf6, 0 3px 10px rgba(0, 0, 0, .5);
}
.notice b { display: block; background: #1f7fd1; color: #fff; text-align: center; font-size: 19px; font-weight: 800; letter-spacing: .14em; padding: 2px 0 1px; border-bottom: 2px solid #111; }
.notice span { display: block; padding: 7px 10px 8px; text-align: center; font-size: 13.5px; line-height: 1.22; font-weight: 600; }

.foot { padding: 30px 20px 26px; text-align: center; background: #08090c; color: var(--ink-soft); font-size: 15px; }
.foot .script { width: min(78%, 400px); height: auto; margin: 0 auto 10px; }
.foot p { margin: 0 0 12px; }
.foot i { font-style: normal; opacity: .6; }
.credit { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; text-decoration: none; opacity: .85; }

/* The call bar on phones, once the dash's call button has scrolled away */
.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 9;
  display: none; gap: 1px; background: #000;
  padding-bottom: env(safe-area-inset-bottom);
  transform: translateY(110%); transition: transform .25s;
}
.bar.show { transform: none; }
.bar a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 58px; font-weight: 800; font-size: 19px; text-decoration: none; }
.bar .b1 { flex: 1; background: var(--amber); color: #171008; }
.bar .b1 svg { width: 22px; height: 22px; }
.bar .b2 { width: 84px; background: #1b1d23; color: var(--ink); font-weight: 600; }
@media (max-width: 819px) {
  .bar { display: flex; }
  .foot { padding-bottom: 86px; }
}
@media (prefers-reduced-motion: reduce) { .bar { transition: none; } }
