/* The 6am Run. Dawn in Jávea old town: night blue going to morning,
   whitewash, terracotta, blue shutters. Bungee (shop sign lettering) for
   the game, Figtree for reading. */

:root {
  --night: #1f2450;
  --night-2: #2c2f66;
  --terra: #c8553d;
  --terra-deep: #9e3c28;
  --wash: #f6efe2;
  --crust: #e9a04a;
  --shutter: #2f6fa8;
  --ink: #1b1a2a;
  --bar: var(--sc-demo-bar, 0px);
  --head: 56px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar) + var(--head)); }
body {
  margin: 0;
  padding-top: var(--bar);
  background: var(--night);
  color: var(--wash);
  font: 17px/1.55 Figtree, system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--crust); outline-offset: 3px; }

.top {
  position: sticky; top: var(--bar); z-index: 20;
  height: var(--head);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 0 clamp(14px, 3vw, 28px);
  background: var(--night);
  border-bottom: 1px solid rgba(246, 239, 226, .12);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 400 22px/1 Bungee, sans-serif; letter-spacing: .02em; white-space: nowrap; }
.brand svg { width: 34px; height: 34px; }
.top-link { font-weight: 600; text-decoration: none; padding: 10px 4px; border-bottom: 2px solid var(--crust); }

/* the game */
.stage {
  position: relative;
  height: clamp(440px, calc(100svh - var(--bar) - var(--head)), 680px);
  overflow: hidden;
  background: var(--night-2);
  touch-action: none;
  user-select: none; -webkit-user-select: none;
}
#game { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.panel {
  position: absolute; left: 50%; top: 50%; z-index: 5;
  width: min(460px, calc(100% - 28px));
  transform: translate(-50%, -54%);
  padding: 22px 24px 18px;
  background: rgba(27, 26, 42, .86);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  border-radius: 18px;
  text-align: center;
}
.panel[hidden] { display: none; }
.kicker { margin: 0 0 4px; color: var(--crust); font-weight: 600; }
.panel h1 { margin: 0 0 10px; font: 400 clamp(36px, 7vw, 54px)/1 Bungee, sans-serif; color: var(--wash); }
.panel p { margin: 0 0 14px; }
.go {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 54px; padding: 12px 30px;
  font: 400 20px/1 Bungee, sans-serif; color: var(--ink);
  background: var(--crust); border: 0; border-radius: 999px; cursor: pointer;
  box-shadow: 0 5px 0 #a8561f;
  transition: transform .12s ease, box-shadow .12s ease;
}
.go:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #a8561f; }
.go:active { transform: translateY(4px); box-shadow: 0 1px 0 #a8561f; }
.keys { font-size: 14px; color: #c9c6d8; margin: 14px 0 4px !important; }
.k-touch { display: none; }
@media (hover: none) and (pointer: coarse) { .k-touch { display: inline; } .k-desk { display: none; } }
.best { font-weight: 600; color: var(--crust); margin: 4px 0 0 !important; min-height: 1.5em; }
.best:empty { display: none; }

.pause, .sound {
  position: absolute; z-index: 4; top: 12px;
  min-width: 44px; height: 44px;
  color: var(--wash); background: rgba(27, 26, 42, .55);
  border: 0; border-radius: 12px; cursor: pointer;
  font: 600 14px/1 Figtree, sans-serif;
}
.pause { right: 12px; display: grid; place-items: center; }
.pause[hidden] { display: none; }
.pause svg { width: 22px; height: 22px; fill: currentColor; }
.sound { left: 12px; top: auto; bottom: 12px; padding: 0 12px; }

.pads { display: none; }
@media (hover: none) and (pointer: coarse) {
  /* the buttons get their own strip under the road, so a thumb never hides the rider */
  .stage { height: calc(min(125vw, 100svh - var(--bar) - var(--head) - 96px, 620px) + 96px); background: #15183a; }
  #game { top: 0; bottom: auto; height: calc(100% - 96px); }
  .panel { top: calc(50% - 48px); }
  .pads { display: flex; justify-content: space-between; gap: 12px; position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 96px; padding: 11px 12px; pointer-events: none; }
  .pads.on .pad { pointer-events: auto; }
  .pad {
    flex: 1; max-width: 220px; height: 74px;
    font: 400 18px/1 Bungee, sans-serif; color: var(--wash);
    background: rgba(27, 26, 42, .42); border: 2px solid rgba(246, 239, 226, .5); border-radius: 18px;
    opacity: .35; transition: opacity .2s;
    touch-action: none;
  }
  .pads.on .pad { opacity: 1; }
  .pad.held { background: rgba(233, 160, 74, .55); }
  .sound { bottom: auto; top: 12px; left: auto; right: 64px; }
}

/* the bakery */
.bakery { background: var(--terra); color: #fff8ee; }
.wrap { max-width: 1080px; margin: 0 auto; padding: clamp(44px, 7vw, 84px) clamp(16px, 4vw, 36px); }
.bakery-head { max-width: 640px; }
.bakery h2 { font: 400 clamp(30px, 5vw, 48px)/1.05 Bungee, sans-serif; margin: 0 0 14px; }
.breads { list-style: none; padding: 0; margin: 28px 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 2px; background: var(--terra-deep); border-radius: 16px; overflow: hidden; }
.breads li { display: grid; gap: 4px; padding: 18px 18px 16px; background: var(--terra); }
.breads b { font: 400 20px/1.1 Bungee, sans-serif; }
.breads span { font-size: 15px; color: #ffe6d4; }
.breads em { font-style: normal; font-weight: 800; font-size: 20px; }
.hours p { margin: 0 0 6px; }
.hours b { display: inline-block; min-width: 84px; }

.foot { padding: 28px clamp(16px, 4vw, 36px) 40px; font-size: 15px; color: #c9c6d8; max-width: 1080px; margin: 0 auto; }
.foot a { color: var(--crust); font-weight: 600; }

@media (max-width: 520px) {
  .brand { font-size: 19px; }
  .panel { padding: 18px 16px 14px; }
  .panel p { font-size: 16px; }
  .hours b { display: block; }
}
