/* The Gold Mine Cafe, NH75 outside Kolar.
 *
 * Rebuilt. The first version was a normal vertical page with a highway badge
 * stuck on it, which is decoration, not design.
 *
 * This one runs SIDEWAYS, because the business sits on a road and its
 * customers are travelling. You drive along the page. Each panel is a sign
 * you pass. The road runs unbroken underneath the whole way and only stops
 * when you arrive.
 *
 * No header bar either. On a highway you do not get a menu, you get an
 * odometer telling you how far along you are.
 *
 * Palette is a road at night rather than a dark website: asphalt that is
 * blue black, sodium lamp amber, and headlight white. Gold is in their name
 * and in the district, so the amber earns its place.
 */

:root {
  --asphalt: #14171a;
  --asphalt-2: #1c2126;
  --sodium: #e0a63c;   /* the lamps over an Indian highway */
  --sodium-d: #8a6014;
  --head: #f2efe8;     /* headlight white */
  --dim: #7c8288;
  --paint: #d8d3c6;    /* road marking */

  --sans: system-ui, -apple-system, "Segoe UI", Roboto,
          "Noto Sans", "Noto Sans Kannada", sans-serif;

  --pad: clamp(1.5rem, 6vw, 5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0; overflow: hidden;
  background: var(--asphalt);
  color: var(--head);
  font: 400 clamp(1rem, .95rem + .3vw, 1.15rem)/1.55 var(--sans);
}

body [lang="kn"] { display: none; }
:root[data-lang="kn"] body [lang="en"] { display: none; }
:root[data-lang="kn"] body [lang="kn"] { display: inline; }
.lang button[lang="kn"] { display: inline; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; z-index: 99; background: var(--head); color: var(--asphalt); padding: .75rem 1rem; }

/* ── the odometer, instead of a header ──────────────────────────────── */

.odo {
  position: fixed; top: clamp(1rem, 4vw, 2rem); left: var(--pad); z-index: 30;
  display: flex; align-items: center; gap: .6rem;
  color: var(--sodium); font-weight: 700; letter-spacing: -.01em;
}
.odo__road { font-size: .6rem; letter-spacing: .2em; }
.odo__no { font-size: 1.15rem; }
.odo__bar {
  display: block; width: clamp(56px, 18vw, 110px); height: 2px;
  background: rgb(216 211 198 / .22);
}
.odo__bar i { display: block; height: 100%; width: 0; background: var(--sodium); transition: width .25s linear; }

.lang {
  position: fixed; top: clamp(1rem, 4vw, 2rem); right: var(--pad); z-index: 30;
  display: flex; align-items: center; gap: .45rem; font-size: .78rem; color: var(--dim);
}
.lang button {
  background: none; border: 0; font: inherit; color: var(--dim); cursor: pointer;
  padding: .25rem .1rem; border-bottom: 2px solid transparent;
}
.lang button[aria-pressed="true"] { color: var(--head); border-bottom-color: var(--sodium); }

/* ── the road ───────────────────────────────────────────────────────── */

.road {
  display: flex; height: 100svh;
  overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.road::-webkit-scrollbar { display: none; }

.stop {
  flex: 0 0 100%; height: 100%;
  scroll-snap-align: start;
  display: flex; flex-direction: column; justify-content: center;
  padding: 0 var(--pad) clamp(5rem, 14vh, 8rem);
  position: relative;
}

/* The centre line, running unbroken under every panel. It is the road, so it
   is drawn once on the scroller rather than per section. */
.road::after {
  content: none;
}
.stop::after {
  content: ""; position: absolute; left: 0; right: 0;
  bottom: clamp(2.6rem, 8vh, 4rem); height: 3px;
  background: repeating-linear-gradient(
    to right, var(--paint) 0 42px, transparent 42px 92px
  );
  opacity: .38;
}
/* The road ends where you arrive. */
.stop--here::after {
  background: linear-gradient(to right, var(--paint) 0 46%, transparent 52%);
  opacity: .5;
}

/* ── panels ─────────────────────────────────────────────────────────── */

.km {
  margin: 0 0 1rem; color: var(--sodium);
  font-size: .68rem; letter-spacing: .32em; text-transform: uppercase; font-weight: 700;
}

h1 {
  margin: 0; font-size: clamp(3.6rem, 19vw, 10rem); line-height: .86;
  font-weight: 800; letter-spacing: -.05em;
}
.lede { margin: 1.4rem 0 0; max-width: 22ch; color: var(--dim); font-size: clamp(1.05rem, 2.6vw, 1.4rem); }

.swipe {
  margin: 2.2rem 0 0; color: var(--sodium); font-weight: 600; font-size: .95rem;
  animation: nudge 2.4s var(--ease) infinite;
}
@keyframes nudge { 0%,100% { transform: none; } 50% { transform: translateX(10px); } }

/* The sign you actually pass, lit from below by the headlights. */
.stop--sign { align-items: flex-start; }
.board {
  border: 3px solid var(--sodium); border-radius: 6px;
  padding: clamp(1.4rem, 5vw, 2.6rem) clamp(1.6rem, 6vw, 3.4rem);
  background: linear-gradient(to top, rgb(224 166 60 / .12), transparent 70%);
}
.board__small { margin: 0; color: var(--sodium); font-size: .72rem; letter-spacing: .28em; text-transform: uppercase; font-weight: 700; }
.board__small--dim { color: var(--dim); margin-top: .8rem; }
.board__big {
  margin: .7rem 0; font-size: clamp(1.8rem, 7vw, 3.6rem);
  font-weight: 800; letter-spacing: -.035em; line-height: 1;
}

.serves { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.serves li {
  counter-increment: s;
  font-size: clamp(2.2rem, 10vw, 5rem); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.08;
}
.serves li::before {
  content: counter(s, decimal-leading-zero);
  display: inline-block; width: 2.4ch;
  font-size: .3em; font-weight: 700; letter-spacing: .1em;
  color: var(--sodium); vertical-align: middle;
}
.serves__note { margin: 1.6rem 0 0; color: var(--dim); font-size: .9rem; }

.stop--photo { padding-inline: clamp(1rem, 4vw, 3rem); }
.shot {
  flex: 1; max-height: 62vh; margin-top: 2rem;
  display: grid; place-items: center;
  border: 1px dashed rgb(242 239 232 / .26);
  color: var(--dim); font-size: .9rem;
}

.score {
  margin: 0; font-size: clamp(6rem, 30vw, 15rem); font-weight: 800;
  line-height: .8; letter-spacing: -.06em; color: var(--sodium);
  font-variant-numeric: tabular-nums;
}
.score__l { margin: 1rem 0 0; max-width: 18ch; font-size: clamp(1.05rem, 2.6vw, 1.4rem); }

h2 {
  margin: 0 0 2rem; max-width: 16ch;
  font-size: clamp(1.7rem, 6vw, 3.2rem); font-weight: 800;
  line-height: 1.05; letter-spacing: -.035em;
}

/* Contact only at the end, because that is when you have arrived. */
.acts { display: flex; flex-wrap: wrap; gap: .7rem; }
.call, .wa {
  text-decoration: none; font-weight: 800; letter-spacing: -.01em;
  padding: 1rem 1.7rem; font-size: 1.05rem;
}
.call { background: var(--sodium); color: var(--asphalt); }
.call:hover { background: #eeb85c; }
.wa { border: 2px solid var(--head); color: var(--head); }
.wa:hover { background: var(--head); color: var(--asphalt); }

.fine { margin: 2.4rem 0 0; color: var(--dim); font-size: .78rem; max-width: 40ch; }

[data-slot] { position: relative; }
.shot[data-slot]::after {
  content: attr(data-slot); position: absolute; left: .9rem; bottom: .8rem;
  font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}

/* ── floor ──────────────────────────────────────────────────────────── */

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  /* Sideways scroll with snap is disorienting without motion. Fall back to a
     plain vertical page. */
  body { overflow: auto; }
  .road { display: block; height: auto; overflow: visible; scroll-snap-type: none; }
  .stop { height: auto; min-height: 0; padding-block: clamp(3rem, 10vw, 5rem); }
  .stop::after { position: static; margin-top: 2.5rem; }
  .odo__bar { display: none; }
}

@media print { .odo, .lang, .skip { display: none; } .road { display: block; } }

/* The road is focusable so arrow keys work, but it should not draw a ring
   just because you clicked into it. */
.road:focus { outline: none; }
.road:focus-visible { outline: 2px solid var(--sodium); outline-offset: -4px; }

/* The nudge has done its job once you have set off. */
.road.is-moving .swipe { opacity: 0; transition: opacity .4s ease; }
