/* calc.css — GUS SKYY bathroom & flooring calculator.
   Tokens mirror gsc-site/deploy/colors_and_type.css (navy #1B264F, gold #C9A24B).
   Fonts are self-hosted in ./fonts — nothing is loaded from Google or any CDN.
   Mobile-first: one card per screen, big touch targets, single column below 720px. */

@import url("fonts/fonts.css");

:root {
  --navy:        #1B264F;
  --navy-mid:    #274690;
  --navy-light:  #576CA8;
  --gold:        #C9A24B;
  --gold-soft:   rgba(201, 162, 75, 0.14);
  --ink:         #302B27;
  --ink-2:       rgba(48, 43, 39, 0.72);
  --ink-3:       rgba(48, 43, 39, 0.52);
  --white:       #ffffff;
  --off-white:   #f7f7f5;
  --line:        rgba(27, 38, 79, 0.12);

  --font-display: "Bebas Neue", "Oswald", Impact, system-ui, sans-serif;
  --font-body:    "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;

  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-1: 0 1px 2px rgba(20, 30, 60, 0.06);
  --shadow-2: 0 8px 24px rgba(20, 30, 60, 0.14);

  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur: 200ms;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

.calc {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px 40px;
}

/* ---------------------------------------------------------------- topbar */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 40px;
  margin-bottom: 20px;
}

.progress {
  display: flex;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  justify-content: center;
}

.progress li {
  width: 26px;
  height: 26px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  background: var(--off-white);
  border: 1px solid var(--line);
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}

.progress li.done { background: var(--navy); color: var(--white); border-color: var(--navy); }
.progress li.here { background: var(--gold); color: var(--navy); border-color: var(--gold); transform: scale(1.12); }

.ghost {
  background: none;
  border: 0;
  padding: 6px 4px;
  font: inherit;
  font-size: 14px;
  color: var(--ink-3);
  cursor: pointer;
  border-radius: var(--r-sm);
}
.ghost:hover { color: var(--navy-mid); }
.ghost:focus-visible { outline: 2px solid var(--navy-mid); outline-offset: 2px; }
.back, .skip { flex: 0 0 auto; min-width: 56px; }
.skip { text-align: right; }
.restart { display: block; margin: 28px auto 0; }

/* ---------------------------------------------------------------- screens */
.screen { animation: none; }

.screen.enter {
  animation: slidein var(--dur) var(--ease) both;
}

@keyframes slidein {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------------------------------------------------------------- type */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(32px, 7vw, 48px);
  line-height: 1.02;
  text-transform: uppercase;
  letter-spacing: 0.01em;
  color: var(--navy);
  margin: 0 0 10px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 6px;
}

.lede { font-size: 17px; color: var(--ink-2); margin: 0 0 22px; }

.sub {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy);
  margin: 26px 0 12px;
}

.microcopy { font-size: 13px; color: var(--ink-3); margin: 12px 0 0; text-align: center; }
.error { color: #c41f06; font-size: 14px; font-weight: 500; margin: 4px 0 0; }

/* ---------------------------------------------------------------- fields */
.field { display: block; margin: 0 0 18px; }
.field-label { display: block; font-size: 14px; font-weight: 700; color: var(--navy); margin-bottom: 6px; }
.field-label em { font-style: normal; font-weight: 400; color: var(--ink-3); }
.field-note { display: block; font-size: 13px; color: var(--ink-3); margin-top: 6px; }

.field input {
  width: 100%;
  padding: 14px 16px;
  font: inherit;
  font-size: 17px;
  color: var(--ink);
  background: var(--white);
  border: 1.5px solid rgba(48, 43, 39, 0.18);
  border-radius: var(--r-md);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.field input:focus {
  outline: none;
  border-color: var(--navy-mid);
  box-shadow: 0 0 0 3px rgba(39, 70, 144, 0.14);
}

.field-inline { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.field-inline .field-label { margin: 0; }
.field-inline input { width: 96px; text-align: center; }

/* ---------------------------------------------------------------- cards */
.cards { display: grid; grid-template-columns: 1fr; gap: 12px; }

@media (min-width: 560px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .cards-level, .cards-compact { grid-template-columns: repeat(3, 1fr); }
}

.card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 0;
  text-align: left;
  font: inherit;
  background: var(--white);
  border: 1.5px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.card:hover { border-color: var(--navy-light); box-shadow: var(--shadow-2); }
.card:focus-visible { outline: 2px solid var(--navy-mid); outline-offset: 2px; }
.card[aria-checked="true"] { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); }

.card-photo {
  flex: 0 0 96px;
  width: 96px;
  height: 84px;
  overflow: hidden;
  background: var(--navy);
}
.card-photo img, .card-photo svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-photo img { transition: transform 300ms var(--ease); }
.card:hover .card-photo img { transform: scale(1.06); }

.card-body { padding: 12px 14px 12px 0; }
.card-title { display: block; font-weight: 700; color: var(--navy); font-size: 16px; line-height: 1.25; }
.card-note { display: block; font-size: 13px; color: var(--ink-3); margin-top: 3px; }

.cards-compact .card { min-height: 56px; }
.cards-compact .card-body { padding: 12px 14px; }

/* ---------------------------------------------------------------- checks */
.checks { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 560px) { .checks { grid-template-columns: 1fr 1fr; } }

.check {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  cursor: pointer;
  font-size: 15px;
  color: var(--navy);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.check:hover { border-color: var(--navy-light); }
.check input { width: 20px; height: 20px; accent-color: var(--navy-mid); flex: 0 0 auto; }
.check:has(input:checked) { border-color: var(--gold); background: var(--gold-soft); }

/* ---------------------------------------------------------------- slider */
.readout {
  font-family: var(--font-display);
  font-size: clamp(44px, 12vw, 68px);
  line-height: 1;
  color: var(--navy);
  text-align: center;
  margin: 8px 0 4px;
}
.readout .unit { font-family: var(--font-body); font-size: 16px; font-weight: 500; color: var(--ink-3); }

.slider {
  width: 100%;
  height: 36px;
  accent-color: var(--gold);
  margin: 4px 0 18px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip {
  font: inherit;
  font-size: 14px;
  padding: 9px 16px;
  border-radius: var(--r-pill);
  border: 1.5px solid var(--line);
  background: var(--white);
  color: var(--navy);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
}
.chip:hover { border-color: var(--navy-light); }
.chip[aria-pressed="true"] { border-color: var(--gold); background: var(--gold-soft); }

/* ---------------------------------------------------------------- result */
.screen-result .eyebrow { color: var(--gold); }

.range {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 12px;
  margin: 6px 0 14px;
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
  border-radius: var(--r-lg);
}
.range-num {
  font-family: var(--font-display);
  font-size: clamp(40px, 11vw, 64px);
  line-height: 1;
  color: var(--white);
  font-variant-numeric: tabular-nums;
}
.range-dash { color: var(--gold); font-size: clamp(28px, 7vw, 40px); line-height: 1; }

.range-basis { font-size: 14px; font-weight: 700; color: var(--navy); margin: 0 0 6px; }
.range-rule { font-size: 15px; color: var(--ink-2); margin: 0 0 6px; }
.range-position { font-size: 15px; color: var(--ink); margin: 0 0 20px; font-weight: 500; }

.proof-photo { margin: 0 0 20px; }
.photo-slot { border-radius: var(--r-lg); overflow: hidden; background: var(--navy); aspect-ratio: 16 / 9; }
.photo-slot img, .photo-slot svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.proof-photo figcaption { font-size: 13px; color: var(--ink-3); margin-top: 8px; }

.proof {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: var(--off-white);
  margin: 0 0 22px;
}

.twocol { display: grid; grid-template-columns: 1fr; gap: 4px 28px; }
@media (min-width: 560px) { .twocol { grid-template-columns: 1fr 1fr; } }

.list { list-style: none; margin: 0; padding: 0; font-size: 14px; color: var(--ink-2); }
.list li { position: relative; padding: 4px 0 4px 22px; }
.list li::before { position: absolute; left: 0; top: 4px; font-weight: 700; }
.list.yes li::before { content: "\2713"; color: #3f8f2f; }
.list.no  li::before { content: "\2717"; color: #b03a2b; }
.list li:not(.yes li):not(.no li)::before { content: "\2022"; color: var(--gold); }

.drivers { margin-top: 18px; }

.disclaimer {
  font-size: 13px;
  color: var(--ink-3);
  border-left: 3px solid var(--gold);
  padding: 4px 0 4px 12px;
  margin: 26px 0 24px;
}

.capture { border-top: 1px solid var(--line); padding-top: 22px; }
/* [hidden] must win over .primary/.secondary { display: block } */
.primary[hidden], .secondary[hidden], .tertiary[hidden] { display: none; }
.capture #lead-promise { margin: -4px 0 14px; }
.capture #btn-send { margin-top: 12px; }
.lead-fine { text-align: left; font-size: 12px; line-height: 1.45; }
.lead-fine a, .error a, .lead-done a { color: inherit; text-decoration: underline; }
.lead-done { border-left: 3px solid var(--gold); padding: 6px 0 6px 14px; margin: 0 0 18px; }
.lead-done p { margin: 6px 0 0; color: var(--ink-2); }
.lead-done:focus { outline: none; }

/* ---------------------------------------------------------------- buttons */
.primary, .secondary {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: var(--r-pill);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: transform var(--dur) var(--ease), background var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.primary { background: var(--navy); color: var(--white); box-shadow: var(--shadow-2); }
.primary:hover { background: var(--navy-mid); transform: translateY(-1px); }
.secondary { background: var(--white); color: var(--navy); border-color: var(--navy); margin-top: 10px; }
.secondary:hover { background: var(--off-white); }
.primary:focus-visible, .secondary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.tertiary {
  display: block;
  text-align: center;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--navy-mid);
  text-decoration: underline;
}

.phone { font-family: var(--font-display); font-size: 32px; letter-spacing: 0.02em; padding: 18px 20px; }

.callbox {
  background: var(--off-white);
  border-radius: var(--r-md);
  padding: 14px 16px;
  margin: 22px 0;
}
.callbox-line { margin: 0; font-size: 15px; color: var(--ink-2); }
.callbox-line + .callbox-line { margin-top: 4px; }

/* ---------------------------------------------------------------- footer */
.foot {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-3);
  text-align: center;
}
.foot p { margin: 2px 0; }
.foot-version { font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- a11y */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .screen.enter { animation: none; }
}

/* The primary-bath ceiling: no range, one sentence and a call (rules.json caps). */
.range-custom {
  margin: 8px 0 20px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--ink);
}
