/* ============================================================
   4X Trading Journal one-page sales site
   Brand compliance: vault/_BRAND_CORE/visual-identity/visual-identity.md
   Hexes are authoritative (Purple Black #110025). Do not approximate.
   Fonts: Montserrat = Gotham stand-in (swap when webfonts supplied).
           Newsreader italic = echoes the journal's printed serif motto.
   ============================================================ */

:root {
  /* Brand palette (exact) */
  --indigo:  #6500FE;
  --orchid:  #CE56FE;   /* signature */
  --saffron: #FCB45E;
  --ink:     #110025;   /* Purple Black base */

  /* Derived surfaces */
  --ink-2:   #1B0733;   /* raised panel */
  --ink-3:   #250B45;   /* card / border-lit */
  --line:    rgba(206, 86, 254, 0.16);
  --paper:   #F6F3EE;   /* journal-page recreations */
  --paper-ink: #17131F; /* text on paper */

  /* Text */
  --text:  #ECE6F4;
  --muted: #B3A6C6;
  --dim:   #948AA8;   /* AA on --ink for small text (~4.6:1) */

  /* Signature gradient, lower-left → upper-right */
  --grad: linear-gradient(45deg, var(--indigo) 0%, var(--orchid) 52%, var(--saffron) 100%);
  --grad-soft: linear-gradient(45deg, rgba(101,0,254,0.16), rgba(206,86,254,0.14), rgba(252,180,94,0.12));

  /* Type */
  --font-sans: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Newsreader", Georgia, "Times New Roman", serif;

  /* Rhythm */
  --maxw: 1120px;
  --pad: clamp(20px, 5vw, 48px);
  --section-y: clamp(72px, 11vw, 140px);
  --radius: 16px;
}

*, *::before, *::after { box-sizing: border-box; }

/* [hidden] must beat class-level display rules (e.g. .btn{display:inline-flex}) */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.6;
  font-size: clamp(16px, 1.05vw, 18px);
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* Atmospheric base: subtle brand glow, top-anchored */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60vw 44vw at 78% -8%, rgba(101,0,254,0.22), transparent 60%),
    radial-gradient(52vw 40vw at 8% 6%, rgba(206,86,254,0.14), transparent 55%),
    var(--ink);
  pointer-events: none;
}

/* -------- layout -------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--pad); }
.section { padding-block: var(--section-y); position: relative; }

/* -------- typography -------- */
h1, h2, h3 { font-weight: 800; line-height: 1.05; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.15rem, 1.8vw, 1.4rem); font-weight: 700; letter-spacing: -0.01em; }

.eyebrow {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--orchid);
  margin: 0 0 1.1rem;
}
.lead { font-size: clamp(1.05rem, 1.5vw, 1.3rem); color: var(--muted); max-width: 46ch; }

.grad-text {
  /* lighter indigo start than --grad so the darkest edge clears large-text contrast */
  background: linear-gradient(45deg, #9a5cff 0%, var(--orchid) 48%, var(--saffron) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* star meter: fills to --rating (e.g. 92% == 4.6/5) */
.star-meter { display: inline-block; position: relative; font-size: 1rem; line-height: 1; letter-spacing: 2px; }
.star-meter::before { content: "★★★★★"; color: rgba(255,255,255,0.18); }
.star-meter::after {
  content: "★★★★★"; color: var(--saffron);
  position: absolute; left: 0; top: 0; width: var(--rating, 100%);
  overflow: hidden; white-space: nowrap;
}
.serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

/* -------- buttons -------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  font-family: var(--font-sans); font-weight: 700; font-size: 0.98rem;
  letter-spacing: 0.01em; line-height: 1;
  padding: 1rem 1.6rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  white-space: nowrap;
}
.btn-primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 8px 30px -8px rgba(101,0,254,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 40px -10px rgba(206,86,254,0.7); }
.btn-ghost {
  color: var(--text); background: transparent; border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--orchid); transform: translateY(-2px); }

/* -------- header -------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(140%) blur(14px);
  background: rgba(17, 0, 37, 0.6);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand img { width: 132px; height: auto; }
.header-nav { display: flex; align-items: center; gap: clamp(14px, 2vw, 30px); }
.header-nav > a:not(.btn) { font-size: 0.92rem; color: var(--muted); font-weight: 500; }
.header-nav > a:not(.btn):hover { color: var(--text); }
.header-nav .btn { padding: 0.7rem 1.15rem; }
@media (max-width: 720px) {
  .header-nav > a:not(.btn) { display: none; }
}

/* -------- footer -------- */
.site-footer { border-top: 1px solid var(--line); padding-block: 56px 32px; margin-top: 40px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.footer-brand img { width: 132px; height: auto; margin-bottom: 12px; }
.footer-note { color: var(--muted); max-width: 34ch; font-size: 0.92rem; margin: 0; }
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 0.92rem; color: var(--muted); }
.footer-links a:hover { color: var(--orchid); }
.footer-legal {
  display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between;
  margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line);
  font-size: 0.8rem; color: var(--dim);
}
.footer-tag { font-family: var(--font-serif); font-style: italic; color: var(--muted); }

/* -------- hero -------- */
.hero { padding-top: clamp(48px, 7vw, 96px); padding-bottom: var(--section-y); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.hero-copy h1 { margin-bottom: 1.3rem; }
.hero-copy .lead { margin: 0 0 1.7rem; }
.hero-rating {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.95rem; color: var(--muted); margin-bottom: 1.8rem;
}
.hero-rating .stars { color: var(--saffron); letter-spacing: 2px; font-size: 1rem; }
.hero-rating strong { color: var(--text); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 1.2rem; }
.hero-trust { font-size: 0.85rem; color: var(--dim); margin: 0; letter-spacing: 0.02em; }

/* Hero visual: real product photo, edge-faded so it melts into the dark bg */
.hero-visual { display: grid; place-items: center; position: relative; }
.hero-visual::before {
  content: ""; position: absolute; width: 108%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(206,86,254,0.30), rgba(101,0,254,0.10) 48%, transparent 68%);
  filter: blur(8px); z-index: 0;
}
.hero-photo {
  position: relative; z-index: 1;
  width: min(420px, 82vw); height: auto; border-radius: 14px;
  -webkit-mask: radial-gradient(120% 120% at 50% 45%, #000 62%, transparent 92%);
          mask: radial-gradient(120% 120% at 50% 45%, #000 62%, transparent 92%);
  filter: drop-shadow(0 40px 70px rgba(0,0,0,0.6));
}
.journal-mock {
  position: relative; z-index: 1;
  width: min(340px, 74vw); aspect-ratio: 5.75 / 8.5;
  border-radius: 10px 16px 16px 10px;
  background:
    linear-gradient(120deg, #24345f 0%, #1c2a4d 46%, #16213d 100%);
  box-shadow:
    inset 10px 0 0 -4px rgba(0,0,0,0.35),
    0 40px 80px -30px rgba(0,0,0,0.8),
    0 10px 40px -12px rgba(101,0,254,0.4);
  display: grid; place-items: center;
  border: 1px solid rgba(255,255,255,0.06);
}
.journal-band {
  position: absolute; top: 0; bottom: 0; right: 12%;
  width: 12px; background: linear-gradient(var(--saffron), #e59b3f);
  border-radius: 2px; box-shadow: 0 0 12px rgba(252,180,94,0.4);
}
.journal-emboss {
  width: 46%; opacity: 0.16; filter: grayscale(1) brightness(1.7);
  mix-blend-mode: screen;
}
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: left; }
  .hero-visual { order: -1; }
  .journal-mock { width: min(260px, 62vw); }
}

/* -------- scroll story: journal turns & opens -------- */
.story { position: relative; background: linear-gradient(180deg, var(--ink), #0c001c 40%, var(--ink)); }
.story-stage {
  position: sticky; top: 0; height: 100vh; overflow: hidden;
  display: grid; place-items: center;
}
.story-stage::before {
  content: ""; position: absolute; width: 70vw; max-width: 760px; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(101,0,254,0.28), rgba(206,86,254,0.10) 45%, transparent 68%);
  filter: blur(8px);
}
.story-scene {
  position: relative; perspective: 1500px;
  width: min(860px, 94vw); aspect-ratio: 3 / 2;
  display: grid; place-items: center;
}
/* soft brand glow behind the floating journal (cutouts have no background of their own) */
.story-scene::before {
  content: ""; position: absolute; width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(206,86,254,0.30), rgba(101,0,254,0.12) 46%, transparent 70%);
  filter: blur(14px);
}
/* real journal cutouts (transparent) floating on the page */
.story-shot { position: absolute; will-change: opacity, transform; filter: drop-shadow(0 40px 60px rgba(0,0,0,0.6)); }
.story-closed { height: 100%; width: auto; }   /* portrait book, centered */
.story-open { width: 100%; height: auto; opacity: 0; }  /* landscape spread */
.story-captions {
  position: absolute; left: 0; right: 0; bottom: clamp(48px, 10vh, 120px);
  text-align: center; pointer-events: none; padding-inline: var(--pad);
}
.story-cap {
  position: absolute; left: 0; right: 0; margin: 0; opacity: 0;
  font-size: clamp(1.4rem, 3.4vw, 2.4rem); font-weight: 800; letter-spacing: -0.02em;
  padding-inline: var(--pad);
}
.scroll-hint {
  position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--dim);
}
.scroll-hint i { width: 1px; height: 30px; background: linear-gradient(var(--orchid), transparent); }
@media (prefers-reduced-motion: no-preference) {
  .story { height: 180vh; }
  .scroll-hint i { animation: hintPulse 1.8s ease-in-out infinite; }
  @keyframes hintPulse { 0%,100% { opacity: .3; transform: scaleY(.7); } 50% { opacity: 1; transform: scaleY(1); } }
}
/* Reduced-motion / no-JS fallback: show the open photo, last caption, normal height */
@media (prefers-reduced-motion: reduce) {
  .story { min-height: 90vh; }
  .story-closed { opacity: 0; }
  .story-open { opacity: 1; }
  .story-cap:last-child { opacity: 1; }
  .scroll-hint { display: none; }
}

/* -------- shared: narrow column -------- */
.narrow { max-width: 820px; }

/* -------- desk context band (full-bleed cinematic) -------- */
.deskband { position: relative; height: clamp(320px, 52vw, 620px); overflow: hidden; }
.deskband img { width: 100%; height: 100%; object-fit: cover; object-position: center 60%; }
.deskband-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, var(--ink) 0%, transparent 22%, transparent 74%, var(--ink) 100%),
    radial-gradient(70% 60% at 50% 50%, transparent, rgba(17,0,37,0.35));
}

/* -------- problem -------- */
.problem { border-top: none; }
.problem h2 { margin-bottom: 2rem; max-width: 16ch; }
.mistake-chips {
  list-style: none; padding: 0; margin: 0 0 2.2rem;
  display: flex; flex-wrap: wrap; gap: 12px;
}
.mistake-chips li {
  font-size: 0.9rem; font-weight: 600; color: var(--muted);
  padding: 0.6rem 1rem; border: 1px solid var(--line); border-radius: 999px;
  background: rgba(206,86,254,0.04);
  position: relative;
}
.mistake-chips li::before { content: "✕ "; color: var(--orchid); font-weight: 700; }
.problem-body { font-size: clamp(1.15rem, 2vw, 1.5rem); line-height: 1.5; max-width: 30ch; color: var(--text); }
.problem-body em { font-style: italic; color: var(--orchid); }

/* -------- insight (data vs writing infographic) -------- */
.vs-grid {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: stretch;
  gap: clamp(12px, 2vw, 26px); margin-top: clamp(28px, 4vw, 44px);
}
.vs-card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 34px); display: flex; flex-direction: column; gap: 18px;
  transition: transform .3s ease, border-color .3s ease;
}
.vs-card:hover { transform: translateY(-4px); }
.vs-paper:hover { border-color: rgba(206,86,254,0.4); }
.vs-tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.vs-viz { width: 100%; height: clamp(96px, 12vw, 132px); display: block; }
.vs-label { margin: auto 0 0; font-size: 1rem; color: var(--muted); line-height: 1.4; }
.vs-label strong { display: block; font-size: clamp(1.3rem, 2vw, 1.6rem); color: var(--text); font-weight: 800; letter-spacing: -0.01em; margin-top: 4px; }
.vs-mid { display: grid; place-items: center; }
.vs-mid span {
  font-family: var(--font-serif); font-style: italic; color: var(--muted); font-size: 1.1rem;
  width: 54px; height: 54px; border: 1px solid var(--line); border-radius: 999px;
  display: grid; place-items: center; background: var(--ink);
}
.insight-kicker {
  text-align: center; max-width: 46ch; margin: clamp(28px, 4vw, 44px) auto 0;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.45; color: var(--text);
}
@media (max-width: 720px) {
  .vs-grid { grid-template-columns: 1fr; }
  .vs-mid span { transform: rotate(90deg); }
}

/* -------- shared section head -------- */
.section-head { max-width: 720px; margin-bottom: clamp(40px, 5vw, 64px); }
.section-head h2 { margin: 0.6rem 0 1rem; }

/* -------- method -------- */
.method { border-top: 1px solid var(--line); }
.method-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(20px, 2.6vw, 30px); }
.method-card {
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: transform .25s ease, border-color .25s ease;
}
.method-card:hover { transform: translateY(-4px); border-color: rgba(206,86,254,0.4); }
.method-text { padding: clamp(22px, 2.6vw, 32px) clamp(22px, 2.6vw, 32px) 0.6rem; }
.method-num {
  font-family: var(--font-serif); font-style: italic; font-size: 1.5rem;
  color: var(--orchid); display: block; margin-bottom: 0.4rem;
}
.method-card h3 { margin-bottom: 0.7rem; }
.method-text p { color: var(--muted); font-size: 0.98rem; margin: 0 0 1.4rem; }
.method-text strong { color: var(--text); font-weight: 700; }

/* stylized journal-page recreation (placeholder for Task 8 photos) */
.spread-slot {
  margin: auto clamp(22px, 2.6vw, 32px) clamp(22px, 2.6vw, 32px);
  border-radius: 8px; overflow: hidden;
  background: linear-gradient(135deg, #ffffff, #ece7df);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.06), 0 20px 40px -24px rgba(0,0,0,0.7);
}
.page { background: var(--paper); color: var(--paper-ink); padding: 18px 20px 22px; min-height: 210px; }
.page-title { font-weight: 900; font-size: 0.86rem; letter-spacing: 0.04em; text-align: center; margin-bottom: 3px; }
.page-sub {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: #6a6472; text-align: center; margin: 12px 0 8px;
  padding: 4px; background: #e7e1d7; border-radius: 20px;
}
.page .line { display: block; height: 1px; background: #cfc8bd; margin: 9px 0; }
.page .line.short { width: 62%; }
.page .pill {
  display: inline-block; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: #4b4553; background: #e7e1d7;
  padding: 3px 10px; border-radius: 20px; margin: 6px 0 4px;
}
.page .opts { display: flex; align-items: center; gap: 6px; font-size: 0.58rem; margin: 6px 0; color: #6a6472; flex-wrap: wrap; }
.page .opts span { font-weight: 700; margin-right: 2px; }
.page .opts b { font-weight: 500; padding: 2px 7px; border: 1px solid #cfc8bd; border-radius: 20px; }
.page .opts b.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.mini-table { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; margin: 4px 0; }
.mini-table span { height: 12px; border: 1px solid #d8d1c6; border-radius: 2px; }
.quad { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; margin-top: 6px; }
.quad span {
  font-size: 0.6rem; font-weight: 700; color: #4b4553;
  border: 1px solid #cfc8bd; border-radius: 6px; padding: 12px 8px 24px; background: #fbf9f5;
}
.quad.ssic span { color: var(--indigo); }

/* -------- 12-week system -------- */
.system { border-top: 1px solid var(--line); }
.system-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.system-copy h2 { margin: 0.6rem 0 1.2rem; }
.system-copy p { color: var(--muted); max-width: 42ch; margin: 0; font-size: clamp(1rem, 1.3vw, 1.15rem); }
.system-stats { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.system-stats li {
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(20px, 2.4vw, 30px); text-align: left;
}
.system-stats strong {
  display: block; font-size: clamp(2rem, 4vw, 3rem); font-weight: 900; line-height: 1;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.system-stats span { font-size: 0.82rem; color: var(--muted); letter-spacing: 0.02em; }

@media (max-width: 820px) {
  .method-grid { grid-template-columns: 1fr; }
  .system-inner { grid-template-columns: 1fr; }
}

/* -------- build quality -------- */
.quality { border-top: 1px solid var(--line); }
.quality-inner { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.quality-visual { display: grid; place-items: center; }
.quality-photo {
  width: 100%; height: auto; border-radius: 16px;
  box-shadow: 0 40px 80px -34px rgba(0,0,0,0.85), 0 0 0 1px rgba(206,86,254,0.14);
}
.quality-copy h2 { margin: 0.6rem 0 1.6rem; }
.spec-list { list-style: none; padding: 0; margin: 0 0 1.6rem; display: grid; gap: 12px; }
.spec-list li { position: relative; padding-left: 30px; color: var(--muted); }
.spec-list li strong { color: var(--text); font-weight: 700; }
.spec-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55em; width: 14px; height: 8px;
  border-left: 2px solid var(--orchid); border-bottom: 2px solid var(--orchid);
  transform: rotate(-45deg);
}
.quality-note { font-size: 1.15rem; color: var(--text); max-width: 34ch; }

/* -------- reviews -------- */
.reviews { border-top: 1px solid var(--line); }
.review-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2vw, 24px); }
.review-card {
  background: linear-gradient(180deg, var(--ink-2), var(--ink));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 2.4vw, 30px); display: flex; flex-direction: column; gap: 14px;
}
.review-card .stars { color: var(--saffron); letter-spacing: 2px; }
.review-card blockquote { margin: 0; font-size: 1.05rem; line-height: 1.5; color: var(--text); }
.review-card figcaption { margin-top: auto; font-size: 0.85rem; color: var(--muted); }
.review-card figcaption span { color: var(--dim); }

/* -------- new edition -------- */
.edition { border-top: 1px solid var(--line); }
.edition-inner {
  text-align: center; margin-inline: auto;
  padding: clamp(36px, 5vw, 64px);
  border: 1px solid var(--line); border-radius: 22px;
  background:
    radial-gradient(80% 120% at 50% -10%, rgba(101,0,254,0.22), transparent 60%),
    linear-gradient(180deg, var(--ink-2), var(--ink));
}
.badge {
  display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: #fff; padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--grad); margin-bottom: 1.2rem;
}
.edition h2 { margin-bottom: 1rem; }
.edition-lead { color: var(--muted); max-width: 46ch; margin: 0 auto 1.6rem; }
.edition-list { list-style: none; padding: 0; margin: 0 auto 1.6rem; max-width: 42ch; text-align: left; display: grid; gap: 12px; }
.edition-list li { padding-left: 28px; position: relative; color: var(--muted); }
.edition-list li strong { color: var(--text); }
.edition-list li::before { content: "✦"; position: absolute; left: 0; color: var(--saffron); }
.edition-foot { font-size: 0.9rem; color: var(--dim); margin: 0; }
.edition-foot strong { color: var(--muted); }

@media (max-width: 820px) {
  .quality-inner { grid-template-columns: 1fr; }
  .review-grid { grid-template-columns: 1fr; }
}

/* -------- how to use / guide -------- */
.guide { border-top: 1px solid var(--line); }
.guide-inner { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: clamp(32px, 5vw, 64px); align-items: center; }
.guide-copy h2 { margin: 0.6rem 0 1.2rem; }
.guide-copy p { color: var(--muted); max-width: 46ch; margin: 0 0 1.8rem; }
.guide-cta { display: flex; flex-wrap: wrap; gap: 14px; }
/* guide document card (replaces the decorative QR) */
.guide-card { display: grid; place-items: center; text-decoration: none; }
.guide-doc {
  width: min(260px, 64vw); aspect-ratio: 3 / 4; border-radius: 14px;
  background: linear-gradient(160deg, #fbf9f5, #ece7df);
  box-shadow: 0 40px 70px -34px rgba(0,0,0,0.8), inset 0 0 0 1px rgba(0,0,0,0.06);
  padding: clamp(22px, 3vw, 34px); display: flex; flex-direction: column; gap: 14px;
  color: var(--paper-ink); transition: transform .3s ease, box-shadow .3s ease;
  position: relative; overflow: hidden;
}
.guide-doc::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 6px; background: var(--grad);
}
.guide-card:hover .guide-doc { transform: translateY(-6px) rotate(-1deg); box-shadow: 0 50px 80px -34px rgba(0,0,0,0.85), inset 0 0 0 1px rgba(0,0,0,0.06); }
.guide-doc-tag { font-size: 0.72rem; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: #6a6472; margin-top: 6px; }
.guide-doc-line { height: 8px; border-radius: 4px; background: #d8d1c6; }
.guide-doc-line.short { width: 55%; }
.guide-doc-open { margin-top: auto; font-weight: 700; color: var(--indigo); font-size: 0.95rem; }

/* geo-demoted marketplace links (set by JS on non-matched markets) */
.cta-alt {
  background: transparent !important; color: var(--muted) !important;
  box-shadow: none !important; border: 1px solid var(--line);
  font-weight: 600; font-size: 0.9rem; padding: 0.7rem 1.1rem;
}
.cta-alt:hover { border-color: var(--orchid); color: var(--text) !important; transform: translateY(-2px); }
.cta-alt::after { display: none !important; }

/* -------- final CTA -------- */
.buy { border-top: 1px solid var(--line); }
.buy-inner {
  text-align: center; max-width: 760px; margin-inline: auto;
  padding: clamp(40px, 6vw, 80px) clamp(24px, 4vw, 56px);
  border-radius: 24px; border: 1px solid var(--line);
  background:
    radial-gradient(90% 130% at 50% 0%, rgba(206,86,254,0.22), transparent 55%),
    linear-gradient(180deg, var(--ink-2), var(--ink));
}
.buy-inner h2 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: 1rem; }
.buy-lead { color: var(--muted); max-width: 42ch; margin: 0 auto 2rem; font-size: 1.1rem; }
.buy-buttons { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 1.4rem; }
.buy-instruments { font-size: 0.92rem; color: var(--muted); margin: 0 0 0.9rem; letter-spacing: 0.01em; }
.buy-gift { font-size: 0.95rem; color: var(--muted); margin: 0 0 0.4rem; }
.buy-gift::before { content: "🎁 "; }
.buy-reassure { font-size: 0.82rem; color: var(--dim); margin: 0; letter-spacing: 0.02em; }

@media (max-width: 820px) {
  .guide-inner { grid-template-columns: 1fr; }
  .guide-card { order: -1; }
}

/* ============================================================
   MOTION LAYER
   All motion gated behind prefers-reduced-motion.
   ============================================================ */

/* scroll reveal (progressive; content always visible if JS/observer absent) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s cubic-bezier(.16,.8,.3,1), transform .7s cubic-bezier(.16,.8,.3,1); }
  .reveal.in { opacity: 1; transform: none; }
  /* stagger children that share a parent via --i set in JS */
  .reveal.in { transition-delay: calc(var(--i, 0) * 80ms); }
}

@media (prefers-reduced-motion: no-preference) {

  /* ---- animated signature gradient in headline accents ---- */
  .grad-text {
    background-size: 200% 200%;
    animation: gradShift 8s ease-in-out infinite;
  }
  @keyframes gradShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
  }

  /* ---- hero orchestrated entrance on load ---- */
  .hero-copy > *, .hero-visual { opacity: 0; }
  body.loaded .hero-copy > * { animation: heroIn .8s cubic-bezier(.16,.8,.3,1) forwards; }
  body.loaded .hero-copy .eyebrow    { animation-delay: .05s; }
  body.loaded .hero-copy h1          { animation-delay: .16s; }
  body.loaded .hero-copy .lead       { animation-delay: .30s; }
  body.loaded .hero-copy .hero-rating{ animation-delay: .42s; }
  body.loaded .hero-copy .hero-cta   { animation-delay: .52s; }
  body.loaded .hero-copy .hero-trust { animation-delay: .60s; }
  body.loaded .hero-visual { animation: journalIn 1.1s cubic-bezier(.16,.8,.3,1) .30s forwards; }
  @keyframes heroIn { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
  @keyframes journalIn { from { opacity: 0; transform: translateY(30px) rotateY(-18deg) scale(.94); } to { opacity: 1; transform: none; } }

  /* hero visual: 3D stage + gentle float (wrapper) + parallax (mock) + breathing glow */
  .hero-visual { perspective: 1200px; }
  .journal-float { animation: float 7s ease-in-out infinite; will-change: transform; }
  .journal-mock {
    transform-style: preserve-3d;
    transition: transform .4s ease;
  }
  @keyframes float {
    0%, 100% { transform: translateY(0) rotateZ(-1deg); }
    50%      { transform: translateY(-14px) rotateZ(1deg); }
  }
  .hero-visual::before { animation: breathe 7s ease-in-out infinite; }
  @keyframes breathe {
    0%, 100% { opacity: .8; transform: scale(1); }
    50%      { opacity: 1;  transform: scale(1.06); }
  }

  /* ---- primary button shine sweep ---- */
  .btn-primary { position: relative; overflow: hidden; }
  .btn-primary::after {
    content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-18deg); transition: left .6s ease;
  }
  .btn-primary:hover::after { left: 140%; }

  /* ---- method cards: 3D lift + paper tilt ---- */
  .method-card { transform-style: preserve-3d; }
  .method-card .spread-slot { transition: transform .35s cubic-bezier(.16,.8,.3,1), box-shadow .35s ease; will-change: transform; }
  .method-card:hover .spread-slot { transform: translateZ(30px) rotateX(4deg) translateY(-4px); box-shadow: 0 30px 50px -26px rgba(0,0,0,.85); }

  /* ---- stat cards pop ---- */
  .system-stats li { transition: transform .3s ease, border-color .3s ease; }
  .system-stats li:hover { transform: translateY(-4px); border-color: rgba(206,86,254,.4); }

  /* ---- mistake chips subtle hover ---- */
  .mistake-chips li { transition: transform .25s ease, border-color .25s ease, color .25s ease; }
  .mistake-chips li:hover { transform: translateY(-2px); border-color: rgba(206,86,254,.5); color: var(--text); }

  /* ---- review cards ---- */
  .review-card { transition: transform .3s ease, border-color .3s ease; }
  .review-card:hover { transform: translateY(-4px); border-color: rgba(206,86,254,.35); }

  /* ---- QR dots shimmer ---- */
  .qr-dots { animation: qrShift 6s linear infinite; background-size: 200% 200%; }
  @keyframes qrShift { to { background-position: 200% 200%; } }

  /* ---- header condensed state after scroll ---- */
  .site-header { transition: background .3s ease, box-shadow .3s ease, height .3s ease; }
  .site-header.scrolled { background: rgba(17,0,37,.85); box-shadow: 0 10px 30px -18px rgba(0,0,0,.9); }
}

/* Reduced motion: still allow instant reveal, kill all animation */
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual { opacity: 1 !important; }
}
