/* Derek's Muffler & Auto Repair. Every color comes off the building: the sign's gold, painted brick, black stripes,
   the tan cap on the wall, and the lot out front. */
@font-face { font-family: "Young Serif"; src: url("fonts/young-serif.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("fonts/zilla-slab-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Zilla Slab"; src: url("fonts/zilla-slab-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Kalam"; src: url("fonts/kalam-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  color-scheme: only light;
  --gold: #F6B012;
  --ink: #111111;
  --paper: #FFF6DF;
  --brick: #F4F2EB;
  --mortar: #E2DFD5;
  --cap: #E0D1B2;
  --lot: #2B2B2B;
  --pink: #E8476B;
  --red: #D3261F;
  --curb: #F2C21A;
  --sans: "Zilla Slab", Georgia, serif;
  --head: "Young Serif", Georgia, serif;
  --hand: "Kalam", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 52px; background: var(--lot); }
body { margin: 0; background: var(--brick); color: var(--ink); font: 400 1.125rem/1.4 var(--sans); font-variant-numeric: lining-nums; overflow-x: hidden; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, p, ul { margin: 0; padding: 0; }
.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 #1762C4; outline-offset: 2px; }

/* The painted brick. */
.wall, .hero {
  background-color: var(--brick);
  background-image:
    linear-gradient(var(--mortar) 2px, transparent 2px),
    linear-gradient(90deg, var(--mortar) 2px, transparent 2px),
    linear-gradient(90deg, var(--mortar) 2px, transparent 2px);
  background-size: 100% 44px, 120px 44px, 120px 44px;
  background-position: 0 0, 0 0, 60px 22px;
  background-repeat: repeat-y, repeat, repeat;
}

.draft { background: var(--ink); color: #fff; text-align: center; font-size: .8125rem; line-height: 1.5rem; }

.topnav { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 1.4rem; background: var(--cap); border-bottom: 3px solid var(--ink); padding: 0 .5rem; }
.topnav a { display: block; padding: .55rem .15rem; font-weight: 700; font-size: 1rem; text-decoration: none; }
.topnav a:hover { text-decoration: underline; }

/* ---------- The first screen ---------- */
.hero { position: relative; overflow: hidden; overflow: clip; padding: 8px 8px 14px; }
.band { position: absolute; left: 0; right: 0; top: 38px; height: 92px; background: var(--gold); border-top: 7px solid var(--ink); border-bottom: 7px solid var(--ink); }
.hero-in { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.signwrap { position: relative; z-index: 1; width: 100%; max-width: calc((100vh - 310px) * 1.0286); max-width: calc((100svh - 310px) * 1.0286); min-width: 268px; box-shadow: 0 5px 0 rgba(0, 0, 0, .16); will-change: transform; border-radius: 6px; }
.sign { display: block; width: 100%; height: auto; overflow: visible; }
#soot { position: absolute; left: 0; top: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

/* The two things to touch on the sign. See-through, over the drawing, and bigger than what they cover. */
.hit { position: absolute; display: block; padding: 0; border: 0; background: none; cursor: pointer; touch-action: pan-y; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; border-radius: 12px; }
#btnCar { left: 6%; top: 17%; width: 88%; height: 36%; }
#btnMuffler { left: 28%; top: 54%; width: 58%; height: 26%; }
#btnMuffler:disabled { cursor: default; display: none; }
/* A ring that says "touch here," on whichever one is next. */
.hit.pulse::after { content: ""; position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; border: 5px solid #fff; box-shadow: 0 0 0 3px var(--ink), inset 0 0 0 3px var(--ink); animation: touchhere 1.3s ease-out infinite; pointer-events: none; }
#btnCar.pulse::after { top: 53%; }
#btnMuffler.pulse::after { left: 34%; top: 42%; }
@keyframes touchhere { 0% { transform: scale(.45); opacity: 1; } 75% { opacity: .9; } 100% { transform: scale(1.15); opacity: 0; } }

.pitch { position: relative; z-index: 3; width: 100%; max-width: 560px; display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.hearrow, .prompt, .addr, .hrs, .how, .door { transform: translate(var(--sx, 0), var(--sy, 0)); }
.hearrow { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; }
.hear { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem .5rem .75rem; background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 999px; font-family: var(--head); font-size: 1.3125rem; line-height: 1.1; cursor: pointer; box-shadow: 0 3px 0 var(--ink); -webkit-tap-highlight-color: transparent; }
.hear:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.hear .slash { display: none; }
.hear[data-sound="on"] { background: var(--ink); color: var(--gold); transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.hear[data-sound="off"] { background: #fff; color: #555; border-color: #777; box-shadow: 0 3px 0 #777; }
.hear[data-sound="off"] .waves { display: none; }
.hear[data-sound="off"] .slash { display: inline; }
.hear.pulse { animation: hearhere 1.3s ease-out infinite; }
@keyframes hearhere { 0% { outline: 0 solid rgba(246, 176, 18, .9); outline-offset: 0; } 100% { outline: 10px solid rgba(246, 176, 18, 0); outline-offset: 2px; } }
.hearline { font-family: var(--head); font-size: 1.3125rem; line-height: 1.15; text-align: center; }

/* One short step at a time, pointing back at the sign. It keeps its place, so nothing jumps when the words change. */
.prompt { display: flex; align-items: center; justify-content: center; gap: .45rem; min-height: 2.25rem; font-weight: 700; font-size: 1.1875rem; line-height: 1.2; text-align: center; }
.prompt .point { display: none; width: 0; height: 0; border-left: .42em solid transparent; border-right: .42em solid transparent; border-bottom: .62em solid var(--red); flex: none; }
.prompt.on .point { display: block; }
.prompt .see { font-size: 1.1875rem; }
.textbtn { display: inline; padding: .15rem .2rem; border: 0; background: none; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.textbtn[hidden] { display: none; }

.call { display: flex; align-items: center; justify-content: center; gap: .55rem; background: var(--ink); color: var(--gold); border-radius: 10px; padding: .8rem .75rem; text-decoration: none; font-family: var(--head); font-size: clamp(1.25rem, 6.8vw, 1.625rem); line-height: 1.1; text-align: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .25); -webkit-tap-highlight-color: transparent; }
.call:hover { background: #2a2a2a; }
.call svg { flex: none; }
.callwords { display: block; }
.next { display: block; color: #fff; font-family: var(--sans); font-weight: 700; font-size: .68em; margin-bottom: .2em; }
.next[hidden] { display: none; }

.addr { text-align: center; font-weight: 700; font-size: 1.0625rem; margin-top: 2px; }
.addr a { text-decoration: none; }
.hrs { text-align: center; font-size: 1.0625rem; margin-top: -6px; }
.how { font-size: 1rem; text-align: center; line-height: 1.35; }

/* ---------- Their garage door, and the banner on it. On a phone it's a full-width band under the first screen. ---------- */
.door { margin: 6px -8px -14px; background: repeating-linear-gradient(#FBFAF6 0 22px, #D8D5CB 22px 24px); border-top: 7px solid var(--ink); border-bottom: 7px solid var(--ink); padding: 24px 12px; display: flex; justify-content: center; align-items: center; }
.banner { background: var(--ink) linear-gradient(112deg, transparent 15%, var(--pink) 15.2% 85%, transparent 85.2%); color: #fff; padding: .6rem 1.5rem .7rem; text-align: center; font-family: var(--head); line-height: 1; box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.b1, .b2 { display: block; text-shadow: 2px 2px 0 var(--ink); }
.b1 { font-size: 1.625rem; }
.b2 { font-size: 2.375rem; letter-spacing: .03em; margin-top: .22em; }

/* ---------- The sections ---------- */
.in { max-width: 1040px; margin: 0 auto; padding: 34px 16px 38px; }
h2 { font-family: var(--head); font-weight: 400; font-size: 2.125rem; line-height: 1.1; }
.lead { font-size: 1.3125rem; margin: .35rem 0 1.1rem; }

/* Their window, with the list on it in their words. A long line that has to wrap stays tucked under its own start. */
.front { display: grid; gap: 16px; }
.window { background: #FBFAF6; border: 3px solid var(--ink); border-bottom: 12px solid var(--gold); padding: 6px; box-shadow: 0 3px 0 rgba(0, 0, 0, .16); }
.board { background: #0E0D14; color: #fff; padding: 12px 10px 14px 12px; font-family: var(--hand); font-weight: 700; font-size: clamp(.9375rem, 4.2vw, 1.0625rem); line-height: 1.35; display: grid; grid-template-columns: repeat(auto-fit, minmax(8.2rem, 1fr)); gap: 0 .6rem; }
.board ul { list-style: none; }
.board li { padding: .13em 0 .13em .75em; text-indent: -.75em; }

.side { display: grid; gap: 16px; align-content: start; }
.plate { background: var(--paper); border: 3px solid var(--ink); padding: 14px 16px; text-align: center; box-shadow: 0 3px 0 rgba(0, 0, 0, .16); }
.p1 { font-family: var(--head); font-size: 1.5rem; line-height: 1.1; }
.p3 { font-weight: 700; font-size: 1.1875rem; margin-top: .2rem; }
.photos { border: 3px dashed #8d8a80; padding: 26px 14px; text-align: center; color: #4c4a44; background: rgba(255, 255, 255, .55); }

.visit .in { padding-top: 6px; }
.two { display: grid; gap: 28px; }
.hours { border-collapse: collapse; width: 100%; max-width: 30rem; margin-top: .6rem; font-size: 1.1875rem; background: rgba(255, 255, 255, .6); }
.hours th, .hours td { padding: .45rem .2rem; border-bottom: 2px solid var(--ink); text-align: left; vertical-align: top; }
.hours th { font-weight: 700; padding-right: .75rem; }
.after { margin-top: .75rem; font-size: 1.1875rem; }
.where { font-size: 1.3125rem; margin: .6rem 0 .75rem; font-weight: 700; }
.btn { display: inline-block; background: var(--gold); color: var(--ink); border: 3px solid var(--ink); border-radius: 10px; padding: .6rem 1.2rem; font-family: var(--head); font-size: 1.3125rem; line-height: 1.1; text-decoration: none; box-shadow: 0 3px 0 var(--ink); }
.btn:hover { background: #FFC02A; }
.small { font-size: 1rem; margin-top: .85rem; }

/* ---------- The lot out front, with the heap ---------- */
.lot { background: var(--lot); color: #fff; }
.heapwrap { background: var(--brick); padding: 10px 12px 0; display: flex; justify-content: center; }
.heap { display: block; width: 100%; max-width: 560px; height: auto; overflow: visible; }
.heap-extra { visibility: hidden; }
.heap-extra.on { visibility: visible; }
.heap-extra.drop { animation: heapdrop .78s linear both; transform-box: fill-box; transform-origin: center; }
@keyframes heapdrop {
  0% { transform: translateY(-420px) rotate(-22deg); animation-timing-function: cubic-bezier(.55, 0, .9, .6); }
  60% { transform: translateY(0) rotate(0); animation-timing-function: cubic-bezier(.2, .7, .5, 1); }
  76% { transform: translateY(-34px) rotate(5deg); animation-timing-function: cubic-bezier(.5, 0, .9, .6); }
  100% { transform: translateY(0) rotate(0); }
}
.curb { height: 12px; background: var(--curb); border-top: 4px solid var(--ink); }
.foot { max-width: 1040px; margin: 0 auto; padding: 24px 16px calc(22px + 3.25rem); text-align: center; }
.bless { font-family: var(--head); font-size: 1.75rem; line-height: 1.15; color: var(--gold); text-wrap: balance; }
.name { margin-top: .75rem; line-height: 1.45; }
.backup { margin-top: .75rem; font-weight: 700; }
.credit { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; font-size: .875rem; color: #d9d9d9; text-decoration: none; }
.credit:hover { text-decoration: underline; }
.credit img { display: block; }

/* The call bar on phones. */
.callbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1.3fr 1fr; background: var(--ink); border-top: 3px solid var(--gold); transform: translateY(110%); transition: transform .18s ease-out; }
.callbar.up { transform: none; }
.callbar a { display: block; padding: .8rem .5rem; text-align: center; font-family: var(--head); font-size: 1.1875rem; line-height: 1.1; text-decoration: none; color: var(--gold); }
.callbar a + a { color: #fff; border-left: 2px solid #444; }

/* ---------- Wider: the sign and the words side by side, like the sign beside its bays ---------- */
@media (min-width: 760px) {
  .topnav { justify-content: flex-end; padding: 0 1.5rem; }
  .hero { padding: 14px 20px 20px; }
  .band { top: 52px; height: 110px; }
  .hero-in { flex-direction: row; align-items: stretch; justify-content: center; gap: 28px; max-width: 1500px; margin: 0 auto; }
  .signwrap { flex: 0 1 auto; align-self: flex-start; width: min(58vw, calc((100vh - 100px) * 1.0286), 860px); width: min(58vw, calc((100svh - 100px) * 1.0286), 860px); max-width: none; }
  /* The words stay under the gold band, with a bay door below them, like the bay beside the real sign. */
  .pitch { flex: 1 1 320px; max-width: 540px; padding-top: 172px; gap: 12px; }
  .hearrow { justify-content: flex-start; }
  .hearline, .how, .addr, .hrs, .prompt { text-align: left; justify-content: flex-start; }
  .hear, .hearline { font-size: clamp(1.25rem, 2.2vw, 1.875rem); }
  .prompt, .prompt .see { font-size: clamp(1.125rem, 1.7vw, 1.4375rem); }
  /* On a wide screen the sign is to the left, so the pointer turns. */
  .prompt .point { border-top: .42em solid transparent; border-bottom: .42em solid transparent; border-right: .62em solid var(--red); border-left: 0; }
  .call { font-size: clamp(1.35rem, 2.6vw, 2.375rem); padding: 1rem .75rem; }
  .how { font-size: 1.125rem; }
  .addr, .hrs { font-size: 1.25rem; }
  .door { flex: 1 1 auto; margin: 6px 0 0; min-height: 150px; border: 7px solid var(--ink); padding: 20px 14px; }
  .board { font-size: 1.1875rem; line-height: 1.6; padding: 16px 20px 18px; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); }
  .board li { padding: 0 0 0 .75em; }
  .front { grid-template-columns: minmax(0, 2.1fr) minmax(220px, 1fr); }
  .two { grid-template-columns: 1fr 1fr; gap: 40px; }
  .callbar { display: none; }
  .foot { padding-bottom: 22px; }
  h2 { font-size: 2.5rem; }
}
/* Sign and words side by side, on a short screen: no room for the band or the door. */
@media (min-width: 760px) and (max-height: 560px) {
  .pitch { padding-top: 12px; }
  .band, .door { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .callbar { transition: none; }
  .hit.pulse::after { animation: none; transform: scale(.8); }
  .hear.pulse { animation: none; }
}
