/* ============ TOKENS ============ */
:root {
  --ink: #211c17;
  --ink-soft: #4a4038;
  --cream: #f6f1e7;
  --cream-deep: #ece3d2;
  --charcoal: #211c17;
  --charcoal-soft: #2c261f;
  --gold: #b9812f;
  --gold-bright: #d69a3f;
  --line: #e2d7c3;
  --line-dark: #3c342b;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 14px;
  --shadow-soft: 0 20px 50px -20px rgba(33, 28, 23, 0.35);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.center { text-align: center; }

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 500; margin: 0 0 .5em; color: var(--ink); }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; font-weight: 500; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); line-height: 1.15; }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--font-body);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0 0 .9em;
}

.section { padding: 96px 0; }
.section-lede { font-size: 1.12rem; color: var(--ink-soft); max-width: 620px; }
.section-lede.center { margin-left: auto; margin-right: auto; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--charcoal); color: var(--cream); }
.btn-primary:hover { background: var(--gold); color: var(--charcoal); transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-dark); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.logo { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; text-decoration: none; color: var(--ink); }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { text-decoration: none; color: var(--ink-soft); font-weight: 500; font-size: .96rem; }
.main-nav a:hover { color: var(--gold); }
.nav-cta {
  background: var(--charcoal); color: var(--cream) !important;
  padding: 10px 22px; border-radius: 999px; font-weight: 600;
}
.nav-cta:hover { background: var(--gold); color: var(--charcoal) !important; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); display: block; }

/* ============ NESTED NAV DROPDOWN (Live Demo) ============ */
.nav-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none; border: none; cursor: pointer; font-family: inherit;
  color: var(--ink-soft); font-weight: 500; font-size: .96rem;
  display: flex; align-items: center; gap: 4px; padding: 0;
}
.nav-dropdown-toggle:hover { color: var(--gold); }
.nav-dropdown-caret { transition: transform .15s ease; flex-shrink: 0; }
.nav-dropdown.open .nav-dropdown-caret { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-soft); padding: 8px; min-width: 210px;
  display: none; flex-direction: column; z-index: 50;
}
.nav-dropdown.open .nav-dropdown-menu { display: flex; }
.nav-dropdown-menu a {
  padding: 10px 14px; border-radius: 8px; white-space: nowrap;
  color: var(--ink-soft) !important; text-decoration: none; font-size: .92rem; font-weight: 500;
}
.nav-dropdown-menu a:hover { background: var(--cream-deep); color: var(--gold) !important; }

/* ============ HERO ============ */
.hero { padding: 88px 0 110px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-sub { font-size: 1.14rem; color: var(--ink-soft); max-width: 520px; }
.hero-actions { display: flex; gap: 14px; margin-top: 32px; flex-wrap: wrap; }

.hero-visual { position: relative; }
.tape-glow {
  position: absolute; inset: -40px;
  background: radial-gradient(circle at 30% 30%, rgba(214,154,63,.35), transparent 60%);
  filter: blur(30px);
  z-index: 0;
}
.mock-player { position: relative; z-index: 1; }
.mock-player-frame {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #3a2f22, #211a13 60%);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(255,255,255,0.06);
}
.mock-player-frame .grain {
  position: absolute; inset: 0;
  background-image: repeating-radial-gradient(circle at 20% 30%, rgba(255,255,255,.05) 0, transparent 2px),
                     repeating-radial-gradient(circle at 70% 60%, rgba(255,255,255,.04) 0, transparent 2px);
  background-size: 6px 6px, 9px 9px;
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 12px 8px, -10px 6px; }
}
.mock-timestamp {
  position: absolute; left: 16px; bottom: 16px;
  font-family: 'Courier New', monospace;
  color: #f0d9a8;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-shadow: 0 1px 6px rgba(0,0,0,.5);
}
.mock-scrubber {
  position: relative; height: 6px; border-radius: 999px;
  background: var(--line-dark, #3c342b);
  margin-top: 18px;
}
.mock-scrubber-fill {
  position: absolute; left: 0; top: 0; bottom: 0; width: 38%;
  background: var(--gold); border-radius: 999px;
}
.mock-scrubber-marker {
  position: absolute; top: 50%; width: 10px; height: 10px;
  background: var(--cream); border: 2px solid var(--gold);
  border-radius: 50%; transform: translate(-50%, -50%);
}

/* ============ WHY KEEPFRAME (EXPLAINER) ============ */
.why-explainer { background: var(--cream); }
.explainer-video-wrap {
  position: relative; max-width: 760px; margin: 32px auto 0;
  aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow-soft); background: var(--charcoal);
}
.explainer-placeholder {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: linear-gradient(135deg, #3a3128, #211c17 65%);
}
.explainer-placeholder-note { color: rgba(246,241,231,.6); font-size: .85rem; }

/* ============ BEFORE / AFTER ============ */
.before-after { background: var(--cream-deep); }
.compare-mode-toggle {
  display: flex; justify-content: center; gap: 6px;
  max-width: 760px; margin: 32px auto 0;
}
.compare-mode-btn {
  border: 1px solid var(--line); background: var(--cream); color: var(--ink-soft);
  font-size: .85rem; font-weight: 600; padding: 8px 18px; border-radius: 999px;
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.compare-mode-btn:hover { color: var(--ink); }
.compare-mode-btn.active { background: var(--charcoal); color: var(--cream); border-color: var(--charcoal); }
.compare {
  position: relative;
  max-width: 760px; margin: 48px auto 0;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  cursor: ew-resize;
  user-select: none;
}
.compare-after, .compare-before { position: absolute; inset: 0; }
.compare-before { width: 55%; overflow: hidden; border-right: 2px solid var(--cream); }
.compare-fill { position: absolute; inset: 0; width: 760px; max-width: none; height: 100%; object-fit: cover; pointer-events: none; }
.compare-label {
  position: absolute; top: 16px; font-size: .78rem; font-weight: 700;
  letter-spacing: .1em; text-transform: uppercase;
  background: rgba(33,28,23,.65); color: #fff; padding: 6px 12px; border-radius: 999px;
}
.compare-label-after { right: 16px; }
.compare-label-before { left: 16px; }
.compare-handle { position: absolute; top: 0; bottom: 0; left: 55%; width: 0; transform: translateX(-50%); z-index: 5; }
.compare-handle-line { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; background: var(--cream); transform: translateX(-50%); }
.compare-handle-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--cream); color: var(--ink);
  display: flex; align-items: center; justify-content: center; gap: 4px;
  box-shadow: 0 4px 14px rgba(0,0,0,.3);
}
.compare-note { text-align: center; font-size: .85rem; color: var(--ink-soft); opacity: .75; margin-top: 16px; }

.link-btn { background: none; border: none; padding: 0; font: inherit; color: var(--gold); text-decoration: underline; cursor: pointer; opacity: 1; }
.link-btn:hover { color: var(--gold-light, var(--gold)); }

.access-modal { position: fixed; inset: 0; background: rgba(0,0,0,.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.access-modal[hidden] { display: none; }
.access-modal-card { background: var(--bg-card, #211c17); color: var(--ink, #f6f1e7); border-radius: 12px; padding: 28px; max-width: 400px; width: 100%; position: relative; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.access-modal-card h3 { margin: 0 0 10px; }
.access-modal-card p { font-size: .9rem; opacity: .85; margin: 0 0 16px; }
.access-modal-close { position: absolute; top: 12px; right: 14px; background: none; border: none; font-size: 1.4rem; color: inherit; opacity: .6; cursor: pointer; line-height: 1; }
.access-modal-close:hover { opacity: 1; }
#accessRequestForm { display: flex; gap: 8px; flex-wrap: wrap; }
#accessEmail { flex: 1; min-width: 180px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); color: inherit; }
.access-modal-status { margin-top: 12px !important; font-size: .85rem !important; }

.compare.mode-sidebyside { cursor: default; display: flex; }
.compare.mode-sidebyside .compare-handle { display: none; }
.compare.mode-sidebyside .compare-after,
.compare.mode-sidebyside .compare-before {
  position: relative; flex: 0 0 50%; width: 50% !important; overflow: hidden;
}
.compare.mode-sidebyside .compare-before { border-right: 2px solid var(--cream); }
.compare.mode-sidebyside .compare-fill { width: 100% !important; max-width: 100%; }

.compare-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  background: linear-gradient(to top, rgba(0,0,0,.75) 0%, rgba(0,0,0,.45) 60%, rgba(0,0,0,0) 100%);
  padding: 16px 14px 8px; display: flex; align-items: center; gap: 10px;
  pointer-events: auto;
}
.compare-ctrl-btn {
  border: none; background: transparent; color: #fff; cursor: pointer;
  width: 30px; height: 30px; padding: 5px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .15s ease;
}
.compare-ctrl-btn:hover { background: rgba(255,255,255,.15); }
.compare-ctrl-btn svg { width: 100%; height: 100%; fill: currentColor; }
.compare-seek {
  -webkit-appearance: none; appearance: none; flex: 1; height: 4px;
  background: rgba(255,255,255,.3); border-radius: 2px; accent-color: var(--gold); cursor: pointer;
}
.compare-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); cursor: pointer; }
.compare-seek::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; border: none; background: var(--gold); cursor: pointer; }
.compare-time { color: #eee; font-size: .74rem; font-family: 'Courier New', monospace; flex-shrink: 0; }

/* ============ CHAPTER SHOWCASE ============ */
.chapters-showcase { background: var(--cream); }
.chapters-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.chapters-points { list-style: none; padding: 0; margin: 24px 0 0; display: flex; flex-direction: column; gap: 12px; }
.chapters-points li {
  padding-left: 28px; position: relative; color: var(--ink-soft);
}
.chapters-points li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--gold); font-weight: 700;
}
.chapters-mock {
  background: var(--charcoal); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-soft);
}
.chapters-mock-header { color: #cbbfa8; font-size: .85rem; font-weight: 600; letter-spacing: .04em; margin-bottom: 14px; }
.chapter-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.chapter-item {
  display: flex; gap: 16px; padding: 14px; border-radius: 10px;
  cursor: pointer; transition: background .15s ease;
}
.chapter-item:hover { background: rgba(255,255,255,.05); }
.chapter-item.active { background: rgba(185, 129, 47, .18); }
.chapter-time {
  font-family: 'Courier New', monospace; color: var(--gold-bright);
  font-size: .88rem; flex-shrink: 0; padding-top: 2px;
}
.chapter-title { color: #f4ecdd; font-weight: 600; font-size: .98rem; }
.chapter-desc { color: #a89a83; font-size: .87rem; margin-top: 2px; }

/* ============ ALREADY DIGITIZED ============ */
.already-digitized { background: var(--charcoal); color: var(--cream); text-align: center; }
.already-digitized h2 { color: var(--cream); }
.already-inner { max-width: 620px; margin: 0 auto; }
.already-digitized .section-lede { color: #cbbfa8; margin: 0 auto 32px; }

/* ============ HOW IT WORKS ============ */
.steps {
  list-style: none; margin: 56px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.step { border-top: 2px solid var(--gold); padding-top: 18px; }
.step-num { font-family: var(--font-display); font-size: 1.6rem; color: var(--gold); display: block; margin-bottom: 6px; }
.step p { color: var(--ink-soft); font-size: .95rem; }

/* ============ PRICING ============ */
.pricing { background: var(--cream-deep); }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; margin-top: 48px; }
.price-card {
  background: var(--cream); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 32px 28px;
}
.price-amount { font-family: var(--font-display); font-size: 2.2rem; color: var(--ink); margin: 4px 0 10px; }
.price-amount span { font-family: var(--font-body); font-size: 1rem; color: var(--ink-soft); font-weight: 500; }
.price-detail { color: var(--ink-soft); font-size: .92rem; }
.price-features { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.price-features li { font-size: .9rem; color: var(--ink-soft); padding-left: 20px; position: relative; }
.price-features li::before { content: "—"; position: absolute; left: 0; color: var(--gold); }

.price-card--featured { border: 1.5px solid var(--gold); position: relative; }
.price-badge {
  position: absolute; top: -12px; right: 24px;
  background: var(--gold); color: var(--charcoal);
  font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 4px 10px; border-radius: 999px;
}

.price-discounts {
  max-width: 460px; margin: 40px auto 0;
  background: var(--cream); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 28px;
}
.price-discounts h4 { margin: 0 0 14px; font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-soft); }
.discount-row { display: flex; justify-content: space-between; padding: 8px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.discount-row:first-of-type { border-top: none; }
.discount-row span:last-child { font-weight: 600; color: var(--gold); }

.pricing-cta { text-align: center; margin-top: 40px; }

/* ============ TRUST ============ */
.trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.trust-item h3 { font-size: 1.15rem; }
.trust-item p { color: var(--ink-soft); font-size: .95rem; }

/* ============ CONTACT ============ */
.contact { background: var(--charcoal); color: var(--cream); }
.contact h2 { color: var(--cream); }
.contact .section-lede { color: #cbbfa8; }
.contact-inner { max-width: 560px; margin: 0 auto; text-align: center; }
.contact-form { text-align: left; margin-top: 36px; display: flex; flex-direction: column; gap: 18px; }
.form-row { display: flex; flex-direction: column; gap: 6px; }
.form-row label { font-size: .85rem; color: #cbbfa8; font-weight: 500; }
.form-row input, .form-row textarea {
  background: var(--charcoal-soft); border: 1px solid var(--line-dark);
  border-radius: 10px; padding: 12px 14px; color: var(--cream); font-family: var(--font-body); font-size: .96rem;
}
.form-row input:focus, .form-row textarea:focus { outline: none; border-color: var(--gold); }
.contact-form .btn-primary { background: var(--gold); color: var(--charcoal); margin-top: 6px; }
.contact-form .btn-primary:hover { background: var(--gold-bright); transform: none; }
.form-note { font-size: .88rem; color: var(--gold-bright); min-height: 1.2em; }
.contact-alt { margin-top: 28px; font-size: .92rem; color: #a89a83; }
.contact-alt a { color: var(--gold-bright); text-decoration: none; }

/* ============ FOOTER ============ */
.site-footer { background: var(--charcoal); color: #8a7d68; padding: 28px 0; border-top: 1px solid var(--line-dark); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; row-gap: 6px; }
.footer-inner .logo { color: var(--cream); font-size: 1.1rem; }
.footer-inner p { margin: 0; font-size: .85rem; }
.footer-inner a { color: #8a7d68; }
.footer-inner a:hover { color: var(--cream); }
.footer-tools { flex-basis: 100%; text-align: right; opacity: .75; font-size: .78rem !important; }

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ============ RESPONSIVE ============ */
@media (max-width: 880px) {
  /* backdrop-filter on .site-header creates a containing block for its
     fixed-position .main-nav child, which breaks the dropdown's
     positioning/opacity -- disable it here where the dropdown is used. */
  .site-header { backdrop-filter: none; background: var(--cream); }
  .main-nav { position: fixed; inset: 76px 0 0 0; background: var(--cream); flex-direction: column; padding: 32px 24px; gap: 22px; transform: translateX(100%); transition: transform .25s ease; z-index: 101; }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-dropdown { width: 100%; }
  .nav-dropdown-toggle { width: 100%; justify-content: center; font-size: 1rem; padding: 4px 0; }
  .nav-dropdown-menu {
    position: static; transform: none; display: none; box-shadow: none;
    border: none; background: transparent; padding: 10px 0 0; min-width: 0;
    width: 100%; align-items: center; gap: 14px;
  }
  .nav-dropdown.open .nav-dropdown-menu { display: flex; }
  .nav-dropdown-menu a { padding: 4px 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 420px; margin: 0 auto; }
  .chapters-inner { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .trust-grid { grid-template-columns: 1fr; gap: 28px; }
  .section { padding: 64px 0; }
}
@media (max-width: 520px) {
  .steps { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; gap: 10px; text-align: center; }
}
