/* ──────────────────────────────────────────────────────────────────────────
   Vibe Profits — writebook pattern
   Designed as if by the 37signals team that built writebook.
   No mesh gradients, no marquees, no kinetic decoration. Editorial calm.
   ────────────────────────────────────────────────────────────────────────── */

:root {
  /* writebook palette — measured from rendered page */
  --bg: #f7f8f8;
  --ink: #142333;
  --muted: #33485c;
  --soft: #647F94;
  --hairline: #dfe5ea;
  --field: #FFFFFF;

  /* primary action: solid green CTA, writebook style */
  --green: #1F5A36;
  --green-deep: #0F3D22;

  /* writebook type tokens */
  --font-serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --font-size: clamp(22px, 2.225vw, 32px);
  --line-height: 1.3;
  --letter-spacing: -0.0015em;
  --transition: 0.15s cubic-bezier(0.33, 1, 0.68, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
}

body {
  background: var(--bg);
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: var(--font-size);
  line-height: var(--line-height);
  letter-spacing: var(--letter-spacing);
  font-feature-settings: 'liga', 'dlig';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
}

::selection { background: rgba(31,90,54,0.18); color: var(--ink); }

/* ── nav ──────────────────────────────────────────────────────────────── */
.wb-nav {
  background: rgba(247,248,248,0.92);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--hairline);
  position: sticky;
  top: 0;
  z-index: 10;
}
.wb-nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 18px 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.wb-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-serif);
  font-weight: 800;
  font-size: 24px;
  letter-spacing: -0.02em;
}
.wb-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  font-family: var(--font-serif);
}
.wb-nav-links {
  display: flex;
  gap: 28px;
  font-size: 17px;
  font-weight: 500;
  color: var(--muted);
}
.wb-nav-links a {
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition);
}
.wb-nav-links a:hover { color: var(--ink); }
@media (max-width: 720px) {
  .wb-nav-links { display: none; }
}

/* ── shell + sections ─────────────────────────────────────────────────── */
.wb-shell {
  max-width: 1280px;
  margin: 0 auto;
  padding: 64px 36px 96px;
}

.wb-section {
  max-width: 780px;
  margin: 96px 0 0;
  padding: 0;
}
.wb-section:first-of-type { margin-top: 96px; }

.wb-section h2 {
  margin: 0 0 32px;
}
.wb-section h3 {
  margin: 48px 0 16px;
}
.wb-section p {
  margin: 0 0 28px;
  max-width: 720px;
}
.wb-section ul {
  margin: 0 0 32px;
  padding: 0 0 0 1.2em;
}
.wb-section ul li {
  margin-bottom: 14px;
  max-width: 720px;
}

/* ── hero ─────────────────────────────────────────────────────────────── */
.wb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 80px;
  margin-top: 64px;
  align-items: start;
}
@media (max-width: 1024px) {
  .wb-hero { grid-template-columns: 1fr; gap: 48px; }
}

.wb-hero-content {
  max-width: 760px;
}

.wb-hero h1 {
  margin: 0 0 28px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.wb-hero h2 {
  margin: 0 0 30px;
  max-width: 720px;
}
.wb-hero p {
  margin: 0 0 28px;
  max-width: 720px;
}
.wb-hero p a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.0625em;
}

/* version pill (Cohort 01) */
.wb-version-pill {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  letter-spacing: 0;
  align-self: center;
  white-space: nowrap;
}

/* ── typography ──────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.1;
  font-weight: 800;
  margin: 0 0 24px;
}

h1 {
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 800;
}

h2 {
  font-size: clamp(30px, 3.2vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 700;
}

h3 {
  font-size: clamp(22px, 1.8vw, 28px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 700;
}

p, li {
  font-family: var(--font-serif);
  font-size: var(--font-size);
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--muted);
}

p strong, p b, li strong, li b {
  color: var(--ink);
  font-weight: 700;
}

p em, li em, h1 em, h2 em, h3 em {
  font-style: italic;
  color: inherit;
}
h1 em, h2 em, h3 em { color: var(--ink); }

a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.0625em;
}

/* ── buy panel (right side of hero) ──────────────────────────────────── */
.wb-buy {
  position: sticky;
  top: 96px;
  background: var(--field);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  box-shadow:
    0 1px 0 rgba(20,35,51,0.04),
    0 22px 60px -20px rgba(20,35,51,0.18);
  overflow: hidden;
}

.wb-buy-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid var(--hairline);
  background: rgba(247,248,248,0.55);
}
.wb-buy-title,
.wb-buy-price {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.wb-buy-price { font-size: 18px; color: var(--muted); font-weight: 600; }

.wb-buy-body { padding: 24px 26px 26px; }
.wb-buy-body h3 {
  margin: 0 0 16px;
  font-size: 20px;
  line-height: 1.2;
  font-weight: 800;
  color: var(--ink);
}

.wb-buy-list {
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}
.wb-buy-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 10px;
  font-size: 17px;
  line-height: 1.4;
  color: var(--muted);
}
.wb-buy-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 12px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
}
.wb-buy-list li strong { color: var(--ink); }

.wb-buy-form { display: grid; gap: 10px; margin-bottom: 16px; }
.wb-buy-form input[type=email] {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 17px;
  color: var(--ink);
  background: var(--field);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wb-buy-form input[type=email]:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31,90,54,0.14);
}

.wb-buy-foot {
  font-size: 15px;
  line-height: 1.4;
  color: var(--muted);
  margin: 0;
}
.wb-buy-foot a { color: var(--ink); }

/* ── CTA buttons ─────────────────────────────────────────────────────── */
.wb-cta {
  display: block;
  width: 100%;
  background: var(--green);
  color: #fff;
  border: 0;
  padding: 18px 24px;
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.005em;
  border-radius: 8px;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  min-height: 60px;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.18),
    0 8px 22px -10px rgba(31,90,54,0.55);
}
.wb-cta:hover {
  background: var(--green-deep);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.22),
    0 14px 28px -10px rgba(31,90,54,0.6);
}
.wb-cta:active { transform: translateY(1px) scale(0.99); }
.wb-cta:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 3px;
}

/* ── apply form (full-width section) ─────────────────────────────────── */
.wb-form {
  max-width: 720px;
  display: grid;
  gap: 20px;
  margin: 32px 0;
}
.wb-form-row {
  display: grid;
  gap: 8px;
}
.wb-form label {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}
.wb-form input,
.wb-form select,
.wb-form textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  font-family: var(--font-serif);
  font-size: 18px;
  line-height: 1.4;
  color: var(--ink);
  background: var(--field);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.wb-form textarea { resize: vertical; min-height: 110px; }
.wb-form input:focus,
.wb-form select:focus,
.wb-form textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(31,90,54,0.14);
}
.wb-form-foot {
  font-size: 16px;
  color: var(--muted);
  margin: 12px 0 0;
}

/* ── success state ────────────────────────────────────────────────────── */
.wb-success {
  max-width: 720px;
  padding: 32px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--field);
  margin: 32px 0;
}
.wb-success h3 { margin: 0 0 12px; font-size: 26px; }
.wb-success p { margin: 0; }

/* ── footer ───────────────────────────────────────────────────────────── */
.wb-foot {
  margin-top: 120px;
  padding-top: 32px;
  border-top: 1px solid var(--hairline);
  font-size: 16px;
  color: var(--soft);
}
.wb-foot a { color: var(--soft); font-weight: 500; }
.wb-foot a:hover { color: var(--ink); }

/* ── accessibility helpers ───────────────────────────────────────────── */
.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;
}

/* ── reduced motion ──────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ── nuke any legacy decorative elements that might still be in DOM ──── */
.mesh-bg, .noise-overlay, .scroll-progress, .cursor-orb, .easter-toast,
.back-to-top, .sticky-header, .marquee, .giant-mark, .press-tile,
.press-aside, .hero-photo-aside { display: none !important; }
