/* =====================================================================
   SRIVARI PUBLICATIONS - dark blue theme
   Colours can be changed from js/config.js (theme section) or here.
   ===================================================================== */

:root {
  --bg-0: #040a1d;
  --bg-1: #071231;
  --bg-2: #0a1b4a;
  --card: rgba(255, 255, 255, .045);
  --line: rgba(160, 190, 255, .14);
  --line-2: rgba(160, 190, 255, .28);
  --text: #eaf0ff;
  --muted: #a3b4da;
  --dim: #7a8dbd;
  --gold: #f4c24f;
  --gold-2: #ffe08f;
  --sky: #6cb0ff;
  --free: #2dd4bf;
  --danger: #ff6b81;
  --ok: #34d399;
  --radius: 20px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --font-head: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --shadow: 0 30px 60px -25px rgba(0, 0, 0, .75);
  --header-h: 78px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font-body); color: var(--text); background: var(--bg-0);
  line-height: 1.65; font-size: 16px; overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; display: block; }
main, .site-footer { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 0; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--gold); color: #1a1300; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 8px; }
.container { width: min(1200px, 100% - 2.5rem); margin-inline: auto; }

/* thin themed scrollbar */
* { scrollbar-width: thin; scrollbar-color: #274392 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #1f3a85; border-radius: 10px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-track { background: var(--bg-0); }

/* icons */
.i, [data-icon] { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.i svg, [data-icon] svg { width: 100%; height: 100%; }

/* ---------------------------------------------------------------------
   Background effects
   --------------------------------------------------------------------- */
.bg-fx {
  position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: linear-gradient(180deg, var(--bg-0) 0%, var(--bg-1) 45%, var(--bg-0) 100%);
}
.blob { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .42; will-change: transform; }
.b1 { width: 56vmax; height: 56vmax; background: #1d4ed8; top: -22vmax; left: -14vmax; animation: drift1 26s ease-in-out infinite alternate; }
.b2 { width: 46vmax; height: 46vmax; background: #0ea5e9; opacity: .22; bottom: -18vmax; right: -12vmax; animation: drift2 32s ease-in-out infinite alternate; }
.b3 { width: 38vmax; height: 38vmax; background: #4f46e5; opacity: .26; top: 38%; left: 46%; animation: drift3 38s ease-in-out infinite alternate; }
.dots {
  position: absolute; inset: 0; opacity: .8;
  background-image: radial-gradient(rgba(170, 200, 255, .13) 1px, transparent 1.2px);
  background-size: 34px 34px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 35%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse at 50% 35%, #000 20%, transparent 78%);
}
@keyframes drift1 { to { transform: translate(14vmax, 10vmax) scale(1.15); } }
@keyframes drift2 { to { transform: translate(-12vmax, -9vmax) scale(1.1); } }
@keyframes drift3 { to { transform: translate(-16vmax, 8vmax) scale(.85); } }

.scroll-progress {
  position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 60; transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--sky), var(--gold));
}

/* ---------------------------------------------------------------------
   Preloader
   --------------------------------------------------------------------- */
.preloader {
  position: fixed; inset: 0; z-index: 300; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 42%, #12307a 0%, #040a1d 68%);
  transition: opacity .5s var(--ease), visibility .5s, transform .7s var(--ease);
}
.no-js .preloader { display: none; }
.no-js .toolbar, .no-js .chips, .no-js .result-count, .no-js .pi { display: none; }
.quote:empty { display: none; }
.preloader.hide { opacity: 0; visibility: hidden; transform: scale(1.08); }
.pre-inner { display: grid; justify-items: center; gap: 1.6rem; }
.pre-inner img { animation: preLogo .8s var(--ease) both; filter: drop-shadow(0 0 28px rgba(244, 194, 79, .45)); }
.pre-line { width: 150px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.pre-line span { display: block; height: 100%; width: 100%; transform-origin: 0 50%; background: linear-gradient(90deg, var(--sky), var(--gold)); animation: preBar .65s var(--ease) both; }
@keyframes preLogo { from { opacity: 0; transform: scale(.5) rotate(-18deg); } to { opacity: 1; transform: none; } }
@keyframes preBar { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------------------------------------------------------------------
   Header / navigation
   --------------------------------------------------------------------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50; height: var(--header-h);
  display: flex; align-items: center;
  transition: height .4s var(--ease), background .4s, box-shadow .4s, border-color .4s, transform .5s var(--ease);
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  --header-h: 66px; height: 66px;
  background: rgba(5, 12, 36, .72); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-color: var(--line); box-shadow: 0 12px 40px -18px rgba(0, 0, 0, .8);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; }
.brand-logo { width: 46px; height: 46px; object-fit: contain; transition: transform .6s var(--spring); filter: drop-shadow(0 4px 14px rgba(244, 194, 79, .25)); }
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.1); }
.brand-text { display: grid; line-height: 1.05; }
.brand-text b { font-family: var(--font-head); font-size: 3.5rem; letter-spacing: .01em; }
.brand-text small { font-size: 1rem; letter-spacing: .34em; text-transform: uppercase; color: var(--gold); font-weight: 500; margin-top: 3px; }
.nav-links { display: flex; align-items: center; gap: .4rem; }
.nav-link { position: relative; padding: .55rem 1rem; font-size: .92rem; font-weight: 500; color: var(--muted); transition: color .3s; }
.nav-link::after {
  content: ''; position: absolute; left: 1rem; right: 1rem; bottom: .2rem; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2)); transform: scaleX(0); transform-origin: 0 50%;
  transition: transform .45s var(--ease);
}
.nav-link:hover, .nav-link.active { color: #fff; }
.nav-link:hover::after, .nav-link.active::after { transform: scaleX(1); }
.nav-actions { display: flex; align-items: center; gap: .5rem; }
.icon-btn {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 1.15rem;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line); transition: background .3s, transform .3s var(--spring), border-color .3s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .13); border-color: var(--line-2); transform: translateY(-2px); }
.cart-badge {
  position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 20px; font-size: .7rem; font-weight: 600;
  display: grid; place-items: center; background: var(--gold); color: #1a1300; transform: scale(0); transition: transform .4s var(--spring);
}
.cart-badge.show { transform: scale(1); }
.cart-badge.bump, .cart-btn.bump { animation: bump .6s var(--spring); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }
.burger { display: none; width: 44px; height: 44px; border-radius: 50%; position: relative; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); }
.burger span { position: absolute; left: 12px; right: 12px; height: 2px; background: #fff; border-radius: 2px; transition: transform .45s var(--ease), opacity .3s, top .45s var(--ease); }
.burger span:nth-child(1) { top: 15px; } .burger span:nth-child(2) { top: 21px; } .burger span:nth-child(3) { top: 27px; }
body.nav-open .burger span:nth-child(1) { top: 21px; transform: rotate(45deg); }
body.nav-open .burger span:nth-child(2) { opacity: 0; }
body.nav-open .burger span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  padding: .85rem 1.55rem; border-radius: 999px; font-weight: 600; font-size: .92rem; letter-spacing: .01em; white-space: nowrap;
  border: 1px solid transparent; transition: transform .35s var(--ease), box-shadow .35s, background .35s, color .35s, border-color .35s;
}
.btn::after {
  content: ''; position: absolute; inset: 0; z-index: -1; transform: translateX(-130%);
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .42) 50%, transparent 70%); transition: transform .8s var(--ease);
}
.btn:hover::after { transform: translateX(130%); }
.btn:hover { transform: translateY(-3px); }
.btn:active { transform: translateY(0) scale(.97); }
.btn .i { transition: transform .35s var(--ease); }
.btn:hover .i-arrow, .btn:hover .arrow-r { transform: translateX(4px); }
.btn-gold { background: linear-gradient(135deg, var(--gold-2), var(--gold) 55%, #e39d1b); color: #1a1300; box-shadow: 0 14px 34px -14px rgba(244, 194, 79, .75); }
.btn-gold:hover { box-shadow: 0 20px 44px -12px rgba(244, 194, 79, .85); }
.btn-teal { background: linear-gradient(135deg, #7ff0dc, var(--free)); color: #04231f; box-shadow: 0 14px 34px -14px rgba(45, 212, 191, .7); }
.btn-teal:hover { box-shadow: 0 20px 44px -12px rgba(45, 212, 191, .8); }
.btn-ghost { background: rgba(255, 255, 255, .05); border-color: var(--line-2); color: #fff; backdrop-filter: blur(8px); }
.btn-ghost:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .45); }
.btn-sm { padding: .55rem 1.05rem; font-size: .82rem; }
.btn-lg { padding: 1rem 1.9rem; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn.disabled { opacity: .55; pointer-events: none; filter: saturate(.6); }
.btn.loading { pointer-events: none; }
.btn.loading .btn-label { opacity: .0; }
.btn.loading::before {
  content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(26, 19, 0, .25); border-top-color: #1a1300; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); transform: scale(0); animation: ripple .65s linear; pointer-events: none; z-index: -1; }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }

/* ---------------------------------------------------------------------
   Shared building blocks
   --------------------------------------------------------------------- */
.section { position: relative; padding: clamp(4.5rem, 9vw, 8rem) 0; }
.section.alt::before {
  content: ''; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, transparent, rgba(10, 27, 74, .55) 18%, rgba(10, 27, 74, .55) 82%, transparent);
}
.glass { background: linear-gradient(145deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)); border: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--card); }
.card::before {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .45s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(108, 176, 255, .16), transparent 45%);
}
.card:hover::before { opacity: 1; }

.sec-head { max-width: 700px; margin: 0 auto 2.6rem; text-align: center; }
.sec-head.left { margin-left: 0; text-align: left; }
.eyebrow {
  display: inline-flex; align-items: center; gap: .7rem; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .28em; color: var(--gold); margin-bottom: 1rem;
}
.eyebrow::before, .eyebrow::after { content: ''; width: 28px; height: 1px; background: linear-gradient(90deg, transparent, var(--gold)); }
.eyebrow::after { transform: scaleX(-1); }
.sec-head.left .eyebrow::before { display: none; }
.sec-head h2 { font-size: clamp(2rem, 4.6vw, 3.25rem); margin-bottom: 1rem; }
.sec-head p { color: var(--muted); font-size: 1.02rem; }
.sec-head::after { content: ''; display: block; width: 76px; height: 3px; margin: 1.4rem auto 0; border-radius: 3px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.sec-head.left::after { margin-left: 0; background: linear-gradient(90deg, var(--gold), transparent); }

.pill {
  display: inline-flex; align-items: center; gap: .6rem; padding: .45rem 1.1rem; border-radius: 999px; font-size: .8rem; font-weight: 500; letter-spacing: .04em;
  background: rgba(244, 194, 79, .1); border: 1px solid rgba(244, 194, 79, .35); color: var(--gold-2);
}
.pill::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(244, 194, 79, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(244, 194, 79, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 194, 79, 0); } }

/* scroll reveal */
.js [data-reveal] { opacity: 0; transform: translateY(34px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal="left"] { transform: translateX(-46px); }
.js [data-reveal="right"] { transform: translateX(46px); }
.js [data-reveal="zoom"] { transform: scale(.92); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js [data-reveal].done { transition-delay: 0s; }

/* ---------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; padding: calc(var(--header-h) + 2.5rem) 0 5rem; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 3rem; align-items: center; }
.hero-copy { display: grid; gap: 1.6rem; justify-items: start; }
.hero h1 { font-size: clamp(2.7rem, 6.2vw, 5rem); font-weight: 800; letter-spacing: -.01em; }
.hero h1 span { display: block; }
.shine {
  display: inline-block !important; padding-bottom: .08em;
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-2) 30%, #fff 46%, var(--gold-2) 60%, var(--gold) 100%); background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite;
}
@keyframes shimmer { to { background-position: -220% 0; } }
.lead { font-size: clamp(1rem, 1.5vw, 1.15rem); color: var(--muted); max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; }
.js .hero-anim { opacity: 0; }
.ready .hero-anim { animation: heroIn 1.1s var(--ease) both; animation-delay: calc(var(--i, 0) * .14s + .1s); }
@keyframes heroIn { from { opacity: 0; transform: translateY(36px); filter: blur(8px); } to { opacity: 1; transform: none; filter: none; } }

.stats { display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem; padding-top: 1.4rem; margin-top: .4rem; border-top: 1px solid var(--line); width: 100%; max-width: 560px; }
.stat { display: grid; }
.stat b { font-family: var(--font-head); font-size: clamp(1.7rem, 3vw, 2.3rem); color: #fff; line-height: 1.1; }
.stat span { font-size: .78rem; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; }

.hero-visual { position: relative; display: grid; place-items: center; }
.halo {
  position: absolute; width: min(500px, 92%); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(70, 120, 255, .38), rgba(70, 120, 255, 0) 66%);
  animation: breathe 7s ease-in-out infinite;
}
.halo::before, .halo::after { content: ''; position: absolute; inset: 7%; border-radius: 50%; border: 1px dashed rgba(244, 194, 79, .35); animation: spin 60s linear infinite; }
.halo::after { inset: 20%; border-style: solid; border-color: rgba(108, 176, 255, .2); animation-direction: reverse; animation-duration: 90s; }
@keyframes breathe { 50% { transform: scale(1.1); opacity: .8; } }
.book-stack { --mx: 0; --my: 0; position: relative; width: min(470px, 100%); aspect-ratio: 1 / 1.08; }
.float-book {
  position: absolute; width: var(--w); left: var(--l); top: var(--t); z-index: var(--z);
  transform: translate3d(calc(var(--mx) * var(--depth) * 1px), calc(var(--my) * var(--depth) * 1px), 0) rotate(var(--rot));
  transition: transform .5s var(--ease);
}
.float-book .cover { --ry: -16deg; transform: perspective(900px) rotateY(var(--ry)); animation: floaty 7s ease-in-out infinite; animation-delay: var(--fd, 0s); box-shadow: -14px 26px 50px rgba(0, 0, 0, .6), 0 0 70px rgba(70, 120, 255, .28); }
.fbk-1 { --w: 52%; --l: 25%; --t: 6%; --z: 3; --rot: -2deg; --depth: 16; --fd: 0s; }
.fbk-2 { --w: 40%; --l: 0%; --t: 38%; --z: 2; --rot: -9deg; --depth: 30; --fd: -2.4s; }
.fbk-3 { --w: 38%; --l: 62%; --t: 44%; --z: 4; --rot: 8deg; --depth: 8; --fd: -4.6s; }
.fbk-2 .cover { --ry: 14deg; } .fbk-3 .cover { --ry: -22deg; }
@keyframes floaty {
  0%, 100% { transform: perspective(900px) rotateY(var(--ry)) translateY(0); }
  50% { transform: perspective(900px) rotateY(calc(var(--ry) + 5deg)) translateY(-18px); }
}

.sparks { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.spark { position: absolute; bottom: -12px; left: var(--x); width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); opacity: 0; animation: sparkUp var(--t) linear infinite; animation-delay: var(--dl); box-shadow: 0 0 10px var(--c); }
@keyframes sparkUp { 0% { transform: translate(0, 0); opacity: 0; } 10% { opacity: .9; } 100% { transform: translate(var(--dx), -105vh); opacity: 0; } }
.scroll-cue { position: absolute; left: 50%; bottom: 1.6rem; width: 26px; height: 42px; margin-left: -13px; border: 2px solid rgba(255, 255, 255, .35); border-radius: 20px; opacity: .8; }
.scroll-cue span { position: absolute; left: 50%; top: 7px; width: 4px; height: 8px; margin-left: -2px; border-radius: 4px; background: var(--gold); animation: wheel 1.8s ease-in-out infinite; }
@keyframes wheel { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(14px); opacity: 0; } 100% { opacity: 0; } }

/* ---------------------------------------------------------------------
   Marquee
   --------------------------------------------------------------------- */
.marquee { overflow: hidden; border-block: 1px solid var(--line); background: rgba(10, 27, 74, .45); padding: 1rem 0; position: relative; }
.marquee::before, .marquee::after { content: ''; position: absolute; top: 0; bottom: 0; width: 120px; z-index: 2; pointer-events: none; }
.marquee::before { left: 0; background: linear-gradient(90deg, var(--bg-1), transparent); }
.marquee::after { right: 0; background: linear-gradient(-90deg, var(--bg-1), transparent); }
.marquee-track { display: flex; width: max-content; gap: 2.6rem; align-items: center; animation: marquee 38s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span { font-family: var(--font-head); font-size: 1.35rem; font-style: italic; color: var(--muted); white-space: nowrap; }
.marquee-track i { width: 8px; height: 8px; transform: rotate(45deg); background: var(--gold); flex: none; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------------------------------------------------------------------
   About
   --------------------------------------------------------------------- */
.about-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.frame { position: relative; padding: 10px; border-radius: 30px; background: linear-gradient(145deg, rgba(244, 194, 79, .6), rgba(108, 176, 255, .25) 50%, rgba(255, 255, 255, .06)); box-shadow: var(--shadow); }
.frame > img { width: 100%; aspect-ratio: 1 / 1.04; object-fit: cover; border-radius: 22px; transition: transform 1.2s var(--ease); }
.frame:hover > img { transform: scale(1.02); }
.float-badge {
  position: absolute; display: grid; justify-items: center; gap: 2px; padding: .9rem 1.2rem; border-radius: 18px; text-align: center;
  background: rgba(7, 18, 49, .78); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .8);
  animation: floaty2 6s ease-in-out infinite;
}
.fb-1 { left: -22px; bottom: 38px; } .fb-2 { right: -18px; top: 38px; animation-delay: -3s; }
.float-badge b { font-family: var(--font-head); font-size: 1.7rem; color: var(--gold); line-height: 1; }
.float-badge small { font-size: .68rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.float-badge .i { color: var(--sky); font-size: 1.3rem; }
@keyframes floaty2 { 50% { transform: translateY(-12px); } }
.about-copy { display: grid; gap: 1.2rem; }
.about-copy .sec-head { margin-bottom: .4rem; }
.about-copy p { color: var(--muted); margin-bottom: 1rem; }
.points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-top: .4rem; }
.point { display: flex; gap: .9rem; padding: 1.1rem; transition: transform .45s var(--ease), border-color .45s; }
.point:hover { transform: translateY(-5px); border-color: var(--line-2); }
.point .pi, .ci {
  width: 44px; height: 44px; border-radius: 14px; display: inline-grid; place-items: center; flex: none; font-size: 1.2rem; color: var(--gold);
  background: linear-gradient(135deg, rgba(244, 194, 79, .22), rgba(244, 194, 79, .05)); border: 1px solid rgba(244, 194, 79, .32);
  transition: transform .5s var(--spring);
}
.point:hover .pi, .c-card:hover .ci { transform: rotate(-8deg) scale(1.12); }
.point h4 { font-family: var(--font-body); font-size: .98rem; font-weight: 600; margin-bottom: .2rem; }
.point p { font-size: .85rem; line-height: 1.5; margin: 0; }
.quote { margin: .6rem 0 0; padding: 1.3rem 1.5rem; border-left: 3px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; background: linear-gradient(90deg, rgba(244, 194, 79, .09), transparent); }
.quote p { font-family: var(--font-head); font-style: italic; font-size: 1.15rem; color: #fff; margin: 0 0 .5rem; }
.quote cite { font-size: .8rem; color: var(--gold); font-style: normal; letter-spacing: .08em; text-transform: uppercase; }

/* ---------------------------------------------------------------------
   Books
   --------------------------------------------------------------------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; padding: .9rem; border-radius: 26px; }
.search { position: relative; flex: 1 1 260px; display: flex; align-items: center; }
.search .i, .search [data-icon] { position: absolute; left: 1.1rem; color: var(--dim); pointer-events: none; transition: color .3s; }
.search input {
  width: 100%; padding: .8rem 1.1rem .8rem 3rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: .92rem;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.search input::placeholder { color: var(--dim); }
.search input:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 4px rgba(244, 194, 79, .14); }
.search:focus-within [data-icon] { color: var(--gold); }
.seg { position: relative; display: inline-flex; padding: 5px; border-radius: 999px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); }
.seg-thumb { position: absolute; top: 5px; bottom: 5px; left: 0; width: 0; border-radius: 999px; background: linear-gradient(135deg, var(--gold-2), var(--gold)); box-shadow: 0 8px 22px -8px rgba(244, 194, 79, .8); transition: transform .5s var(--ease), width .5s var(--ease); }
.seg-btn { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .45rem; padding: .55rem 1.15rem; border-radius: 999px; font-size: .86rem; font-weight: 500; color: var(--muted); white-space: nowrap; transition: color .35s; }
.seg-btn em { font-style: normal; font-size: .7rem; padding: 1px 7px; border-radius: 20px; background: rgba(255, 255, 255, .1); transition: background .35s; }
.seg-btn:hover { color: #fff; }
.seg-btn.active { color: #1a1300; }
.seg-btn.active em { background: rgba(26, 19, 0, .15); }
.select { position: relative; display: inline-flex; align-items: center; }
.select select {
  appearance: none; -webkit-appearance: none; padding: .8rem 2.6rem .8rem 1.2rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: .88rem; cursor: pointer;
  transition: border-color .3s, box-shadow .3s;
}
.select select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(244, 194, 79, .14); }
.select select option { background: #0a1b4a; color: #fff; }
.select [data-icon] { position: absolute; right: 1rem; pointer-events: none; color: var(--muted); font-size: 1rem; }

.chips { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.4rem 0 .6rem; }
.chips.center { justify-content: center; margin-bottom: 2rem; }
.chip { padding: .45rem 1.05rem; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 255, 255, .04); color: var(--muted); font-size: .82rem; transition: all .35s var(--ease); }
.chip:hover { color: #fff; border-color: var(--line-2); transform: translateY(-2px); }
.chip.active { background: rgba(244, 194, 79, .14); border-color: var(--gold); color: var(--gold-2); }
.result-count { font-size: .82rem; color: var(--dim); margin: .4rem 0 1.4rem; min-height: 1.3em; }

.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 1.7rem; }
.book-card { display: flex; flex-direction: column; padding: 1.1rem; transition: transform .45s var(--ease), border-color .45s, box-shadow .45s, background .45s; }
.book-card.done { transition: transform .45s var(--ease), border-color .45s, box-shadow .45s, background .45s, opacity .3s; }
.book-card:hover { transform: translateY(-10px); border-color: var(--line-2); background: rgba(255, 255, 255, .07); box-shadow: 0 34px 60px -28px rgba(0, 0, 0, .9), 0 0 0 1px rgba(108, 176, 255, .1); }
.cover-wrap { position: relative; padding: 2.5rem 1rem 1.4rem; border-radius: 14px; margin-bottom: 1rem; background: radial-gradient(circle at 50% 100%, rgba(70, 120, 255, .26), rgba(7, 18, 49, .3) 70%); perspective: 900px; }
.cover-wrap .cover { margin-inline: auto; width: min(78%, 190px); transition: transform .35s var(--ease), box-shadow .5s; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); will-change: transform; }
.cover-wrap.tilting .cover { transition: transform .08s linear, box-shadow .5s; }
.book-card:hover .cover { box-shadow: -10px 24px 40px rgba(0, 0, 0, .65), 0 0 40px rgba(70, 120, 255, .3); }

/* the book cover look (also used in hero, modal and cart) */
.cover { position: relative; aspect-ratio: 2 / 3; border-radius: 3px 10px 10px 3px; overflow: hidden; background: #0a1b4a; box-shadow: -8px 16px 30px rgba(0, 0, 0, .55); }
.cover > img { width: 100%; height: 100%; object-fit: cover; }
.cover::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 8%; z-index: 2; pointer-events: none; background: linear-gradient(90deg, rgba(0, 0, 0, .5), rgba(255, 255, 255, .16) 45%, rgba(0, 0, 0, .08)); }
.cover::after { content: ''; position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, .22) 50%, transparent 62%) 150% 0 / 260% 100% no-repeat; transition: background-position 1s var(--ease); }
.book-card:hover .cover::after, .bm-cover:hover .cover::after, .float-book:hover .cover::after { background-position: -50% 0; }
.gen-cover { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .6rem; padding: 14% 12% 12% 16%; background: linear-gradient(150deg, var(--g1), var(--g2)); color: #fff; }
.gen-cover b { font-family: var(--font-head); font-size: clamp(.9rem, 2.2vw, 1.25rem); line-height: 1.2; }
.gen-cover i { width: 40%; height: 2px; background: var(--gold); }
.gen-cover small { font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; color: var(--gold-2); }

.tag { position: absolute; top: .7rem; left: .7rem; z-index: 4; padding: .22rem .7rem; border-radius: 999px; font-size: .68rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.tag-free { background: linear-gradient(135deg, #7ff0dc, var(--free)); color: #04231f; box-shadow: 0 6px 18px -6px rgba(45, 212, 191, .8); }
.tag-badge { left: auto; right: .7rem; background: linear-gradient(135deg, var(--gold-2), var(--gold)); color: #1a1300; box-shadow: 0 6px 18px -6px rgba(244, 194, 79, .8); }
.tag-off { background: rgba(255, 107, 129, .18); border: 1px solid rgba(255, 107, 129, .5); color: #ffb3c0; }
.quick {
  position: absolute; left: 50%; bottom: .8rem; z-index: 5; transform: translate(-50%, 14px); opacity: 0; display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap;
  padding: .45rem 1rem; border-radius: 999px; font-size: .76rem; font-weight: 600; background: rgba(5, 12, 36, .85); backdrop-filter: blur(8px); border: 1px solid var(--line-2);
  transition: opacity .4s var(--ease), transform .45s var(--ease), background .3s;
}
.quick:hover { background: var(--gold); color: #1a1300; }
.book-card:hover .quick, .quick:focus-visible { opacity: 1; transform: translate(-50%, 0); }
@media (hover: none) { .quick { opacity: 1; transform: translate(-50%, 0); } }
.info { display: flex; flex-direction: column; flex: 1; gap: .25rem; }
.info .cat { font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--sky); font-weight: 500; }
.info h3 { font-size: 1.18rem; line-height: 1.25; cursor: pointer; transition: color .3s; }
.book-card:hover .info h3 { color: var(--gold-2); }
.info .author { font-size: .84rem; color: var(--muted); }
.buy { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: auto; padding-top: 1rem; }
.price { display: flex; align-items: baseline; gap: .45rem; font-size: 1.15rem; font-weight: 600; color: #fff; }
.price s { font-size: .82rem; color: var(--dim); font-weight: 400; }
.price.free { color: var(--free); font-size: 1rem; letter-spacing: .04em; }
.empty { text-align: center; padding: 4rem 1rem; color: var(--muted); display: grid; justify-items: center; gap: .6rem; }
.empty[hidden] { display: none; }
.empty [data-icon] { font-size: 2.6rem; color: var(--dim); }
.empty h3 { font-size: 1.5rem; color: #fff; }

/* ---------------------------------------------------------------------
   Gallery
   --------------------------------------------------------------------- */
.masonry { column-count: 3; column-gap: 1.2rem; }
.g-item { position: relative; break-inside: avoid; margin: 0 0 1.2rem; border-radius: 18px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); background: var(--bg-2); }
.g-item img { width: 100%; height: auto; transition: transform 1s var(--ease), filter .6s; }
.g-item:hover img { transform: scale(1.08); filter: brightness(.7); }
.g-item figcaption { position: absolute; inset: auto 0 0 0; padding: 2.4rem 1.2rem 1.1rem; display: grid; gap: 2px; background: linear-gradient(0deg, rgba(3, 8, 25, .92), transparent); transform: translateY(40%); opacity: 0; transition: transform .55s var(--ease), opacity .55s var(--ease); }
.g-item figcaption span { font-family: var(--font-head); font-size: 1.1rem; }
.g-item figcaption em { font-style: normal; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); }
.g-item:hover figcaption, .g-item:focus-visible figcaption { transform: none; opacity: 1; }
.g-zoom { position: absolute; top: .9rem; right: .9rem; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(5, 12, 36, .7); backdrop-filter: blur(8px); border: 1px solid var(--line-2); opacity: 0; transform: scale(.6) rotate(-30deg); transition: all .5s var(--spring); }
.g-item:hover .g-zoom { opacity: 1; transform: none; }
@media (hover: none) { .g-item figcaption { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 1.6rem; align-items: stretch; }
.contact-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
.c-card { display: flex; flex-direction: column; gap: 1rem; padding: 1.5rem; transition: transform .45s var(--ease), border-color .45s; }
.c-card:hover { transform: translateY(-6px); border-color: var(--line-2); }
.c-card h4 { font-family: var(--font-body); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); font-weight: 500; margin-bottom: .25rem; }
.c-card p, .c-card a { font-size: .95rem; color: #fff; word-break: break-word; }
.c-card a:hover { color: var(--gold-2); }
.contact-side { padding: 2rem; display: flex; flex-direction: column; justify-content: center; gap: 1.2rem; }
.contact-side h3 { font-size: 1.7rem; }
.contact-side p { color: var(--muted); }
.contact-side .btns { display: flex; flex-wrap: wrap; gap: .7rem; }
.map { width: 100%; min-height: 220px; flex: 1; border: 0; border-radius: 16px; filter: invert(.92) hue-rotate(180deg) saturate(.7) brightness(.9); }
.socials { display: flex; flex-wrap: wrap; gap: .6rem; }
.social { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-size: 1.1rem; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); transition: transform .4s var(--spring), background .3s, color .3s, border-color .3s; }
.social:hover { transform: translateY(-5px) rotate(-6deg); background: var(--gold); color: #1a1300; border-color: var(--gold); }

/* ---------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------- */
.site-footer { position: relative; margin-top: 2rem; padding-top: 4rem; background: linear-gradient(180deg, transparent, rgba(3, 7, 22, .85)); }
.site-footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.foot-grid { display: grid; grid-template-columns: 1.5fr 1fr 1.3fr; gap: 3rem; padding-bottom: 3rem; }
.foot-brand { display: grid; gap: 1.1rem; justify-items: start; }
.foot-brand p { color: var(--muted); max-width: 340px; font-size: .92rem; }
.site-footer h4 { font-family: var(--font-body); font-size: .78rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 1.1rem; }
.site-footer li { margin-bottom: .6rem; color: var(--muted); font-size: .92rem; }
.site-footer li a { transition: color .3s, padding-left .35s var(--ease); }
.site-footer li a:hover { color: #fff; padding-left: 6px; }
.foot-bottom { padding: 1.4rem 0 1.8rem; border-top: 1px solid var(--line); text-align: center; font-size: .82rem; color: var(--dim); }

/* ---------------------------------------------------------------------
   Floating buttons
   --------------------------------------------------------------------- */
.fabs { position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40; display: grid; gap: .8rem; justify-items: end; }
.fab { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .8); transition: transform .4s var(--spring), opacity .4s, visibility .4s; }
.fab:hover { transform: translateY(-4px) scale(1.08); }
.fab-wa { background: #25d366; color: #fff; position: relative; }
.fab-wa::before { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid #25d366; animation: ring 2.4s ease-out infinite; }
.fab-wa[hidden] { display: none; }
@keyframes ring { to { transform: scale(1.6); opacity: 0; } }
.fab-top { width: 46px; height: 46px; font-size: 1.1rem; background: rgba(10, 27, 74, .9); border: 1px solid var(--line-2); backdrop-filter: blur(8px); opacity: 0; visibility: hidden; transform: translateY(20px); }
.fab-top.show { opacity: 1; visibility: visible; transform: none; }
.fab-top.show:hover { transform: translateY(-4px); }

/* ---------------------------------------------------------------------
   Overlays: cart drawer, book modal, lightbox, checkout
   --------------------------------------------------------------------- */
.overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem;
  background: rgba(2, 6, 20, .66); backdrop-filter: blur(7px); -webkit-backdrop-filter: blur(7px);
  opacity: 0; visibility: hidden; transition: opacity .45s var(--ease), visibility 0s linear .45s;
}
.overlay.open { opacity: 1; visibility: visible; transition-delay: 0s; }

.drawer { position: absolute; top: 0; right: 0; bottom: 0; width: min(450px, 100%); display: flex; flex-direction: column; background: linear-gradient(180deg, #0b2058, #071231 60%); border-left: 1px solid var(--line-2); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, .8); transform: translateX(104%); transition: transform .6s var(--ease); }
#cartOverlay { padding: 0; }
#cartOverlay.open .drawer { transform: none; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.4rem; border-bottom: 1px solid var(--line); }
.drawer-head h3 { font-size: 1.5rem; display: flex; align-items: center; gap: .6rem; }
.count { font-family: var(--font-body); font-size: .76rem; font-weight: 500; padding: .12rem .65rem; border-radius: 20px; background: rgba(244, 194, 79, .15); color: var(--gold-2); border: 1px solid rgba(244, 194, 79, .35); }
.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.4rem; }
.drawer-foot { padding: 1.2rem 1.4rem 1.5rem; border-top: 1px solid var(--line); background: rgba(3, 8, 25, .5); display: grid; gap: .9rem; }
.cart-item { display: grid; grid-template-columns: 64px 1fr auto; gap: .9rem; align-items: center; padding: .9rem 0; border-bottom: 1px solid var(--line); animation: itemIn .55s var(--ease) both; }
.cart-item.removing { animation: itemOut .4s var(--ease) forwards; }
.static .cart-item:not(.removing) { animation: none; }
.long { display: none; }
@keyframes itemIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
@keyframes itemOut { to { opacity: 0; transform: translateX(60px); height: 0; padding: 0; } }
.cart-item .cover { border-radius: 2px 6px 6px 2px; box-shadow: -3px 6px 12px rgba(0, 0, 0, .5); }
.ci-info h4 { font-family: var(--font-head); font-size: 1rem; margin-bottom: .1rem; }
.ci-info small { color: var(--muted); font-size: .78rem; display: block; margin-bottom: .45rem; }
.ci-side { display: grid; justify-items: end; gap: .5rem; }
.ci-total { font-weight: 600; }
.ci-remove { font-size: .74rem; color: var(--dim); display: inline-flex; align-items: center; gap: .25rem; transition: color .3s; }
.ci-remove:hover { color: var(--danger); }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line-2); border-radius: 999px; background: rgba(255, 255, 255, .05); overflow: hidden; }
.qty button { width: 30px; height: 30px; display: grid; place-items: center; font-size: 1rem; transition: background .25s, color .25s; }
.qty button:hover { background: var(--gold); color: #1a1300; }
.qty span { min-width: 28px; text-align: center; font-size: .88rem; font-weight: 600; }
.sum-row { display: flex; justify-content: space-between; align-items: baseline; color: var(--muted); font-size: .92rem; }
.sum-row.total { color: #fff; font-size: 1.15rem; font-weight: 600; padding-top: .7rem; border-top: 1px dashed var(--line-2); }
.sum-row.total b { font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-2); }
.note { font-size: .78rem; color: var(--dim); line-height: 1.5; }
.cart-empty { height: 100%; min-height: 320px; display: grid; place-content: center; justify-items: center; text-align: center; gap: .8rem; color: var(--muted); }
.cart-empty .big { font-size: 3.6rem; color: var(--sky); opacity: .8; animation: floaty2 4s ease-in-out infinite; }
.cart-empty h4 { font-size: 1.5rem; color: #fff; }

.modal { position: relative; width: min(960px, 100%); max-height: 92vh; overflow-y: auto; border-radius: 28px; background: linear-gradient(160deg, #0e2563 0%, #08153d 55%, #050d26 100%); border: 1px solid var(--line-2); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .9); transform: translateY(40px) scale(.95); opacity: 0; transition: transform .6s var(--ease), opacity .5s var(--ease); }
#bookOverlay.open .modal { transform: none; opacity: 1; }
.modal-x { position: absolute; top: 1rem; right: 1rem; z-index: 5; }
.modal-x:hover { transform: rotate(90deg); }
.bm-grid { display: grid; grid-template-columns: .85fr 1.15fr; }
.bm-cover { display: grid; place-items: center; padding: 3rem 2rem; background: radial-gradient(circle at 50% 60%, rgba(70, 120, 255, .38), transparent 70%); perspective: 1000px; }
.bm-cover .cover { width: min(250px, 100%); transform: rotateY(-14deg); transition: transform .8s var(--ease); box-shadow: -18px 30px 60px rgba(0, 0, 0, .7), 0 0 60px rgba(70, 120, 255, .3); }
.bm-cover:hover .cover { transform: rotateY(-2deg) scale(1.03); }
.bm-info { padding: 3rem 2.4rem 2.4rem 1.2rem; display: flex; flex-direction: column; gap: .9rem; }
.bm-info .cat { font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: var(--sky); }
.bm-info h1, .bm-info h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); }
.textlink { color: var(--sky); text-decoration: underline; text-underline-offset: 3px; transition: color .3s; }
.textlink:hover { color: var(--gold-2); }
.book-card h3 a { color: inherit; }
a.cover-wrap { display: block; }
.book-card h3 a:hover { color: var(--gold-2); }

/* ---------- generated book pages (books/*.html) ---------- */
.bp-main { padding-top: calc(var(--header-h) + 1.4rem); padding-bottom: 3rem; }
.crumbs { margin-bottom: 1.2rem; }
.crumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .82rem; color: var(--dim); }
.crumbs li + li::before { content: '/'; margin-right: .4rem; opacity: .5; }
.crumbs a { transition: color .3s; }
.crumbs a:hover { color: var(--gold-2); }
.crumbs [aria-current] { color: var(--muted); }
.bp-card { border-radius: 28px; overflow: hidden; background: linear-gradient(160deg, #0e2563 0%, #08153d 55%, #050d26 100%); border: 1px solid var(--line-2); box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .9); animation: bpIn .9s var(--ease) both; }
@keyframes bpIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
.bp-card .bm-info { padding: 3rem 2.6rem 2.6rem 1.2rem; }
.bp-more h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 3.2rem 0 1.4rem; }
.bm-info .author { color: var(--muted); }
.meta { display: flex; flex-wrap: wrap; gap: .5rem; }
.meta li { font-size: .76rem; padding: .3rem .8rem; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--line); color: var(--muted); }
.meta li b { color: #fff; font-weight: 500; }
.desc { color: var(--muted); font-size: .95rem; }
.bm-price { display: flex; align-items: baseline; flex-wrap: wrap; gap: .8rem; margin-top: .4rem; }
.bm-price b { font-family: var(--font-head); font-size: 2.3rem; color: var(--gold-2); line-height: 1; }
.bm-price s { color: var(--dim); }
.bm-price em { font-style: normal; font-size: .76rem; font-weight: 600; padding: .2rem .65rem; border-radius: 20px; background: rgba(52, 211, 153, .15); color: var(--ok); border: 1px solid rgba(52, 211, 153, .4); }
.bm-price.free b { color: var(--free); }
.bm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .9rem; margin-top: .6rem; }
.bm-actions .qty button { width: 38px; height: 38px; }

.lightbox { background: rgba(2, 5, 18, .94); z-index: 120; }
.lb-fig { margin: 0; text-align: center; max-width: min(1000px, 84vw); }
.lb-fig img { max-height: 76vh; max-width: 100%; margin-inline: auto; border-radius: 18px; box-shadow: 0 40px 90px -20px rgba(0, 0, 0, .9); border: 1px solid var(--line-2); transition: opacity .35s var(--ease), transform .45s var(--ease); transform: scale(.9); }
.lightbox.open .lb-fig img { transform: none; }
.lb-fig img.swap { opacity: 0; transform: scale(.95) !important; }
.lb-fig figcaption { margin-top: 1.1rem; display: grid; gap: .2rem; }
.lb-fig figcaption span { font-family: var(--font-head); font-size: 1.35rem; }
.lb-fig figcaption small { color: var(--dim); letter-spacing: .14em; font-size: .75rem; }
.lb-close { position: absolute; top: 1.2rem; right: 1.2rem; }
.lb-close:hover { transform: rotate(90deg); }
.lb-nav { position: absolute; top: 50%; margin-top: -22px; width: 52px; height: 52px; }
.lb-prev { left: 1.2rem; } .lb-next { right: 1.2rem; }
.lb-nav:hover { background: var(--gold); color: #1a1300; }

/* ---------------------------------------------------------------------
   Checkout
   --------------------------------------------------------------------- */
.checkout { z-index: 110; padding: 0; background: var(--bg-0); backdrop-filter: none; place-items: stretch; transition: opacity .5s var(--ease), visibility 0s linear .5s; }
.checkout::before { content: ''; position: absolute; inset: 0; background: radial-gradient(60vmax circle at 85% -10%, rgba(29, 78, 216, .45), transparent 60%), radial-gradient(50vmax circle at 0% 100%, rgba(14, 165, 233, .22), transparent 60%), linear-gradient(180deg, var(--bg-1), var(--bg-0)); }
.checkout-shell { position: absolute; inset: 0; overflow-y: auto; transform: translateY(5vh); transition: transform .7s var(--ease); display: flex; flex-direction: column; }
.checkout.open .checkout-shell { transform: none; }
.checkout-top { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .9rem clamp(1rem, 4vw, 2.5rem); background: rgba(4, 10, 29, .75); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
.steps { display: flex; align-items: center; gap: 1.6rem; }
.steps li { display: flex; align-items: center; gap: .55rem; font-size: .82rem; color: var(--dim); position: relative; transition: color .4s; }
.steps li + li::before { content: ''; position: absolute; left: -1.3rem; top: 50%; width: .9rem; height: 1px; background: var(--line-2); }
.steps i { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 600; font-size: .75rem; border: 1px solid var(--line-2); transition: all .5s var(--spring); }
.steps li.active, .steps li.done { color: #fff; }
.steps li.active i { background: var(--gold); color: #1a1300; border-color: var(--gold); transform: scale(1.12); box-shadow: 0 0 0 5px rgba(244, 194, 79, .16); }
.steps li.done i { background: rgba(52, 211, 153, .2); border-color: var(--ok); color: var(--ok); }
.checkout-body { position: relative; width: min(1120px, 100% - 2rem); margin: 2.2rem auto 4rem; flex: 1; }
.co-title { margin-bottom: 1.6rem; }
.co-title h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.co-title p { color: var(--muted); margin-top: .4rem; }
.co-grid { display: grid; grid-template-columns: 1.3fr .8fr; gap: 1.8rem; align-items: start; animation: itemIn .8s var(--ease) both; }
.co-form { display: grid; gap: 1.4rem; }
.co-group { padding: 1.5rem; border-radius: 22px; border: 1px solid var(--line); display: grid; gap: 1rem; margin: 0; min-width: 0; }
.co-group legend { padding: 0 .7rem; font-family: var(--font-head); font-size: 1.15rem; color: var(--gold-2); display: flex; align-items: center; gap: .5rem; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1rem; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%; padding: 1.5rem 1rem .55rem; border-radius: 14px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); font: inherit; font-size: .95rem; resize: vertical;
  transition: border-color .3s, box-shadow .3s, background .3s;
}
.field textarea { min-height: 96px; }
.field label { position: absolute; left: 1rem; top: 1rem; color: var(--dim); font-size: .92rem; pointer-events: none; transform-origin: 0 0; transition: transform .3s var(--ease), color .3s; }
.field input:focus + label, .field input:not(:placeholder-shown) + label,
.field textarea:focus + label, .field textarea:not(:placeholder-shown) + label { transform: translateY(-.62rem) scale(.78); color: var(--gold); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .08); box-shadow: 0 0 0 4px rgba(244, 194, 79, .14); }
.field .err { display: block; max-height: 0; overflow: hidden; font-size: .76rem; color: var(--danger); padding-left: .3rem; opacity: 0; transition: max-height .35s var(--ease), opacity .35s, margin .35s; }
.field.invalid input, .field.invalid textarea { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(255, 107, 129, .12); }
.field.invalid .err { max-height: 40px; opacity: 1; margin-top: .35rem; }
.field.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.co-summary { position: sticky; top: 92px; padding: 1.6rem; border-radius: 24px; display: grid; gap: 1rem; }
.co-summary h3 { font-size: 1.4rem; }
.sum-list { display: grid; gap: .8rem; max-height: 300px; overflow-y: auto; padding-right: .3rem; }
.sum-item { display: grid; grid-template-columns: 46px 1fr auto; gap: .8rem; align-items: center; font-size: .88rem; }
.sum-item .cover { border-radius: 2px 5px 5px 2px; box-shadow: -2px 4px 8px rgba(0, 0, 0, .5); }
.sum-item b { display: block; font-family: var(--font-head); font-size: .95rem; font-weight: 600; line-height: 1.25; }
.sum-item small { color: var(--dim); }
.alert { padding: .9rem 1.1rem; border-radius: 14px; font-size: .88rem; display: flex; gap: .7rem; align-items: flex-start; animation: itemIn .5s var(--ease) both; }
.alert.error { background: rgba(255, 107, 129, .1); border: 1px solid rgba(255, 107, 129, .45); color: #ffc1cb; }
.alert.warn { background: rgba(244, 194, 79, .1); border: 1px solid rgba(244, 194, 79, .4); color: var(--gold-2); }
.alert a { text-decoration: underline; }
.alert .i { margin-top: 2px; }

.co-success { max-width: 640px; margin: 3rem auto; text-align: center; display: grid; justify-items: center; gap: 1.1rem; animation: itemIn .9s var(--ease) both; }
.tick { width: 120px; height: 120px; }
.tick circle { fill: none; stroke: var(--ok); stroke-width: 4; stroke-dasharray: 340; stroke-dashoffset: 340; animation: draw 1s .1s var(--ease) forwards; }
.tick path { fill: none; stroke: var(--ok); stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; animation: draw .6s .9s var(--ease) forwards; }
.tick-bg { animation: popIn .8s var(--spring) both; border-radius: 50%; background: radial-gradient(circle, rgba(52, 211, 153, .25), transparent 70%); }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes popIn { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.co-success h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); }
.co-success p { color: var(--muted); }
.order-id { display: inline-flex; flex-direction: column; gap: .15rem; padding: .9rem 1.8rem; border-radius: 18px; background: rgba(244, 194, 79, .1); border: 1px dashed rgba(244, 194, 79, .5); }
.order-id small { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--dim); }
.order-id b { font-family: var(--font-head); font-size: 1.6rem; color: var(--gold-2); letter-spacing: .04em; }
.co-success .actions { display: flex; flex-wrap: wrap; gap: .8rem; justify-content: center; margin-top: .6rem; }

/* ---------------------------------------------------------------------
   Toasts & flying cover
   --------------------------------------------------------------------- */
.toasts { position: fixed; left: 50%; bottom: 1.4rem; z-index: 400; transform: translateX(-50%); display: grid; gap: .6rem; justify-items: center; pointer-events: none; width: min(92vw, 420px); }
.toast { display: flex; align-items: center; gap: .7rem; padding: .8rem 1.2rem; border-radius: 16px; font-size: .9rem; background: rgba(8, 20, 56, .94); backdrop-filter: blur(14px); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .8); animation: toastIn .55s var(--spring) both; }
.toast .i { font-size: 1.25rem; color: var(--ok); }
.toast.error .i { color: var(--danger); } .toast.info .i { color: var(--sky); }
.toast.out { animation: toastOut .4s var(--ease) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(30px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(14px) scale(.95); } }
.fly { position: fixed; z-index: 500; pointer-events: none; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 30px rgba(0, 0, 0, .6); }
.fly img, .fly .gen-cover { width: 100%; height: 100%; object-fit: cover; }

/* ---------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .hero-copy { justify-items: center; }
  .hero-cta, .stats { justify-content: center; }
  .stats { margin-inline: auto; }
  .hero-visual { order: -1; width: min(400px, 94%); margin-inline: auto; }
  .hero { padding-top: calc(var(--header-h) + 1.5rem); }
  .about-grid { grid-template-columns: 1fr; }
  .about-visual { max-width: 520px; margin-inline: auto; }
  .masonry { column-count: 2; }
  .contact-grid { grid-template-columns: 1fr; }
  .co-grid { grid-template-columns: 1fr; }
  .co-summary { position: static; order: -1; }
  .bm-grid { grid-template-columns: 1fr; }
  .bm-cover { padding: 2.4rem 1rem 1rem; }
  .bm-cover .cover { width: 180px; }
  .bm-info { padding: 1.4rem 1.6rem 2rem; }
}
@media (max-width: 860px) {
  .burger { display: block; }
  .nav-links {
    position: fixed; top: var(--header-h); left: 1rem; right: 1rem; flex-direction: column; align-items: stretch; gap: .2rem; padding: .8rem; border-radius: 22px;
    background: rgba(6, 15, 44, .96); backdrop-filter: blur(20px); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .9);
    opacity: 0; visibility: hidden; transform: translateY(-14px) scale(.97); transform-origin: 50% 0; transition: opacity .4s var(--ease), transform .5s var(--ease), visibility 0s linear .5s;
  }
  body.nav-open .nav-links { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .nav-link { padding: .9rem 1.1rem; border-radius: 14px; font-size: 1rem; }
  .nav-link::after { display: none; }
  .nav-link.active { background: rgba(244, 194, 79, .12); color: var(--gold-2); }
  .toolbar { border-radius: 22px; }
  .seg { width: 100%; } .seg-btn { flex: 1; justify-content: center; padding-inline: .5rem; }
  .select { width: 100%; } .select select { width: 100%; }
  .foot-grid { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; }
  .row3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .container { width: min(1200px, 100% - 1.6rem); }
  .brand-text small { display: none; } .brand-text b { font-size: 2rem; }
  .seg-btn { font-size: .78rem; padding: .55rem .35rem; } .seg-btn em { display: none; }
  .book-grid { grid-template-columns: repeat(2, 1fr); gap: .9rem; }
  .book-card { padding: .7rem; }
  .cover-wrap { padding: 2.2rem .5rem 1.1rem; }
  .hero-visual { width: min(290px, 76%); }
  .cover-wrap .cover { width: 82%; }
  .info h3 { font-size: 1rem; }
  .buy { flex-direction: column; align-items: stretch; gap: .6rem; }
  .buy .btn { width: 100%; }
  .long { display: inline; }
  .price { justify-content: center; }
  .quick { display: none; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin-inline: -.8rem; padding: .2rem .8rem .6rem; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chips.center { justify-content: flex-start; }
  .chip { white-space: nowrap; flex: none; }
  .masonry { column-gap: .8rem; } .g-item { margin-bottom: .8rem; border-radius: 14px; }
  .g-item figcaption { padding: 1.6rem .8rem .7rem; } .g-item figcaption span { font-size: .9rem; } .g-item figcaption em { font-size: .6rem; }
  .points, .contact-cards { grid-template-columns: 1fr; }
  .fb-1 { left: 8px; } .fb-2 { right: 8px; }
  .foot-grid { grid-template-columns: 1fr; gap: 2rem; }
  .row2, .row3 { grid-template-columns: 1fr; }
  .steps span { display: none; } .steps { gap: 1.2rem; }
  .checkout-top .btn { padding-inline: .8rem; }
  .co-group { padding: 1.1rem; }
  .lb-nav { top: auto; bottom: 1.2rem; margin: 0; } .lb-prev { left: 28%; } .lb-next { right: 28%; }
  .lb-fig { max-width: 94vw; } .lb-fig img { max-height: 64vh; }
  .drawer { width: 100%; }
  .cart-item { grid-template-columns: 56px 1fr; } .ci-side { grid-column: 1 / -1; grid-auto-flow: column; justify-content: space-between; align-items: center; }
  .hero-cta .btn { flex: 1 1 100%; }
  .fabs { right: .8rem; bottom: .8rem; } .fab { width: 50px; height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .preloader { display: none; }
}
