/* ============================================================================
   From Poor to Middle Class — launch page
   Issam Saed design system. Token block is the portable copy from the design
   canvas; do not redefine these values inline anywhere below.
   ========================================================================== */

/* --- Fonts. Variable faces: one file covers every weight the page uses. ---- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter Tight";
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
  src: url("fonts/inter-tight-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* Ground — the page is warm cream, not white */
  --bg-page: #f3efe5;
  --bg-page-top: #d8d2c2;   /* gradient stop, top 240px only */

  /* Panels float ON the ground */
  --panel: #ffffff;
  --panel-dark: #252828;
  --panel-blush: #fbe3e7;

  /* Ink */
  --text: #252828;
  --text-on-dark: #ffffff;
  --text-muted: #5c5952;
  --hairline: #d8d2c2;           /* DIVIDERS ONLY — decorative, exempt from 1.4.11 */
  --border-control: #87806f;     /* control boundaries: 3.93:1 white, 3.22:1 blush */
  --placeholder: #767268;        /* 4.80:1 on white */

  /* Accent — split three ways, deliberately. */
  --accent: #e4002b;             /* FILLS AND RULES ONLY */
  --accent-hover: #b80023;
  --accent-text: #cc0026;        /* red as text on cream/white */
  --accent-text-on-dark: #f45774;/* red as text on black — 4.57:1 on charcoal.
                                    Was #f0143d (3.45:1), which failed AA. */
  --charcoal-hover: #464a4a;
  --teal: #84abb0;               /* reserved secondary */

  /* Type */
  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --lh-hero: 0.9;
  --lh-tiny: 1.05;
  --lh-small: 1.15;
  --lh-medium: 1.3;
  --lh-normal: 1.4;

  /* Radii — five, deliberately */
  --radius-btn: 0;              /* primary buttons are SQUARE */
  --radius-pill: 40px;          /* secondary buttons are PILLS */
  --radius-band: 20px 20px 0 0;
  --radius-panel: 31px;
  --radius-panel-lg: 50px;

  /* Layout */
  --w-prose: 720px;
  --w-wide: 1450px;
  --w-hero: 1040px;             /* hero band only — cover + copy side by side.
                                   Capped here so the copy column stays under
                                   ~80 characters at any viewport width. */

  --header-h: 68px;             /* measured: 16px + 20px content + 16px + border */
  --focus-ring-color: var(--accent-text);  /* 5.09:1 on cream */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------- reset --- */
*,
*::before,
*::after { box-sizing: border-box; }

body,
h1, h2, h3, p, blockquote, figure, ul, ol, dd { margin: 0; }

ul, ol { padding: 0; list-style: none; }

img, svg { display: block; max-width: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: var(--lh-normal);
  color: var(--text);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Every interactive element gets a visible keyboard ring. The design canvas
   set outline:none with no replacement, which made the page unusable by
   keyboard — this is the fix, not a style preference. */
:focus-visible {
  outline: 3px solid var(--focus-ring-color);
  /* The offset is load-bearing: it lands the ring on the page ground instead of
     against a red button fill, where red-on-red would be invisible. */
  outline-offset: 3px;
  border-radius: 2px;
}

/* Recolour the ring by inheritance wherever the ground is charcoal (14.86:1)
   rather than adding a selector per control. */
.site-header,
.site-footer,
.on-dark { --focus-ring-color: var(--text-on-dark); }
:focus:not(:focus-visible) { outline: none; }

/* Sticky header must never cover what the user just jumped to or tabbed to. */
:target,
[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

.skip-link {
  position: absolute;
  left: 12px;
  top: -100px;
  z-index: 100;
  background: var(--panel-dark);
  color: var(--text-on-dark);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  padding: 12px 18px;
  transition: top 150ms var(--ease);
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------------------------------------------------------------- page --- */
.page {
  min-height: 100vh;
  background: linear-gradient(var(--bg-page-top), var(--bg-page) 240px);
  color: var(--text);
}

.wrap {
  max-width: var(--w-prose);
  margin-inline: auto;
}

.stack {
  display: flex;
  flex-direction: column;
}

/* -------------------------------------------------------------- header --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--panel-dark);
  color: var(--text-on-dark);
  padding: 16px max(20px, env(safe-area-inset-right)) 16px max(20px, env(safe-area-inset-left));
}

.brand {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  letter-spacing: 0.04em;
  color: inherit;
  text-decoration: none;
}

/* --------------------------------------------------------------- links --- */
a { color: inherit; }

/* -------------------------------------------------------------- button --- */
.btn {
  display: inline-block;
  border: none;
  cursor: pointer;
  font-family: var(--font-display);
  font-weight: 500;
  border-radius: var(--radius-btn);
  text-decoration: none;
  text-align: center;
  touch-action: manipulation;
  transition: background-color 150ms var(--ease), color 150ms var(--ease);
}
.btn--primary {
  background: var(--accent);
  color: var(--text-on-dark);
}
.btn--primary:hover { background: var(--accent-hover); color: var(--text-on-dark); }
.btn--sm  { font-size: 13px; padding: 10px 18px; position: relative; }
/* The header CTA is 38px tall by design. Extend the hit area to the 44px
   minimum with a pseudo-element so the touch target grows without moving the
   header. */
.btn--sm::after { content: ""; position: absolute; inset: -3px 0; }
.btn--md  { font-size: 15px; padding: 15px 22px; }
.btn--lg  { font-size: 16px; padding: 16px 36px; }
.btn[aria-busy="true"] { opacity: 0.75; cursor: progress; }

/* ---------------------------------------------------------------- type --- */
.h1, .h2, .h3, .quote {
  font-family: var(--font-display);
  font-weight: 500;
  text-wrap: balance;
}
.h1 {
  font-size: clamp(2.4rem, 8vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.h2 {
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  line-height: var(--lh-tiny);
}
.h3 { font-size: 18px; line-height: var(--lh-small); }

.accent-text { color: var(--accent-text); }
.on-dark .accent-text { color: var(--accent-text-on-dark); }

.lead {
  max-width: 560px;
  font-size: 17px;
  line-height: var(--lh-normal);
  color: var(--text-muted);
}
.body-muted { font-size: 16px; line-height: var(--lh-normal); color: var(--text-muted); }
.small-muted { font-size: 15px; line-height: var(--lh-normal); color: var(--text-muted); }
.fine { font-size: 13px; color: var(--text-muted); }

.eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--accent-text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.eyebrow .icon { width: 22px; height: 22px; flex-shrink: 0; }

.rule {
  height: 4px;
  width: 64px;
  background: var(--accent);
}

.icon { fill: currentColor; }

/* ---------------------------------------------------------------- hero --- */
.hero {
  padding: 64px 20px 48px;
  gap: 24px;
  text-align: center;
  align-items: center;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 24px;              /* same rhythm the flat stack had */
  align-items: center;
  width: 100%;
}

.cover {
  width: min(280px, 65vw);
  margin-top: 12px;
}

/* ---------------------------------------------------------------- form --- */
.signup-form { width: 100%; max-width: 440px; }

.field-row {
  display: flex;
  gap: 0;
  flex-wrap: wrap;
}

.field-row input[type="email"] {
  flex: 1;
  min-width: 160px;
  border: 1px solid var(--border-control);
  background: var(--panel);
  color: var(--text);
  padding: 15px 16px;
  font-size: 15px;
  font-family: var(--font-body);
  border-radius: var(--radius-btn);
}
.field-row input[type="email"]::placeholder { color: var(--placeholder); }
.field-row input[type="email"]:focus-visible { outline-offset: -1px; }
.field-row input[type="email"][aria-invalid="true"] { border-color: var(--accent); }

.form-label {
  display: block;
  text-align: left;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.blush .form-label { color: var(--text); }

/* Reserve the row so success/error text never shifts the layout below it. */
.form-status {
  min-height: 22px;
  margin-top: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
}
.form-status:empty { min-height: 22px; }
.form-status[data-state="error"] { color: var(--accent-text); }
.form-status[data-state="success"] { color: var(--accent-text); }
.on-dark .form-status[data-state="error"],
.on-dark .form-status[data-state="success"] { color: var(--accent-text-on-dark); }

/* --------------------------------------------------------------- bands --- */
.band-dark {
  background: var(--panel-dark);
  color: var(--text-on-dark);
  padding: 72px 20px;
}
.band-white { background: var(--panel); padding: 64px 20px; }
.band-plain { padding: 64px 20px; }

.quote-block { gap: 24px; }
.quote {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  line-height: var(--lh-small);
}
.quote-mark { width: 28px; height: 28px; color: var(--accent-text-on-dark); }
.attribution { font-size: 14px; color: rgb(255 255 255 / 0.6); }

/* ------------------------------------------------------------ who/facts --- */
.about { gap: 24px; }

.portrait {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  overflow: hidden;
}

.facts li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
}
.facts .dot {
  min-width: 8px;
  height: 8px;
  background: var(--accent);
  align-self: center;
}
.facts p { font-size: 16px; line-height: var(--lh-normal); }

/* --------------------------------------------------------- social band --- */
.social-band { padding: 0 20px; }
.social-band .panel {
  background: var(--panel-dark);
  color: var(--text-on-dark);
  border-radius: var(--radius-panel);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  align-items: center;
}
.social-title { font-family: var(--font-display); font-weight: 500; font-size: 18px; }
.social-list {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  justify-content: center;
}
.social-list a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-on-dark);
  text-decoration: none;
  transition: color 150ms var(--ease);
}
.social-list a:hover { color: var(--accent-text-on-dark); }
.social-list .icon { width: 26px; height: 26px; }
.social-count {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.social-name {
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgb(255 255 255 / 0.55);
}

/* ------------------------------------------------------------- journey --- */
.journey { padding: 64px 20px; }
.journey .wrap { display: flex; flex-direction: column; gap: 40px; }
.journey figure { display: flex; flex-direction: column; gap: 16px; }
.journey figcaption { display: flex; gap: 16px; }
.journey .bar { width: 4px; background: var(--accent); flex-shrink: 0; }
.journey .caption-text { display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------------- lessons --- */
.lessons .wrap { display: flex; flex-direction: column; gap: 28px; }
.lessons li {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 22px 0;
  border-bottom: 1px solid var(--hairline);
}
.lessons .num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 26px;
  color: var(--accent-text);
  min-width: 40px;
  font-variant-numeric: tabular-nums;
}
.lessons .h3 { margin-bottom: 6px; }
.lessons .more { font-style: italic; font-size: 16px; color: var(--text-muted); }

/* --------------------------------------------------------- lead magnet --- */
.lead-magnet { padding: 64px 20px; }
.lead-magnet .panel {
  background: var(--panel-blush);
  border-radius: var(--radius-panel);
  padding: clamp(28px, 6vw, 56px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: center;
  align-items: center;
}
.lead-magnet .h2 { font-size: clamp(1.7rem, 5.5vw, 2.4rem); }
.lead-magnet .lead { max-width: 480px; }
.lead-magnet .mark { width: 26px; height: 26px; color: var(--accent-text); }

/* -------------------------------------------- lead magnet: what you get --- */
/* A preview of the deliverable, per the lead-magnet-form pattern: show what the
   email actually buys. Pure CSS — no image, no network weight. */
.checklist {
  width: 100%;
  max-width: 380px;
  background: var(--panel);
  border: 1px solid var(--hairline);
  border-radius: 14px;
  padding: 22px 24px 0;
  text-align: left;
  overflow: hidden;
}

.checklist-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 4px;
}

.checklist ol {
  display: flex;
  flex-direction: column;
}

.checklist li {
  display: flex;
  gap: 12px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 14px;
  line-height: var(--lh-small);
}
.checklist li:last-child { border-bottom: 0; }

.checklist .n {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 12px;
  color: var(--accent-text);
  min-width: 18px;
  font-variant-numeric: tabular-nums;
}

/* The six unnamed breakthroughs — redacted bars, decorative only. The visible
   copy already says "+ 6 more inside", so nothing is withheld from a screen
   reader that a sighted reader can read. */
.checklist .locked {
  height: 9px;
  border-radius: 2px;
  background: var(--hairline);
  flex: 1;
  max-width: 78%;
}
.checklist .locked--short { max-width: 58%; }

/* Fade the tail of the list into the card edge. */
.checklist-fade {
  -webkit-mask-image: linear-gradient(#000 35%, transparent 100%);
  mask-image: linear-gradient(#000 35%, transparent 100%);
  padding-bottom: 26px;
}
/* A mask that hides content must never survive into a high-contrast or
   reduced-transparency context. */
@media (prefers-reduced-transparency: reduce), (forced-colors: active) {
  .checklist-fade {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

/* ----------------------------------------------------------------- faq --- */
.faq { padding: 16px 20px 64px; }
.faq .h2 { margin-bottom: 24px; }
.faq details { border-top: 1px solid var(--hairline); }

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 17px;
  touch-action: manipulation;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--accent-text);
  flex-shrink: 0;
}
.faq details[open] summary::after { content: "\2212"; } /* − */
.faq .answer { padding: 0 0 20px; }

/* ------------------------------------------------------------ final CTA --- */
.final-cta { text-align: center; }
.final-cta .wrap {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
}
.final-cta .h2 {
  font-size: clamp(1.9rem, 6.5vw, 3rem);
  line-height: 1;
}

/* -------------------------------------------------------------- footer --- */
.site-footer {
  background: var(--panel-dark);
  color: rgb(255 255 255 / 0.5);
  padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  text-align: center;
  font-size: 13px;
  border-top: 1px solid rgb(255 255 255 / 0.12);
}
.site-footer a { transition: color 150ms var(--ease); }
.site-footer a:hover { color: var(--text-on-dark); }

/* -------------------------------------------------------------- images --- */
/* Every media box reserves its space before the file loads, so nothing on the
   page moves as images arrive. */
.media {
  display: block;          /* <picture> is inline by default */
  position: relative;
  overflow: hidden;
}
.media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Ratios match the fixed box sizes the original design used, so the reserved
   space is identical to the approved layout. */
.media--cover    { aspect-ratio: 20 / 31; }  /* 1200 x 1860 artwork */
/* contain, not cover: the mockup has transparent margins and a spine edge that
   must not be clipped by sub-pixel rounding. */
.media--cover img { object-fit: contain; }
.media--portrait { aspect-ratio: 1 / 1; border-radius: 50%; }
.media--journey  { aspect-ratio: 36 / 17; width: 100%; }  /* 720 x 340 */

/* Placeholder shown until the real photograph is dropped in. Same box, same
   aspect ratio — swapping in the <img> causes no layout change. */
.media--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--hairline);
  border: 1px dashed #bfb8a4;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
}

/* ------------------------------------------------------------- motion --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------- print --- */
@media print {
  .site-header, .skip-link, .signup-form, .social-band { display: none; }
  .page { background: none; }
  .faq details { display: block; }
  .faq .answer { display: block !important; }
}

/* =========================================================== desktop hero ===
   The page's only width breakpoint. Everything above this line is the mobile
   layout and must stay untouched.

   Column 2 is 1fr, never a fixed length: fixed grid tracks do not shrink when
   space runs out, and a 340px + 560px pair overflows the viewport between
   900px and 1100px. The container cap does the line-length work instead.
   ========================================================================== */
@media (min-width: 900px) {
  .hero {
    max-width: var(--w-hero);
    display: grid;
    grid-template-columns: minmax(0, 340px) minmax(0, 1fr);
    column-gap: clamp(32px, 5vw, 72px);
    align-items: center;
    padding: 88px 40px 72px;
    text-align: left;
  }

  /* Two items, one row. The cover is pulled into column 1 while staying LAST in
     the DOM, so the <h1> is still the first thing a crawler or screen reader
     meets. Explicit row placement on both — never `grid-row: 1 / -1`, which
     only spans the explicit grid and silently collapses here. */
  .hero-copy {
    grid-column: 2;
    grid-row: 1;
    align-items: flex-start;
  }
  .hero > .cover {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    max-width: 340px;
    margin-top: 0;
  }

  .hero .eyebrow     { justify-content: flex-start; }
  .hero .form-status { text-align: left; }
}
