/* ===================================================================
   Inspired Environment — landing page styles
   Aesthetic: editorial / data-journalism. Anti-corporate. Paper + ink.
   =================================================================== */

:root {
  /* Paper-cream palette — warm, not white */
  --paper:        #f1ebde;
  --paper-deep:   #e8dfcc;
  --paper-shadow: #d9cdb3;

  --ink:        #1a1611;
  --ink-soft:   #2d281f;     /* darker — was #3a342a, more contrast on cream */
  --ink-faint:  #4f4839;     /* darker — was #756a5a, now ~7:1 on cream */
  --rule:       #b8ad96;     /* slightly darker rule */

  /* Single saturated accent — burnt sienna, like a fountain pen mark */
  --mark:       #c84b1f;
  --mark-deep:  #9c3814;

  /* Highlighter for stat callouts — old-school yellow legal pad */
  --highlight:  #f4d35e;

  /* Type */
  --display: "Instrument Serif", "Times New Roman", Times, serif;
  --body:    "Newsreader", "Iowan Old Style", Georgia, serif;
  --mono:    "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  /* Editorial easing */
  --ease: cubic-bezier(0.2, 0.65, 0.2, 1);

  /* Layout */
  --container: 1240px;
  --container-narrow: 760px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

/* ---- Reset (minimal) ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, ol, ul, figure, blockquote {
  margin: 0;
  padding: 0;
}
ol, ul { list-style: none; }
button { font: inherit; cursor: pointer; }
input, textarea, button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ---- Base ---- */
html { background: var(--paper); }
body {
  font-family: var(--body);
  font-weight: 400;
  font-optical-sizing: auto;
  font-feature-settings: "kern", "liga";  /* dropped onum (old-style figures) — they reduce legibility for some readers */
  font-size: clamp(18px, 1vw + 15px, 20px);  /* up from 17/19 */
  line-height: 1.6;  /* up from 1.55 */
  color: var(--ink);
  background: var(--paper);
  background-image:
    radial-gradient(ellipse 60% 40% at 15% 0%, rgba(200, 75, 31, 0.06), transparent 60%),
    radial-gradient(ellipse 70% 50% at 90% 110%, rgba(26, 22, 17, 0.06), transparent 65%),
    url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' seed='4'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.07 0'/></filter><rect width='240' height='240' filter='url(%23n)'/></svg>");
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--mark); color: var(--paper); }

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow {
  max-width: var(--container-narrow);
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  position: relative;
}
.section + .section {
  border-top: 1px solid var(--rule);
}

.section__eyebrow {
  color: var(--mark);
  font-family: var(--mono);
  font-size: 11px;
  margin-bottom: 1.75rem;
}

.section__heading {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  max-width: 22ch;
}
.section__heading--display {
  font-size: clamp(2.5rem, 6vw, 4.75rem);
  max-width: none;
  margin-bottom: 3rem;
}

/* ---- Utility ---- */
.smallcaps {
  font-family: var(--mono);
  font-size: 12px;            /* up from 11 */
  letter-spacing: 0.12em;     /* down from 0.18 — tighter is more readable */
  text-transform: uppercase;
  font-weight: 500;
}

.italic { font-style: italic; font-family: var(--display); }

/* Hand-drawn pen-mark underline */
.pen-mark {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 8' preserveAspectRatio='none'><path d='M2 5 Q 50 2 100 5 T 198 4' stroke='%23c84b1f' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 0.4em;
  padding-bottom: 0.1em;
}

/* Highlighter background bar */
.highlighter {
  background: linear-gradient(180deg, transparent 55%, rgba(244, 211, 94, 0.62) 55%);
  padding: 0 0.05em;
}

/* Drop cap */
.drop-cap::first-letter {
  font-family: var(--display);
  font-style: italic;
  font-size: 5.4em;
  line-height: 0.85;
  float: left;
  margin: 0.07em 0.1em -0.08em 0;
  color: var(--mark);
}

/* ===================================================================
   STICKY TOPBAR
   Travels with scroll. Hides when the diagnostic form enters viewport.
   =================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(241, 235, 222, 0.92);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  border-bottom: 1px solid var(--rule);
  transition: transform 0.4s var(--ease), opacity 0.3s var(--ease);
  will-change: transform;
}
.topbar--hide {
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
}

.topbar__inner {
  max-width: var(--container);
  margin-inline: auto;
  padding: 0.75rem var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 2.75rem;
}

.topbar__brand {
  color: var(--ink);
  font-weight: 500;
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
}
.topbar__brand:hover { color: var(--mark); }

.topbar__date {
  color: var(--ink-faint);
  margin-left: 0.4em;
}

.topbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1rem, 1.2vw, 1.2rem);
  color: var(--ink);
  padding: 0.25rem 0.1rem 0.3rem;
  border-bottom: 1.5px solid var(--mark);
  line-height: 1;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), background 0.2s var(--ease);
}
.topbar__cta:hover {
  color: var(--mark);
}
.topbar__cta-arrow {
  font-style: normal;
  font-family: var(--body);
  display: inline-block;
  transition: transform 0.25s var(--ease);
}
.topbar__cta:hover .topbar__cta-arrow {
  transform: translateX(4px);
}
.topbar__cta-short { display: none; }

@media (max-width: 600px) {
  .topbar__cta-label { display: none; }
  .topbar__cta-short { display: inline; }
  .topbar__date { display: none; }
}

/* ===================================================================
   MASTHEAD
   =================================================================== */

.masthead {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
  position: relative;
}

.masthead__headline {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.75rem, 8vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}
.masthead__headline > span {
  display: block;
}
.masthead__headline .italic {
  font-style: italic;
  color: var(--ink-soft);
}

.masthead__lede {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  max-width: 60ch;
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--ink-soft);
}

.masthead__lede p:first-child {
  /* dropped italic — body text in italic is harder to read; keep the editorial border accent */
  font-family: var(--body);
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  color: var(--ink);
  border-left: 2px solid var(--mark);
  padding-left: 1.25rem;
  font-weight: 400;
}

.masthead__sources {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 12px;             /* up from 11 */
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  text-transform: none;
}
.masthead__sources a {
  color: inherit;
  border-bottom: 1px dotted var(--ink-faint);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.masthead__sources a:hover {
  color: var(--mark);
  border-bottom-color: var(--mark);
}

.masthead__rule {
  margin-top: clamp(3rem, 6vw, 5rem);
  height: 1px;
  background: var(--rule);
}

/* ===================================================================
   SECTION I — THE NUMBERS
   =================================================================== */

.section--numbers {
  padding-top: clamp(4rem, 8vw, 6rem);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 4vw, 3.5rem) clamp(2rem, 5vw, 4.5rem);
  margin-bottom: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 900px) {
  .stat-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.stat {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  border-top: 2px solid var(--ink);
  padding-top: 1.25rem;
}

.stat__figure {
  font-family: var(--display);
  font-size: clamp(4.5rem, 9vw, 7.5rem);
  line-height: 0.85;
  letter-spacing: -0.04em;
  color: var(--ink);
  display: flex;
  align-items: baseline;
}
.stat__unit {
  font-size: 0.45em;
  color: var(--ink-soft);
  margin-left: 0.05em;
}
.stat__prefix {
  font-size: 0.55em;
  color: var(--ink-soft);
  margin-right: 0.02em;
}

.stat figcaption {
  font-size: 1rem;             /* up from 0.95 */
  line-height: 1.5;            /* up from 1.45 */
  color: var(--ink-soft);
  max-width: 28ch;
}

.stat cite {
  font-style: normal;
  font-size: 12px;             /* up from 10 — citations were too small */
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: 0.5rem;
}

.section__pullquote {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.25;
  color: var(--ink);
  max-width: 32ch;
  border-left: 2px solid var(--mark);
  padding-left: 1.5rem;
  margin-top: clamp(2rem, 4vw, 3rem);
}

/* ===================================================================
   SECTION II — REFRAME
   =================================================================== */

.section--reframe {
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(200, 75, 31, 0.04), transparent 70%),
    var(--paper);
}

.prose {
  font-size: clamp(1.1rem, 1.3vw, 1.25rem);
  line-height: 1.7;
  color: var(--ink);           /* up from ink-soft — body should be highest-contrast */
}
.prose p + p { margin-top: 1.4em; }
.prose em { font-style: italic; color: var(--ink); }
.prose strong { font-weight: 600; color: var(--ink); }

/* ===================================================================
   SECTION III — METHOD
   =================================================================== */

.method {
  display: flex;
  flex-direction: column;
  gap: clamp(3rem, 6vw, 5rem);
}

.method__step {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2rem;
  border-top: 1px solid var(--rule);
  padding-top: clamp(2rem, 4vw, 2.5rem);
  align-items: start;
}
.method__step:first-child {
  border-top-color: var(--ink);
  border-top-width: 2px;
}

@media (min-width: 900px) {
  .method__step {
    grid-template-columns: 4rem minmax(0, 1fr) 16rem 14rem;
    gap: 2rem;
  }
}
@media (min-width: 1200px) {
  .method__step {
    grid-template-columns: 5rem minmax(0, 1fr) 18rem 15rem;
  }
}

.method__numeral {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(3.5rem, 6vw, 5rem);
  line-height: 0.85;
  color: var(--mark);
  letter-spacing: -0.02em;
  min-width: 4ch;
}

.method__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.01em;
  margin-bottom: 0.85rem;
  color: var(--ink);
}

.method__lede {
  font-size: clamp(1.1rem, 1.3vw, 1.25rem);
  line-height: 1.55;
  color: var(--ink);           /* up from ink-soft */
  max-width: 36ch;
}

.method__exhibit {
  margin: 0;
  width: 100%;
  align-self: start;
}
.method__exhibit svg {
  width: 100%;
  height: auto;
  display: block;
}
@media (min-width: 900px) {
  .method__exhibit {
    margin-top: 0.25rem;     /* nudges exhibit baseline closer to the title */
  }
}

.method__note {
  border-left: 1px solid var(--rule);
  padding-left: 1.25rem;
  font-size: 0.98rem;          /* up from 0.92 */
  line-height: 1.6;            /* up from 1.55 */
  color: var(--ink-soft);      /* up from ink-faint — readability over decoration */
  /* dropped italic body */
}
.method__note .smallcaps {
  display: block;
  font-style: normal;
  color: var(--mark);
  margin-bottom: 0.5rem;
}
.method__note strong {
  color: var(--ink-soft);
  font-weight: 600;
  font-style: normal;
}

/* ===================================================================
   SECTION IV — AUDIENCE
   =================================================================== */

.audience__not-for {
  margin-top: clamp(2.5rem, 4vw, 3.5rem);
  padding: 1.5rem 1.75rem;
  background: var(--paper-deep);
  border: 1px solid var(--rule);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  align-items: baseline;
}
.audience__not-for .smallcaps {
  color: var(--mark);
  white-space: nowrap;
}
.audience__not-for p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-soft);
  /* dropped italic — body italic hurts readability */
}

@media (max-width: 600px) {
  .audience__not-for {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
}

/* ===================================================================
   SECTION V — FOUNDER
   =================================================================== */

.section--founder {
  background:
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
}

.founder__quote {
  border-left: 3px solid var(--mark);
  padding-left: clamp(1.25rem, 3vw, 2.5rem);
}
.founder__quote p {
  /* swapped from display serif to body serif — display serif at body size hurts long-form readability */
  font-family: var(--body);
  font-size: clamp(1.2rem, 1.8vw, 1.4rem);
  line-height: 1.55;
  color: var(--ink);
  font-weight: 400;
}
.founder__quote p + p { margin-top: 1.2em; }

.founder__credentials {
  font-style: italic;
  color: var(--mark);
}

.founder__sig {
  margin-top: 2rem;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}
.founder__name {
  font-family: var(--display);
  font-style: italic;
  font-size: 2.25rem;
  line-height: 1;
  color: var(--ink);
}
.founder__role {
  color: var(--ink-faint);
}

/* ===================================================================
   SECTION VI — CTA / FORM
   =================================================================== */

.section--cta {
  background: var(--ink);
  color: var(--paper);
  border-top: 1px solid var(--ink) !important;
}
.section--cta .section__eyebrow {
  color: var(--highlight);
}
.section--cta .section__heading {
  color: var(--paper);
}
.section--cta .section__heading::after {
  content: "";
  display: block;
  width: 4ch;
  height: 2px;
  background: var(--mark);
  margin-top: 1.5rem;
}

.cta__lede {
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.55;
  color: rgba(241, 235, 222, 0.75);
  max-width: 50ch;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.intake {
  border-top: 1px solid rgba(241, 235, 222, 0.25);
  border-bottom: 1px solid rgba(241, 235, 222, 0.25);
}

.field {
  display: block;
  padding: 1.5rem 0;
  border-bottom: 1px solid rgba(241, 235, 222, 0.12);
  position: relative;
}
.field:last-of-type { border-bottom: none; }

.field__label {
  display: block;
  color: rgba(244, 211, 94, 0.85);
  margin-bottom: 0.85rem;
}

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  outline: 0;
  color: var(--paper);
  font-family: var(--body);
  font-size: clamp(1.15rem, 1.6vw, 1.45rem);
  line-height: 1.4;
  padding: 0;
  resize: none;
  font-weight: 400;
}
.field input::placeholder,
.field textarea::placeholder {
  color: rgba(241, 235, 222, 0.32);
  font-style: italic;
}
.field--textarea textarea {
  display: block;
}
.field input:focus-visible,
.field textarea:focus-visible {
  outline: 0;
  border-bottom-color: var(--highlight);
}

.intake__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  padding-top: 1.75rem;
  padding-bottom: 1.75rem;
}

.intake__note {
  color: rgba(241, 235, 222, 0.55);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: var(--paper);
  color: var(--ink);
  border: 0;
  padding: 1rem 1.75rem 1.05rem;
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover {
  background: var(--mark);
  color: var(--paper);
}
.btn:active { transform: translateY(1px); }
.btn__arrow {
  display: inline-block;
  font-style: normal;
  transition: transform 0.25s var(--ease);
}
.btn:hover .btn__arrow {
  transform: translateX(5px);
}
.btn:disabled {
  opacity: 0.55;
  cursor: progress;
}

.intake__error {
  color: var(--highlight);
  font-size: 0.95rem;
  padding: 1rem 0 0;
  font-style: italic;
}
.intake__error a {
  color: var(--highlight);
  border-bottom: 1px solid currentColor;
}

.intake__success {
  border-top: 1px solid rgba(241, 235, 222, 0.25);
  border-bottom: 1px solid rgba(241, 235, 222, 0.25);
  padding: clamp(3rem, 6vw, 5rem) 0;
  text-align: center;
}
.intake__success-headline {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1.2;
  color: var(--paper);
  margin-bottom: 1rem;
}
.intake__success .smallcaps {
  color: rgba(244, 211, 94, 0.7);
}

/* ===================================================================
   FOOTER
   =================================================================== */

.footer {
  background: var(--paper);
  padding: clamp(3.5rem, 6vw, 5rem) 0 clamp(2rem, 3vw, 3rem);
  border-top: 1px solid var(--rule);
  font-size: 0.92rem;
}

.footer__grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  grid-template-columns: 1fr;
  margin-bottom: clamp(3rem, 5vw, 4rem);
}
@media (min-width: 720px) {
  .footer__grid {
    grid-template-columns: 1fr 1.5fr;
  }
}

.footer__label {
  color: var(--mark);
  margin-bottom: 1rem;
}

.footer__tag {
  font-family: var(--display);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  line-height: 1.3;
  color: var(--ink);
  max-width: 28ch;
  margin-bottom: 1.25rem;
}

.footer__contact {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: flex-start;
}
.footer__contact a {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink);
  border-bottom: 1px dotted var(--ink-faint);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.footer__contact a:hover {
  color: var(--mark);
  border-bottom-color: var(--mark);
}

.intake__phone {
  color: rgba(244, 211, 94, 0.85);
  border-bottom: 1px dotted currentColor;
  padding-bottom: 1px;
  transition: color 0.2s var(--ease);
}
.intake__phone:hover {
  color: var(--paper);
}

.footer__sources {
  list-style: decimal inside;
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--ink-soft);
  counter-reset: source;
}
.footer__sources li {
  list-style: none;
  padding-left: 0;
  margin-bottom: 0.45rem;
  counter-increment: source;
}
.footer__sources li::before {
  content: counter(source) ".  ";
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
  margin-right: 0.35em;
}
.footer__sources a {
  color: var(--ink-soft);
  border-bottom: 1px dotted var(--ink-faint);
  padding-bottom: 1px;
  transition: color 0.2s var(--ease);
}
.footer__sources a:hover { color: var(--mark); }

.footer__bottom {
  border-top: 1px solid var(--rule);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  color: var(--ink-faint);
}

/* ===================================================================
   ENTRANCE ANIMATION (masthead only — restraint)
   =================================================================== */

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes underline {
  from { background-size: 0% 0.4em; }
  to   { background-size: 100% 0.4em; }
}

.rise {
  opacity: 0;
  animation: rise 1.05s var(--ease) both;
}
.r-1 { animation-delay: 0.05s; }
.r-2 { animation-delay: 0.25s; }
.r-3 { animation-delay: 0.5s; }
.r-4 { animation-delay: 0.75s; }
.r-5 { animation-delay: 1s; }
.r-6 { animation-delay: 1.4s; }

.pen-animate {
  background-size: 0% 0.4em;
  animation: underline 1.4s var(--ease) 1.6s forwards;
}

@media (prefers-reduced-motion: reduce) {
  .rise, .pen-animate {
    animation: none !important;
    opacity: 1 !important;
    background-size: 100% 0.4em !important;
  }
}

/* ===================================================================
   FOCUS STATES
   =================================================================== */

a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--mark);
  outline-offset: 4px;
  border-radius: 1px;
}

input:focus-visible,
textarea:focus-visible {
  outline: 0;
  box-shadow: inset 0 -1px 0 0 var(--highlight);
}
