/* ============================================================================
   MAGIC OF MAGIC — reader-conversion site. BRIGHT, PLAYFUL fantasy-comedy theme.
   Deliberately the opposite of the author's five dark/epic sites: light cream
   ground, bouncy rounded type, sticker buttons, confetti. Palette: violet + hot
   pink + sunny yellow + teal. R-rated adult comedy (signalled clearly, cheekily).
   ============================================================================ */
:root{
  --bg:        #fdf4ea;
  --bg-2:      #fffaf2;
  --card:      #ffffff;
  --ink:       #2e2340;
  --dim:       #6a5d80;
  --faint:     #9a8fb0;
  --line:      rgba(124,58,237,0.18);

  --purple:    #7c3aed;   /* primary / brand / CTA */
  --purple-d:  #5b21b6;   /* button 3D shadow */
  --pink:      #ec4899;   /* secondary / fun */
  --yellow:    #f6a91e;   /* sunny */
  --teal:      #14b5a6;   /* fresh */

  --maxw: 1120px;
  --ease: cubic-bezier(.34,1.56,.64,1);   /* springy! */
  --sans: "Nunito", "Segoe UI", system-ui, sans-serif;
  --display: "Fredoka", "Nunito", system-ui, sans-serif;
}
*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0; background:var(--bg); color:var(--ink);
  font-family:var(--sans); font-weight:400; font-size:18px; line-height:1.7;
  -webkit-font-smoothing:antialiased; overflow-x:hidden;
}
img{ max-width:100%; display:block; }
em{ font-style:italic; color:var(--pink); }
.accent{ color:var(--purple); }
.pink{ color:var(--pink); }
.yellow{ color:var(--yellow); }

/* ── playful background ─────────────────────────────────────────────────── */
.bg-field{ position:fixed; inset:0; z-index:-2; pointer-events:none; }
.bg-glow{
  position:absolute; inset:0;
  background:
    radial-gradient(50% 40% at 12% 0%, color-mix(in srgb, var(--purple) 14%, transparent), transparent 70%),
    radial-gradient(46% 40% at 90% 8%, color-mix(in srgb, var(--pink) 13%, transparent), transparent 70%),
    radial-gradient(50% 44% at 80% 92%, color-mix(in srgb, var(--yellow) 14%, transparent), transparent 70%),
    radial-gradient(46% 40% at 10% 90%, color-mix(in srgb, var(--teal) 12%, transparent), transparent 70%),
    var(--bg);
}
.bg-runes{
  position:absolute; inset:0; opacity:.5;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Cg fill='none' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M40 40 l0 16 M32 48 l16 0' stroke='%237c3aed' opacity='.28'/%3E%3Cpath d='M250 60 l0 16 M242 68 l16 0' stroke='%23ec4899' opacity='.28'/%3E%3Cpath d='M120 200 l0 14 M113 207 l14 0' stroke='%23f6a91e' opacity='.3'/%3E%3Ccircle cx='230' cy='230' r='5' fill='%2314b5a6' stroke='none' opacity='.3'/%3E%3Ccircle cx='70' cy='150' r='4' fill='%23ec4899' stroke='none' opacity='.3'/%3E%3C/g%3E%3C/svg%3E");
  background-size:300px 300px;
}
.bg-vignette{ display:none; }

/* ── nav ────────────────────────────────────────────────────────────────── */
.nav{
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; gap:1.2rem;
  padding:.7rem clamp(1rem,4vw,2.2rem);
  background:color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter:blur(10px);
  border-bottom:2px solid var(--line);
}
.nav-mark{
  font-family:var(--display); font-weight:700; letter-spacing:.01em;
  color:var(--ink); text-decoration:none; font-size:1.05rem; white-space:nowrap;
}
.nav-rune{ color:var(--yellow); }
.nav-links{ display:flex; gap:1.3rem; margin-left:auto; }
.nav-links a{
  color:var(--dim); text-decoration:none; font-size:.85rem; font-weight:700;
  transition:color .15s;
}
.nav-links a:hover{ color:var(--purple); }

/* ── buttons (sticker style) ────────────────────────────────────────────── */
.btn{
  --b:var(--purple); --bd:var(--purple-d);
  display:inline-block; cursor:pointer; text-decoration:none; text-align:center;
  font-family:var(--display); font-weight:600; letter-spacing:.01em;
  font-size:.95rem;
  padding:.7rem 1.4rem; border-radius:999px; border:none;
  color:#fff; background:var(--b);
  box-shadow:0 4px 0 var(--bd); transition:transform .1s var(--ease), box-shadow .1s var(--ease), filter .15s;
}
.btn:hover{ filter:brightness(1.05); transform:translateY(-1px); box-shadow:0 5px 0 var(--bd); }
.btn:active{ transform:translateY(3px); box-shadow:0 1px 0 var(--bd); }
.btn-ghost{ background:#fff; color:var(--purple); box-shadow:0 4px 0 var(--line); }
.btn-ghost:hover{ color:var(--purple); }
.btn-lg{ font-size:1.05rem; padding:.9rem 1.9rem; }
.btn-sm{ font-size:.8rem; padding:.5rem 1rem; box-shadow:0 3px 0 var(--purple-d); }
.btn-pink{ --b:var(--pink); --bd:#be185d; }
@media (max-width:760px){ .nav-links{ display:none; } .nav-mark{ margin-right:auto; } }

/* ── layout helpers ─────────────────────────────────────────────────────── */
.wrap{ max-width:var(--maxw); margin:0 auto; padding:0 clamp(1.1rem,4vw,2rem); }
.narrow{ max-width:820px; }
.band{ position:relative; padding:clamp(3.5rem,9vw,7rem) 0; }
.kicker{
  font-family:var(--display); font-weight:600; font-size:.85rem; letter-spacing:.02em;
  color:var(--pink); margin:0 0 1rem;
}
.kicker.purple{ color:var(--purple); }
.centered{ text-align:center; }
.band-h{
  font-family:var(--display); font-weight:700; line-height:1.1;
  font-size:clamp(2rem,5vw,3.2rem); margin:0 0 1.3rem; color:var(--ink);
}
.lead{ font-size:clamp(1.08rem,2.2vw,1.3rem); color:var(--ink); line-height:1.65; margin:0 0 1.1rem; }
.lead.centered{ max-width:48ch; margin-left:auto; margin-right:auto; }
.band p{ color:var(--dim); margin:0 0 1.1rem; }
.pull{
  font-family:var(--display); font-weight:600; font-size:clamp(1.2rem,2.6vw,1.7rem);
  color:var(--ink)!important; line-height:1.35; margin:1.8rem 0 0;
  background:color-mix(in srgb,var(--yellow) 20%,transparent);
  display:inline-block; padding:.5rem .9rem; border-radius:12px; transform:rotate(-1deg);
}

/* ── HERO ───────────────────────────────────────────────────────────────── */
.hero{
  position:relative; min-height:96svh; display:flex; flex-direction:column;
  align-items:center; justify-content:center; text-align:center;
  padding:4rem clamp(1.1rem,4vw,2rem) 3.5rem;
}
.hero-inner{ position:relative; z-index:2; max-width:900px; }
.eyebrow{
  font-family:var(--display); font-weight:600; font-size:.9rem; letter-spacing:.01em;
  color:var(--teal); margin:0 0 1.4rem;
  background:#fff; display:inline-block; padding:.35rem .9rem; border-radius:999px; box-shadow:0 3px 0 var(--line);
}
.hero-title{
  font-family:var(--display); font-weight:700; line-height:1.08;
  font-size:clamp(2.3rem,6.4vw,4.4rem); margin:0 0 1.4rem; color:var(--ink);
}
.hero-sub{ font-size:clamp(1.1rem,2.3vw,1.4rem); color:var(--dim); max-width:50ch; margin:0 auto 1.1rem; line-height:1.6; }
.hero-sub-2{ font-family:var(--display); font-weight:500; color:var(--ink); font-size:clamp(1.05rem,2.3vw,1.35rem); line-height:1.4; margin-top:1.2rem; }
.hero-cta{ display:flex; gap:.9rem; justify-content:center; flex-wrap:wrap; margin:2rem 0 1.2rem; }
.hero-ku{ font-size:.92rem; color:var(--faint); }
.hero-ku strong{ color:var(--teal); }
.content-note{ font-size:.82rem; color:var(--faint); margin-top:1rem; font-weight:600; }

/* confetti hero motif */
.portal{ position:absolute; z-index:1; inset:0; overflow:hidden; pointer-events:none; }
.portal.small{ position:relative; inset:auto; height:70px; margin:0 auto; }
.portal span, .portal::before, .portal::after{
  content:""; position:absolute; top:-6%; width:14px; height:14px; border-radius:4px;
  animation:confetti 9s linear infinite;
}
.portal span:nth-child(1){ left:16%; background:var(--purple); animation-delay:0s; }
.portal span:nth-child(2){ left:38%; background:var(--pink); width:12px; height:12px; border-radius:50%; animation-delay:-2s; }
.portal span:nth-child(3){ left:62%; background:var(--yellow); animation-delay:-4s; }
.portal span:nth-child(4){ left:82%; background:var(--teal); width:10px; height:16px; animation-delay:-6s; }
.portal::before{ left:28%; background:var(--yellow); width:10px; height:10px; border-radius:50%; animation-delay:-7s; }
.portal::after{ left:72%; background:var(--pink); animation-delay:-3.5s; }
@keyframes confetti{ 0%{ transform:translateY(-20px) rotate(0); opacity:0; } 8%{ opacity:.9; } 92%{ opacity:.7; } 100%{ transform:translateY(104vh) rotate(540deg); opacity:0; } }

.scroll-cue{
  position:absolute; bottom:1.5rem; left:50%; transform:translateX(-50%); z-index:2;
  display:flex; flex-direction:column; align-items:center; gap:.4rem;
  color:var(--faint); text-decoration:none; font-size:.8rem; font-weight:700;
}
.scroll-arrow{ animation:bob 1.6s ease-in-out infinite; font-size:1.1rem; color:var(--pink); }
@keyframes bob{ 0%,100%{ transform:translateY(0); } 50%{ transform:translateY(6px); } }

/* ── band tints ─────────────────────────────────────────────────────────── */
.band-magic{ background:color-mix(in srgb, var(--purple) 5%, transparent); }
.band-shadow{ background:color-mix(in srgb, var(--pink) 6%, transparent); }
.band-read{ background:color-mix(in srgb, var(--yellow) 8%, transparent); }
.sub-lead{ color:var(--dim)!important; margin-bottom:2.4rem; }

/* ── comedy-pillar cards ────────────────────────────────────────────────── */
.runes{ display:grid; grid-template-columns:repeat(4,1fr); gap:1.1rem; margin:2.6rem 0 1rem; }
.rune-card{
  text-align:left; cursor:pointer; font:inherit; color:var(--ink);
  background:var(--card); border:2px solid var(--line); border-radius:18px; padding:1.4rem 1.2rem;
  display:flex; flex-direction:column; gap:.5rem; min-height:210px;
  box-shadow:0 6px 0 color-mix(in srgb,var(--purple) 12%,transparent);
  transition:transform .14s var(--ease), box-shadow .14s var(--ease), border-color .15s;
}
.rune-card:hover, .rune-card.on{ transform:translateY(-3px) rotate(-1deg); border-color:var(--purple); box-shadow:0 10px 0 color-mix(in srgb,var(--purple) 16%,transparent); }
.rune-card:nth-child(2):hover, .rune-card:nth-child(2).on{ border-color:var(--pink); box-shadow:0 10px 0 color-mix(in srgb,var(--pink) 16%,transparent); transform:translateY(-3px) rotate(1deg); }
.rune-card:nth-child(3):hover, .rune-card:nth-child(3).on{ border-color:var(--yellow); box-shadow:0 10px 0 color-mix(in srgb,var(--yellow) 20%,transparent); }
.rune-card:nth-child(4):hover, .rune-card:nth-child(4).on{ border-color:var(--teal); box-shadow:0 10px 0 color-mix(in srgb,var(--teal) 18%,transparent); transform:translateY(-3px) rotate(1deg); }
.rune-glyph{ font-size:2.2rem; line-height:1; }
.rune-name{ font-family:var(--display); font-weight:700; font-size:1.1rem; }
.rune-desc{ font-size:.92rem; color:var(--dim); line-height:1.55; max-height:0; opacity:0; overflow:hidden; transition:max-height .35s var(--ease), opacity .3s; }
.rune-card:hover .rune-desc, .rune-card.on .rune-desc{ max-height:240px; opacity:1; }
.rune-hint{ text-align:center; font-size:.9rem; color:var(--faint)!important; font-style:italic; margin-top:1.4rem!important; }
@media (max-width:860px){ .runes{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:480px){ .runes{ grid-template-columns:1fr; } .rune-card{ min-height:0; } .rune-desc{ max-height:240px; opacity:1; } }

/* ── content warning box ────────────────────────────────────────────────── */
.content-warn{
  display:flex; gap:.7rem; align-items:flex-start; max-width:640px; margin:0 auto 1rem;
  background:#fff; border:2px dashed color-mix(in srgb,var(--pink) 45%,transparent); border-radius:14px;
  padding:.9rem 1.1rem; font-size:.92rem; color:var(--dim);
}
.content-warn strong{ color:var(--pink); }

/* ── split (Grandma / stakes) ───────────────────────────────────────────── */
.split{ display:grid; grid-template-columns:1.1fr .9fr; gap:clamp(1.6rem,4vw,3rem); align-items:center; margin-top:2rem; }
.glass-card{
  background:#fff; border:2px solid var(--line); border-radius:18px; padding:1.8rem 1.6rem;
  box-shadow:0 8px 0 color-mix(in srgb,var(--yellow) 20%,transparent); transform:rotate(-1.2deg);
}
.glass-label{ font-family:var(--display); font-weight:700; font-size:.78rem; color:var(--yellow); }
.glass-quote{ font-family:var(--display); font-weight:600; font-size:clamp(1.15rem,2.4vw,1.55rem); line-height:1.35; color:var(--ink)!important; margin:.8rem 0 1rem; }
.glass-meta{ font-size:.85rem; color:var(--faint); font-style:italic; }
@media (max-width:820px){ .split{ grid-template-columns:1fr; } .glass-card{ transform:none; } }

/* ── mysteries ──────────────────────────────────────────────────────────── */
.mys-grid{ display:grid; grid-template-columns:repeat(2,1fr); gap:1.1rem; margin:1rem 0 2.2rem; }
.mys-card{
  background:var(--card); border:2px solid var(--line); border-radius:18px; padding:1.7rem 1.5rem;
  box-shadow:0 6px 0 color-mix(in srgb,var(--purple) 10%,transparent);
  transition:transform .14s var(--ease), box-shadow .14s;
}
.mys-card:nth-child(even){ box-shadow:0 6px 0 color-mix(in srgb,var(--pink) 12%,transparent); }
.mys-card:hover{ transform:translateY(-3px); }
.mys-num{ font-family:var(--display); font-weight:700; font-size:.9rem; color:var(--pink); }
.mys-card:nth-child(even) .mys-num{ color:var(--purple); }
.mys-card h3{ font-family:var(--display); font-weight:700; font-size:1.3rem; margin:.4rem 0 .6rem; color:var(--ink); }
.mys-card p{ font-size:.98rem; line-height:1.55; margin:0; }
.mys-foot{ text-align:center; font-family:var(--display); font-weight:600; color:var(--ink)!important; font-size:clamp(1.05rem,2.2vw,1.3rem); line-height:1.45; max-width:52ch; margin:0 auto!important; }
@media (max-width:720px){ .mys-grid{ grid-template-columns:1fr; } }

/* ── why ────────────────────────────────────────────────────────────────── */
.why-list{ list-style:none; padding:0; margin:2rem auto 2.6rem; max-width:66ch; }
.why-list li{ font-size:1.08rem; line-height:1.6; color:var(--dim); padding:1rem 0; border-bottom:2px dotted var(--line); }
.why-if{ display:block; font-family:var(--display); font-weight:700; color:var(--purple); font-size:1rem; margin-bottom:.2rem; }
.promise-row{ display:grid; grid-template-columns:repeat(4,1fr); gap:1rem; }
.promise{ display:flex; flex-direction:column; gap:.35rem; padding:1.3rem 1rem; background:#fff; border:2px solid var(--line); border-radius:16px; text-align:center; align-items:center; box-shadow:0 5px 0 color-mix(in srgb,var(--purple) 10%,transparent); }
.promise-ico{ font-size:1.6rem; }
.promise strong{ font-family:var(--display); font-weight:700; font-size:1rem; color:var(--ink); }
.promise span:last-child{ font-size:.86rem; color:var(--faint); line-height:1.4; }
@media (max-width:820px){ .promise-row{ grid-template-columns:repeat(2,1fr); } }

/* ── the cover wall (8 books) ───────────────────────────────────────────── */
.cover-wall{ display:grid; grid-template-columns:repeat(4,1fr); gap:1.2rem; margin:2.4rem 0 0; }
.cover-tile{ text-align:center; }
.cover-tile .shell{ position:relative; aspect-ratio:2/3; border-radius:8px; overflow:hidden; box-shadow:0 8px 22px rgba(90,40,140,.22); transition:transform .16s var(--ease); }
.cover-tile:hover .shell{ transform:translateY(-4px) rotate(-1.5deg); }
.cover-tile img{ width:100%; height:100%; object-fit:cover; }
.cover-tile.upcoming .shell{ display:flex; flex-direction:column; align-items:center; justify-content:center; gap:.4rem; background:repeating-linear-gradient(45deg,#fff,#fff 10px,#faf2ff 10px,#faf2ff 20px); border:2px dashed color-mix(in srgb,var(--purple) 40%,transparent); }
.cover-tile.upcoming .q{ font-family:var(--display); font-weight:700; font-size:2.4rem; color:var(--purple); }
.cover-tile .num{ font-family:var(--display); font-weight:700; font-size:.72rem; color:var(--pink); margin-top:.5rem; }
.cover-tile .name{ font-size:.8rem; color:var(--dim); line-height:1.3; }
.cover-tile .coming{ font-size:.72rem; color:var(--faint); font-style:italic; }
@media (max-width:640px){ .cover-wall{ grid-template-columns:repeat(2,1fr); } }

/* ── read / signup ──────────────────────────────────────────────────────── */
.read-cta{ display:flex; gap:.9rem; justify-content:center; flex-wrap:wrap; margin:1.6rem 0 2.6rem; }
.signup{ background:#fff; border:2px solid var(--line); border-radius:20px; padding:clamp(1.6rem,4vw,2.4rem); text-align:center; box-shadow:0 8px 0 color-mix(in srgb,var(--yellow) 22%,transparent); }
.signup h3{ font-family:var(--display); font-weight:700; font-size:1.35rem; margin:0 0 .6rem; color:var(--ink); }
.signup p{ font-size:.95rem; max-width:52ch; margin:0 auto 1.3rem; }
.signup-form{ display:flex; gap:.6rem; justify-content:center; flex-wrap:wrap; }
.signup-form input{
  flex:1; min-width:240px; max-width:340px; padding:.8rem 1.1rem; font:inherit; font-size:1rem;
  background:var(--bg); border:2px solid var(--line); border-radius:999px; color:var(--ink);
}
.signup-form input:focus{ outline:none; border-color:var(--purple); }
.signup-msg{ font-size:.95rem; margin:1rem 0 0!important; min-height:1.2em; font-weight:700; }
.signup-msg.ok{ color:var(--teal)!important; }
.signup-msg.err{ color:var(--pink)!important; }

/* ── footer ─────────────────────────────────────────────────────────────── */
.foot{ text-align:center; padding:3rem 1.5rem 3.5rem; border-top:2px solid var(--line); background:var(--bg-2); }
.foot-title{ font-family:var(--display); font-weight:700; font-size:1.15rem; margin:0 0 .4rem; color:var(--ink); }
.foot-sub{ color:var(--dim); margin:0 0 1.3rem; font-size:.95rem; }
.foot-links{ display:flex; gap:1.2rem; justify-content:center; flex-wrap:wrap; margin-bottom:1.3rem; }
.foot-links a{ color:var(--purple); text-decoration:none; font-size:.85rem; font-weight:700; transition:color .15s; }
.foot-links a:hover{ color:var(--pink); }
.foot-legal{ color:var(--faint); font-size:.8rem; margin:0; }

/* ── reveal-on-scroll ───────────────────────────────────────────────────── */
.reveal{ opacity:0; transform:translateY(24px); transition:opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in{ opacity:1; transform:none; }

@media (prefers-reduced-motion:reduce){
  *{ animation:none!important; scroll-behavior:auto; }
  .reveal{ opacity:1; transform:none; transition:none; }
  .pull, .glass-card{ transform:none; }
}
