/* S&H Vending — styles
   Fonts: Barlow and Barlow Condensed (SIL Open Font License), hosted in /fonts. */

@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow";
  src: url("fonts/barlow-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Barlow Condensed";
  src: url("fonts/barlow-condensed-latin-800-italic.woff2") format("woff2");
  font-weight: 800; font-style: italic; font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --navy: #092445;
  --navy-deep: #061830;
  --red: #d4130d;
  --red-dark: #ab0d08;
  --white: #ffffff;

  --bg: #ffffff;
  --bg-tint: #eef2f8;
  --text: #0b1b33;
  --muted: #4c5d76;
  --line: #d5dce8;
  --heading: #092445;

  --font-body: "Barlow", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;

  --wrap: 1120px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section: clamp(3.5rem, 8vw, 6.5rem);
  --header-h: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #071427;
    --bg-tint: #0b1e3a;
    --text: #e9eff8;
    --muted: #a5b4cb;
    --line: #223557;
    --heading: #ffffff;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + env(safe-area-inset-top, 0px) + 12px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid #f2b632;
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: max(var(--gutter), env(safe-area-inset-left, 0px)) max(var(--gutter), env(safe-area-inset-right, 0px));
}
.wrap.narrow { max-width: 800px; }

.skip-link {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--navy); color: #fff;
  padding: .6rem 1rem; border-radius: 4px; z-index: 100;
}
.skip-link:focus { top: 1rem; }

/* ---------- Type ---------- */
h1, h2, .reward-amount, .steps > li::before {
  font-family: var(--font-display);
  font-weight: 800;
  font-style: italic;
  text-transform: uppercase;
  line-height: .95;
  letter-spacing: .005em;
}

h1 { font-size: clamp(2.9rem, 8.2vw, 5.4rem); color: #fff; }
h2 { font-size: clamp(2.1rem, 5vw, 3.25rem); color: var(--heading); margin-bottom: 1.25rem; }
h3 { font-size: 1.25rem; font-weight: 700; line-height: 1.25; color: var(--heading); }

.lead { font-size: 1.1875rem; color: var(--muted); max-width: 58ch; }

/* ---------- Buttons (slanted like the logo's red band) ---------- */
.btn {
  display: inline-block;
  transform: skewX(-10deg);
  padding: .85rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 4px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.0625rem;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
.btn > span { display: inline-block; transform: skewX(10deg); }

.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); }

.btn-ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn-ghost:hover { background: #fff; color: var(--navy); border-color: #fff; }

.btn-white { background: #fff; color: var(--red-dark); }
.btn-white:hover { background: var(--navy); color: #fff; }

.btn-row { display: flex; flex-wrap: wrap; gap: .9rem 1.1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid #d5dce8;
  padding-top: env(safe-area-inset-top, 0px);
}
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}
.brand { display: block; flex: none; }
.brand img { width: auto; height: 54px; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav a:not(.btn) {
  color: #092445;
  font-weight: 500;
  text-decoration: none;
  padding: .35rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--red); }
.nav-call { padding: .65rem 1.2rem; font-size: 1rem; }

.nav-toggle {
  display: none;
  align-items: center; gap: .55rem;
  background: none; border: 2px solid #092445; border-radius: 4px;
  color: #092445;
  font: 700 1rem var(--font-body);
  padding: .5rem .8rem;
  cursor: pointer;
}
.nav-toggle-bars,
.nav-toggle-bars::before,
.nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: #fff;
}
/* Red slash behind the machine, taken from the logo */
.hero::before {
  content: "";
  position: absolute;
  top: -10%; bottom: -10%;
  right: -8%;
  width: 46%;
  background: var(--red);
  transform: skewX(-12deg);
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  padding-block: clamp(3rem, 7vw, 5.5rem);
}
.hero-lead {
  margin-top: 1.4rem;
  font-size: clamp(1.125rem, 2vw, 1.3125rem);
  line-height: 1.5;
  color: #d7e0ee;
  max-width: 34ch;
}
.hero .btn-row { margin-top: 2rem; }
.hero-area { margin-top: 1.6rem; color: #a9b9d1; font-size: 1rem; }

.hero-machine { display: flex; justify-content: center; }
.machine {
  width: min(100%, 340px);
  filter: drop-shadow(0 24px 30px rgba(3, 10, 22, .45));
}
.m-sign {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: 25px; letter-spacing: .5px;
  fill: #fff;
}
.m-label {
  font-family: var(--font-body);
  font-weight: 700; font-size: 12px;
  fill: #c9d5e8;
}
.m-price {
  font-family: var(--font-body);
  font-weight: 700; font-size: 23px;
  font-variant-numeric: tabular-nums;
  fill: #ff5a4d;
}

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-tint { background: var(--bg-tint); }

/* How it works: a real sequence, so it is numbered */
.steps {
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.25rem;
}
.steps > li {
  counter-increment: step;
  border-top: 4px solid var(--red);
  padding-top: 1.1rem;
}
.steps > li::before {
  content: counter(step);
  display: block;
  font-size: 4rem;
  color: var(--heading);
  margin-bottom: .6rem;
}
.steps p { margin-top: .5rem; color: var(--muted); }

/* Cost + receipt */
.cost-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5rem);
}
.checks { margin-top: 1.6rem; display: grid; gap: .9rem; }
.checks li {
  position: relative;
  padding-left: 2rem;
  max-width: 56ch;
}
.checks li::before {
  content: "";
  position: absolute; left: .2rem; top: .42em;
  width: .95rem; height: .5rem;
  border-left: 3px solid var(--red);
  border-bottom: 3px solid var(--red);
  transform: rotate(-45deg);
}

.receipt {
  --paper: #fffdf6;
  position: relative;
  justify-self: center;
  width: min(100%, 380px);
  background: var(--paper);
  color: #1b2333;
  padding: 2rem 1.6rem 2.4rem;
  transform: rotate(1.5deg);
  box-shadow: 0 18px 34px rgba(6, 24, 48, .22);
}
/* torn zigzag bottom edge */
.receipt::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background:
    linear-gradient(135deg, var(--paper) 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(225deg, var(--paper) 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
}
.receipt-head {
  font-family: var(--font-display);
  font-weight: 800; font-style: italic;
  font-size: 1.9rem; line-height: 1;
  text-transform: uppercase;
  text-align: center;
  color: #092445;
}
.receipt-sub { text-align: center; color: #5b6578; margin-top: .25rem; }
.receipt-lines {
  margin-top: 1.3rem;
  border-top: 2px dashed #b9bfca;
  padding-top: 1rem;
  display: grid; gap: .65rem;
  font-variant-numeric: tabular-nums;
}
.receipt-lines > div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
}
.receipt-lines dd { font-weight: 700; white-space: nowrap; }
.receipt-total {
  margin-top: .5rem;
  border-top: 2px dashed #b9bfca;
  padding-top: .95rem;
  font-size: 1.3rem;
  font-weight: 700;
}
.receipt-total dd { color: var(--red); }
.receipt-foot { margin-top: 1.3rem; text-align: center; color: #5b6578; font-size: .95rem; }

/* Good fit */
.fit-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.places {
  margin-top: 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  column-gap: 2rem;
}
.places li {
  padding: .7rem 0;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.needs {
  border-left: 4px solid var(--red);
  padding-left: clamp(1.25rem, 3vw, 2rem);
}
.needs .checks { margin-top: 1.1rem; }

/* Reward */
.reward { background: var(--red); color: #fff; overflow: hidden; }
.reward h2 { color: #fff; }
.reward-grid {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(1.5rem, 6vw, 5rem);
}
.reward-amount {
  font-size: clamp(6rem, 19vw, 13rem);
  line-height: .8;
  color: #fff;
  text-shadow: .045em .045em 0 var(--navy);
}
.reward-steps {
  counter-reset: r;
  display: grid; gap: .8rem;
  max-width: 54ch;
}
.reward-steps li {
  counter-increment: r;
  position: relative;
  padding-left: 2.6rem;
  font-size: 1.125rem;
}
.reward-steps li::before {
  content: counter(r);
  position: absolute; left: 0; top: .05em;
  width: 1.8rem; height: 1.8rem;
  display: grid; place-items: center;
  background: #fff; color: var(--red-dark);
  border-radius: 50%;
  font-weight: 700; font-size: 1rem;
}
.reward-note { margin: 1.4rem 0 1.8rem; color: #ffe1df; max-width: 54ch; }

/* Questions */
.faq { margin-top: 1.5rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  position: relative;
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 2.75rem 1.15rem 0;
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--heading);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before, .faq summary::after {
  content: "";
  position: absolute; right: .35rem; top: 50%;
  width: 16px; height: 3px; margin-top: -1.5px;
  background: var(--red);
  border-radius: 2px;
  transition: transform .2s ease;
}
.faq summary::after { transform: rotate(90deg); }
.faq details[open] summary::after { transform: rotate(0deg); }
.faq details p { padding: 0 2.75rem 1.3rem 0; color: var(--muted); max-width: 64ch; }

/* Contact */
.contact { background: var(--navy-deep); color: #fff; }
.contact h2 { color: #fff; }
.contact .lead { color: #b9c7dc; }
.contact-list {
  margin-top: 2.25rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1rem;
}
.contact-list a {
  display: block;
  height: 100%;
  padding: 1.15rem 1.3rem;
  border: 2px solid #2a416a;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color .15s ease, border-color .15s ease;
}
.contact-list a:hover { background: var(--red); border-color: var(--red); }
.contact-way { display: block; color: #b9c7dc; font-size: 1rem; }
.contact-list a:hover .contact-way { color: #ffe1df; }
.contact-value { display: block; font-weight: 700; font-size: 1.25rem; overflow-wrap: anywhere; }

/* Footer */
.site-footer { background: #040f20; color: #93a4be; font-size: .95rem; }
.footer-row {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem;
  padding-block: 1.6rem;
}

/* Phone quick-contact bar (hidden on larger screens) */
.call-bar { display: none; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
  .site-nav { gap: 1.1rem; }
  .site-nav a:not(.btn) { font-size: .98rem; }
  .steps { grid-template-columns: 1fr; gap: 1.75rem; max-width: 560px; }
  .steps > li { display: grid; grid-template-columns: 4.2rem 1fr; column-gap: .5rem; }
  .steps > li::before { grid-row: span 2; margin: 0; line-height: .85; }
  .fit-grid, .cost-grid { grid-template-columns: 1fr; }
  .receipt { margin-top: .5rem; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --header-h: 62px; }
  body { font-size: 1rem; padding-bottom: calc(60px + env(safe-area-inset-bottom, 0px)); }

  .brand img { height: 44px; }
  .nav-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff;
    border-bottom: 1px solid #d5dce8;
    padding: .25rem var(--gutter) 1.25rem;
    box-shadow: 0 14px 24px rgba(6, 24, 48, .14);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) {
    padding: .95rem 0;
    font-size: 1.0625rem;
    border-bottom: 1px solid #e3e8f0;
  }
  .site-nav a:not(.btn):hover { border-bottom-color: #e3e8f0; color: var(--red); }
  .nav-call { margin-top: 1.1rem; }

  .hero::before { top: auto; bottom: -6%; right: -30%; width: 120%; height: 44%; transform: skewY(-8deg); }
  .hero-grid { grid-template-columns: 1fr; padding-block: 2.5rem 3rem; }
  .hero-lead { max-width: none; }
  .hero .btn-row { flex-direction: column; align-items: stretch; padding-inline: .4rem; }
  .machine { width: min(78%, 280px); }

  .reward-grid { grid-template-columns: 1fr; }
  .reward-amount { font-size: clamp(6.5rem, 34vw, 9rem); }
  .reward .btn { display: block; margin-inline: .4rem; }

  .footer-row { padding-bottom: 1.6rem; }

  .call-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    display: grid; grid-template-columns: 1fr 1fr;
    background: var(--navy-deep);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-shadow: 0 -6px 18px rgba(3, 10, 22, .3);
  }
  .call-bar a {
    display: block;
    padding: 1.05rem 1rem;
    text-align: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.0625rem;
    text-decoration: none;
  }
  .call-bar a:first-child { background: var(--red); }
}

/* ---------- Motion + print ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media print {
  .site-header, .call-bar, .nav-toggle { display: none; }
  .hero, .reward, .contact { color: #000; background: none; }
  .hero::before { display: none; }
  h1, .reward h2, .contact h2 { color: #000; }
}
