/* Ferricool Brand Scorecard
   Values transcribed from the Claude Design prototype (Brand Scorecard LP.dc.html).
   Display face is Boldonse (Anton as fallback); body face is Stem with Poppins as
   fallback — Stem is a licensed font, drop the webfont in and it takes over. */

:root {
  --yellow: #FDE100;
  --ink:    #0A0A0A;
  --red:    #EF4130;
  --teal:   #0E9C93;
  --maroon: #8E1B3C;
  --near:   #1B1B1B;

  --display: 'Boldonse', 'Anton', sans-serif;
  --body:    'Stem', 'Poppins', sans-serif;

  --card-w: min(470px, 92vw);
  --card-h: 472px;
  --radius: 19px;
  --pad: clamp(18px, 2.5vw, 29px);

  /* overwritten by app.js from the swipe-speed setting */
  --swipe: 620ms;
  --swipe-fade: 434ms;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--yellow);
}

body { font-family: var(--body); }

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--red); }

::selection { background: var(--ink); color: var(--yellow); }

.page {
  position: relative;
  min-height: 100vh;
  width: 100%;
  background: var(--yellow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- background wordmarks ---------- */

.wordmark {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  user-select: none;
}
.wordmark--score { top: -3.4vw;    width: min(1480px, 104vw); }
.wordmark--card  { bottom: -3.2vw; width: min(1180px, 84vw); }

/* ---------- card stage ---------- */

.stage {
  position: relative;
  z-index: 12;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(76px, 13vh, 120px) clamp(14px, 4vw, 24px) clamp(20px, 4vh, 34px);
}

.stack {
  position: relative;
  width: var(--card-w);
  min-height: var(--card-h);
}

/* One slot per step. app.js sets .is-active / .is-past / .is-ahead / .is-hidden and
   --depth; the active slot sits in flow so a tall card grows the stack instead of
   spilling out of it. */
.slot {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: var(--card-h);
  transform-origin: 50% 60%;
  will-change: transform, opacity;
  transition: transform var(--swipe) cubic-bezier(.2, .85, .2, 1),
              opacity var(--swipe-fade) ease;
}

.slot.is-active {
  position: relative;
  width: 100%;
  z-index: 90;
  transform: none;
  opacity: 1;
}

/* swiped away to the left */
.slot.is-past {
  transform: translate3d(-128%, 4%, 0) rotate(-11deg) scale(.94);
  opacity: 0;
  pointer-events: none;
}

/* peeking out of the stack behind the active card */
.slot.is-ahead {
  transform: translate3d(calc(var(--depth) * 15px), 0, 0) scale(calc(1 - var(--depth) * 0.035));
  opacity: 1;
  pointer-events: none;
  z-index: calc(90 - var(--depth));
}

/* deeper than the visible peek, or not in play yet */
.slot.is-deep {
  transform: translate3d(66px, 0, 0) scale(.895);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
}

.slot.is-hidden {
  transform: scale(.94);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
}

/* ---------- card shell ---------- */

.card {
  position: relative;
  min-height: var(--card-h);
  border-radius: var(--radius);
  padding: var(--pad);
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.35);
}

.card--ink   { background: var(--ink); }
.card--teal  { background: var(--teal); }
.card--red   { background: var(--red); }
.card--maroon{ background: var(--maroon); }
.card--near  { background: var(--near); }

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.logo-mark { width: min(37%, 154px); height: auto; display: block; }

.counter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 3px;
}

.counter-text {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.82);
  white-space: nowrap;
}
.counter-text b { font-weight: 700; color: #FFFFFF; }

.back {
  background: transparent;
  border: none;
  padding: 0 2px;
  margin: 0;
  color: #FFFFFF;
  font-family: var(--body);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
  transition: transform .18s ease, opacity .18s ease;
}
.back:hover { opacity: 1; transform: translateX(-3px); }

/* ---------- intro card ---------- */

.logo-intro { width: min(86%, 372px); height: auto; display: block; }

.intro-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.intro-lede {
  font-family: var(--display);
  font-size: clamp(11.5px, 1.35vw, 15px);
  line-height: 1.5;
  letter-spacing: 0.01em;
  color: #FFFFFF;
}
.intro-lede .is-yellow { color: var(--yellow); }

.intro-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  max-width: 50ch;
  text-wrap: pretty;
}

/* ---------- question card ---------- */

.question {
  font-family: var(--display);
  font-size: clamp(13.5px, 1.7vw, 18px);
  line-height: 1.34;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  margin-top: clamp(13px, 2vw, 22px);
  text-wrap: pretty;
}

.options {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option {
  text-align: left;
  background: rgba(0, 0, 0, 0.2);
  border: none;
  border-radius: 11px;
  padding: clamp(13px, 3.4vw, 15px) 17px;
  font-family: var(--body);
  font-weight: 700;
  font-size: 12.5px;
  color: #FFFFFF;
  cursor: pointer;
  transition: background .18s ease, transform .18s ease;
}
.option:hover { filter: brightness(1.18); }
.option.is-picked {
  background: rgba(0, 0, 0, 0.42);
  transform: scale(.985);
}

/* ---------- buttons ---------- */

.btn-primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--yellow);
  color: var(--ink);
  border: none;
  border-radius: 10px;
  padding: clamp(12px, 3.2vw, 15px) 16px;
  font-family: var(--display);
  font-size: 12px;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-primary:active { transform: translateY(1px); }

.btn-primary--wide {
  margin-top: 8px;
  align-self: flex-start;
  gap: 28px;
  border-radius: 11px;
  padding: clamp(14px, 3.4vw, 16px) 18px;
  font-size: 13px;
  min-width: 228px;
}
.btn-primary--wide:hover { box-shadow: 0 10px 24px -8px rgba(0, 0, 0, 0.6); }

.btn-primary--link {
  flex: 0 0 auto;
  display: inline-flex;
  justify-content: flex-start;
  gap: 10px;
  white-space: nowrap;
  border-radius: 11px;
  padding: clamp(13px, 3.4vw, 15px) 17px;
}
.btn-primary--link:hover { color: var(--ink); }

.arrow {
  font-family: var(--body);
  font-size: 18px;
  line-height: 1;
}

.btn-ghost {
  background: transparent;
  color: #FFFFFF;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  padding: clamp(12px, 3.2vw, 14px) 13px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color .18s ease;
}
.btn-ghost:hover { border-color: var(--yellow); }

.btn-plain {
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  border: none;
  padding: 13px 6px;
  font-family: var(--body);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}
.btn-plain:hover { color: #FFFFFF; }

/* ---------- details gate ---------- */

.gate-form {
  margin-top: auto;
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gate-form input[type="text"],
.gate-form input[type="email"] {
  background: rgba(0, 0, 0, 0.22);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: clamp(11px, 3.2vw, 14px) 14px;
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  color: #FFFFFF;
  outline: none;
  transition: border-color .18s ease;
}
.gate-form input::placeholder { color: rgba(255, 255, 255, 0.4); }
.gate-form input:focus { border-color: var(--yellow); }

/* honeypot — never shown to a human */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; margin: 0; }

.gate-error {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--yellow);
  min-height: 14px;
  line-height: 1.2;
  opacity: 0;
  transition: opacity .2s ease;
}
.gate-error.is-shown { opacity: 1; }

/* ---------- result card ---------- */

.result-name {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--yellow);
  padding-top: 6px;
  white-space: nowrap;
}

.result-block { margin-top: clamp(13px, 2vw, 22px); }
.result-block--rule {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--yellow);
  font-weight: 600;
}

.persona-title {
  font-family: var(--display);
  font-size: clamp(16px, 2.1vw, 23px);
  line-height: 1.18;
  letter-spacing: 0.01em;
  color: #FFFFFF;
  margin-top: 10px;
}

.result-body {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.75);
  max-width: 48ch;
  text-wrap: pretty;
}
.result-block--rule .result-body { margin-top: 14px; }

.score-row {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.score-num {
  font-family: var(--display);
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  color: #FFFFFF;
}

.score-band {
  font-family: var(--display);
  font-size: clamp(12.5px, 1.5vw, 16px);
  line-height: 1.2;
  color: var(--red);
  white-space: nowrap;
}

.bar {
  margin-top: 16px;
  height: 8px;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 99px;
  overflow: hidden;
}
.bar-fill {
  height: 100%;
  width: 0;
  background: var(--yellow);
  border-radius: 99px;
  transition: width .2s linear;
}

.result-cta {
  margin-top: auto;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.signature {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}
.signature-text {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  max-width: 34ch;
  text-wrap: pretty;
}
.signature-url {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--yellow);
}

/* ---------- footer ---------- */

.footer {
  position: relative;
  z-index: 6;
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  padding: 0 24px 26px;
}

.footer-row {
  display: flex;
  align-items: center;
  gap: clamp(12px, 2.6vw, 26px);
  flex-wrap: wrap;
  justify-content: center;
  text-align: center;
  max-width: 1000px;
}

.footer-mark { height: 28px; width: auto; display: block; }

.rule { width: 1px; height: 38px; background: rgba(10, 10, 10, 0.35); }

.footer-blurb {
  font-size: clamp(10.5px, 2.4vw, 12.5px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  max-width: 46ch;
}
.footer-blurb b { font-weight: 700; }

.footer-links {
  font-size: clamp(10.5px, 2.4vw, 12.5px);
  line-height: 1.45;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- confetti ---------- */

.confetti {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 999;
}

@media (prefers-reduced-motion: reduce) {
  .slot { transition: opacity .01ms linear; }
  .bar-fill { transition: none; }
}
