/* QuickSnax Vending
   Palette: machine cobalt, panel navy, button-light lemon, in-stock mint.
   Type: Archivo, wide cut for headlines, normal width for reading. */

:root {
  --ink: #13203B;
  --ink-soft: #323C53;
  --paper: #B5BFD0;
  --white: #FFFFFF;
  --cobalt: #2B54E0;
  --cobalt-deep: #1C3BA8;
  --cobalt-tint: #A6B8E6;
  --lemon: #FFC83D;
  --lemon-deep: #F2B312;
  --mint: #1A9E63;
  --line: #7F8BA4;
  --error: #C2261D;

  /* Roles: what a color is for. After-hours mode swaps these. */
  --bg: var(--paper);
  --text: var(--ink);
  --surface: var(--white);
  --outline: var(--ink);
  --accent: var(--cobalt);
  --rule: rgba(19, 32, 59, .13);
  --drop: rgba(19, 32, 59, .16);
  --header-bg: rgba(181, 191, 208, .92);
  --field-bg: #F1F4F9;
  --field-border: #9AA4BA;
  --band: var(--ink);
  --cta-bg: var(--cobalt);

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 22px;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);

  color-scheme: light;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  transition: background-color .5s, color .5s;
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, iframe { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; }
p { margin: 0; }

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: var(--white);
  padding: 10px 16px; border-radius: var(--radius-s);
  text-decoration: none;
}
.skip:focus { top: 12px; }

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

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: var(--lemon);
  color: var(--ink);
  font: inherit;
  font-weight: 750;
  font-stretch: 110%;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 0 var(--ink);
  transition: transform .15s var(--ease-out), box-shadow .15s var(--ease-out), background-color .15s;
}
.btn:hover { background: var(--lemon-deep); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--ghost { background: transparent; box-shadow: none; color: var(--text); border-color: var(--outline); }
.btn--ghost:hover { background: var(--surface); }
.btn--ghost:active { transform: none; }
.btn--small { min-height: 40px; padding: 8px 18px; font-size: .95rem; box-shadow: 0 3px 0 var(--ink); }
.btn--wide { width: 100%; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  min-height: 68px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-weight: 850; font-stretch: 125%;
  font-size: 1.3rem; letter-spacing: -.02em;
}
.brand__mark { flex: none; width: 32px; height: 40px; }
.brand__name { white-space: nowrap; }
.brand__sub { font-weight: 600; font-stretch: 112%; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav a { white-space: nowrap; }
.site-nav a:not(.btn) {
  text-decoration: none; font-weight: 550;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--accent); }

.menu-toggle {
  display: none;
  width: 48px; height: 48px;
  border: 0; background: none; cursor: pointer;
  margin-right: -10px;
}
.menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
  display: block; width: 24px; height: 2.5px; border-radius: 2px;
  background: var(--text); margin: auto;
  transition: transform .2s var(--ease-out), opacity .2s;
}
.menu-toggle__bars { position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle__bars::before { top: -7px; }
.menu-toggle__bars::after { top: 7px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 1140px) {
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .site-nav .btn { margin-top: 16px; }
}

/* Hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero__place {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; color: var(--ink-soft);
  margin-bottom: 18px;
}
.hero__place::before {
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 4px rgba(26, 158, 99, .18);
}
.hero__title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 880;
  font-stretch: 125%;
  letter-spacing: -.035em;
  line-height: .98;
  max-width: 12ch;
  text-wrap: balance;
}
.hero__lede {
  margin-top: 24px;
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 34em;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.hero__facts {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px 26px;
  font-weight: 600; font-size: .98rem;
}
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts svg {
  width: 20px; height: 20px;
  fill: none; stroke: var(--mint); stroke-width: 2.6;
  stroke-linecap: round; stroke-linejoin: round;
}

.hero__machine { margin: 0; display: grid; justify-items: center; gap: 16px; }
.hero__caption { font-weight: 600; color: var(--ink-soft); text-align: center; min-height: 1.6em; }

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__title { max-width: 14ch; }
}

/* The vending machine */
.machine {
  --w: min(100%, 380px);
  position: relative;
  width: var(--w);
  padding: 14px 14px 0;
  background: linear-gradient(160deg, #3A63EC 0%, var(--cobalt) 45%, var(--cobalt-deep) 100%);
  border: 3px solid var(--ink);
  border-radius: 22px 22px 10px 10px;
  /* --px / --py run from -1 to 1 and follow the mouse (js/main.js) */
  --px: 0; --py: 0;
  box-shadow: calc(10px - var(--px) * 8px) calc(12px - var(--py) * 6px) 0 var(--drop);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.machine__sign {
  margin-bottom: 12px;
  padding: 6px 0;
  text-align: center;
  font-weight: 880; font-stretch: 125%;
  letter-spacing: -.01em;
  font-size: 1.15rem;
  color: var(--ink);
  background: var(--lemon);
  border: 2px solid var(--ink);
  border-radius: 10px;
}
.machine__body { display: grid; grid-template-columns: 1fr 68px; gap: 12px; }

.machine__window {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px 4px;
  padding: 10px 8px 12px;
  background: linear-gradient(180deg, #1A2747 0%, #22335E 100%);
  border: 3px solid var(--ink);
  border-radius: 10px;
  overflow: hidden;
}
/* glass glare */
.machine__window::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.10) 31%, rgba(255,255,255,.04) 46%, transparent 47%);
  pointer-events: none;
}

.slot {
  position: relative;
  display: grid; justify-items: center; align-content: end;
  gap: 2px;
  padding: 4px 0 0;
  border: 0; background: none;
  color: inherit; font: inherit;
  cursor: pointer;
  border-radius: 6px;
  touch-action: manipulation;
}
.slot:hover .slot__snack { transform: translateY(-3px); }
.slot:focus-visible { outline-color: var(--lemon); outline-offset: 0; }
.slot__snack {
  width: 70%;
  aspect-ratio: 40 / 56;
  transition: transform .18s var(--ease-out), opacity .25s;
}
.slot__snack svg { width: 100%; height: 100%; }
.slot.is-empty .slot__snack { opacity: 0; transform: translateY(6px) scale(.9); transition: none; }
.slot__coil {
  width: 92%; height: 7px;
  border-radius: 3px;
  background: repeating-linear-gradient(105deg, #A9B5CC 0 2px, transparent 2px 7px);
  opacity: .85;
}
.slot.is-turning .slot__coil { animation: coil-turn .45s linear 1; }
@keyframes coil-turn { to { background-position-x: 21px; } }
.slot__code {
  font-size: .68rem; font-weight: 700; line-height: 1;
  color: #C9D3E8;
  padding: 2px 5px; border-radius: 3px;
  background: rgba(255, 255, 255, .08);
}

.machine__panel {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 10px 6px;
  background: #E9EDF6;
  border: 3px solid var(--ink);
  border-radius: 10px;
}
.lcd {
  width: 100%;
  min-height: 46px;
  display: grid; place-items: center;
  padding: 4px;
  background: #0E2A1E;
  border-radius: 5px;
  overflow: hidden;
}
.lcd__text {
  color: #7BF2B0;
  font-size: .62rem; font-weight: 700; line-height: 1.2;
  text-align: center;
  text-shadow: 0 0 6px rgba(123, 242, 176, .6);
}
.keypad {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px;
  width: 100%;
}
.keypad button {
  display: grid; place-items: center;
  aspect-ratio: 1;
  padding: 0;
  font: inherit;
  font-size: .58rem; font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  /* Trim the font's extra space above and below the letters so they sit
     dead center in the key (browsers without support fall back to line-height 1) */
  text-box: trim-both cap alphabetic;
  text-align: center;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid var(--ink);
  border-radius: 4px;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, transform .1s;
}
.keypad button:hover { background: #FFE7A3; }
.keypad button:focus-visible { outline: 2px solid var(--lemon); outline-offset: 1px; }
.keypad button.is-lit { background: var(--lemon); }
.keypad button.is-pressed, .keypad button:active { transform: translateY(1px); background: var(--lemon-deep); }
.reader {
  width: 100%; aspect-ratio: 1.3;
  display: grid; place-items: center;
  background: var(--ink); border-radius: 6px;
}
.reader svg { width: 60%; fill: none; stroke: var(--lemon); stroke-width: 2; stroke-linecap: round; }
.coin { width: 8px; height: 26px; border-radius: 4px; background: var(--ink); }

.machine__tray {
  position: relative;
  margin: 12px 0 14px;
  margin-right: 80px;
  height: 64px;
  background: #0F1830;
  border: 3px solid var(--ink);
  border-radius: 8px;
}
.machine__flap {
  position: absolute; left: -3px; right: -3px; top: -3px;
  height: 34px;
  z-index: 3;
  background: rgba(198, 210, 236, .55);
  border: 3px solid var(--ink);
  border-radius: 8px 8px 4px 4px;
  transform-origin: top center;
}
.machine__flap.is-bumped { animation: flap-bump .5s var(--ease-out); }
@keyframes flap-bump {
  30% { transform: perspective(200px) rotateX(-28deg); }
  100% { transform: none; }
}
.machine__feet {
  position: absolute; left: 18px; right: 18px; bottom: -14px;
  display: flex; justify-content: space-between;
}
.machine__feet span { width: 34px; height: 11px; background: var(--ink); border-radius: 0 0 4px 4px; }

/* the snack that falls */
.dropper {
  position: absolute; z-index: 2;
  pointer-events: none;
  will-change: transform, opacity;
}
.dropper svg { width: 100%; height: 100%; }

/* Mouse parallax: the machine leans toward the cursor; the snacks sit a little
   deeper behind the glass and the glare slides the other way */
.machine.is-tilting {
  transform: perspective(1000px) rotateY(calc(var(--px) * 5deg)) rotateX(calc(var(--py) * -4deg));
}
.machine.is-tilting .slot,
.machine.is-tilting .dropper { translate: calc(var(--px) * 4px) calc(var(--py) * 3px); }
.machine.is-tilting .machine__sign { translate: calc(var(--px) * 2px) calc(var(--py) * 1.5px); }
.machine.is-tilting .machine__window::after { translate: calc(var(--px) * -24px) 0; }

/* Sections */
.section { padding: clamp(64px, 9vw, 120px) 0; }
section[id] { scroll-margin-top: 68px; }
.section--tint { background: var(--cobalt-tint); }
.section--ink { background: var(--band); color: var(--white); }
.section--cta { background: var(--cta-bg); color: var(--white); }

.section__title {
  font-size: clamp(2rem, 4.2vw, 3.3rem);
  font-weight: 860;
  font-stretch: 122%;
  letter-spacing: -.03em;
  max-width: 18ch;
  text-wrap: balance;
}
.section__lede {
  margin-top: 16px;
  max-width: 36em;
  font-size: 1.15rem;
  color: var(--ink-soft);
}
.section--ink .section__lede, .section--cta .section__lede { color: rgba(255, 255, 255, .82); }

/* Steps: a sequence, so they keep their numbers */
.steps {
  list-style: none; padding: 0;
  margin: clamp(40px, 6vw, 64px) 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  position: relative;
}
.step { position: relative; }
/* Connector from each circle to the next one; the last step has none */
.step:not(:last-child)::before {
  content: "";
  position: absolute; left: 56px; right: -32px; top: 26.5px;
  border-top: 3px dashed var(--line);
}
.step__num {
  display: grid; place-items: center;
  width: 56px; height: 56px;
  margin-bottom: 22px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--lemon);
  color: var(--ink);
  font-weight: 880; font-stretch: 125%; font-size: 1.45rem;
}
.step h3 { font-size: 1.35rem; font-weight: 780; font-stretch: 112%; letter-spacing: -.01em; }
.step p { margin-top: 10px; color: var(--ink-soft); max-width: 30em; }

@media (max-width: 860px) {
  .steps { grid-template-columns: 1fr; gap: 36px; }
  .step:not(:last-child)::before { left: 26.5px; right: auto; top: 56px; bottom: -36px; border-top: 0; border-left: 3px dashed var(--line); }
  .step { padding-left: 80px; }
  .step__num { position: absolute; left: 0; top: 0; margin: 0; }
}

/* Who it's for */
.who {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(36px, 6vw, 88px); align-items: start;
}
.who__intro .btn { margin-top: 28px; }
.who__list {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0 32px;
}
.who__list li {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 0;
  border-top: 2px solid var(--rule);
}
.who__list svg {
  flex: none; width: 30px; height: 30px; margin-top: 2px;
  fill: none; stroke: var(--accent); stroke-width: 1.9;
  stroke-linecap: round; stroke-linejoin: round;
}
.who__list h3 { font-size: 1.12rem; font-weight: 760; }
.who__list p { margin-top: 4px; color: var(--ink-soft); font-size: 1rem; }

@media (max-width: 860px) {
  .who { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .who__list { grid-template-columns: 1fr; }
}

/* Machine lineup: styled like a row of vending columns */
.lineup {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 3px solid var(--outline);
  border-radius: var(--radius-l);
  background: var(--surface);
  overflow: hidden;
}
.model {
  position: relative;
  display: flex; flex-direction: column;
  padding: 28px 24px 32px;
  border-left: 3px solid var(--outline);
}
.model:first-child { border-left: 0; }
.model::after {
  /* the coil at the bottom of each column */
  content: "";
  position: absolute; left: 24px; right: 24px; bottom: 14px;
  height: 7px; border-radius: 3px;
  background: repeating-linear-gradient(105deg, #B9C2D6 0 2px, transparent 2px 8px);
}
.model__code {
  align-self: flex-start;
  padding: 4px 10px;
  border-radius: var(--radius-s);
  background: var(--ink); color: var(--lemon);
  font-weight: 800; font-stretch: 115%;
  font-size: .95rem;
}
.model h3 { margin-top: 20px; font-size: 1.3rem; font-weight: 780; font-stretch: 112%; letter-spacing: -.01em; }
.model p { margin-top: 10px; color: var(--ink-soft); font-size: 1rem; }
.model .model__fit { margin-top: auto; padding-top: 22px; color: var(--text); font-size: .95rem; }
.model__fit strong { display: block; font-weight: 700; color: var(--accent); }

@media (max-width: 980px) {
  .lineup { grid-template-columns: repeat(2, 1fr); }
  .model:nth-child(3) { border-left: 0; }
  .model:nth-child(n+3) { border-top: 3px solid var(--outline); }
}
@media (max-width: 560px) {
  .lineup { grid-template-columns: 1fr; }
  .model { border-left: 0; }
  .model:nth-child(n+2) { border-top: 3px solid var(--outline); }
}

/* Build your machine */
.build {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(36px, 6vw, 80px); align-items: start;
}
.picks { margin: 32px 0 0; padding: 0; border: 0; min-width: 0; }
.picks + .picks { margin-top: 26px; }
.picks legend { padding: 0; font-weight: 750; font-stretch: 110%; font-size: 1.1rem; }
.picks__note { font-weight: 500; font-stretch: 100%; font-size: .95rem; color: var(--ink-soft); margin-left: 6px; }
.picks__row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.pick { position: relative; cursor: pointer; }
.pick input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.pick span {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 650;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .15s var(--ease-out);
}
.pick input[type="checkbox"] + span::before {
  content: ""; flex: none;
  width: 14px; height: 14px;
  border: 2px solid var(--outline); border-radius: 4px;
  background: var(--surface);
}
.pick input[type="checkbox"]:checked + span::before {
  background: var(--ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M4 10.5l4 4 8-9' fill='none' stroke='%23FFC83D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}
.pick:hover span { background: var(--cobalt); color: var(--white); }
.pick:hover input[type="checkbox"] + span::before { border-color: var(--white); }
.pick input:checked + span {
  background: var(--lemon); color: var(--ink); border-color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transform: translateY(-2px);
}
.pick input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 3px; }

.build__preview {
  position: sticky; top: 92px;
  display: grid; justify-items: center; gap: 24px;
}
.mini {
  position: relative;
  width: min(100%, 300px);
  padding: 12px 12px 14px;
  background: linear-gradient(160deg, #3A63EC 0%, var(--cobalt) 45%, var(--cobalt-deep) 100%);
  border: 3px solid var(--ink);
  border-radius: 20px 20px 10px 10px;
  box-shadow: 10px 12px 0 var(--drop);
}
.mini__sign {
  margin-bottom: 10px; padding: 5px 0;
  text-align: center;
  font-weight: 880; font-stretch: 125%; font-size: 1rem;
  color: var(--ink);
  background: var(--lemon);
  border: 2px solid var(--ink); border-radius: 9px;
}
.mini__window {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 4px;
  padding: 10px 8px;
  background: linear-gradient(180deg, #1A2747 0%, #22335E 100%);
  border: 3px solid var(--ink); border-radius: 10px;
}
.mini__slot { display: grid; justify-items: center; gap: 3px; }
.mini__slot svg { width: 62%; aspect-ratio: 40 / 56; }
.mini__slot::after {
  content: ""; width: 92%; height: 6px; border-radius: 3px;
  background: repeating-linear-gradient(105deg, #A9B5CC 0 2px, transparent 2px 7px);
  opacity: .85;
}
.mini__tray {
  margin-top: 10px; height: 34px;
  background: #0F1830;
  border: 3px solid var(--ink); border-radius: 8px;
}
.pick-result {
  width: min(100%, 360px);
  padding: 22px 24px 24px;
  background: var(--surface);
  border: 3px solid var(--outline);
  border-radius: var(--radius-l);
}
.pick-result__label { font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.pick-result__name { margin-top: 8px; display: flex; align-items: center; gap: 10px; font-size: 1.25rem; font-weight: 780; font-stretch: 112%; line-height: 1.2; }
.pick-result__why { margin-top: 10px; color: var(--ink-soft); font-size: 1rem; }
.pick-result__mix { margin-top: 8px; font-size: .95rem; font-weight: 600; }
.pick-result .btn { margin-top: 20px; }

/* Phones and tablets: show the machine right under the intro so it fills up in view */
@media (max-width: 860px) {
  .build { grid-template-columns: 1fr; gap: 0; }
  .build__controls, .build__preview { display: contents; }
  .build .section__title, .build .section__lede { order: 0; }
  .mini { order: 1; justify-self: center; width: min(100%, 200px); margin-top: 28px; }
  .picks { order: 2; }
  .pick-result { order: 3; justify-self: center; margin-top: 36px; }
}

/* Promises */
.promises { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 88px); }
.promises__list { margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px 40px; }
.promises__list dt {
  font-size: 1.25rem; font-weight: 780; font-stretch: 112%;
  color: var(--lemon);
}
.promises__list dd { margin: 8px 0 0; color: rgba(255, 255, 255, .82); }
@media (max-width: 860px) {
  .promises { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .promises__list { grid-template-columns: 1fr; gap: 28px; }
}

/* Service area */
.area { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 6vw, 72px); align-items: center; }
.towns__hint { margin-top: 24px; font-weight: 600; }
.towns {
  list-style: none; padding: 0; margin: 14px 0 0;
  display: flex; flex-wrap: wrap; gap: 10px;
}
.town {
  min-height: 44px;
  padding: 8px 18px;
  border: 2px solid var(--outline);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, color .15s, box-shadow .15s, transform .15s var(--ease-out);
}
.town:hover { background: var(--cobalt); color: var(--white); }
.town[aria-pressed="true"] {
  background: var(--lemon);
  color: var(--ink);
  border-color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transform: translateY(-2px);
}
.town:active { transform: translateY(1px); box-shadow: none; }
.area__note { margin-top: 24px; color: var(--ink-soft); }
.area__map {
  border: 3px solid var(--outline);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--cobalt-tint);
  aspect-ratio: 4 / 3;
  box-shadow: 10px 12px 0 var(--drop);
}
.area__map iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 860px) {
  .area { grid-template-columns: 1fr; }
}

/* FAQ */
.faq { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.faq__list details { border-top: 2px solid var(--rule); }
.faq__list details:last-child { border-bottom: 2px solid var(--rule); }
.faq__list summary {
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 20px;
  padding: 20px 0;
  min-height: 48px;
  font-weight: 700; font-size: 1.12rem;
  cursor: pointer;
}
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: ""; flex: none;
  width: 14px; height: 14px;
  border-right: 3px solid var(--accent);
  border-bottom: 3px solid var(--accent);
  transform: rotate(45deg) translate(-3px, -3px);
  transition: transform .2s var(--ease-out);
}
.faq__list details[open] summary::after { transform: rotate(-135deg) translate(-3px, -3px); }
.faq__list details p { padding: 0 0 22px; color: var(--ink-soft); max-width: 40em; }
@media (max-width: 860px) {
  .faq { grid-template-columns: 1fr; }
}

/* Request form */
.request { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(36px, 6vw, 88px); align-items: start; }
.request__alt { margin-top: 28px; color: rgba(255, 255, 255, .9); }
.request__alt a { color: var(--lemon); font-weight: 700; text-underline-offset: 3px; }
.form {
  display: grid; gap: 18px;
  padding: clamp(22px, 4vw, 40px);
  background: var(--surface); color: var(--text);
  border: 3px solid var(--outline);
  border-radius: var(--radius-l);
  box-shadow: 10px 12px 0 rgba(19, 32, 59, .35);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 650; font-size: .98rem; }
.field__optional { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  font: inherit; font-size: 1rem;
  color: var(--text);
  background: var(--field-bg);
  border: 2px solid var(--field-border);
  border-radius: var(--radius-m);
  transition: border-color .15s, background-color .15s;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-soft); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); background: var(--surface);
  box-shadow: 0 0 0 3px rgba(43, 84, 224, .25);
}
.field__error { display: none; color: var(--error); font-size: .92rem; font-weight: 600; }
.field.is-invalid input, .field.is-invalid select { border-color: var(--error); }
.field.is-invalid .field__error { display: block; }
.hp { position: absolute; left: -9999px; }
.form__status { font-weight: 650; min-height: 1.6em; }
.form__status.is-ok { color: var(--mint); }
.form__status.is-error { color: var(--error); }
.form button[disabled] { opacity: .7; cursor: progress; }
.form__note { margin-top: -6px; font-size: .92rem; color: var(--ink-soft); }
.form__note a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

@media (max-width: 860px) {
  .request { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .form__row { grid-template-columns: 1fr; }
}

/* Privacy policy and other text pages */
.legal { max-width: calc(46rem + 2 * var(--gutter)); padding-top: clamp(40px, 7vw, 80px); padding-bottom: clamp(64px, 9vw, 112px); }
.legal__eyebrow { font-weight: 650; color: var(--accent); }
.legal__title {
  margin-top: 8px;
  font-size: clamp(2.4rem, 5.5vw, 3.6rem);
  font-weight: 880; font-stretch: 125%; letter-spacing: -.035em;
}
.legal__updated { margin-top: 12px; color: var(--ink-soft); font-size: .98rem; }
.legal > p, .legal > ul { margin-top: 18px; }
.legal__updated + p { margin-top: 36px; font-size: 1.15rem; }
.legal h2 {
  margin-top: 44px;
  font-size: 1.4rem; font-weight: 780; font-stretch: 112%; letter-spacing: -.01em;
}
.legal ul { padding-left: 1.3em; }
.legal li + li { margin-top: 8px; }
.legal li::marker { color: var(--accent); }
.legal a { color: var(--accent); font-weight: 600; text-underline-offset: 3px; }

/* Footer */
.site-footer { background: var(--band); color: rgba(255, 255, 255, .85); padding: 56px 0 40px; }
.site-footer__inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; }
.brand--light { color: var(--white); }
.site-footer__tag { margin-top: 14px; max-width: 30em; }
.site-footer__contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer__contact a { text-decoration: none; }
.site-footer__contact a:hover { text-decoration: underline; color: var(--lemon); }
.site-footer__legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .15); font-size: .92rem; color: rgba(255, 255, 255, .6); }
.site-footer__legal a { color: inherit; text-underline-offset: 3px; }
.site-footer__legal a:hover { color: var(--lemon); }
@media (max-width: 560px) {
  .site-footer__inner { grid-template-columns: 1fr; }
}

/* Day / night switch in the header */
.theme-toggle {
  flex: none;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  padding: 0;
  border: 2px solid var(--outline);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color .15s, transform .15s var(--ease-out);
}
.theme-toggle:hover { background: var(--lemon); color: var(--ink); border-color: var(--ink); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-toggle .i-sun { display: none; }
.site-nav { margin-left: auto; }
@media (max-width: 1140px) {
  .theme-toggle { margin-left: auto; }
  .menu-toggle { order: 3; }
}
/* Phones: tighten the header so the logo, switch and menu share one row */
@media (max-width: 480px) {
  .site-header__inner { gap: 8px; }
  .brand { font-size: 1.12rem; gap: 8px; }
  .brand__mark { width: 28px; height: 35px; }
  .theme-toggle { width: 40px; height: 40px; }
}
@media (max-width: 359px) {
  .site-header .brand__sub { display: none; }
}

/* ---------- After hours: the site goes dark and the machines light up ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #0B1222;
  --ink-soft: #AEB8CD;
  --line: #34415F;
  --cobalt-tint: #121C35;
  --error: #FF8A80;

  --text: #E9EEF8;
  --surface: #151F38;
  --outline: #3A4A72;
  --accent: #8AA6FF;
  --rule: rgba(255, 255, 255, .1);
  --drop: rgba(0, 0, 0, .45);
  --header-bg: rgba(11, 18, 34, .88);
  --field-bg: #0E1629;
  --field-border: #3A4A72;
  --band: #060A15;
  --cta-bg: var(--cobalt-deep);
}
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; color: var(--lemon); }
[data-theme="dark"] .theme-toggle:hover .i-sun { color: var(--ink); }

/* A soft blue wash behind the hero machine, like light spilling onto the floor */
[data-theme="dark"] .hero {
  background: radial-gradient(ellipse 50% 60% at 78% 55%, rgba(43, 84, 224, .22), transparent 70%);
}
@media (max-width: 860px) {
  [data-theme="dark"] .hero { background: radial-gradient(ellipse 80% 40% at 50% 75%, rgba(43, 84, 224, .22), transparent 70%); }
}

[data-theme="dark"] .machine,
[data-theme="dark"] .mini {
  box-shadow:
    0 0 0 1px rgba(140, 175, 255, .25),
    0 0 36px rgba(70, 120, 255, .45),
    0 0 110px rgba(43, 84, 224, .35);
}
/* glow on the floor under the machine */
[data-theme="dark"] .machine::before,
[data-theme="dark"] .mini::before {
  content: "";
  position: absolute; left: -18%; right: -18%; bottom: -46px;
  height: 64px;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(70, 120, 255, .4), transparent 70%);
  pointer-events: none;
}
[data-theme="dark"] .machine__sign,
[data-theme="dark"] .mini__sign {
  background: #FFD45E;
  box-shadow: 0 0 14px rgba(255, 200, 61, .75), 0 0 40px rgba(255, 200, 61, .3);
}
/* lit-up glass: a light strip along the top and a brighter inside */
[data-theme="dark"] .machine__window,
[data-theme="dark"] .mini__window {
  position: relative;
  background: linear-gradient(180deg, #34508F 0%, #263B6C 45%, #1C2B50 100%);
  box-shadow: inset 0 12px 26px rgba(200, 225, 255, .25);
}
[data-theme="dark"] .machine__window::before,
[data-theme="dark"] .mini__window::before {
  content: "";
  position: absolute; left: 10px; right: 10px; top: 3px;
  height: 3px; border-radius: 2px;
  background: #F2F8FF;
  box-shadow: 0 0 10px 3px rgba(200, 225, 255, .75);
  pointer-events: none;
}
[data-theme="dark"] .keypad button.is-lit { box-shadow: 0 0 8px rgba(255, 200, 61, .9); }
[data-theme="dark"] .lcd__text { text-shadow: 0 0 8px rgba(123, 242, 176, .9); }
[data-theme="dark"] .form { box-shadow: 10px 12px 0 rgba(0, 0, 0, .35); }
[data-theme="dark"] .area__map iframe { filter: brightness(.85); }

/* When the lights come on, the signs flicker like real fluorescent tubes */
.powering-on .machine__sign,
.powering-on .mini__sign,
.powering-on .machine__window,
.powering-on .mini__window { animation: power-on .9s linear 1; }
@keyframes power-on {
  0% { filter: brightness(.35); }
  8% { filter: brightness(1.25); }
  14% { filter: brightness(.45); }
  26% { filter: brightness(1.15); }
  34% { filter: brightness(.6); }
  50%, 100% { filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
