/* ============================================================
   RINKEA — Premium Landing Page
   Palette / Typography / Glassmorphism / Animations / Responsive
   ============================================================ */

:root {
  --midnight: #07111f;
  --ink-blue: #102a43;
  --royal-orange: #ff7a00;
  --gold: #f5c542;
  --paper: #f8f8f4;
  --glow: #6c63ff;

  --bg: var(--midnight);
  --bg-2: #0a1828;
  --text: #eaf0f7;
  --text-dim: #9fb0c3;
  --card-bg: rgba(255, 255, 255, 0.045);
  --card-border: rgba(255, 255, 255, 0.1);
  --glass: rgba(16, 42, 67, 0.55);

  --font-head: "Poppins", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;

  --maxw: 1180px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg: #f4f1ea;
  --bg-2: #e9e3d6;
  --text: #102a43;
  --text-dim: #4a5d72;
  --card-bg: rgba(16, 42, 67, 0.04);
  --card-border: rgba(16, 42, 67, 0.12);
  --glass: rgba(248, 248, 244, 0.7);
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.6s var(--ease), color 0.6s var(--ease);
}

a { color: inherit; text-decoration: none; }

/* ---------------- Background layers ---------------- */
.bg-aurora {
  position: fixed; inset: 0; z-index: -3; pointer-events: none;
  background:
    radial-gradient(60% 50% at 20% 10%, rgba(108, 99, 255, 0.18), transparent 60%),
    radial-gradient(50% 45% at 85% 30%, rgba(255, 122, 0, 0.14), transparent 60%),
    radial-gradient(55% 55% at 50% 100%, rgba(245, 197, 66, 0.1), transparent 60%);
  filter: blur(8px);
  animation: auroraShift 18s ease-in-out infinite alternate;
}
@keyframes auroraShift {
  0%   { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(2%, -2%, 0) scale(1.08); }
}
.bg-constellation {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
}
.bg-pages {
  position: fixed; inset: 0; z-index: -2; pointer-events: none; overflow: hidden;
}
.page-float {
  position: absolute; width: 46px; height: 60px;
  background: linear-gradient(160deg, rgba(248,248,244,0.9), rgba(200,210,225,0.55));
  border-radius: 3px 7px 7px 3px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0.5;
  will-change: transform;
}
.page-float::before {
  content: ""; position: absolute; left: 6px; right: 6px; top: 12px; height: 2px;
  background: rgba(16,42,67,0.25); box-shadow: 0 8px 0 rgba(16,42,67,0.18), 0 16px 0 rgba(16,42,67,0.14);
}

/* ---------------- Preloader ---------------- */
.preloader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--midnight);
  display: grid; place-items: center;
  transition: opacity 0.8s var(--ease), visibility 0.8s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader__inner { text-align: center; }
.preloader__logo { width: 120px; height: 120px; margin: 0 auto 18px; }
.preloader__bar {
  width: 200px; height: 3px; border-radius: 4px;
  background: rgba(255,255,255,0.12); overflow: hidden; margin: 0 auto;
}
.preloader__bar span {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--glow), var(--royal-orange));
  transition: width 0.2s linear;
}

/* ---------------- Cursor glow + spotlight ---------------- */
.cursor-glow {
  position: fixed; top: 0; left: 0; z-index: 1; pointer-events: none;
  width: 26px; height: 26px; border-radius: 50%;
  background: radial-gradient(circle, var(--glow), transparent 70%);
  mix-blend-mode: screen; transform: translate(-50%, -50%);
  transition: opacity 0.3s; opacity: 0.0;
}
.spotlight {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 30%), rgba(108,99,255,0.12), transparent 60%);
  transition: background 0.15s ease-out;
}

/* ---------------- Navbar ---------------- */
.nav {
  position: fixed; top: -90px; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 14px clamp(16px, 4vw, 48px);
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--card-border);
}
.nav__brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; }
.nav__word { font-size: 1.25rem; letter-spacing: -0.5px; }
.nav__logo-wrap, .footer__logo-wrap { position: relative; display: inline-grid; place-items: center; }
.nav__mark, .footer__mark { position: relative; z-index: 1; }
.nav__logo-img, .footer__logo-img, .hero__logo-img {
  position: absolute; inset: 0; margin: auto; width: 100%; height: 100%;
  object-fit: contain; z-index: 2; border-radius: 50%;
}
.hero__logo-img { position: absolute; }
.nav__parent {
  font-size: 0.62rem; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--text-dim); background: var(--card-bg); border: 1px solid var(--card-border);
  padding: 3px 8px; border-radius: 999px; margin-left: 2px; white-space: nowrap;
}
.nav__mark, .footer__mark { width: 30px; height: 30px; display: inline-block; }
.nav__links { display: flex; gap: 26px; list-style: none; }
.nav__links a { color: var(--text-dim); font-weight: 500; transition: color 0.25s; }
.nav__links a:hover { color: var(--text); }
.nav__actions { display: flex; align-items: center; gap: 12px; }
.theme-toggle {
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text);
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
  cursor: pointer; transition: transform 0.2s, background 0.2s;
}
.theme-toggle:hover { transform: rotate(25deg); background: var(--glow); color: #fff; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 13px 26px; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: 1px solid transparent; position: relative; overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, color 0.25s;
  will-change: transform;
}
.btn--solid { background: linear-gradient(120deg, var(--glow), var(--royal-orange)); color: #fff; box-shadow: 0 10px 30px rgba(108,99,255,0.35); }
.btn--solid:hover { box-shadow: 0 16px 40px rgba(255,122,0,0.4); }
.btn--outline { background: transparent; border-color: var(--card-border); color: var(--text); }
.btn--outline:hover { border-color: var(--glow); color: var(--glow); }
.btn--ghost { background: transparent; color: var(--text-dim); padding: 10px 16px; }
.btn--ghost:hover { color: var(--text); }

.ink-ripple::after {
  content: ""; position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.5); transform: scale(0); opacity: 0.6;
  width: 12px; height: 12px; pointer-events: none;
  animation: ripple 0.6s ease-out forwards;
}
@keyframes ripple { to { transform: scale(22); opacity: 0; } }

/* ---------------- Hero ---------------- */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 120px 20px 80px; position: relative;
}
.hero__logo { width: clamp(160px, 26vw, 240px); height: clamp(160px, 26vw, 240px); margin-bottom: 6px; }
.hero__title { font-family: var(--font-head); font-weight: 800; }
.hero__rinkea {
  font-size: clamp(3rem, 11vw, 7rem); letter-spacing: -2px; line-height: 1;
  background: linear-gradient(120deg, var(--paper), var(--gold) 40%, var(--royal-orange) 75%, var(--glow));
  -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-block;
}
.hero__sub { font-size: clamp(1.1rem, 2.4vw, 1.5rem); color: var(--text); margin-top: 8px; font-weight: 500; }
.hero__tagline { margin-top: 14px; color: var(--text-dim); font-size: 0.95rem; letter-spacing: 1px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.hero__tag-word { opacity: 0; transform: translateY(8px); }
.hero__tagline .dot { color: var(--glow); }
.hero__typing { margin-top: 18px; font-size: 1.05rem; color: var(--glow); min-height: 1.4em; font-weight: 600; }
.caret { animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__cta { display: flex; gap: 16px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }
.hero__stats { margin-top: 34px; display: flex; gap: 26px; flex-wrap: wrap; justify-content: center; color: var(--text-dim); font-size: 0.9rem; }
.rating span { color: var(--gold); }
.hero__powered { margin-top: 28px; font-size: 0.85rem; color: var(--text-dim); letter-spacing: 0.3px; }
.hero__powered a { color: var(--glow); font-weight: 600; }
.hero__powered a:hover { text-decoration: underline; }
.hero__compliance { margin-top: 16px; font-size: 0.78rem; color: var(--text-dim); display: flex; gap: 8px; align-items: center; justify-content: center; flex-wrap: wrap; }
.badge-13 {
  display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 7px;
  border-radius: 6px; font-weight: 700; font-size: 0.75rem; color: #fff;
  background: linear-gradient(120deg, var(--glow), var(--royal-orange));
}

/* ---------------- Section heads ---------------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 50px; }
.section-head h2 { font-family: var(--font-head); font-weight: 800; font-size: clamp(1.8rem, 4vw, 2.6rem); }
.section-head p { color: var(--text-dim); margin-top: 8px; }

/* ---------------- Features ---------------- */
.features { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.features__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.card {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px;
  padding: 30px 26px; backdrop-filter: blur(10px); transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  opacity: 0; transform: translateY(30px);
}
.card.in { opacity: 1; transform: translateY(0); }
.card:hover { border-color: var(--glow); box-shadow: 0 20px 50px rgba(108,99,255,0.18); transform: translateY(-6px); }
.card__icon { font-size: 2.2rem; margin-bottom: 14px; }
.card h3 { font-family: var(--font-head); font-weight: 600; margin-bottom: 8px; }
.card p { color: var(--text-dim); font-size: 0.93rem; }

/* ---------------- Stats ---------------- */
.stats { padding: 90px clamp(16px, 4vw, 48px); }
.stats__grid { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 22px; text-align: center; }
.stat { padding: 28px 12px; border-radius: 18px; background: var(--card-bg); border: 1px solid var(--card-border); }
.stat__num { display: block; font-family: var(--font-head); font-weight: 800; font-size: clamp(2.2rem, 5vw, 3.4rem); background: linear-gradient(120deg, var(--gold), var(--royal-orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__label { color: var(--text-dim); letter-spacing: 1px; text-transform: uppercase; font-size: 0.8rem; }

/* ---------------- Showcase ---------------- */
.showcase { padding: 110px clamp(16px, 4vw, 48px) 130px; }
.showcase__stage { display: grid; place-items: center; perspective: 1200px; }
.phone {
  width: 240px; height: 480px; border-radius: 36px; padding: 12px;
  background: linear-gradient(160deg, var(--ink-blue), #06121f);
  box-shadow: 0 40px 90px rgba(0,0,0,0.5), inset 0 0 0 2px rgba(255,255,255,0.06);
  position: relative; transform-style: preserve-3d; will-change: transform;
  animation: phoneSpin 14s linear infinite;
}
@keyframes phoneSpin {
  0% { transform: rotateY(-18deg) rotateX(4deg); }
  50% { transform: rotateY(18deg) rotateX(-2deg); }
  100% { transform: rotateY(-18deg) rotateX(4deg); }
}
.phone__notch { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); width: 90px; height: 18px; background: #06121f; border-radius: 0 0 14px 14px; z-index: 2; }
.phone__screen { width: 100%; height: 100%; border-radius: 26px; background: linear-gradient(160deg, var(--paper), #eceadf); overflow: hidden; padding: 46px 22px 22px; position: relative; }
.phone__page { position: relative; height: 100%; }
.phone__title { font-family: var(--font-head); font-weight: 800; color: var(--ink-blue); margin: 10px 0 14px; font-size: 1.1rem; }
.phone__line { height: 7px; border-radius: 4px; background: rgba(16,42,67,0.18); margin: 9px 0; }
.phone__line.short { width: 60%; }
.phone__page.flip { animation: pageFlip 1.6s var(--ease); }
@keyframes pageFlip {
  0% { transform: rotateY(0); opacity: 1; }
  45% { transform: rotateY(-92deg); opacity: 0.2; }
  55% { transform: rotateY(92deg); opacity: 0.2; }
  100% { transform: rotateY(0); opacity: 1; }
}

/* ---------------- Footer ---------------- */
.footer { padding: 70px 20px 50px; text-align: center; border-top: 1px solid var(--card-border); background: var(--bg-2); }
.footer__brand { font-family: var(--font-head); font-weight: 800; font-size: 1.3rem; display: flex; gap: 8px; align-items: center; justify-content: center; }
.footer__parent {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  margin: 14px auto 0; padding: 12px 22px; border-radius: 14px;
  background: var(--card-bg); border: 1px solid var(--card-border);
  transition: border-color 0.25s, transform 0.25s;
}
.footer__parent:hover { border-color: var(--glow); transform: translateY(-3px); }
.footer__parent-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-dim); }
.footer__parent-name { font-family: var(--font-head); font-weight: 800; letter-spacing: 3px; font-size: 1rem; background: linear-gradient(120deg, var(--gold), var(--royal-orange)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.footer__parent-sub { font-size: 0.72rem; color: var(--text-dim); }
.footer__links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; margin: 22px 0 6px; }
.footer__links a { color: var(--text-dim); font-size: 0.9rem; transition: color 0.25s; }
.footer__links a:hover { color: var(--glow); }
.footer__credit { margin-top: 16px; font-size: 0.85rem; color: var(--text-dim); }
.footer__credit a { color: var(--glow); font-weight: 600; }
.footer__credit a:hover { text-decoration: underline; }
.footer__tag { color: var(--text-dim); margin: 8px 0 18px; }
.footer__social { display: flex; gap: 18px; justify-content: center; font-size: 1.2rem; margin-bottom: 20px; }
.footer__social a { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--card-border); color: var(--text-dim); transition: transform 0.25s, color 0.25s, border-color 0.25s; }
.footer__social a:hover { transform: translateY(-4px); color: var(--glow); border-color: var(--glow); }
.footer__copy { color: var(--text-dim); font-size: 0.82rem; }

/* ---------------- Reveal util ---------------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------------- Responsive ---------------- */
@media (max-width: 980px) {
  .nav__links { display: none; }
}
@media (max-width: 520px) {
  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { width: 100%; }
  .quiz__opts { grid-template-columns: 1fr; }
  .visitors { font-size: 0.72rem; padding: 6px 10px; }
  .badges { display: none; }
}

/* ---------------- SVG logo parts ---------------- */
.logo-svg { width: 100%; height: 100%; overflow: visible; }
.logo-svg .pen { transform-origin: 50% 50%; }
.logo-svg .ink-drop { transform-origin: 50% 0; }
.logo-svg .bottle-fill { transform-origin: 50% 100%; }
.logo-svg .book-left, .logo-svg .book-right { transform-origin: 100% 50%; }
.logo-svg .eye-lid { transform-origin: 50% 50%; }
.logo-svg .glow-a { transform-origin: 50% 50%; }

/* ---------------- Ink trail canvas ---------------- */
.bg-inktrail { position: fixed; inset: 0; z-index: -1; pointer-events: none; }

/* ---------------- 1. Story spark ---------------- */
.spark { margin-top: 30px; max-width: 540px; }
.spark__label { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 12px; }
.spark__row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.spark__genre {
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text);
  padding: 12px 16px; border-radius: 999px; font-family: var(--font-body); font-size: 0.95rem; cursor: pointer;
}
.spark__output {
  margin-top: 18px; min-height: 3.2em; font-style: italic; color: var(--paper);
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px;
  padding: 16px 20px; backdrop-filter: blur(8px); transition: opacity 0.4s;
}
[data-theme="light"] .spark__output { color: var(--ink-blue); }

/* ---------------- 5. Testimonials ---------------- */
.quotes { padding: 110px clamp(16px, 4vw, 48px); overflow: hidden; }
.quotes__marquee { position: relative; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.quotes__track { display: flex; gap: 22px; width: max-content; animation: marquee 32s linear infinite; }
.quotes__marquee:hover .quotes__track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.quote {
  flex: 0 0 auto; width: 320px; background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: 20px; padding: 26px; backdrop-filter: blur(10px);
}
.quote blockquote { font-size: 1.05rem; line-height: 1.5; }
.quote figcaption { margin-top: 14px; color: var(--glow); font-weight: 600; font-size: 0.88rem; }

/* ---------------- 7. Build stepper ---------------- */
.build { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.build__steps { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.build__step {
  display: flex; align-items: center; gap: 8px; background: var(--card-bg); border: 1px solid var(--card-border);
  color: var(--text-dim); padding: 12px 22px; border-radius: 999px; cursor: pointer; font-weight: 600;
  font-family: var(--font-body); transition: all 0.3s var(--ease);
}
.build__step span {
  display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,0.08); font-size: 0.8rem;
}
.build__step.is-active { color: #fff; border-color: var(--glow); background: linear-gradient(120deg, rgba(108,99,255,0.25), rgba(255,122,0,0.18)); }
.build__step.is-active span { background: linear-gradient(120deg, var(--glow), var(--royal-orange)); }
.build__panel {
  background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 22px; padding: 34px;
  text-align: center; max-width: 620px; margin: 0 auto; backdrop-filter: blur(10px);
}
.build__panel h3 { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; margin-bottom: 10px; }
.build__panel p { color: var(--text-dim); }
.build__progress { margin-top: 22px; height: 6px; border-radius: 999px; background: rgba(255,255,255,0.1); overflow: hidden; }
.build__progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--glow), var(--royal-orange)); transition: width 0.5s var(--ease); }

/* ---------------- 9. Live ticker ---------------- */
.live { padding: 30px 20px 50px; display: grid; place-items: center; }
.live__pill {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 20px; border-radius: 999px;
  background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-dim); font-size: 0.9rem;
  backdrop-filter: blur(8px);
}
.live__dot { width: 9px; height: 9px; border-radius: 50%; background: #2ecc71; box-shadow: 0 0 0 0 rgba(46,204,113,0.6); animation: pulseDot 1.8s infinite; }
@keyframes pulseDot { 0% { box-shadow: 0 0 0 0 rgba(46,204,113,0.5); } 70% { box-shadow: 0 0 0 10px rgba(46,204,113,0); } 100% { box-shadow: 0 0 0 0 rgba(46,204,113,0); } }

/* ---------------- 12. Library embed ---------------- */
.library { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.library__frame { position: relative; aspect-ratio: 16 / 9; border-radius: 20px; overflow: hidden; border: 1px solid var(--card-border); background: var(--card-bg); }
.library__iframe { width: 100%; height: 100%; border: 0; }
.library__fallback { position: absolute; inset: 0; display: none; flex-direction: column; gap: 16px; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.library__frame.failed .library__fallback { display: flex; }

/* ---------------- 11. Quiz ---------------- */
.quiz { padding: 110px clamp(16px, 4vw, 48px); max-width: 720px; margin: 0 auto; }
.quiz__box { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 22px; padding: 36px; text-align: center; backdrop-filter: blur(10px); }
.quiz__q { font-family: var(--font-head); font-weight: 600; font-size: 1.3rem; margin-bottom: 22px; }
.quiz__opts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.quiz__opt { background: rgba(255,255,255,0.04); border: 1px solid var(--card-border); color: var(--text); padding: 16px; border-radius: 14px; cursor: pointer; font-family: var(--font-body); font-size: 0.95rem; transition: all 0.25s; }
.quiz__opt:hover { border-color: var(--glow); transform: translateY(-2px); }
.quiz__result { margin-top: 22px; font-weight: 600; color: var(--gold); min-height: 1.4em; }

/* ---------------- 10/6. Join forms ---------------- */
.join { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.join__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; }
.join__form { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; backdrop-filter: blur(10px); }
.join__form h3 { font-family: var(--font-head); font-weight: 600; margin-bottom: 4px; }
.join__form input, .join__form select { background: rgba(255,255,255,0.05); border: 1px solid var(--card-border); color: var(--text); padding: 12px 14px; border-radius: 12px; font-family: var(--font-body); font-size: 0.95rem; }
.join__form input:focus, .join__form select:focus { outline: none; border-color: var(--glow); }
.join__hint { font-size: 0.78rem; color: var(--text-dim); }

/* ---------------- Reading mode ---------------- */
body.read-mode { --bg: #f4efe3; --bg-2: #ece4d2; --text: #2b2117; --text-dim: #6b5d49; --card-bg: rgba(43,33,23,0.05); --card-border: rgba(43,33,23,0.14); --glass: rgba(248,248,244,0.8); }
body.read-mode .bg-aurora, body.read-mode .bg-constellation, body.read-mode .bg-inktrail, body.read-mode .bg-pages, body.read-mode .spotlight { opacity: 0.15; }
body.read-mode .hero__rinkea { background: linear-gradient(120deg, #2b2117, #8a6d3b); -webkit-background-clip: text; background-clip: text; }

/* ---------------- Confetti letters ---------------- */
.confetti-letter { position: fixed; z-index: 200; pointer-events: none; font-family: var(--font-head); font-weight: 800; will-change: transform, opacity; }

/* ---------------- Reveal additions ---------------- */
.quotes, .build, .live, .library, .quiz, .join, .prompt, .match, .timeline, .authors, .flipbook, .guestbook, .future { position: relative; }

/* ---------------- Language picker + sound ---------------- */
.lang-pick { background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text); padding: 8px 10px; border-radius: 999px; font-family: var(--font-body); font-size: 0.82rem; cursor: pointer; }

/* ---------------- 7. Scroll progress ---------------- */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; z-index: 120; background: linear-gradient(90deg, var(--glow), var(--royal-orange), var(--gold)); box-shadow: 0 0 12px rgba(108,99,255,0.6); }

/* ---------------- 6. Live visitors ---------------- */
.visitors { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: var(--glass); border: 1px solid var(--card-border); backdrop-filter: blur(12px); font-size: 0.8rem; color: var(--text-dim); }
.visitors__dot { width: 8px; height: 8px; border-radius: 50%; background: #2ecc71; animation: pulseDot 1.8s infinite; }

/* ---------------- 2. Streak ---------------- */
.streak { margin-top: 20px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 16px; border-radius: 999px; background: var(--card-bg); border: 1px solid var(--card-border); font-size: 0.85rem; color: var(--text-dim); }

/* ---------------- 1b. Daily prompt ---------------- */
.prompt { padding: 110px clamp(16px, 4vw, 48px); max-width: 760px; margin: 0 auto; }
.prompt__card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 22px; padding: 32px; text-align: center; backdrop-filter: blur(10px); }
.prompt__text { font-family: var(--font-head); font-weight: 600; font-size: 1.25rem; line-height: 1.5; min-height: 2.4em; }
.prompt__card .btn { margin-top: 18px; }

/* ---------------- 9. Mood matcher ---------------- */
.match { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.match__moods { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.match__mood { background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text); padding: 14px 22px; border-radius: 14px; cursor: pointer; font-size: 0.95rem; transition: all 0.25s; }
.match__mood:hover, .match__mood.is-active { border-color: var(--glow); transform: translateY(-3px); background: linear-gradient(120deg, rgba(108,99,255,0.2), rgba(255,122,0,0.15)); }
.match__result { text-align: center; margin-top: 22px; font-weight: 600; color: var(--gold); min-height: 1.4em; }

/* ---------------- 10. Timeline ---------------- */
.timeline { padding: 110px clamp(16px, 4vw, 48px); max-width: 860px; margin: 0 auto; }
.timeline__track { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; position: relative; margin-bottom: 26px; }
.timeline__step { display: flex; align-items: center; gap: 8px; background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text-dim); padding: 12px 18px; border-radius: 12px; cursor: pointer; font-weight: 600; font-family: var(--font-body); }
.timeline__step span { color: var(--glow); font-family: var(--font-head); }
.timeline__step.is-active { color: #fff; border-color: var(--glow); }
.timeline__bar { position: absolute; left: 0; bottom: -10px; height: 4px; width: 100%; background: rgba(255,255,255,0.08); border-radius: 999px; }
.timeline__bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--glow), var(--royal-orange)); border-radius: 999px; transition: width 0.5s var(--ease); }
.timeline__text { text-align: center; color: var(--text-dim); }

/* ---------------- 11. Author carousel ---------------- */
.authors { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.authors__carousel { display: flex; align-items: center; gap: 14px; }
.authors__viewport { overflow: hidden; flex: 1; }
.authors__track { display: flex; gap: 20px; transition: transform 0.5s var(--ease); }
.author { flex: 0 0 260px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 20px; padding: 28px; text-align: center; backdrop-filter: blur(10px); }
.author__avatar { width: 72px; height: 72px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; font-size: 1.4rem; color: #fff; background: linear-gradient(120deg, var(--glow), var(--royal-orange)); }
.author figcaption h3 { font-family: var(--font-head); font-weight: 600; }
.author figcaption span { color: var(--text-dim); font-size: 0.82rem; }
.authors__nav { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text); font-size: 1.4rem; cursor: pointer; }
.authors__nav:hover { border-color: var(--glow); }

/* ---------------- 12. Flipbook ---------------- */
.flipbook { padding: 110px clamp(16px, 4vw, 48px); }
.flipbook__stage { display: grid; place-items: center; perspective: 1400px; }
.book { position: relative; width: 240px; height: 320px; transform-style: preserve-3d; }
.book__page { position: absolute; inset: 0; border-radius: 8px 14px 14px 8px; display: grid; place-items: center; text-align: center; padding: 24px; backface-visibility: hidden; font-family: var(--font-head); font-weight: 600; box-shadow: 0 24px 50px rgba(0,0,0,0.4); cursor: grab; }
.book__page--front { background: linear-gradient(160deg, var(--paper), #eceadf); color: var(--ink-blue); transform-origin: left center; z-index: 2; }
.book__page--back { background: linear-gradient(160deg, var(--ink-blue), #06121f); color: var(--paper); transform: rotateY(180deg); }
.book.flipped .book__page--front { transform: rotateY(-180deg); transition: transform 0.6s var(--ease); }
.book.flipped .book__page--back { transform: rotateY(0); transition: transform 0.6s var(--ease); z-index: 3; }

/* ---------------- 4. Guestbook ---------------- */
.guestbook { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.guestbook__form { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 28px; }
.guestbook__form input { background: var(--card-bg); border: 1px solid var(--card-border); color: var(--text); padding: 12px 16px; border-radius: 12px; font-family: var(--font-body); min-width: 200px; }
.guestbook__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.guestbook__item { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 14px; padding: 16px; }
.guestbook__item b { color: var(--glow); }
.guestbook__item span { color: var(--text-dim); display: block; margin-top: 6px; }

/* ---------------- 13. Toasts + badges ---------------- */
.toast-wrap { position: fixed; top: 80px; right: 16px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--glass); border: 1px solid var(--card-border); backdrop-filter: blur(14px); color: var(--text); padding: 12px 18px; border-radius: 12px; font-size: 0.88rem; box-shadow: 0 12px 30px rgba(0,0,0,0.3); transform: translateX(120%); transition: transform 0.4s var(--ease); max-width: 280px; }
.toast.show { transform: translateX(0); }
.toast b { color: var(--gold); }
.badges { position: fixed; left: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--card-border); font-size: 0.75rem; color: var(--text); backdrop-filter: blur(10px); opacity: 0; transform: translateX(-120%); transition: all 0.4s var(--ease); }
.badge.show { opacity: 1; transform: translateX(0); }
.badge.locked { opacity: 0.4; filter: grayscale(1); }

/* ---------------- 15-19. Future stubs ---------------- */
.future { padding: 110px clamp(16px, 4vw, 48px); max-width: var(--maxw); margin: 0 auto; }
.future__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; }
.future__card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 24px; }
.future__card h3 { font-family: var(--font-head); font-weight: 600; margin-bottom: 8px; }
.future__card p { color: var(--text-dim); font-size: 0.88rem; margin-bottom: 12px; }
.future__card code { font-size: 0.74rem; color: var(--glow); background: rgba(108,99,255,0.12); padding: 3px 8px; border-radius: 6px; }

/* ---------------- Auth modal ---------------- */
.modal { position: fixed; inset: 0; z-index: 400; display: none; place-items: center; background: rgba(4,10,18,0.7); backdrop-filter: blur(6px); }
.modal.open { display: grid; }
.modal__box { background: var(--bg-2); border: 1px solid var(--card-border); border-radius: 20px; padding: 32px; width: min(380px, 90vw); position: relative; display: flex; flex-direction: column; gap: 12px; }
.modal__box h3 { font-family: var(--font-head); }
.modal__sub { color: var(--text-dim); font-size: 0.85rem; }
.modal__sub code, .modal__box code { color: var(--glow); }
.modal__close { position: absolute; top: 12px; right: 14px; background: none; border: none; color: var(--text); font-size: 1.6rem; cursor: pointer; }
.modal__box input { background: rgba(255,255,255,0.06); border: 1px solid var(--card-border); color: var(--text); padding: 12px 14px; border-radius: 12px; font-family: var(--font-body); }


