/* CPG Envoy. Short page, bold type, pastel cards, off-white insets. */
/* Metric-matched fallback, so the headline does not reflow when the web font arrives. */
@font-face { font-family: "Bricolage Fallback"; src: local("Arial Black"), local("Arial-Black"); size-adjust: 81%; }
:root {
  color-scheme: light;
  --paper: #FFFFFF;
  --cream: #FBF8F2;      /* off-white surfaces */
  --field: #F4F0E6;      /* inset fields inside cards */
  --ink: #1B1F3B;
  --muted: #5A6072;
  --line: rgba(27, 31, 59, .12);
  --ring: #E4472B;       /* the circle: decisions only */
  --mint: #D3EFDF;
  --peach: #FFDFD0;
  --sky: #DCE7FB;
  --mint-ink: #0F5A3A;
  --display: "Bricolage Grotesque", "Bricolage Fallback", system-ui, sans-serif;
  --sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --r-card: 28px;
  --r-md: 16px;
  --shadow: 0 1px 2px rgba(27, 31, 59, .05), 0 12px 32px rgba(27, 31, 59, .07);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
main { flex: 1; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(1160px, 100% - 48px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; background: var(--ink); color: var(--cream); padding: 10px 16px; border-radius: 999px; z-index: 10; }
.skip:focus { top: 12px; }

/* header */
.top { padding: 18px 0; }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand img { height: 56px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; font-weight: 500; font-size: 16px; }
.nav a:not(.btn) { text-decoration: none; }
.nav a:not(.btn):hover { text-decoration: underline; text-underline-offset: 5px; }

/* buttons and chips */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 56px; padding: 0 34px; border-radius: 999px;
  background: var(--ink); color: var(--cream);
  font-weight: 600; font-size: 18px; text-decoration: none;
  transition: transform .2s var(--ease), background-color .2s;
}
.btn:hover { background: #0E1126; transform: translateY(-1px); }
.btn-small { min-height: 44px; padding: 0 22px; font-size: 16px; }
.btn-light { background: var(--cream); color: var(--ink); }
.btn-light:hover { background: #FFFFFF; }
.chip {
  border: 0; cursor: pointer; min-height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--field); font-weight: 500; font-size: 16px;
  transition: background-color .2s, color .2s;
}
.chip:hover { background: #EAE4D6; }
.chip.is-on { background: var(--ink); color: var(--cream); }
.chip-ghost { position: relative; background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); min-height: 34px; padding: 0 14px; font-size: 14px; margin-left: 8px; }
.chip-ghost::after { content: ""; position: absolute; inset: -5px -4px; }   /* 44px tap target, small pill */

/* hero */
.hero { text-align: center; padding: 36px 0 60px; }
h1 {
  font: 800 clamp(42px, 5.9vw, 78px)/1 var(--display);
  letter-spacing: -.035em;
  margin-inline: auto;
  text-wrap: balance;
}
.circled { position: relative; display: inline-block; white-space: nowrap; margin-top: .38em; padding-inline: .06em; }
.ring {
  position: absolute; left: -.9em; top: -.27em;
  width: calc(100% + 1.8em); height: calc(100% + .66em); max-width: none;
  overflow: visible; pointer-events: none;
}
.ring path {
  fill: none; stroke: var(--ring); stroke-width: 6; stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.lead { font-size: clamp(19px, 1.9vw, 23px); line-height: 1.45; max-width: 34em; margin: 40px auto 26px; text-wrap: balance; }
.hint { color: var(--muted); font-size: 15px; margin-top: 16px; }

/* demo */
.demo-section { padding-bottom: 96px; }
.chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; }
.chips-label { font-weight: 700; margin-right: 8px; }
.demo { display: grid; grid-template-columns: 1fr auto 1fr auto 1fr; align-items: stretch; transition: opacity .6s; }
.step {
  background: var(--paper); border-radius: var(--r-card); padding: 26px;
  box-shadow: inset 0 0 0 1.5px var(--line), var(--shadow);
  display: flex; flex-direction: column; gap: 14px; min-width: 0;
  transition: opacity .5s, box-shadow .5s;
}
.step h3 { font: 700 19px/1.2 var(--sans); display: flex; align-items: center; gap: 10px; }
.num {
  display: inline-grid; place-items: center; flex: none;
  width: 28px; height: 28px; border-radius: 50%;
  background: #D63F24; color: #fff; font: 700 14px/1 var(--sans);   /* ring red, one step darker: 4.5:1 with white */
}
.arrow {
  align-self: start; margin: 26px -6px 0; z-index: 1;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--ink); color: var(--cream);
}
.field { display: flex; align-items: center; gap: 10px; background: var(--field); border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 15px; }
.rows { display: grid; gap: 6px; }
.row {
  display: grid; grid-template-columns: 1fr 40px 74px; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--r-md);
  transition: background-color .5s;
}
.row.dist { grid-template-columns: auto 1fr auto; }
.row-main { display: grid; min-width: 0; }
.row strong { font-size: 15.5px; line-height: 1.25; }
.row small { color: var(--muted); font-size: 13px; line-height: 1.3; }
.meter { height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; }
.meter i { display: block; height: 100%; width: var(--v); border-radius: inherit; background: var(--ink); transition: width .9s var(--ease); }
.row:nth-child(1) .meter i { --v: 92%; }
.row:nth-child(2) .meter i { --v: 86%; }
.row:nth-child(3) .meter i { --v: 64%; }
.row:nth-child(4) .meter i { --v: 38%; }
.tag {
  font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: var(--field); white-space: nowrap; text-align: center;
  transition: opacity .4s, transform .4s var(--ease);
}
.tag-go { background: var(--ink); color: var(--cream); }
.tag-no { background: var(--peach); color: #8A3212; }
.row.pick, .row.good { background: var(--mint); }
.row.bad .row-main, .row.bad .avatar { opacity: .5; transition: opacity .5s; }
.avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; font: 700 13px/1 var(--sans); }
.a1 { background: #BFE6D0; color: var(--mint-ink); }
.a2 { background: var(--sky); color: #23408F; }
.a3 { background: var(--peach); color: #8A3212; }
.foot { color: var(--muted); font-size: 13.5px; margin-top: auto; }
.terms { display: grid; gap: 6px; background: var(--field); border-radius: var(--r-md); padding: 14px 16px; }
.term { display: grid; grid-template-columns: 92px 1fr; gap: 10px; align-items: baseline; padding: 6px 0; }
.term + .term { border-top: 1px solid var(--line); }
.term dt { color: var(--muted); font-size: 13.5px; }
.term dd { display: grid; font-size: 15px; line-height: 1.3; }
.term s { color: var(--muted); font-size: 13.5px; text-decoration-color: var(--ring); text-decoration-thickness: 1.5px; }
.term b { font-weight: 700; transition: opacity .45s, transform .45s var(--ease); }
.done {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; margin-top: auto;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  background: var(--ink); color: var(--cream);
  transition: background-color .4s, color .4s, box-shadow .4s;
}
.demo-note { text-align: center; color: var(--muted); font-size: 14px; margin: 14px 0 24px; text-wrap: balance; }

/* demo, while the script is playing it: steps wait in their "before" state until switched on */
.demo.resetting { opacity: 0; }                                   /* the loop restarts behind a fade */
.demo.no-anim, .demo.no-anim * { transition: none !important; }   /* state swapped while invisible */
.demo.playing .step { opacity: .5; }
.demo.playing .step.is-on { opacity: 1; }
.demo.playing.stacked .step { opacity: 1; }                        /* stacked: cards stay solid, only their contents reveal */
.demo.playing .step.is-now { box-shadow: inset 0 0 0 1.5px rgba(27, 31, 59, .32), 0 1px 2px rgba(27, 31, 59, .05), 0 16px 40px rgba(27, 31, 59, .11); }
.demo.playing .step:not(.is-on) .meter i { width: 0; }
.demo.playing .step:not(.is-on) .tag { opacity: 0; transform: translateY(4px); }
.demo.playing .step:not(.is-on) .row { background: transparent; }
.demo.playing .step:not(.is-on) .row.bad .row-main, .demo.playing .step:not(.is-on) .row.bad .avatar { opacity: 1; }
.demo.playing .step:not(.is-on) .term b { opacity: 0; transform: translateY(4px); }
.demo.playing .step:not(.is-on) .term s { text-decoration: none; color: var(--ink); }
.demo.playing .step:not(.is-on) .done { background: transparent; color: var(--muted); box-shadow: inset 0 0 0 1.5px var(--line); }
/* stagger inside the live step: only on the way in */
.demo.playing .step.is-on .row:nth-child(2), .demo.playing .step.is-on .row:nth-child(2) .tag, .demo.playing .step.is-on .row:nth-child(2) .meter i, .demo.playing .step.is-on .term:nth-child(2) b { transition-delay: .25s; }
.demo.playing .step.is-on .row:nth-child(3), .demo.playing .step.is-on .row:nth-child(3) .tag, .demo.playing .step.is-on .row:nth-child(3) .meter i, .demo.playing .step.is-on .term:nth-child(3) b { transition-delay: .5s; }
.demo.playing .step.is-on .row:nth-child(4), .demo.playing .step.is-on .row:nth-child(4) .tag, .demo.playing .step.is-on .row:nth-child(4) .meter i, .demo.playing .step.is-on .term:nth-child(4) b { transition-delay: .75s; }
.demo.playing .step.is-on .done { transition-delay: 1.1s; }

/* in short */
.short { padding-bottom: 104px; }
h2 { font: 800 clamp(34px, 4.4vw, 54px)/1.02 var(--display); letter-spacing: -.03em; text-align: center; margin-bottom: 36px; text-wrap: balance; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { border-radius: var(--r-card); padding: 34px 32px 32px; display: flex; flex-direction: column; gap: 10px; }
.mint { background: var(--mint); }
.peach { background: var(--peach); }
.sky { background: var(--sky); }
.big { font: 800 clamp(44px, 4.6vw, 60px)/1 var(--display); letter-spacing: -.035em; }
.card-title { font-weight: 700; font-size: 20px; line-height: 1.25; }
.card p:not(.big):not(.card-title) { font-size: 16px; line-height: 1.5; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 14px; }
.pills li { background: rgba(255, 255, 255, .72); border-radius: 999px; padding: 6px 14px; font-size: 14.5px; font-weight: 600; }
.prices { margin-top: auto; background: rgba(255, 255, 255, .72); border-radius: var(--r-md); padding: 6px 16px; }
.prices div { display: grid; padding: 9px 0; }
.prices div + div { border-top: 1px solid var(--line); }
.prices dt { font-size: 13.5px; color: #6B3A26; }
.prices dd { font-weight: 700; font-size: 15.5px; }

/* questions */
.faq { padding-bottom: 104px; }
.faq-list { max-width: 760px; margin-inline: auto; display: grid; gap: 10px; }
details { background: var(--cream); border-radius: 22px; padding: 0 26px; }
summary {
  cursor: pointer; list-style: none; padding: 20px 0; font-weight: 600; font-size: 19px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
}
summary::-webkit-details-marker { display: none; }
summary:focus-visible { outline-offset: -2px; border-radius: 14px; }
summary::after {
  content: ""; flex: none; width: 12px; height: 12px;
  border-right: 2.4px solid var(--ink); border-bottom: 2.4px solid var(--ink);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease);
}
details[open] summary::after { transform: translateY(3px) rotate(-135deg); }
details p { padding-bottom: 22px; max-width: 60ch; }

/* closing band */
.band { background: var(--ink); color: var(--cream); border-radius: 36px; text-align: center; padding: 72px 28px 64px; margin-bottom: 72px; }
.band h2 { margin-bottom: 26px; }
.band-steps { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 30px; }
.band-steps li { display: inline-flex; align-items: center; gap: 10px; background: rgba(255, 255, 255, .1); border-radius: 999px; padding: 7px 18px 7px 7px; font-weight: 600; font-size: 16px; }
.band .hint { color: rgba(251, 248, 242, .72); }
.band :focus-visible { outline-color: var(--cream); }

/* footer */
.foot-bar { background: var(--cream); padding: 22px 0; font-size: 15px; color: var(--muted); }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.foot-row img { height: 40px; width: auto; }
.foot-row a { display: inline-block; padding: 11px 0; margin: -11px 0; }   /* 44px tap target */

/* plain pages */
.plain { max-width: 680px; margin-inline: auto; padding: 48px 0 96px; }
.plain h1 { font-size: clamp(38px, 5vw, 56px); margin: 0 0 24px; }
.plain p { margin-bottom: 16px; }
.plain .btn { margin-top: 12px; }

/* one entrance, on load */
@media (prefers-reduced-motion: no-preference) {
  .hero > * { animation: rise .7s var(--ease) both; }
  .hero > :nth-child(2) { animation-delay: .08s; }
  .hero > :nth-child(3) { animation-delay: .16s; }
  .hero > :nth-child(4) { animation-delay: .22s; }
  .ring { animation: draw .9s .6s var(--ease) both; }
  @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
  @keyframes draw { from { clip-path: inset(-30% 110% -30% -10%); } to { clip-path: inset(-30% -10% -30% -10%); } }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* the demo stacks, and rests in its finished state (main.js uses the same width) */
@media (max-width: 1100px) {
  .demo { grid-template-columns: 1fr; max-width: 720px; margin-inline: auto; }
  .arrow { justify-self: center; margin: -8px 0; transform: rotate(90deg); }
  #demo-toggle { display: none; }
}
/* tablet */
@media (max-width: 980px) {
  .cards { grid-template-columns: 1fr; }
  .chips { max-width: 680px; margin-inline: auto; }
  .chips-label { width: 100%; text-align: center; margin: 0 0 2px; }
}
/* phone */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .wrap { width: min(1160px, 100% - 32px); }
  .nav a:not(.btn) { display: none; }
  .brand img { height: 44px; }
  .hero { padding: 36px 0 56px; }
  .lead { margin: 26px auto 24px; }
  .btn { width: 100%; padding: 0 20px; }
  .btn-small { width: auto; }
  /* one swipeable row of chips; the block padding keeps focus rings from being clipped */
  .chips { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; scrollbar-width: none; max-width: none; margin: -6px -16px; padding: 6px 16px; }
  .chips::-webkit-scrollbar { display: none; }
  .chips { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 48px), transparent); }
  .chips-label { flex: none; width: auto; margin: 0 4px 0 0; }
  .chip { flex: none; }
  .step { padding: 20px; }
  .row { grid-template-columns: 1fr auto; }
  .row .meter { display: none; }
  .demo-section, .short, .faq { padding-bottom: 72px; }
  .card { padding: 28px 24px; }
  .band { border-radius: 28px; padding: 52px 20px 44px; margin-bottom: 48px; }
  .band-steps { flex-direction: column; align-items: stretch; max-width: 280px; margin: 0 auto 28px; }
  .foot-row { flex-direction: column; align-items: flex-start; }
}
/* small phones: the headline scales down so the ring stays inside the screen */
@media (max-width: 374px) {
  h1 { font-size: 11.2vw; }
}
