/* ============================================================================
   Crathco C-Store Frozen Beverage Dealer Microsite — shared stylesheet
   Authorized dealer microsite. Mobile-first, WCAG AA, Core Web Vitals minded.
   ========================================================================== */

/* ----- Design tokens ----------------------------------------------------- */
:root {
  --navy:      #0b2540;   /* deep base */
  --navy-2:    #123a63;
  --ice:       #e8f4fb;   /* cold wash */
  --ice-2:     #cfe8f7;
  --cyan:      #1b9fd8;   /* frozen accent */
  --cyan-dk:   #137bab;
  --amber:     #f7941e;   /* warm CTA — high contrast against navy/ice */
  --amber-dk:  #d97a06;
  --ink:       #14202b;   /* body text on light (AA on white) */
  --ink-soft:  #44535f;
  --white:     #ffffff;
  --line:      #d7e3ec;
  --good:      #157f54;
  --shadow:    0 6px 24px rgba(11, 37, 64, .10);
  --radius:    12px;
  --maxw:      1120px;
  --gap:       clamp(1rem, 3vw, 2rem);
}

/* ----- Reset-ish --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  font-size: 1.05rem;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan-dk); }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); margin-top: 0; }
h3 { font-size: 1.2rem; }
p  { margin: 0 0 1rem; }

/* ----- Accessibility helpers -------------------------------------------- */
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -48px; z-index: 1000;
  background: var(--amber); color: var(--navy); padding: .6rem 1rem;
  border-radius: 0 0 8px 8px; font-weight: 700; transition: top .15s ease;
}
.skip-link:focus { top: 0; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }

/* ----- Layout ------------------------------------------------------------ */
.container { width: min(100% - 2rem, var(--maxw)); margin-inline: auto; }
section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.lead { font-size: 1.15rem; color: var(--ink-soft); }
.eyebrow {
  text-transform: uppercase; letter-spacing: .08em; font-size: .8rem;
  font-weight: 700; color: var(--cyan-dk); margin: 0 0 .4rem;
}

/* ----- Header / nav ------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: var(--white);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: .6rem 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .55rem; color: var(--white); text-decoration: none; font-weight: 800; }
.brand .logo-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), var(--amber));
  display: grid; place-items: center; color: var(--navy); font-weight: 900; font-size: 1rem;
}
.brand small { display: block; font-weight: 500; font-size: .68rem; color: var(--ice-2); letter-spacing: .02em; }
.nav-links { display: flex; align-items: center; gap: .25rem 1.1rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.nav-links a { color: var(--ice); text-decoration: none; font-weight: 600; font-size: .95rem; padding: .35rem .15rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--white); border-bottom: 2px solid var(--amber); }
.nav-cta { white-space: nowrap; }

/* mobile nav toggle */
.nav-toggle {
  display: none; background: transparent; border: 2px solid var(--ice-2);
  color: var(--white); border-radius: 8px; padding: .4rem .6rem; font-weight: 700; cursor: pointer;
}
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .nav-links {
    flex-basis: 100%; flex-direction: column; align-items: flex-start;
    gap: .2rem; max-height: 0; overflow: hidden; transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 420px; padding-bottom: .6rem; }
  .nav-links a { display: block; width: 100%; padding: .55rem .15rem; }
}

/* ----- Buttons ----------------------------------------------------------- */
.btn {
  display: inline-block; font-weight: 800; text-decoration: none; cursor: pointer;
  border: 2px solid transparent; border-radius: 999px; padding: .7rem 1.4rem;
  font-size: 1rem; line-height: 1; text-align: center; transition: transform .08s ease, background .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--amber); color: var(--navy); }
.btn-primary:hover { background: var(--amber-dk); color: var(--navy); }
.btn-secondary { background: transparent; color: var(--white); border-color: var(--ice-2); }
.btn-secondary:hover { background: rgba(255,255,255,.12); }
.btn-ghost { background: var(--white); color: var(--navy-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--ice); }
.btn-block { display: block; width: 100%; }

/* ----- Trust bar --------------------------------------------------------- */
.trust-bar { background: var(--ice); border-bottom: 1px solid var(--line); }
.trust-bar ul {
  display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; justify-content: center;
  list-style: none; margin: 0; padding: .7rem 0; font-size: .9rem; font-weight: 600; color: var(--navy-2);
}
.trust-bar li { display: flex; align-items: center; gap: .4rem; }
.trust-bar li::before { content: "✓"; color: var(--good); font-weight: 900; }

/* ----- Hero -------------------------------------------------------------- */
.hero { background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 60%, var(--cyan-dk) 140%); color: var(--white); }
.hero h1 { color: var(--white); max-width: 18ch; }
.hero .subhead { font-size: 1.2rem; color: var(--ice); max-width: 60ch; }
.hero .hero-number { color: var(--amber); font-weight: 800; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.4rem; }
.hero-grid { display: grid; gap: var(--gap); align-items: center; }
@media (min-width: 880px) { .hero-grid { grid-template-columns: 1.2fr .8fr; } }
.hero-card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--radius); padding: 1.2rem; backdrop-filter: blur(2px);
}
.hero-card h2 { color: var(--white); font-size: 1.15rem; }
.hero-card .stat { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px dashed rgba(255,255,255,.18); }
.hero-card .stat:last-child { border-bottom: 0; }
.hero-card .stat b { color: var(--amber); }

/* ----- Generic surfaces -------------------------------------------------- */
.section-alt { background: var(--ice); }
.grid { display: grid; gap: var(--gap); }
.grid-3 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { grid-template-columns: 1fr; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { color: var(--navy); }
.card .card-media { border-radius: 10px; overflow: hidden; margin: -.2rem 0 1rem; background: var(--ice); aspect-ratio: 4 / 3; }
.card .card-media img { width: 100%; height: 100%; object-fit: cover; }
.card .placeholder-media {
  display: grid; place-items: center; height: 100%; color: var(--cyan-dk);
  font-size: .8rem; font-weight: 700; text-align: center; padding: 1rem;
  background: repeating-linear-gradient(45deg, var(--ice), var(--ice) 12px, var(--ice-2) 12px, var(--ice-2) 24px);
}
.card .card-foot { margin-top: auto; padding-top: 1rem; }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em;
  background: var(--ice-2); color: var(--navy-2); border-radius: 999px; padding: .25rem .6rem; margin-bottom: .6rem;
}

/* spec list inside product cards */
.spec-list { list-style: none; margin: 0 0 1rem; padding: 0; }
.spec-list li { padding: .3rem 0; border-bottom: 1px solid var(--line); font-size: .95rem; display: flex; justify-content: space-between; gap: 1rem; }
.spec-list li span:first-child { color: var(--ink-soft); }
.spec-list li span:last-child { font-weight: 700; text-align: right; }

/* ----- Comparison table -------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table.compare { border-collapse: collapse; width: 100%; min-width: 560px; background: var(--white); }
table.compare th, table.compare td { padding: .8rem 1rem; text-align: left; border-bottom: 1px solid var(--line); font-size: .95rem; }
table.compare thead th { background: var(--navy); color: var(--white); }
table.compare tbody tr:nth-child(even) { background: var(--ice); }
table.compare th[scope="row"] { font-weight: 700; color: var(--navy-2); }

/* ----- ROI calculator ---------------------------------------------------- */
.roi-calc {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: clamp(1.1rem, 3vw, 2rem);
}
.roi-calc.mini { box-shadow: none; background: var(--ice); }
.roi-grid { display: grid; gap: var(--gap); }
@media (min-width: 820px) { .roi-grid { grid-template-columns: 1fr 1fr; } }
.roi-fields { display: grid; gap: .9rem; }
.field { display: grid; gap: .3rem; }
.field label { font-weight: 700; font-size: .92rem; color: var(--navy-2); }
.field .hint { font-size: .76rem; color: var(--ink-soft); font-weight: 500; }
.field input, .field select, .lead-form input, .lead-form select, .lead-form textarea {
  font: inherit; padding: .6rem .7rem; border: 1.5px solid var(--line); border-radius: 8px;
  background: var(--white); color: var(--ink); width: 100%;
}
.field input:focus, .lead-form input:focus, .lead-form select:focus, .lead-form textarea:focus {
  border-color: var(--cyan); outline: 2px solid var(--cyan);
}
.input-affix { position: relative; }
.input-affix .affix { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--ink-soft); font-weight: 700; }
.input-affix input { padding-left: 1.6rem; }

.roi-results { background: var(--navy); color: var(--white); border-radius: var(--radius); padding: 1.2rem; align-self: start; }
.roi-results h3 { color: var(--white); }
.roi-out { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .5rem 0; border-bottom: 1px dashed rgba(255,255,255,.2); }
.roi-out:last-of-type { border-bottom: 0; }
.roi-out .label { color: var(--ice-2); font-size: .9rem; }
.roi-out .value { font-size: 1.35rem; font-weight: 800; color: var(--white); }
.roi-out.headline .value { color: var(--amber); font-size: 1.7rem; }
.roi-disclaimer { font-size: .76rem; color: var(--ink-soft); margin-top: 1rem; }
.roi-results .roi-disclaimer { color: var(--ice-2); }
.roi-cta { margin-top: 1rem; }

/* ----- FAQ --------------------------------------------------------------- */
.faq details {
  background: var(--white); border: 1px solid var(--line); border-radius: 10px;
  padding: .2rem 1rem; margin-bottom: .7rem;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--navy); padding: .8rem 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--cyan-dk); font-weight: 700; }
.faq details[open] summary::after { content: "–"; }
.faq details p { padding-bottom: .9rem; margin: 0; color: var(--ink-soft); }

/* ----- Lead form --------------------------------------------------------- */
.lead-wrap { display: grid; gap: var(--gap); }
@media (min-width: 880px) { .lead-wrap { grid-template-columns: 1.1fr .9fr; } }
.lead-form { display: grid; gap: .85rem; }
.lead-form .row { display: grid; gap: .85rem; }
@media (min-width: 560px) { .lead-form .row.cols-2 { grid-template-columns: 1fr 1fr; } }
.lead-form .toggle-group { display: flex; gap: .5rem; }
.lead-form .toggle-group label {
  flex: 1; text-align: center; border: 1.5px solid var(--line); border-radius: 8px; padding: .55rem;
  font-weight: 700; cursor: pointer; background: var(--white);
}
.lead-form .toggle-group input { position: absolute; opacity: 0; }
.lead-form .toggle-group input:checked + span { color: var(--cyan-dk); }
.lead-form .toggle-group label:has(input:checked) { border-color: var(--cyan); background: var(--ice); }
.consent { font-size: .8rem; color: var(--ink-soft); }
.form-note { background: var(--ice); border: 1px solid var(--line); border-radius: 10px; padding: 1rem 1.2rem; }
.form-note h3 { margin-top: 0; }
.form-note ul { margin: 0; padding-left: 1.1rem; }
.form-note li { margin-bottom: .35rem; }

/* ----- Callout / note ---------------------------------------------------- */
.note {
  border-left: 4px solid var(--cyan); background: var(--ice); padding: 1rem 1.2rem;
  border-radius: 0 10px 10px 0; font-size: .95rem;
}
.note.warn { border-left-color: var(--amber); }

/* ----- Footer ------------------------------------------------------------ */
.site-footer { background: var(--navy); color: var(--ice); padding: 2.5rem 0 1.5rem; font-size: .92rem; }
.site-footer a { color: var(--ice-2); }
.footer-grid { display: grid; gap: var(--gap); grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h4 { color: var(--white); margin: 0 0 .6rem; font-size: 1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: .4rem; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.15); margin-top: 1.6rem; padding-top: 1.2rem; font-size: .8rem; color: var(--ice-2); }
.footer-legal p { margin: 0 0 .5rem; }

/* ----- Utility ----------------------------------------------------------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: 1.4rem; }
.muted { color: var(--ink-soft); }
.maxw-prose { max-width: 70ch; }
.maxw-prose-center { max-width: 70ch; margin-inline: auto; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ============================================================================
   v2 VISUAL UPGRADE — hero imagery, proof band, sticky mobile CTA, richer cards
   Original artwork is self-hosted SVG in /assets (no external/IP assets).
   ========================================================================== */

/* ----- Hero: add illustration + layered depth ---------------------------- */
.hero { position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 85% 20%, rgba(27,159,216,.30), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, rgba(247,148,30,.18), transparent 60%);
}
.hero .container { position: relative; z-index: 1; }
.hero-illus {
  width: 100%; height: auto; border-radius: 16px;
  box-shadow: 0 24px 60px rgba(0,0,0,.35); display: block;
}
.hero-badges { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.hero-badges span {
  font-size: .78rem; font-weight: 700; color: var(--ice);
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.18);
  padding: .3rem .7rem; border-radius: 999px;
}

/* ----- Proof / stats band ------------------------------------------------ */
.proof-band { background: var(--navy-2); color: var(--white); padding: 0; }
.proof-band .container { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: rgba(255,255,255,.12); border-radius: 14px; overflow: hidden; margin-top: -2.5rem; position: relative; z-index: 2; box-shadow: var(--shadow); }
@media (min-width: 760px) { .proof-band .container { grid-template-columns: repeat(4, 1fr); } }
.proof-stat { background: var(--navy-2); padding: 1.2rem 1rem; text-align: center; }
.proof-stat b { display: block; font-size: clamp(1.5rem, 4vw, 2.1rem); color: var(--amber); line-height: 1.1; }
.proof-stat span { display: block; font-size: .82rem; color: var(--ice-2); margin-top: .2rem; }
.proof-band + section, .proof-wrap + section { padding-top: 3rem; }

/* ----- Trust logos row (SVG-free badge chips) ---------------------------- */
.logo-row { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; align-items: center; }
.logo-chip {
  display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--navy-2);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; padding: .55rem 1rem; font-size: .9rem;
}
.logo-chip .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--good); }
.logo-chip.alt .dot { background: var(--cyan); }
.logo-chip.warm .dot { background: var(--amber); }

/* ----- Richer product/equipment cards ------------------------------------ */
.card { transition: transform .15s ease, box-shadow .15s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(11,37,64,.16); }
.card .card-media { background: linear-gradient(160deg, var(--ice) 0%, var(--ice-2) 100%); display: grid; place-items: center; padding: .6rem; }
.card .card-media img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.equip-card-link { text-decoration: none; color: inherit; }

/* image swap-note ribbon on illustrative product art */
.illus-note {
  font-size: .68rem; color: var(--cyan-dk); font-weight: 700; text-align: center;
  margin-top: .4rem; letter-spacing: .02em;
}

/* ----- Section eyebrow accent line --------------------------------------- */
.eyebrow::before { content: ""; display: inline-block; width: 18px; height: 2px; background: var(--amber); vertical-align: middle; margin-right: .5rem; }
.eyebrow.center::before { width: 24px; }

/* ----- Calculator verdict line ------------------------------------------- */
.roi-verdict {
  margin-top: 1rem; background: rgba(247,148,30,.14); border: 1px solid rgba(247,148,30,.4);
  color: var(--white); border-radius: 10px; padding: .7rem .9rem; font-weight: 700; font-size: .92rem;
}
.roi-verdict strong { color: var(--amber); }

/* ----- Sticky mobile conversion bar -------------------------------------- */
.mobile-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  display: none; gap: .5rem; padding: .55rem .7rem;
  background: rgba(11,37,64,.97); border-top: 1px solid rgba(255,255,255,.15);
  box-shadow: 0 -6px 20px rgba(0,0,0,.25);
}
.mobile-cta a { flex: 1; padding: .8rem; font-size: .95rem; }
.mobile-cta .btn-call { background: var(--white); color: var(--navy); border-color: var(--white); }
@media (max-width: 760px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 4.2rem; } /* room for the bar */
}

/* ----- Testimonial / social proof cards ---------------------------------- */
.quote-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.quote-card p { font-size: 1.05rem; color: var(--ink); font-style: italic; }
.quote-card .who { font-style: normal; font-weight: 700; color: var(--navy-2); font-size: .9rem; margin: 0; }
.quote-card .stars { color: var(--amber); letter-spacing: 2px; margin-bottom: .4rem; }

/* ----- Wave divider ------------------------------------------------------ */
.wave { display: block; width: 100%; height: 40px; }
.wave-navy { color: var(--navy); }
.wave-ice { color: var(--ice); }
