/* Outcome-Proof funnel. Tokens and type from brand/brand.md. Mobile first. */

@font-face {
  font-family: 'Archivo';
  src: url('fonts/archivo-var-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('fonts/source-serif-4-var-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('fonts/source-serif-4-var-italic-latin.woff2') format('woff2');
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('fonts/ibm-plex-mono-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}

:root {
  --ink: #121417;
  --ink-2: #1c1f23;
  --paper: #f3f4f1;
  --signal: #e0531f;
  --signal-dark: #c4441a;
  --slate: #5b6470;
  --slate-light: #a3a9b1;
  --rule: #daddd6;
  --white: #ffffff;
  --error: #b3261e;
  --display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;
  --gutter: 20px;
  --shadow: 0 1px 2px rgba(18, 20, 23, 0.06), 0 12px 32px rgba(18, 20, 23, 0.1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 16px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.5;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 3px;
}

h1,
h2 {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  line-height: 1.06;
  margin: 0;
}

h1 {
  font-size: clamp(34px, 9vw, 60px);
  letter-spacing: -0.015em;
}

h1 em {
  font-style: normal;
  color: var(--signal);
}

.label {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 14px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  margin-right: 10px;
  vertical-align: 1px;
}

.subhead {
  font-size: 20px;
  margin: 18px 0 0;
}

.prose p {
  margin: 0 0 1em;
}

/* ---------- Dark bands ---------- */

.dark {
  background: var(--ink);
  color: var(--paper);
}

.dark .label {
  color: var(--slate-light);
}

.dark .subhead {
  color: #c9cdd2;
}

/* ---------- Header and footer ---------- */

.site-header {
  padding: 18px var(--gutter);
  border-bottom: 1px solid var(--rule);
  max-width: 1200px;
  margin: 0 auto;
}

.dark .site-header {
  border-bottom-color: #2a2e33;
}

.brand {
  display: inline-block;
}

.brand img {
  display: block;
  width: 170px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  padding: 24px var(--gutter) 96px;
  border-top: 1px solid var(--rule);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--slate);
}

.site-footer a {
  color: var(--slate);
  margin-left: auto;
}

/* ---------- Buttons ---------- */

.button {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  padding: 17px 22px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 19px;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:active {
  transform: translateY(0);
}

.button:disabled {
  opacity: 0.7;
  cursor: progress;
  transform: none;
}

.button-signal {
  background: var(--signal);
  color: var(--white);
  box-shadow: 0 4px 0 var(--signal-dark);
}

.button-signal:hover {
  background: #e8612f;
}

.button-signal:active {
  box-shadow: 0 2px 0 var(--signal-dark);
}

.button::after {
  content: ' →';
  font-weight: 700;
}

/* ---------- Opt-in hero ---------- */

.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 36px var(--gutter) 0;
  display: grid;
  gap: 36px;
}

.hero-cta {
  margin-top: 28px;
}

.hero-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate-light);
  margin: 16px 0 0;
  text-align: center;
}

.hero-visual {
  position: relative;
  margin: 0 calc(var(--gutter) * -1);
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.desk {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
}

/* The worksheet mockup: real layout of the Branch Map, not an AI render. */
.sheet {
  position: absolute;
  left: 40%;
  top: 6%;
  width: 41%;
  max-width: 330px;
  aspect-ratio: 210 / 297;
  background: var(--white);
  color: var(--ink);
  padding: 5.5% 6%;
  border-radius: 2px;
  transform: rotate(4deg);
  box-shadow: -18px 22px 30px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(0, 0, 0, 0.2);
  font-size: clamp(6px, 1.75vw, 9px);
  line-height: 1.3;
  animation: sheet-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes sheet-in {
  from {
    transform: translate(6%, 10%) rotate(10deg);
    opacity: 0;
  }
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sheet-head img {
  width: 1.9em;
}

.sheet-label {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8em;
  color: var(--slate);
}

.sheet-title {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.85em;
  white-space: nowrap;
  margin: 0.5em 0 0.6em;
}

.sheet-field {
  font-family: var(--display);
  font-weight: 700;
  margin: 0.9em 0 0;
}

.sheet-line {
  display: block;
  height: 1.6em;
  border-bottom: 1px solid #9aa0a6;
}

.sheet-line.short {
  width: 50%;
}

.sheet-table {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0;
  margin-top: 1em;
  border-top: 1.5px solid var(--ink);
}

.sheet-table > * {
  border-bottom: 1px solid #9aa0a6;
  min-height: 2.3em;
  padding: 0.35em 0.4em 0.35em 0;
  font-size: 0.82em;
}

.sheet-table .th {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.68em;
  color: var(--slate);
  min-height: 0;
  padding: 0.5em 0;
}

.sheet-table i + i,
.sheet-table span + i {
  border-left: 1px solid #c3c7cc;
}

.sheet-table .hot {
  background: #fdf0ea;
  border-bottom-color: var(--signal);
}

.sheet-table span.hot {
  box-shadow: inset 2px 0 0 var(--signal);
  padding-left: 0.4em;
  font-weight: 600;
}

/* ---------- Opt-in body ---------- */

.optin {
  display: grid;
  gap: 40px;
  padding: 0 var(--gutter) 64px;
  max-width: 1200px;
  margin: 0 auto;
  grid-template-areas:
    'form'
    'details';
}

.details {
  grid-area: details;
  max-width: 640px;
}

.lede {
  font-size: 22px;
  line-height: 1.4;
}

.details > .label {
  margin-top: 32px;
}

.gets {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 12px;
}

.gets li {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 16px;
}

.get-icon svg {
  display: block;
  width: 52px;
  height: 52px;
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.get-icon .pip {
  fill: var(--signal);
  stroke: none;
}

.for-you {
  font-style: italic;
  font-size: 19px;
  border-left: 3px solid var(--signal);
  padding-left: 16px;
}

.how {
  list-style: none;
  padding: 0;
  margin: 36px 0 0;
  display: grid;
  gap: 14px;
  counter-reset: how;
}

.how li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 17px;
}

.how span,
.inside span:not(.pip-mark) {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--ink);
  border-radius: 8px;
  font-family: var(--mono);
  font-weight: 500;
  font-size: 13px;
}

/* "Sound familiar?" demands and the 2013 story */

.demands {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.demands li {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(22px, 5.6vw, 28px);
  line-height: 1.15;
  padding-left: 18px;
  border-left: 4px solid var(--ink);
}

.demands li:nth-child(2) {
  border-left-color: var(--signal);
}

.demands-note {
  color: var(--slate);
  margin: 0 0 32px;
}

.story {
  margin: 32px 0;
  padding: 24px 22px;
  background: var(--ink);
  color: var(--paper);
  border-radius: 10px;
}

.story .label {
  color: var(--slate-light);
}

.story blockquote {
  margin: 0;
  font-size: 18px;
}

.story blockquote p {
  margin: 0 0 0.9em;
}

.story blockquote p:last-child {
  font-weight: 600;
  color: var(--white);
}

.story figcaption {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #2f343a;
  font-size: 15px;
  color: #c9cdd2;
}

/* ---------- Form ---------- */

.form-card {
  grid-area: form;
  position: relative;
  z-index: 1;
  margin-top: -28px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 5px solid var(--signal);
  border-radius: 10px;
  padding: 24px 20px;
  box-shadow: var(--shadow);
}

.form-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.form-head h2 {
  font-size: 24px;
}

.free-tag {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--ink);
  color: var(--paper);
  padding: 5px 10px;
  border-radius: 999px;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}

input[type='text'],
input[type='email'],
input[type='tel'] {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 13px 14px;
  border: 1.5px solid #b9bec4;
  border-radius: 6px;
  background: var(--paper);
  color: var(--ink);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

input[type='text']:hover,
input[type='email']:hover,
input[type='tel']:hover {
  border-color: var(--slate);
}

input::placeholder {
  color: #8b929b;
}

input:focus-visible {
  outline: 3px solid var(--signal);
  outline-offset: 1px;
  border-color: var(--ink);
  background: var(--white);
}

input[aria-invalid='true'] {
  border-color: var(--error);
}

.hint {
  font-size: 14px;
  color: var(--slate);
  margin: 6px 0 0;
}

.error {
  font-size: 15px;
  color: var(--error);
  margin: 6px 0 0;
}

.error:empty {
  display: none;
}

.consent {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 4px 12px;
  align-items: start;
}

.consent input {
  width: 22px;
  height: 22px;
  margin: 2px 0 0;
  accent-color: var(--ink);
}

.consent label {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.45;
  margin: 0;
}

.consent .error {
  grid-column: 2;
}

.fine {
  font-size: 14px;
  color: var(--slate);
  margin: 14px 0 0;
  text-align: center;
}

/* ---------- Closing band ---------- */

.closing {
  display: grid;
  overflow: hidden;
}

.closing-img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

.closing-copy {
  padding: 32px var(--gutter) 48px;
}

.closing h2 {
  font-size: clamp(30px, 7vw, 46px);
  margin-bottom: 28px;
}

/* ---------- Sticky mobile button ---------- */

.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
  background: rgba(243, 244, 241, 0.94);
  backdrop-filter: blur(8px);
  border-top: 1px solid var(--rule);
}

.sticky-cta .button {
  padding: 14px;
  font-size: 17px;
}

/* ---------- Thank-you page ---------- */

.thanks-head {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px var(--gutter) 72px;
}

.thanks-head h1 {
  font-size: clamp(32px, 8vw, 54px);
}

.progress {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 3px solid #3a3f45;
  color: var(--slate-light);
}

.progress li span {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: 11px;
}

.progress .done {
  border-top-color: var(--paper);
  color: var(--paper);
}

.progress .done span {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.progress .current {
  border-top-color: var(--signal);
  color: var(--paper);
}

.progress .current span {
  border-color: var(--signal);
  color: var(--signal);
}

.thanks {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 var(--gutter) 64px;
}

.offer {
  position: relative;
  margin-top: -44px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.offer-visual {
  position: relative;
  background: var(--ink);
  aspect-ratio: 16 / 11;
  overflow: hidden;
}

.offer-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% 55%;
  opacity: 0.9;
}

/* Playbook mockup: the real stacked logo on a printed page. */
.book {
  position: absolute;
  left: 8%;
  bottom: -6%;
  width: 46%;
  max-width: 240px;
  aspect-ratio: 210 / 297;
  transform: rotate(-5deg);
  font-size: clamp(9px, 2.6vw, 13px);
}

.book-page,
.book-cover {
  position: absolute;
  inset: 0;
  background: var(--paper);
  border-radius: 2px;
}

.book-page.p3 {
  transform: translate(10px, -8px) rotate(4deg);
  background: #e4e6e1;
}

.book-page.p2 {
  transform: translate(5px, -4px) rotate(2deg);
  background: #eceee9;
}

.book-cover {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12%;
  box-shadow: -14px 18px 30px rgba(0, 0, 0, 0.55);
  border: 1px solid #d6d9d2;
}

.book-cover img {
  width: 62%;
}

.book-title {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 1.2em;
  line-height: 1.1;
  margin: 1.1em 0 0.5em;
}

.book-by {
  font-family: var(--mono);
  font-size: 0.62em;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0;
}

.offer-body {
  padding: 26px 20px 28px;
}

.offer-label {
  color: var(--signal-dark);
}

.inside {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  display: grid;
  gap: 10px;
}

.inside li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
}

.inside em {
  display: block;
  font-family: var(--serif);
  font-stretch: normal;
  font-style: normal;
  font-weight: 400;
  font-size: 14px;
  color: var(--slate);
}

.pip-mark {
  flex: none;
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
}

.pip-mark::before {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--signal);
}

.buy-box {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 20px;
}

.price-line {
  font-size: 20px;
  margin: 0 0 14px;
}

.price-line s {
  color: var(--slate);
}

.price-line strong {
  font-family: var(--display);
  font-stretch: 112%;
  font-weight: 800;
  font-size: 30px;
  color: var(--ink);
}

.timer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  margin: 0 0 16px;
}

.timer::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  animation: pulse 1.6s ease-in-out infinite;
}

.timer strong {
  font-weight: 500;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 2px 8px;
  font-variant-numeric: tabular-nums;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

.button-big {
  font-size: clamp(18px, 4.8vw, 20px);
  padding: 19px 22px;
}

.guarantee {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 12px;
  align-items: start;
  font-size: 15px;
  color: var(--slate);
  margin: 18px 0 0;
}

.decline {
  text-align: center;
  margin: 18px 0 0;
  font-size: 15px;
}

.decline a {
  color: var(--slate);
}

.declined {
  margin-top: -44px;
  position: relative;
  padding: 28px 24px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.declined h2 {
  font-size: 30px;
  margin-bottom: 8px;
}

.declined p:last-child {
  margin: 0;
}

/* ---------- Privacy ---------- */

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px var(--gutter) 56px;
}

.placeholder {
  display: inline-block;
  margin-top: 24px;
  padding: 8px 12px;
  border: 2px dashed var(--signal);
  font-family: var(--mono);
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ---------- Wider screens ---------- */

@media (min-width: 900px) {
  :root {
    --gutter: 40px;
  }

  .brand img {
    width: 200px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    align-items: center;
    gap: 48px;
    padding-top: 40px;
    padding-bottom: 72px;
  }

  .hero-cta {
    display: inline-block;
    width: auto;
    padding-left: 34px;
    padding-right: 34px;
  }

  .hero-note {
    text-align: left;
  }

  .hero-visual {
    margin: 0;
    border-radius: 12px;
    aspect-ratio: 1 / 1;
  }

  .sheet {
    left: 36%;
    top: 9%;
    width: 54%;
    max-width: 340px;
    font-size: clamp(7px, 0.75vw, 9.5px);
  }

  .optin {
    grid-template-columns: minmax(0, 1fr) 420px;
    grid-template-areas: 'details form';
    column-gap: 72px;
    padding-top: 64px;
    align-items: start;
  }

  .form-card {
    position: sticky;
    top: 24px;
    margin-top: -120px;
    padding: 30px;
  }

  .closing {
    grid-template-columns: 1fr 1fr;
    align-items: center;
  }

  .closing-img {
    height: 100%;
    aspect-ratio: auto;
    max-height: 520px;
  }

  .closing-copy {
    padding: 48px 64px;
    max-width: 600px;
  }

  .closing .button {
    display: inline-block;
    width: auto;
    padding-left: 34px;
    padding-right: 34px;
  }

  .sticky-cta {
    display: none;
  }

  .site-footer {
    padding-bottom: 32px;
    max-width: none;
  }

  .thanks-head {
    padding-top: 36px;
    padding-bottom: 96px;
  }

  .progress {
    max-width: 440px;
  }

  .offer {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    margin-top: -64px;
  }

  .offer-visual {
    aspect-ratio: auto;
    min-height: 100%;
  }

  .book {
    left: 14%;
    bottom: auto;
    top: 12%;
    width: 60%;
    font-size: clamp(10px, 1.2vw, 14px);
  }

  .offer-body {
    padding: 36px 40px;
  }

  .declined {
    margin-top: -64px;
  }
}

/* ---------- Download page ---------- */

.downloads {
  display: grid;
  gap: 14px;
  margin: 8px 0 18px;
}

#buy-error {
  text-align: center;
  margin-top: 12px;
}
