/* =========================================================================
   Conversational Freedom · funnel system (system B)
   Dylan's own brand, elevated: paper + ink, a gold button, a highlighter
   under one phrase, Libre Baskerville headlines, Caveat for the notebook hand.
   "html" prefixes keep element rules ahead of the Tailwind reset Base44 injects.
   ========================================================================= */
@font-face { font-family: "Libre Baskerville"; src: url("fonts/baskerville-normal-400-700.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Libre Baskerville"; src: url("fonts/baskerville-italic-400.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter-normal-300-800.woff2") format("woff2"); font-weight: 300 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Caveat"; src: url("fonts/caveat-normal-400-700.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }

:root {
  --paper: #ede6d6;
  --paper-2: #e6dec9;
  --card: #f7f2e7;
  --card-2: #fbf8f1;
  --ink: #1b2130;
  --ink-2: #464b57;
  --ink-3: #5e5d57;
  --gold: #c9a94e;
  --gold-2: #d6b960;
  --hl: #e4d08a;
  --sage: #4d6a62;
  --sage-soft: rgba(126, 155, 146, 0.16);
  --line: rgba(74, 60, 38, 0.17);
  --line-soft: rgba(74, 60, 38, 0.1);
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --hand: "Caveat", "Segoe Print", cursive;
  --radius: 18px;
  --maxw: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html body {
  margin: 0; color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  background: linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%) fixed;
}
/* paper grain, one continuous canvas (no seams between sections) */
html body::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
html img { display: block; max-width: 100%; }
html a { color: inherit; text-decoration: none; }
html h1, html h2, html h3 { margin: 0; font-family: var(--serif); font-weight: 700; letter-spacing: -0.015em; color: var(--ink); }
html h1 { font-size: clamp(30px, 4.6vw, 54px); line-height: 1.12; }
html h2 { font-size: clamp(26px, 3.6vw, 40px); line-height: 1.15; }
html h3 { font-size: 20px; line-height: 1.3; }
html p { margin: 0; }
html em { font-style: italic; }
::selection { background: var(--hl); color: var(--ink); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 860px; }
.section { padding: clamp(64px, 10vh, 104px) 0; position: relative; }
.center { text-align: center; }
.eyebrow { display: inline-block; margin: 0 0 18px; font-size: 12px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase; color: var(--sage); }
.eyebrow .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--sage); margin-right: 10px; vertical-align: 2px; }
.sec-head { text-align: center; max-width: 760px; margin: 0 auto 60px; }
.lead { font-size: clamp(17px, 1.8vw, 20px); color: var(--ink-2); line-height: 1.6; }
.hand { font-family: var(--hand); font-weight: 600; color: var(--sage); }

/* highlighter: the brand's marker pen behind one phrase */
.hl { position: relative; white-space: nowrap; z-index: 0; font-style: italic; }
.hl::before { content: ""; position: absolute; left: -0.12em; right: -0.12em; bottom: 0.06em; height: 0.46em; z-index: -1;
  background: var(--hl); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease) 0.4s; }
.hl.on::before, .no-js .hl::before { transform: scaleX(1); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 16px 34px; border-radius: 999px; border: 0;
  font-family: var(--sans); font-size: 16px; font-weight: 700; letter-spacing: 0.01em; cursor: pointer; position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s var(--ease); }
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 14px 30px -14px rgba(120, 92, 20, 0.55); }
.btn-gold::after { content: ""; position: absolute; inset: 0; transform: translateX(-120%); background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent); transition: transform 0.7s var(--ease); }
.btn-gold:hover { transform: translateY(-2px); background: var(--gold-2); box-shadow: 0 20px 40px -16px rgba(120, 92, 20, 0.6); }
.btn-gold:hover::after { transform: translateX(120%); }
.btn-lg { font-size: 17px; padding: 19px 42px; }
.btn .ar { transition: transform 0.25s var(--ease); }
.btn:hover .ar { transform: translateX(3px); }

/* reveal */
.rv { opacity: 0; transform: translateY(22px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* hero */
.hero { text-align: center; padding: clamp(72px, 12vh, 120px) 0 clamp(56px, 9vh, 96px); position: relative; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.55;
  background: repeating-linear-gradient(180deg, transparent 0 39px, var(--line-soft) 39px 40px);
  -webkit-mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%); mask-image: radial-gradient(70% 70% at 50% 40%, #000, transparent 75%); }
.hero .wrap { position: relative; }
.hero h1 { max-width: 20ch; margin: 0 auto; }
.hero .lead { max-width: 58ch; margin: 24px auto 0; }

/* countdown: kinetic minimal line (variant C), recoloured */
#countdown { margin: 44px auto 0; text-align: center; }
#countdown .cd-when { font-size: 13px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage); margin-bottom: 14px; }
.cd-line { display: flex; gap: 6px; justify-content: center; align-items: flex-start; font-variant-numeric: tabular-nums; }
.cd-line .u { display: flex; flex-direction: column; align-items: center; min-width: 74px; }
.cd-line .g { font-family: var(--serif); font-size: clamp(40px, 7vw, 66px); font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.cd-line .sep { font-family: var(--serif); font-size: clamp(32px, 5vw, 50px); color: var(--ink-3); line-height: 1; padding-top: 4px; }
.cd-line .lbl { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); margin-top: 10px; font-weight: 600; }
.cd-line .g.slide { animation: cd-slide 0.45s cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes cd-slide { 0% { transform: translateY(-12px); opacity: 0.2; } 100% { transform: none; opacity: 1; } }
.cd-bar { height: 5px; border-radius: 99px; background: rgba(27, 33, 48, 0.08); margin: 24px auto 0; max-width: 460px; overflow: hidden; }
.cd-bar > i { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold), var(--hl)); transition: width 1s linear; }
.hero-cta { margin-top: 40px; }

/* pillars: open editorial columns (variant B) */
.ps-B .row { display: grid; grid-template-columns: repeat(3, 1fr); }
.ps-B .col { padding: 10px 34px; text-align: center; }
.ps-B .col + .col { border-left: 1px solid var(--line); }
.ps-B .ghost { font-family: var(--serif); font-style: italic; font-size: 76px; line-height: 1; color: rgba(201, 169, 78, 0.42); margin-bottom: 10px; }
.ps-B .badge { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; margin: 0 auto 4px; background: var(--card); border: 1px solid var(--line); }
.ps-B .badge svg { width: 24px; height: 24px; stroke: var(--sage); stroke-width: 1.7; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.ps-B .pill-t { font-family: var(--serif); font-size: clamp(18px, 1.6vw, 21px); font-weight: 700; line-height: 1.35; margin: 18px 0 10px; }
.ps-B .pill-d { font-size: 15px; line-height: 1.55; color: var(--ink-2); }

/* host: split card (variant A) */
.hs-A .card { background: var(--card); border: 1px solid var(--line); border-radius: 26px; padding: 30px; display: grid; grid-template-columns: minmax(280px, 400px) 1fr; gap: 40px; align-items: center;
  box-shadow: 0 30px 70px -44px rgba(27, 33, 48, 0.45); }
.hs-A .photo { aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; border: 1px solid var(--line); }
.hs-A .photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.hs .name { font-family: var(--serif); font-size: clamp(28px, 3vw, 36px); font-weight: 700; }
.hs .title { color: var(--sage); font-weight: 600; margin: 8px 0 18px; font-size: 15px; }
.hs .bio p + p { margin-top: 12px; }
.hs .bio { color: var(--ink-2); font-size: 16px; line-height: 1.65; }
.hs .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 24px; }
.hs .stat { background: var(--card-2); border: 1px solid var(--line-soft); border-radius: 14px; padding: 18px 12px; text-align: center; }
.hs .stat b { font-family: var(--serif); font-size: 26px; display: block; }
.hs .stat span { color: var(--ink-3); font-size: 13px; line-height: 1.35; display: block; margin-top: 6px; }

/* gift: split (variant A), tilted cover */
.gs-A { display: grid; grid-template-columns: 1fr minmax(300px, 400px); gap: 56px; align-items: center; max-width: 980px; margin: 0 auto; }
.gs .gname { font-family: var(--serif); font-size: clamp(28px, 3.6vw, 44px); font-weight: 700; line-height: 1.12; }
.gs .gval { font-size: clamp(18px, 1.8vw, 22px); color: var(--ink); line-height: 1.45; margin-top: 16px; }
.gs .gdesc { font-size: 16px; color: var(--ink-2); line-height: 1.6; margin-top: 14px; }
.deliver { display: inline-flex; align-items: center; gap: 10px; margin-top: 24px; padding: 12px 20px; border-radius: 99px; font-weight: 600; font-size: 14.5px;
  color: #10632f; background: rgba(37, 211, 102, 0.12); border: 1px solid rgba(37, 211, 102, 0.4); }
.deliver svg { width: 18px; height: 18px; fill: #25d366; }
.gift-cover { transform: rotate(-4deg); transition: transform 0.4s ease; border-radius: 10px; overflow: hidden; box-shadow: 0 34px 60px -30px rgba(27, 33, 48, 0.55); }
.gift-cover:hover { transform: rotate(0); }
.gift-cover { aspect-ratio: 1240 / 1720; }
.gift-cover img { width: 129%; max-width: none; height: auto; margin: -9.7% 0 0 -13.7%; }

/* proof: 8 equal DM cards (real follower words; screenshots to swap in) */
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.dm { background: var(--card-2); border: 1px solid var(--line); border-radius: 16px; padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 12px; min-height: 196px; }
.dm__top { display: flex; align-items: center; gap: 10px; }
.dm__av { width: 30px; height: 30px; border-radius: 50%; flex: none; background: linear-gradient(135deg, #f9ce34, #ee2a7b 55%, #6228d7); }
.dm__who { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.2; }
.dm__who span { display: block; font-weight: 500; color: var(--ink-3); font-size: 12px; }
.dm__msg { font-size: 14.5px; line-height: 1.5; color: var(--ink); background: #efe9db; border-radius: 16px 16px 16px 4px; padding: 11px 13px; }

/* video slots (2-up) */
.vgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; max-width: 920px; margin: 0 auto; }
.vcard { text-align: center; }
.vframe { aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; position: relative; background: var(--ink); border: 1px solid var(--line); display: grid; place-items: center; }
.vframe img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.vplay { position: relative; width: 64px; height: 64px; border-radius: 50%; background: var(--card); color: var(--ink); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); }
.vplay svg { width: 24px; height: 24px; margin-left: 3px; }
.vname { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 20px 0 4px; }
.vdesc { font-size: 14.5px; color: var(--ink-2); margin: 0 auto; max-width: 36ch; }

/* footer: branding-only banner, 1.5x the wordmark height, centred */
.foot { display: flex; align-items: center; justify-content: center; height: 66px; background: var(--ink); color: var(--card); }
.wordmark { display: inline-flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 18px; letter-spacing: -0.01em; line-height: 44px; height: 44px; }
.wordmark i { font-style: italic; color: var(--hl); }
.wordmark svg { width: 22px; height: 22px; }

/* opt-in modal */
.modal-overlay { position: fixed; inset: 0; z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(27, 33, 48, 0.55); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s ease; }
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal { position: relative; width: 100%; max-width: 440px; background: var(--card); border: 1px solid var(--line); border-radius: 24px; padding: 42px 34px 32px;
  box-shadow: 0 40px 100px -30px rgba(27, 33, 48, 0.6); transform: translateY(10px) scale(0.97); opacity: 0; transition: transform 0.3s var(--ease), opacity 0.25s ease; }
.modal-overlay.open .modal { transform: none; opacity: 1; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink); transition: transform 0.2s ease, background 0.2s ease; }
.modal-x:hover { transform: rotate(90deg); background: var(--hl); }
.modal h3 { font-size: 26px; text-align: center; margin-bottom: 8px; }
.modal-sub { text-align: center; color: var(--ink-2); font-size: 15px; margin: 0 0 26px; }
.modal-field { margin-bottom: 14px; }
.modal-field label { display: block; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 7px; }
.modal-field input { width: 100%; min-height: 50px; font: inherit; font-size: 16px; color: var(--ink); background: var(--card-2); border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; outline: none; transition: border-color 0.2s, box-shadow 0.2s; }
.modal-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 169, 78, 0.25); }
.modal-field input.err { border-color: #b4412f; }
.modal-err { color: #9c3524; font-size: 13px; text-align: center; min-height: 18px; margin: 0 0 6px; }
.modal .btn { width: 100%; }

/* ---------------- shared specimen pages (emails, ad scripts) ---------------- */
.doc-hero { text-align: center; padding: clamp(64px, 10vh, 104px) 0 40px; }
.doc-hero h1 { font-size: clamp(30px, 4.2vw, 46px); }
.doc-hero .lead { max-width: 56ch; margin: 18px auto 0; }
.seq { max-width: 760px; margin: 0 auto; padding: 0 20px 96px; display: grid; gap: 26px; }
.email { background: var(--card-2); border: 1px solid var(--line); border-radius: 20px; padding: 30px 32px 28px; box-shadow: 0 24px 50px -40px rgba(27, 33, 48, 0.45); }
.email__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.email__tag { font-size: 12px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage); }
.email__meta { font-size: 12.5px; color: var(--ink-3); }
.email__sl { font-size: 11px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-3); }
.email__subject { font-family: var(--serif); font-size: 22px; line-height: 1.3; margin: 6px 0 4px; }
.email__pv { font-size: 14px; color: var(--ink-3); margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px dashed var(--line); }
.email__body p { margin: 0 0 14px; font-size: 16.5px; line-height: 1.65; }
.email__sign { font-family: var(--hand); font-size: 26px; color: var(--ink); margin-top: 6px; }
.tok-merge { background: rgba(126, 155, 146, 0.2); color: var(--sage); border-radius: 6px; padding: 1px 6px; font-weight: 600; font-size: 0.92em; white-space: nowrap; }
.tok-link { background: rgba(201, 169, 78, 0.22); color: #6f5714; border-radius: 6px; padding: 1px 6px; font-weight: 600; font-size: 0.92em; white-space: nowrap; }
.phase { text-align: center; margin: 22px 0 0; }
.phase span { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-3); padding: 8px 16px; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }

@media (max-width: 900px) {
  .ps-B .row { grid-template-columns: 1fr; gap: 36px; }
  .ps-B .col + .col { border-left: 0; border-top: 1px solid var(--line); padding-top: 36px; }
  .hs-A .card { grid-template-columns: 1fr; padding: 22px; gap: 26px; }
  .gs-A { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  .gift-cover { max-width: 320px; margin: 0 auto; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .vgrid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .cd-line .u { min-width: 54px; }
  .hs .stats { grid-template-columns: 1fr; }
  .proof-grid { grid-template-columns: 1fr; }
  .email { padding: 24px 20px; }
  .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .hl::before { transition: none; transform: scaleX(1); }
  .cd-line .g.slide { animation: none; }
  .gift-cover, .btn, .modal, .modal-overlay { transition: none; }
}

/* ---- mobile hardening (references/mobile.md) ---- */
img, svg, video, canvas, iframe { max-width: 100%; }
p, li, td, th, blockquote, figcaption, h1, h2, h3, h4, h5, h6 { overflow-wrap: anywhere; }
table, pre { display: block; max-width: 100%; overflow-x: auto; }
@media (max-width: 700px) {
  .tag, [class*="badge"], [class*="pill"] { margin-left: 0; }
}
@media (max-width: 420px) {
  .tok-merge, .tok-link, code { white-space: normal; }
}
