/* ==================================================================
   Mise · landing
   Paper, ink, one ember accent. Numbers are the design.
================================================================== */

:root {
  --paper:      #FAF7F2;
  --paper-2:    #F3EEE5;
  --ink:        #14110E;
  --ink-2:      #3E3830;
  --ink-3:      #6B6459;
  --rule:       rgba(20, 17, 14, .13);
  --rule-soft:  rgba(20, 17, 14, .07);
  --ember:      #C8451F;
  --ember-ink:  #9E3315;

  --dark:       #17140F;
  --dark-2:     #221D16;
  --on-dark:    #F6F1E8;
  --on-dark-2:  #B6ACA0;

  /* chart roles, validated: see note in app.js */
  --surface-1:  #FAF7F2;
  --series-1:   #2a78d6;
  --series-alert: #C8451F;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --ui: 'Inter Tight', ui-sans-serif, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --gut: clamp(20px, 5vw, 72px);
  --sect: clamp(72px, 9vw, 148px);
  --r: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, ul, ol, table { margin: 0; padding: 0; }
ul { list-style: none; }
img, svg { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--ui);
  font-size: clamp(16px, .4vw + 15px, 18px);
  line-height: 1.6;
  font-weight: 380;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--ember); color: #fff; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

:focus-visible { outline: 3px solid var(--ember); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gut); }
.wrap--narrow { max-width: 840px; }

/* ------------------------------ nav ------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gut);
  background: rgba(250, 247, 242, .88);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav__brand { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.nav__mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--ink); position: relative;
}
.nav__mark::after {
  content: ''; position: absolute; inset: 6px 6px auto 6px; height: 3px;
  border-radius: 2px; background: var(--ember);
}
.nav__name { font-family: var(--serif); font-size: 26px; letter-spacing: -.01em; }
.nav__links { display: flex; gap: 26px; font-size: 15px; color: var(--ink-2); }
.nav__links a { padding: 6px 0; border-bottom: 1px solid transparent; transition: border-color .3s, color .3s; }
.nav__links a:hover { color: var(--ink); border-color: var(--ember); }

/* ------------------------------ buttons ------------------------------ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 100px;
  font-size: 15px; font-weight: 500; letter-spacing: -.005em;
  transition: transform .25s var(--ease), background .3s, color .3s, border-color .3s;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn--fill { background: var(--ink); color: var(--paper); }
.btn--fill:hover { background: var(--ember-ink); }
.btn--ghost { border: 1px solid var(--rule); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--wide { width: 100%; }
.btn--lg { min-height: 58px; padding: 0 34px; font-size: 17px; }
.nav__cta { min-height: 42px; font-size: 14px; padding: 0 18px; }

/* ------------------------------ type ------------------------------ */
.eyebrow {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
}

.section { padding: var(--sect) 0; border-top: 1px solid var(--rule-soft); }
/* the nav is sticky, so anchor jumps have to clear it */
.section, .hero, [id] { scroll-margin-top: 88px; }
.section--paper { background: var(--paper-2); }
.section--dark { background: var(--dark); color: var(--on-dark); border-top: 0; }

.shead { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.shead__k {
  font-size: 13px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ember); font-weight: 500; margin-bottom: 14px;
}
.shead__h {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(34px, 5.4vw, 62px); line-height: 1.04; letter-spacing: -.02em;
}
.shead__h em { font-style: italic; color: var(--ink-3); }
.shead__p { margin-top: 20px; color: var(--ink-2); max-width: 62ch; }
.shead--light .shead__h em { color: var(--on-dark-2); }
.shead--light .shead__p { color: var(--on-dark-2); }
.shead--light .shead__k { color: #E8834F; }

.h3 { font-size: 18px; font-weight: 600; margin: 26px 0 8px; letter-spacing: -.01em; }
.h3:first-child { margin-top: 0; }

/* ------------------------------ hero ------------------------------ */
.hero { padding: clamp(52px, 8vw, 110px) 0 clamp(48px, 7vw, 96px); }
.hero__h {
  font-family: var(--serif); font-weight: 400;
  font-size: clamp(40px, 7.6vw, 96px); line-height: 1.0; letter-spacing: -.025em;
  margin: 18px 0 0;
}
.hero__h em { font-style: italic; color: var(--ember); }
.hero__body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px;
  margin-top: clamp(28px, 4vw, 52px); align-items: start;
}
.lede { font-size: clamp(17px, 1.2vw, 20px); line-height: 1.55; color: var(--ink-2); }
.lede strong { color: var(--ink); font-weight: 600; }
.lede--muted { color: var(--ink-3); font-size: 16px; }
.hero__cta { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.hero__note { grid-column: 1 / -1; font-size: 14px; color: var(--ink-3); }

/* ------------------------------ chart ------------------------------ */
.viz {
  background: var(--surface-1);
  border: 1px solid var(--rule);
  border-radius: var(--r);
  padding: clamp(18px, 2.4vw, 30px);
}
.viz__cap {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; margin-bottom: 22px;
}
.viz__title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.viz__toggle {
  font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--rule);
  padding-bottom: 2px; min-height: 44px; display: inline-flex; align-items: center;
}
.viz__toggle:hover { color: var(--ink); border-color: var(--ink); }

.bars { display: grid; gap: 4px; }
.bargroup__label {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); font-weight: 500;
  margin: 18px 0 8px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-soft);
}
.bargroup__label:first-child { margin-top: 0; }

.row {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(0, 3fr) 74px 74px;
  align-items: center; gap: 14px;
  padding: 7px 8px; border-radius: 8px;
  transition: background .2s;
  cursor: default;
}
.row:hover, .row:focus-within { background: rgba(20,17,14,.045); }
.row__name { font-size: 14.5px; line-height: 1.25; }
.row__name small { display: block; color: var(--ink-3); font-size: 12.5px; }
.row__track { position: relative; height: 26px; }
.row__bar {
  position: absolute; left: 0; top: 3px; bottom: 3px;
  background: var(--series-1);
  border-radius: 0 4px 4px 0;
  width: 0; transition: width .9s var(--ease);
}
.row--alert .row__bar { background: var(--series-alert); }
.row__paid, .row__keep {
  font-size: 14px; text-align: right; font-variant-numeric: tabular-nums;
}
.row__paid { color: var(--ink-3); }
.row__keep { font-weight: 600; }
.row--alert .row__keep { color: var(--ember-ink); }

.row__flag {
  display: inline-block; margin-left: 8px; vertical-align: 1px;
  font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase; font-weight: 600;
  color: #fff; background: var(--ember); padding: 2px 7px; border-radius: 100px;
}

.axis {
  display: grid;
  grid-template-columns: minmax(150px, 1.15fr) minmax(0, 3fr) 74px 74px;
  gap: 14px; padding: 0 8px; margin-top: 14px;
  font-size: 12px; color: var(--ink-3);
}
.axis__scale { display: flex; justify-content: space-between; }
.axis__h { text-align: right; }

.viz__foot { margin-top: 20px; font-size: 13.5px; color: var(--ink-3); max-width: 74ch; }

.viz__tablewrap { overflow-x: auto; margin-top: 8px; }
.dtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.dtable th, .dtable td { text-align: right; padding: 10px 12px; border-bottom: 1px solid var(--rule-soft); }
.dtable th:first-child, .dtable td:first-child { text-align: left; }
.dtable th { font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.dtable td { font-variant-numeric: tabular-nums; }

.callout {
  margin-top: clamp(26px, 3vw, 40px);
  border-left: 3px solid var(--ember);
  padding: 4px 0 4px 22px;
  max-width: 74ch;
}
.callout p + p { margin-top: 14px; }
.callout strong { font-weight: 600; }

/* ------------------------------ split + calc ------------------------------ */
.split { display: grid; grid-template-columns: 1fr 460px; gap: clamp(28px, 4vw, 64px); align-items: start; }
.split__text p { color: var(--ink-2); }

.ticks { display: grid; gap: 9px; margin-top: 16px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15.5px; }
.ticks li::before {
  content: ''; position: absolute; left: 3px; top: .55em;
  width: 9px; height: 9px; border-radius: 2px; background: var(--ember);
}
.ticks--sm li { font-size: 14.5px; }
.section--dark .ticks li { color: var(--on-dark-2); }

.calc {
  background: #fff; border: 1px solid var(--rule); border-radius: var(--r);
  padding: clamp(20px, 2.6vw, 30px);
  position: sticky; top: 88px;
}
.calc__h { font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.calc__p { font-size: 14px; color: var(--ink-3); margin-top: 4px; }

.field { display: block; margin-top: 18px; }
.field__l { display: block; font-size: 13.5px; color: var(--ink-2); margin-bottom: 7px; }
.field__in {
  display: flex; align-items: center; gap: 2px;
  border: 1px solid var(--rule); border-radius: 10px;
  padding: 0 14px; background: var(--paper);
  transition: border-color .25s, background .25s;
}
.field__in:focus-within { border-color: var(--ink); background: #fff; }
.field__in input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  height: 50px; font-size: 17px; font-variant-numeric: tabular-nums; font-weight: 500;
}
.field__pre, .field__suf { color: var(--ink-3); font-size: 16px; }

.calc__out {
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--rule);
}
.calc__lab { font-size: 12.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.calc__num {
  font-family: var(--serif); font-size: clamp(42px, 5vw, 56px); line-height: 1.05;
  letter-spacing: -.02em; margin-top: 4px; font-variant-numeric: tabular-nums;
  color: var(--ember-ink);
}
.calc__sub { font-size: 14px; color: var(--ink-2); margin-top: 4px; }
.calc__math { font-size: 12.5px; color: var(--ink-3); margin: 16px 0 18px; }
.calc__fine { font-size: 12.5px; color: var(--ink-3); margin-top: 12px; }

/* ------------------------------ dark cards ------------------------------ */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.card {
  background: var(--dark-2); border: 1px solid rgba(246,241,232,.1);
  border-radius: var(--r); padding: clamp(20px, 2.2vw, 28px);
}
.card__n {
  font-family: var(--serif); font-size: 30px; color: #E8834F; line-height: 1;
}
.card__h { font-size: 18px; font-weight: 600; margin: 10px 0 8px; }
.card p:last-child { color: var(--on-dark-2); font-size: 15px; }
.dark__foot {
  margin-top: clamp(26px, 3vw, 40px); color: var(--on-dark-2);
  max-width: 70ch; border-left: 3px solid #E8834F; padding-left: 20px;
}

/* ------------------------------ pillars ------------------------------ */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 34px); }
.pillar { border-top: 2px solid var(--ink); padding-top: 20px; }
.pillar__h { font-size: 21px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 10px; }
.pillar p { color: var(--ink-2); font-size: 15.5px; }

.keeps {
  margin-top: clamp(36px, 4vw, 60px); padding: clamp(22px, 2.6vw, 34px);
  background: var(--paper-2); border-radius: var(--r); border: 1px solid var(--rule-soft);
}
.keeps__h { font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.keeps__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.keeps__grid p { font-size: 15px; color: var(--ink-2); }
.keeps__grid strong { color: var(--ink); font-weight: 600; }

/* ------------------------------ proof ------------------------------ */
.proof { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(24px, 3vw, 48px); align-items: start; }
.proof__frame {
  display: block; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--rule); background: #fff;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.proof__frame:hover { transform: translateY(-4px); box-shadow: 0 18px 50px rgba(20,17,14,.14); }
.proof__chrome {
  display: flex; gap: 6px; padding: 11px 14px; background: var(--paper-2);
  border-bottom: 1px solid var(--rule-soft);
}
.proof__chrome span { width: 10px; height: 10px; border-radius: 50%; background: rgba(20,17,14,.16); }
.proof__shot {
  aspect-ratio: 16 / 10; display: grid; align-items: center;
  padding: clamp(22px, 4vw, 54px);
  background:
    radial-gradient(120% 100% at 78% 40%, rgba(226,84,43,.5), transparent 62%),
    radial-gradient(90% 80% at 20% 90%, rgba(233,166,58,.22), transparent 60%),
    #16100C;
  color: #F6EEE2;
}
.proof__eyebrow { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: rgba(246,238,226,.72); }
.proof__title {
  font-family: var(--serif); font-size: clamp(26px, 3.6vw, 46px); line-height: 1.02;
  margin-top: 12px; letter-spacing: -.02em;
}
.proof__title em { font-style: italic; color: #FFD08A; }
.proof__cta {
  margin-top: 20px; display: inline-block; font-size: 13px; font-weight: 500;
  border-bottom: 1px solid rgba(246,238,226,.45); padding-bottom: 3px;
}
.proof__side .btn { margin-top: 20px; }

/* ------------------------------ pricing ------------------------------ */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.plan {
  border: 1px solid var(--rule); border-radius: var(--r);
  padding: clamp(22px, 2.6vw, 32px); background: var(--paper);
}
.plan--feature { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.plan--feature .plan__k { color: #E8834F; }
.plan--feature .plan__sub, .plan--feature .plan__alt { color: var(--on-dark-2); }
.plan--feature .ticks li { color: var(--on-dark-2); }
.plan--perf { background: var(--paper-2); }
.plan__k { font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; }
.plan__price {
  font-family: var(--serif); font-size: clamp(40px, 4.6vw, 56px); line-height: 1.05;
  letter-spacing: -.02em; margin-top: 8px; font-variant-numeric: tabular-nums;
}
.plan__price--sm { font-size: clamp(24px, 2.6vw, 32px); }
.plan__cur { font-size: .55em; vertical-align: .38em; margin-right: 1px; }
.plan__unit { font-size: .38em; color: var(--ink-3); margin-left: 3px; letter-spacing: 0; }
.plan--feature .plan__unit { color: var(--on-dark-2); }
.plan__sub { font-size: 14.5px; color: var(--ink-2); margin-top: 8px; }
.plan__alt { font-size: 13.5px; color: var(--ink-3); margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--rule-soft); }
.plan--feature .plan__alt { border-color: rgba(246,241,232,.14); }
.plan__note { font-size: 14px; color: var(--ink-2); margin-top: 14px; }

/* ------------------------------ faq ------------------------------ */
.faq { display: grid; gap: 2px; }
.q { border-bottom: 1px solid var(--rule); }
.q summary {
  list-style: none; cursor: pointer; padding: 20px 40px 20px 0; position: relative;
  font-size: clamp(17px, 1.3vw, 20px); font-weight: 500; letter-spacing: -.01em;
  min-height: 44px; display: flex; align-items: center;
}
.q summary::-webkit-details-marker { display: none; }
.q summary::after {
  content: ''; position: absolute; right: 6px; top: 50%; width: 13px; height: 13px;
  margin-top: -6px;
  background:
    linear-gradient(var(--ink), var(--ink)) center/13px 1.5px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center/1.5px 13px no-repeat;
  transition: transform .3s var(--ease);
}
.q[open] summary::after { transform: rotate(45deg); }
.q p { padding: 0 0 22px; color: var(--ink-2); max-width: 68ch; }

/* ------------------------------ cta + foot ------------------------------ */
.section--cta { text-align: center; background: var(--paper-2); }
.cta__h { font-family: var(--serif); font-weight: 400; font-size: clamp(34px, 5vw, 56px); letter-spacing: -.02em; line-height: 1.05; }
.cta__p { margin: 18px auto 26px; color: var(--ink-2); max-width: 58ch; }
.cta__fine { margin-top: 14px; font-size: 13.5px; color: var(--ink-3); }

.foot { padding: 30px 0; border-top: 1px solid var(--rule); }
.foot__row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--ink-3); }
.foot__brand { font-family: var(--serif); font-size: 22px; color: var(--ink); }

/* ==================================================================
   RESPONSIVE
================================================================== */

@media (max-width: 1100px) {
  .split { grid-template-columns: 1fr; }
  .calc { position: static; max-width: 560px; }
  .proof { grid-template-columns: 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan--feature { order: -1; }
}

@media (max-width: 900px) {
  .nav__links { display: none; }
  .cards { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; gap: 30px; }
  .keeps__grid { grid-template-columns: 1fr; gap: 14px; }
  .hero__body { grid-template-columns: 1fr; }
  /* the chart drops its "diner pays" column before it drops the bar */
  .row, .axis { grid-template-columns: minmax(120px, 1.2fr) minmax(0, 2.4fr) 70px; }
  .row__paid, .axis__h--paid { display: none; }
}

@media (max-width: 620px) {
  :root { --sect: clamp(56px, 12vw, 84px); }
  .hero__h { font-size: clamp(34px, 10.5vw, 52px); }
  .shead__h { font-size: clamp(30px, 8.6vw, 42px); }
  /* stack the bar under its label so neither gets squeezed */
  .row {
    grid-template-columns: 1fr auto; grid-template-areas: 'name keep' 'track track';
    gap: 6px 12px; padding: 12px 8px;
  }
  .row__name { grid-area: name; }
  .row__keep { grid-area: keep; }
  .row__track { grid-area: track; height: 20px; }
  .axis { display: none; }
  .viz { padding: 16px 14px; }
  .calc__num { font-size: clamp(38px, 12vw, 48px); }
  .btn { width: 100%; }
  .hero__cta .btn { flex: 1 1 100%; }
  .nav__cta { width: auto; }
  .foot__row { flex-direction: column; gap: 6px; }
}

@media (max-width: 380px) {
  .row__name { font-size: 13.5px; }
  .row__name small { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .001ms !important;
  }
  .row__bar { transition: none !important; }
}
