/* ==========================================================================
   Osman Books — design system
   Midnight navy · ivory paper · antique gold, with DNA red/blue accents.
   ========================================================================== */

:root {
  --ink: #0a1426;
  --ink-2: #0f1d36;
  --ink-3: #172a4b;
  --ink-soft: #24365a;
  --gold: #c9a45c;
  --gold-2: #e4ca92;
  --gold-deep: #9f7b37;
  --ivory: #fbf8f2;
  --paper: #f3ede2;
  --sand: #e8dfcd;
  --text: #1a2133;
  --muted: #5d6578;
  --muted-light: #a9b1c3;
  --line: rgba(10, 20, 38, 0.09);
  --line-light: rgba(255, 255, 255, 0.1);
  --helix-red: #e5533d;
  --helix-blue: #3b82f6;
  --success: #1f8a5b;
  --danger: #c0392b;

  --font-display: "Playfair Display", "Times New Roman", serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;

  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-xl: 40px;
  --shadow-sm: 0 2px 10px rgba(10, 20, 38, 0.06);
  --shadow: 0 18px 50px -18px rgba(10, 20, 38, 0.25);
  --shadow-lg: 0 40px 90px -30px rgba(10, 20, 38, 0.45);
  --shadow-gold: 0 14px 40px -12px rgba(201, 164, 92, 0.55);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --container: 1240px;
  --nav-h: 84px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h, 80px) + 12px); -webkit-text-size-adjust: 100%; overflow-x: clip; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold-2); color: var(--ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  color: var(--ink);
}
h1 em, h2 em, h3 em { font-style: italic; color: var(--gold); font-weight: 500; }
p { margin: 0 0 1.1em; }

.icon { flex-shrink: 0; vertical-align: middle; }
.container { width: min(var(--container), 100% - 48px); margin-inline: auto; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Typography helpers ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.7; }
.on-dark .eyebrow { color: var(--gold-2); }
.section-title { font-size: clamp(2rem, 4vw, 3.3rem); }
.section-lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; }
.on-dark .section-lead { color: var(--muted-light); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 56px; flex-wrap: wrap; }
.section-head.center { flex-direction: column; align-items: center; text-align: center; }
.section-head.center .section-lead { margin-inline: auto; }
.section-head.center .eyebrow::after { content: ""; width: 34px; height: 1px; background: currentColor; opacity: 0.7; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 28px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), background 0.3s, color 0.3s, border-color 0.3s;
  white-space: nowrap;
}
.btn .icon { transition: transform 0.35s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover .icon-arrow { transform: translateX(4px); }
.btn-gold {
  --btn-bg: linear-gradient(135deg, #e4ca92 0%, #c9a45c 45%, #a8843f 100%);
  --btn-fg: var(--ink);
  background: var(--btn-bg);
  box-shadow: var(--shadow-gold);
}
.btn-gold::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.55) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}
.btn-gold:hover::after { transform: translateX(120%); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.28); backdrop-filter: blur(8px); }
.btn-ghost:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn-outline { background: transparent; color: var(--ink); border-color: rgba(10, 20, 38, 0.2); }
.btn-outline:hover { border-color: var(--ink); background: var(--ink); color: #fff; }
.btn-dark:hover { box-shadow: var(--shadow); }
.btn-sm { padding: 10px 18px; font-size: 13.5px; }
.btn-block { width: 100%; }
.link-arrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--ink); border-bottom: 1px solid var(--gold); padding-bottom: 2px; transition: gap 0.3s var(--ease), color .3s; }
.link-arrow:hover { gap: 14px; color: var(--gold-deep); }
.on-dark .link-arrow { color: #fff; }

/* ---------- Announcement + navigation ---------- */
.announce {
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
  color: var(--ink);
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
  padding: 9px 16px;
  letter-spacing: 0.02em;
}

.nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  transition: background 0.4s, box-shadow 0.4s, height 0.4s var(--ease), backdrop-filter 0.4s;
}
.has-announce .nav { top: 38px; }
.nav.is-scrolled, .nav.is-solid {
  top: 0;
  height: 70px;
  background: rgba(10, 20, 38, 0.86);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 10px 40px -20px rgba(0, 0, 0, 0.6);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold-2), var(--gold-deep));
  color: var(--ink);
  box-shadow: var(--shadow-gold);
}
.brand-name { font-family: var(--font-display); font-size: 21px; font-weight: 600; line-height: 1; }
.brand-name small { display: block; font-family: var(--font-body); font-size: 10.5px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold-2); margin-top: 5px; font-weight: 600; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative;
  padding: 10px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  transition: color 0.25s, background 0.25s;
}
.nav-links a:hover, .nav-links a.active { color: #fff; background: rgba(255, 255, 255, 0.07); }
.nav-links a.active::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); transform: translateX(-50%); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; background: none; border: 0; color: #fff; padding: 8px; cursor: pointer; }

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: var(--ink);
  padding: 28px 24px;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform 0.55s var(--ease);
  overflow-y: auto;  /* tall link lists scroll inside instead of poking out below (and showing at the top while hidden) */
}
.mobile-menu.open { transform: none; }
@media (max-height: 800px) { .mobile-menu nav a { font-size: 27px; padding: 8px 0; } }
.mobile-menu-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 40px; }
.mobile-menu nav a { display: block; font-family: var(--font-display); font-size: 34px; color: #fff; padding: 10px 0; border-bottom: 1px solid var(--line-light); }
.mobile-menu nav a:hover { color: var(--gold-2); }
.mobile-menu .btn { margin-top: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: calc(var(--nav-h) + 70px) 0 150px;
  background: radial-gradient(1200px 700px at 78% 40%, #1c3563 0%, transparent 60%), radial-gradient(900px 600px at 0% 100%, #2a1d10 0%, transparent 55%), var(--ink);
  color: #fff;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; opacity: 0.13; filter: grayscale(0.5) contrast(1.1); mix-blend-mode: luminosity; }
.hero-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--ink) 20%, rgba(10, 20, 38, 0.55) 60%, rgba(10, 20, 38, 0.2)), linear-gradient(0deg, var(--ink) 0%, transparent 35%); }
.hero-helix { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; pointer-events: none; opacity: 0.9; }
.hero-grain { position: absolute; inset: 0; z-index: 1; opacity: 0.05; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.hero .container { position: relative; z-index: 2; display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 60px; align-items: center; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 16px 7px 8px;
  border-radius: 999px;
  border: 1px solid rgba(228, 202, 146, 0.3);
  background: rgba(201, 164, 92, 0.08);
  font-size: 13px; font-weight: 600; color: var(--gold-2);
  margin-bottom: 28px;
}
.hero-pill .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; }
.hero-pill .dot::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(0.55); opacity: 0.6; } }
.hero h1 { color: #fff; font-size: clamp(2.9rem, 6.6vw, 5.6rem); font-weight: 600; line-height: 1.02; margin-bottom: 14px; }
.hero h1 em { background: linear-gradient(100deg, var(--gold-2), var(--gold) 50%, #f2dfb4); -webkit-background-clip: text; background-clip: text; color: transparent; font-style: italic; }
.hero-sub-en { font-family: var(--font-display); font-style: italic; font-size: 1.35rem; color: var(--gold-2); margin-bottom: 22px; opacity: 0.9; }
.hero-lead { font-size: 1.14rem; color: rgba(255, 255, 255, 0.72); max-width: 560px; margin-bottom: 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 48px; }
.hero-meta { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; padding-top: 28px; border-top: 1px solid var(--line-light); }
.hero-author { display: flex; align-items: center; gap: 14px; }
.hero-author img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); }
.hero-author strong { display: block; font-size: 15px; }
.hero-author span { font-size: 13px; color: var(--muted-light); }
.hero-facts { display: flex; gap: 26px; }
.hero-facts div { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted-light); }
.hero-facts strong { display: block; font-family: var(--font-display); font-size: 22px; letter-spacing: 0; text-transform: none; color: #fff; }

.hero-visual { position: relative; display: grid; place-items: center; min-height: 560px; }
.hero-visual::before {
  content: "";
  position: absolute;
  width: 440px; height: 440px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201, 164, 92, 0.35), transparent 65%);
  filter: blur(20px);
}
.hero-ring { position: absolute; width: 520px; height: 520px; border-radius: 50%; border: 1px dashed rgba(228, 202, 146, 0.25); animation: spin 60s linear infinite; }
.hero-ring::after { content: ""; position: absolute; top: 50%; left: -6px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 20px var(--gold); }
@keyframes spin { to { transform: rotate(360deg); } }

.float-card {
  position: absolute;
  z-index: 4;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.6);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
  animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; color: #fff; font-size: 15px; }
.float-card .fc-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold-2), var(--gold-deep)); color: var(--ink); }
.float-card.fc-1 { top: 12%; left: -4%; }
.float-card.fc-2 { bottom: 16%; right: -6%; animation-delay: -2s; }
.float-card.fc-3 { bottom: 2%; left: -8%; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }

.scroll-hint { position: absolute; left: 50%; bottom: 100px; z-index: 3; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 10px; font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: rgba(255, 255, 255, 0.45); }
.scroll-hint span { width: 1px; height: 44px; background: linear-gradient(var(--gold), transparent); animation: drip 2.2s infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- 3D book ---------- */
.book3d { --w: 300px; --h: calc(var(--w) * 1.42); --d: 34px; --spine: #0f2442; perspective: 1800px; position: relative; z-index: 3; }
.book3d-inner {
  position: relative;
  width: var(--w); height: var(--h);
  transform-style: preserve-3d;
  transform: rotateY(-28deg) rotateX(6deg);
  transition: transform 1s var(--ease);
}
.book3d:hover .book3d-inner { transform: rotateY(-12deg) rotateX(3deg); }
.book3d.is-flipped .book3d-inner { transform: rotateY(-180deg) rotateX(3deg); }
.book3d-face { position: absolute; inset: 0; border-radius: 3px 8px 8px 3px; overflow: hidden; backface-visibility: hidden; }
.book3d-face img { width: 100%; height: 100%; object-fit: cover; }
.book3d-front { transform: translateZ(calc(var(--d) / 2)); box-shadow: inset 4px 0 10px rgba(0, 0, 0, 0.25); }
.book3d-front::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0, 0, 0, 0.28) 0%, rgba(255, 255, 255, 0.18) 2.5%, transparent 6%, transparent 70%, rgba(255, 255, 255, 0.12) 100%); }
.book3d-back { transform: rotateY(180deg) translateZ(calc(var(--d) / 2)); }
.book3d-spine { position: absolute; top: 0; left: calc(var(--d) / -2); width: var(--d); height: 100%; background: linear-gradient(90deg, var(--spine), color-mix(in srgb, var(--spine) 80%, #fff), var(--spine)); transform: rotateY(-90deg); border-radius: 3px; }
.book3d-pages { position: absolute; top: 5px; right: calc(var(--d) / -2 + 3px); width: calc(var(--d) - 4px); height: calc(100% - 10px); background: repeating-linear-gradient(90deg, #fdfbf6 0 2px, #e6dece 2px 3px); transform: rotateY(90deg); }
.book3d-pages-top { position: absolute; left: 3px; top: calc(var(--d) / -2 + 5px); width: calc(100% - 6px); height: calc(var(--d) - 4px); background: repeating-linear-gradient(0deg, #fdfbf6 0 2px, #e6dece 2px 3px); transform: rotateX(90deg); }
.book3d-shadow { position: absolute; left: 10%; right: -8%; bottom: -34px; height: 40px; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), transparent 70%); filter: blur(10px); transform: translateZ(-40px); }
.book3d.lg { --w: 330px; }
.book3d.md { --w: 260px; }
.book3d.sm { --w: 170px; --d: 22px; }
.flip-hint { margin-top: 36px; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; cursor: pointer; transition: all .3s; }
.flip-hint:hover { border-color: var(--gold); color: var(--ink); }

/* ---------- Stats band ---------- */
.stats-band { position: relative; z-index: 5; margin-top: -90px; }
.stats-card {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--line);
}
.stat { padding: 34px 30px; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: var(--line); }
.stat-value { font-family: var(--font-display); font-size: clamp(2rem, 3.4vw, 2.9rem); font-weight: 600; color: var(--ink); line-height: 1; margin-bottom: 8px; }
.stat-value span { color: var(--gold); }
.stat-label { font-size: 13.5px; color: var(--muted); font-weight: 600; }

/* ---------- Sections ---------- */
.section { padding: 130px 0; position: relative; }
.section.tight { padding: 90px 0; }
.bg-paper { background: var(--paper); }
.bg-ink { background: var(--ink); color: rgba(255, 255, 255, 0.78); }
.bg-ink h2, .bg-ink h3 { color: #fff; }
.bg-ink-grad { background: radial-gradient(900px 500px at 90% 0%, #1a2f58, transparent 60%), radial-gradient(700px 500px at 0% 100%, #2b2011, transparent 60%), var(--ink); color: rgba(255, 255, 255, 0.78); }
.bg-ink-grad h2, .bg-ink-grad h3 { color: #fff; }

/* About the book */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 90px; align-items: center; }
.collage { position: relative; height: 620px; }
.collage-main { position: absolute; left: 0; top: 0; width: 72%; height: 88%; border-radius: 240px 240px var(--radius-lg) var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-lg); }
.collage-main img, .collage-sub img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.collage:hover .collage-main img { transform: scale(1.05); }
.collage-sub { position: absolute; right: 0; bottom: 0; width: 50%; aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 10px solid var(--ivory); box-shadow: var(--shadow); }
.collage-badge {
  position: absolute; top: 44px; right: 4%;
  width: 150px; height: 150px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; text-align: center;
  box-shadow: var(--shadow-lg);
}
.collage-badge svg.ring-text { position: absolute; inset: 0; animation: spin 24s linear infinite; }
.collage-badge strong { font-family: var(--font-display); font-size: 36px; line-height: 1; color: var(--gold-2); }
.collage-badge small { display: block; font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted-light); }
.collage-dots { position: absolute; left: -30px; bottom: 60px; width: 120px; height: 120px; background-image: radial-gradient(var(--gold) 1.6px, transparent 1.6px); background-size: 16px 16px; opacity: 0.5; z-index: -1; }
.about-text .lead-quote { font-family: var(--font-display); font-style: italic; font-size: 1.28rem; color: var(--ink); border-left: 3px solid var(--gold); padding: 4px 0 4px 22px; margin: 30px 0; }
.check-list { list-style: none; padding: 0; margin: 28px 0 36px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 22px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 15px; color: var(--ink); }
.check-list .icon { color: var(--ink); background: var(--gold-2); border-radius: 50%; padding: 4px; margin-top: 2px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Highlights */
.highlight-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.highlight-card {
  position: relative;
  padding: 40px 34px 36px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--line-light);
  overflow: hidden;
  transition: transform 0.5s var(--ease), border-color 0.4s, background 0.4s;
}
.highlight-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(400px 200px at var(--mx, 50%) var(--my, 0%), rgba(201, 164, 92, 0.18), transparent 60%); opacity: 0; transition: opacity 0.4s; }
.highlight-card:hover { transform: translateY(-8px); border-color: rgba(228, 202, 146, 0.35); }
.highlight-card:hover::before { opacity: 1; }
.highlight-num { position: absolute; top: 26px; right: 30px; font-family: var(--font-display); font-size: 54px; line-height: 1; color: transparent; -webkit-text-stroke: 1px rgba(228, 202, 146, 0.3); }
.highlight-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: linear-gradient(145deg, rgba(228, 202, 146, 0.2), rgba(201, 164, 92, 0.05)); color: var(--gold-2); border: 1px solid rgba(228, 202, 146, 0.25); margin-bottom: 28px; position: relative; }
.highlight-card h3 { font-size: 1.45rem; color: #fff; margin-bottom: 12px; position: relative; }
.highlight-card p { font-size: 15px; margin: 0; color: var(--muted-light); position: relative; }

/* Chapters */
.chapter-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.chapter-card {
  position: relative;
  display: flex; flex-direction: column;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 34px 32px 30px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.chapter-card::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--helix-red), var(--gold), var(--helix-blue)); transform: scaleX(0); transform-origin: left; transition: transform 0.6s var(--ease); }
.chapter-card:hover { transform: translateY(-8px); box-shadow: var(--shadow); }
.chapter-card:hover::after { transform: scaleX(1); }
.chapter-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.chapter-no { font-family: var(--font-display); font-size: 68px; line-height: 0.85; font-weight: 600; color: transparent; -webkit-text-stroke: 1.4px var(--gold); }
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; }
.badge-free { background: rgba(31, 138, 91, 0.1); color: var(--success); }
.badge-lock { background: rgba(10, 20, 38, 0.06); color: var(--muted); }
.badge-gold { background: rgba(201, 164, 92, 0.16); color: var(--gold-deep); }
.chapter-card h3 { font-size: 1.5rem; margin-bottom: 4px; }
.chapter-en { font-family: var(--font-display); font-style: italic; color: var(--gold-deep); margin-bottom: 14px; font-size: 1.02rem; }
.chapter-card p { font-size: 14.5px; color: var(--muted); }
.chapter-sections { list-style: none; padding: 0; margin: 0 0 22px; font-size: 13.5px; }
.chapter-sections li { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px dashed var(--line); color: var(--text); }
.chapter-sections li span:first-child { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chapter-sections li span:last-child { color: var(--gold-deep); font-weight: 700; font-variant-numeric: tabular-nums; }
.chapter-foot { margin-top: auto; display: flex; justify-content: space-between; align-items: center; padding-top: 18px; border-top: 1px solid var(--line); }
.pages-pill { font-size: 13px; font-weight: 700; color: var(--ink); display: inline-flex; gap: 8px; align-items: center; }
.pages-pill em { font-style: normal; color: var(--muted); font-weight: 500; }
.chapter-card .chapter-link { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: #fff; transition: transform 0.4s var(--ease), background 0.3s; }
.chapter-card:hover .chapter-link { background: var(--gold); color: var(--ink); transform: rotate(-45deg); }
.chapter-card.is-locked .chapter-link { background: var(--paper); color: var(--muted); }

.chapter-cta { background: radial-gradient(420px 260px at 100% 0%, rgba(201, 164, 92, 0.35), transparent 60%), var(--ink); color: rgba(255, 255, 255, 0.75); border-color: transparent; justify-content: space-between; }
.chapter-cta h3 { color: #fff; font-size: 1.9rem; margin: 18px 0 12px; }
.chapter-cta p { color: var(--muted-light); }
.chapter-cta .cta-cover { width: 92px; border-radius: 4px; box-shadow: 0 18px 30px -10px rgba(0, 0, 0, 0.7); transform: rotate(-6deg); }
.chapter-cta .btn { align-self: flex-start; }

/* Preview CTA */
.preview-cta { overflow: hidden; }
.preview-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 70px; align-items: center; }
.open-book { position: relative; perspective: 2200px; display: flex; justify-content: center; padding: 30px 0 50px; }
.open-book-inner { position: relative; display: flex; transform: rotateX(18deg) rotateZ(-4deg); transform-style: preserve-3d; transition: transform 1s var(--ease); filter: drop-shadow(0 40px 50px rgba(0, 0, 0, 0.5)); }
.open-book:hover .open-book-inner { transform: rotateX(8deg) rotateZ(-2deg); }
.open-book .leaf { width: min(260px, 38vw); aspect-ratio: 420 / 595; background: #fff; overflow: hidden; position: relative; }
.open-book .leaf img { width: 100%; height: 100%; object-fit: cover; }
.open-book .leaf.left { border-radius: 6px 0 0 6px; transform-origin: right; transform: rotateY(12deg); }
.open-book .leaf.right { border-radius: 0 6px 6px 0; transform-origin: left; transform: rotateY(-12deg); }
.open-book .leaf.left::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 70%, rgba(0, 0, 0, 0.25)); }
.open-book .leaf.right::after { content: ""; position: absolute; inset: 0; background: linear-gradient(270deg, transparent 75%, rgba(0, 0, 0, 0.22)); }
.preview-features { list-style: none; padding: 0; margin: 30px 0 38px; display: grid; gap: 16px; }
.preview-features li { display: flex; gap: 16px; align-items: center; color: rgba(255, 255, 255, 0.85); font-weight: 600; }
.preview-features .pf-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.06); border: 1px solid var(--line-light); color: var(--gold-2); }

/* Author */
.author-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 90px; align-items: center; }
.portrait { position: relative; max-width: 470px; }
.portrait-frame { position: relative; border-radius: 260px 260px 30px 30px; overflow: hidden; aspect-ratio: 4 / 5; background: linear-gradient(160deg, #d9cdb5, #b9a888); box-shadow: var(--shadow-lg); z-index: 1; }
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.portrait::before { content: ""; position: absolute; inset: 26px -26px -26px 26px; border: 2px solid var(--gold); border-radius: 260px 260px 30px 30px; z-index: 0; }
.portrait-card {
  position: absolute; z-index: 2; left: -36px; bottom: 50px;
  background: #fff; border-radius: var(--radius); padding: 18px 22px; box-shadow: var(--shadow);
  display: flex; align-items: center; gap: 14px;
}
.portrait-card .pc-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--ink); color: var(--gold-2); }
.portrait-card strong { display: block; font-size: 15px; color: var(--ink); }
.portrait-card span { font-size: 13px; color: var(--muted); }
.portrait-sig { position: absolute; z-index: 2; right: 28px; bottom: -20px; background: var(--ink); color: var(--gold-2); border-radius: 999px; padding: 10px 18px; font-family: var(--font-display); font-style: italic; box-shadow: var(--shadow); }
.author-name-native { font-family: var(--font-display); font-style: italic; font-size: 1.2rem; color: var(--gold-deep); margin-bottom: 22px; }
.author-quote { position: relative; padding: 26px 28px 26px 70px; background: #fff; border-radius: var(--radius); margin: 30px 0; box-shadow: var(--shadow-sm); border: 1px solid var(--line); }
.author-quote .icon { position: absolute; left: 24px; top: 24px; color: var(--gold); }
.author-quote p { font-family: var(--font-display); font-style: italic; font-size: 1.12rem; color: var(--ink); margin: 0; }
.mini-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 30px 0 36px; }
.mini-stat { padding: 18px 16px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); text-align: center; }
.mini-stat strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); line-height: 1.1; }
.mini-stat span { font-size: 12px; color: var(--muted); font-weight: 600; line-height: 1.35; display: block; margin-top: 4px; }

/* Book cards */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 34px; }
.book-card { position: relative; display: flex; flex-direction: column; }
.book-card-stage {
  position: relative;
  border-radius: var(--radius-lg);
  padding: 44px 30px 38px;
  background: radial-gradient(circle at 50% 30%, #fff, var(--sand));
  display: grid; place-items: center;
  overflow: hidden;
  transition: box-shadow 0.5s var(--ease);
}
.book-card-stage::before { content: ""; position: absolute; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(201, 164, 92, 0.35), transparent 65%); }
.book-card:hover .book-card-stage { box-shadow: var(--shadow); }
.book-card-stage .book3d-inner { transform: rotateY(-22deg); }
.book-card:hover .book3d-inner { transform: rotateY(-6deg) translateY(-6px); }
.book-card .discount { position: absolute; top: 18px; left: 18px; background: var(--helix-red); color: #fff; font-weight: 800; font-size: 12px; padding: 5px 11px; border-radius: 999px; z-index: 5; }
.book-card-body { padding: 24px 6px 0; }
.book-card-body .meta { font-size: 12px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--gold-deep); font-weight: 700; margin-bottom: 8px; }
.book-card-body h3 { font-size: 1.5rem; margin-bottom: 6px; }
.book-card-body .by { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.book-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); font-weight: 600; }
.price del { font-size: 1rem; color: var(--muted); margin-left: 8px; font-weight: 400; }
.price.on-request { font-family: var(--font-body); font-size: 14px; font-weight: 700; color: var(--gold-deep); }

/* Testimonials */
.testimonial-track { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 48px) / 3); gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; scrollbar-width: none; }
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial { scroll-snap-align: start; background: #fff; border-radius: var(--radius-lg); padding: 36px 34px; border: 1px solid var(--line); display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.testimonial .stars { color: var(--gold); display: flex; gap: 3px; margin-bottom: 18px; }
.testimonial blockquote { margin: 0 0 26px; font-family: var(--font-display); font-size: 1.16rem; line-height: 1.6; color: var(--ink); flex: 1; }
.testimonial-person { display: flex; align-items: center; gap: 14px; }
.testimonial-person img, .testimonial-person .initials { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; }
.testimonial-person .initials { display: grid; place-items: center; background: var(--ink); color: var(--gold-2); font-weight: 700; }
.testimonial-person strong { display: block; color: var(--ink); }
.testimonial-person span { font-size: 13px; color: var(--muted); }
.slider-nav { display: flex; gap: 10px; }
.slider-nav button { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--line); background: #fff; cursor: pointer; display: grid; place-items: center; transition: all 0.3s; }
.slider-nav button:hover { background: var(--ink); color: #fff; }

/* Publications */
.pub-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.pub-card { display: flex; flex-direction: column; padding: 28px; border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); transition: transform 0.4s var(--ease), box-shadow 0.4s; position: relative; overflow: hidden; }
.pub-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.pub-card .pub-year { font-family: var(--font-display); font-size: 3rem; line-height: 1; color: var(--paper); position: absolute; right: 22px; top: 18px; font-weight: 700; }
.pub-card .pub-journal { padding-right: 96px; font-size: 12px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 14px; position: relative; }
.pub-card h3 { font-family: var(--font-body); font-size: 1.05rem; font-weight: 700; line-height: 1.5; letter-spacing: 0; flex: 1; position: relative; }
.pub-card .link-arrow { margin-top: 18px; align-self: flex-start; font-size: 14px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 80px; align-items: start; }
.faq-aside { position: sticky; top: 110px; }
.contact-card { margin-top: 36px; padding: 30px; border-radius: var(--radius-lg); background: var(--ink); color: rgba(255, 255, 255, 0.75); position: relative; overflow: hidden; }
.contact-card::after { content: ""; position: absolute; right: -60px; top: -60px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(201, 164, 92, 0.35), transparent 70%); }
.contact-card h3 { color: #fff; font-size: 1.4rem; }
.faq-list { display: grid; gap: 14px; }
.faq-item { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); transition: box-shadow 0.3s, border-color 0.3s; }
.faq-item[open] { box-shadow: var(--shadow); border-color: transparent; }
.faq-item summary { list-style: none; cursor: pointer; padding: 24px 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; transition: transform 0.4s var(--ease), background 0.3s; }
.faq-item[open] summary .plus { transform: rotate(180deg); background: var(--gold); }
.faq-item .faq-body { padding: 0 28px 26px; color: var(--muted); }

/* Newsletter CTA */
.cta-banner { position: relative; border-radius: var(--radius-xl); overflow: hidden; padding: 90px 70px; color: #fff; isolation: isolate; }
.cta-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.cta-banner::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(10, 20, 38, 0.96) 30%, rgba(10, 20, 38, 0.55)); }
.cta-inner { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 50px; align-items: center; }
.cta-banner h2 { color: #fff; font-size: clamp(2rem, 3.6vw, 3rem); }
.cta-banner p { color: rgba(255, 255, 255, 0.72); margin: 0; }
.subscribe-form { display: flex; gap: 8px; padding: 8px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.18); backdrop-filter: blur(10px); }
.subscribe-form input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; padding: 0 20px; color: #fff; font-size: 15px; }
.subscribe-form input::placeholder { color: rgba(255, 255, 255, 0.55); }
.form-note { font-size: 12.5px; color: rgba(255, 255, 255, 0.5); margin-top: 12px; padding-left: 20px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255, 255, 255, 0.62); padding: 110px 0 36px; position: relative; overflow: hidden; margin-top: 130px; }
.footer.no-gap { margin-top: 0; }
.footer-word { position: absolute; left: 50%; bottom: -0.25em; transform: translateX(-50%); font-family: var(--font-display); font-size: clamp(5rem, 17vw, 15rem); font-weight: 700; color: transparent; -webkit-text-stroke: 1px rgba(228, 202, 146, 0.08); white-space: nowrap; pointer-events: none; line-height: 1; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.2fr; gap: 50px; position: relative; }
.footer h4 { font-family: var(--font-body); font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold-2); margin-bottom: 22px; font-weight: 700; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.footer a:hover { color: var(--gold-2); }
.footer-about p { margin: 22px 0 26px; max-width: 360px; font-size: 15px; }
.socials { display: flex; gap: 10px; flex-wrap: wrap; }
.socials a { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-light); color: #fff; transition: all 0.3s; }
.socials a:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); transform: translateY(-3px); }
.footer-contact li { display: flex; gap: 12px; align-items: flex-start; }
.footer-contact .icon { color: var(--gold); margin-top: 4px; }
.footer-bottom { position: relative; margin-top: 80px; padding-top: 28px; border-top: 1px solid var(--line-light); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; font-size: 13.5px; }

/* ---------- Page header (inner pages) ---------- */
.page-header { position: relative; padding: calc(var(--nav-h) + 90px) 0 110px; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.page-header > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.2; z-index: -2; filter: grayscale(0.4); }
.page-header::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(800px 400px at 80% 20%, rgba(59, 130, 246, 0.2), transparent 60%), linear-gradient(0deg, var(--ink), rgba(10, 20, 38, 0.6)); }
.page-header h1 { color: #fff; font-size: clamp(2.5rem, 5.4vw, 4.4rem); margin-bottom: 14px; }
.page-header p { color: rgba(255, 255, 255, 0.7); max-width: 620px; font-size: 1.1rem; margin: 0; }
.crumbs { display: flex; gap: 10px; align-items: center; font-size: 13px; color: rgba(255, 255, 255, 0.55); margin-bottom: 22px; flex-wrap: wrap; }
.crumbs a:hover { color: var(--gold-2); }
.crumbs span { opacity: 0.5; }

/* ---------- Book list ---------- */
.filter-bar { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; margin-bottom: 50px; }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chip { padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); font-size: 14px; font-weight: 600; background: #fff; transition: all 0.25s; }
.chip:hover { border-color: var(--ink); }
.chip.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-box { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 20px; border-radius: 999px; background: #fff; border: 1px solid var(--line); min-width: 320px; }
.search-box input { border: 0; outline: 0; flex: 1; background: none; min-width: 0; }
.empty-state { text-align: center; padding: 80px 20px; border: 1px dashed var(--line); border-radius: var(--radius-lg); color: var(--muted); }

/* ---------- Book detail ---------- */
.book-hero { position: relative; padding: calc(var(--nav-h) + 60px) 0 110px; background: radial-gradient(900px 600px at 20% 30%, #1d3665, transparent 60%), var(--ink); color: #fff; overflow: hidden; }
.book-hero .container { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 80px; align-items: center; position: relative; z-index: 2; }
.book-hero .crumbs { grid-column: 1 / -1; margin-bottom: 0; }
.book-stage { display: flex; flex-direction: column; align-items: center; }
.book-stage .flip-hint { color: rgba(255, 255, 255, 0.7); border-color: var(--line-light); }
.book-stage .flip-hint:hover { color: #fff; border-color: var(--gold); }
.book-info h1 { color: #fff; font-size: clamp(2.5rem, 5vw, 4.2rem); margin-bottom: 8px; }
.book-info .sub { font-family: var(--font-display); font-style: italic; color: var(--gold-2); font-size: 1.25rem; margin-bottom: 20px; }
.book-info .by { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; color: rgba(255, 255, 255, 0.75); }
.book-info .by img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; object-position: top; border: 2px solid var(--gold); }
.book-info .by a { color: #fff; font-weight: 700; border-bottom: 1px solid var(--gold); }
.book-info .short { color: rgba(255, 255, 255, 0.75); font-size: 1.08rem; max-width: 560px; }
.book-price-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; margin: 30px 0; padding: 22px 0; border-top: 1px solid var(--line-light); border-bottom: 1px solid var(--line-light); }
.book-price-row .price { color: #fff; font-size: 2.3rem; }
.book-price-row .price.on-request { color: var(--gold-2); font-size: 15px; }
.stock { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #6ee7b7; }
.stock::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px rgba(110, 231, 183, 0.2); }
.stock.out { color: #fca5a5; }
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 34px; }
.spec { padding: 16px 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line-light); }
.spec span { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted-light); margin-bottom: 4px; }
.spec strong { color: #fff; font-size: 14.5px; }

.detail-layout { display: grid; grid-template-columns: 1fr 400px; gap: 60px; align-items: start; }
.detail-block { margin-bottom: 80px; }
.prose p { font-size: 1.07rem; color: #384055; }
.prose p:first-child::first-letter { font-family: var(--font-display); float: left; font-size: 4.6rem; line-height: 0.8; padding: 8px 12px 0 0; color: var(--gold-deep); }
.dedication { margin-top: 30px; padding: 28px 32px; border-radius: var(--radius); background: var(--paper); font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--ink); position: relative; }
.dedication small { display: block; font-family: var(--font-body); font-style: normal; font-size: 11.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gold-deep); margin-bottom: 8px; font-weight: 700; }

.toc { border-radius: var(--radius-lg); background: #fff; border: 1px solid var(--line); overflow: hidden; }
.toc-chapter { border-bottom: 1px solid var(--line); }
.toc-chapter:last-child { border-bottom: 0; }
.toc-chapter summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 56px 1fr auto auto; gap: 18px; align-items: center; padding: 22px 28px; transition: background 0.3s; }
.toc-chapter summary::-webkit-details-marker { display: none; }
.toc-chapter summary:hover { background: var(--ivory); }
.toc-num { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: var(--paper); font-family: var(--font-display); font-size: 1.35rem; color: var(--ink); font-weight: 600; transition: background 0.3s, color 0.3s; }
.toc-chapter[open] .toc-num { background: var(--ink); color: var(--gold-2); }
.toc-title strong { display: block; font-family: var(--font-display); font-size: 1.22rem; color: var(--ink); font-weight: 600; }
.toc-title span { font-size: 13.5px; color: var(--muted); font-style: italic; }
.toc-pages { font-size: 13px; font-weight: 700; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.toc-chapter .chev { transition: transform 0.4s var(--ease); color: var(--muted); }
.toc-chapter[open] .chev { transform: rotate(180deg); }
.toc-body { padding: 0 28px 26px 102px; }
.toc-body > p { font-size: 14.5px; color: var(--muted); }
.toc-lines { list-style: none; margin: 0 0 18px; padding: 0; }
.toc-lines li { display: flex; align-items: baseline; gap: 8px; padding: 6px 0; font-size: 14.5px; }
.toc-lines li .dots { flex: 1; border-bottom: 2px dotted rgba(10, 20, 38, 0.18); transform: translateY(-4px); }
.toc-lines li .pg { font-weight: 700; color: var(--gold-deep); font-variant-numeric: tabular-nums; }

.peek-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.peek { position: relative; aspect-ratio: 420 / 595; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow); transition: transform 0.5s var(--ease); }
.peek:nth-child(odd) { transform: rotate(-2deg); }
.peek:nth-child(even) { transform: rotate(2deg) translateY(14px); }
.peek:hover { transform: rotate(0) translateY(-8px) scale(1.03); z-index: 2; }
.peek img { width: 100%; height: 100%; object-fit: cover; }

.order-card { position: sticky; top: 100px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); overflow: hidden; }
.order-card-head { padding: 28px 30px; background: var(--ink); color: #fff; display: flex; gap: 18px; align-items: center; }
.order-card-head img { width: 60px; border-radius: 4px; box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4); }
.order-card-head h3 { color: #fff; font-size: 1.2rem; margin: 0 0 2px; }
.order-card-head .price { color: var(--gold-2); font-size: 1.4rem; }
.order-card-head .price.on-request { font-size: 13px; }
.order-form { padding: 28px 30px 30px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.order-form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink); margin-bottom: 6px; }
.field-input { width: 100%; padding: 13px 16px; border-radius: 12px; border: 1px solid rgba(10, 20, 38, 0.14); background: var(--ivory); outline: none; transition: border-color 0.25s, box-shadow 0.25s, background 0.25s; font-size: 15px; }
.field-input:focus { border-color: var(--gold); background: #fff; box-shadow: 0 0 0 4px rgba(201, 164, 92, 0.18); }
textarea.field-input { resize: vertical; }
.field .errorlist { list-style: none; padding: 0; margin: 6px 0 0; color: var(--danger); font-size: 12.5px; font-weight: 600; }
.field.has-error .field-input { border-color: var(--danger); }
.order-note { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: flex-start; }
.buy-links { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------- Author page ---------- */
.author-hero { position: relative; padding: calc(var(--nav-h) + 70px) 0 120px; background: var(--ink); color: #fff; overflow: hidden; isolation: isolate; }
.author-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(700px 500px at 75% 40%, rgba(201, 164, 92, 0.22), transparent 60%), radial-gradient(700px 500px at 10% 90%, rgba(59, 130, 246, 0.18), transparent 60%); }
.author-hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 70px; align-items: center; }
.author-hero h1 { color: #fff; font-size: clamp(2.6rem, 5.4vw, 4.6rem); margin-bottom: 8px; }
.author-hero .portrait::before { border-color: rgba(228, 202, 146, 0.6); }
.author-hero .lead { color: rgba(255, 255, 255, 0.75); font-size: 1.12rem; max-width: 600px; }
.profile-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px; }
.profile-links a { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line-light); font-size: 14px; font-weight: 600; transition: all 0.3s; }
.profile-links a:hover { border-color: var(--gold); color: var(--gold-2); }

.timeline { position: relative; display: grid; gap: 0; }
.timeline::before { content: ""; position: absolute; left: 170px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--gold), rgba(201, 164, 92, 0.1)); }
.tl-item { display: grid; grid-template-columns: 150px 40px 1fr; gap: 0 20px; padding: 0 0 38px; position: relative; }
.tl-period { text-align: right; font-weight: 800; font-size: 14px; color: var(--gold-deep); padding-top: 18px; font-variant-numeric: tabular-nums; }
.tl-dot { width: 40px; height: 40px; border-radius: 50%; background: var(--ink); color: var(--gold-2); display: grid; place-items: center; margin-top: 8px; z-index: 1; box-shadow: 0 0 0 6px var(--ivory); }
.tl-card { padding: 20px 26px; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); transition: transform 0.4s var(--ease), box-shadow 0.4s; }
.tl-card:hover { transform: translateX(6px); box-shadow: var(--shadow); }
.tl-card h3 { font-family: var(--font-body); font-size: 1.08rem; font-weight: 800; margin-bottom: 2px; letter-spacing: 0; }
.tl-card .org { font-size: 14px; color: var(--gold-deep); font-weight: 600; }
.tl-card p { font-size: 14.5px; color: var(--muted); margin: 8px 0 0; }
.tabs { display: inline-flex; padding: 6px; border-radius: 999px; background: #fff; border: 1px solid var(--line); gap: 4px; margin-bottom: 40px; }
.tab { padding: 10px 22px; border-radius: 999px; border: 0; background: none; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--muted); transition: all 0.3s; }
.tab.active { background: var(--ink); color: #fff; }
.pub-list { display: grid; gap: 12px; }
.pub-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 24px; align-items: center; padding: 22px 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); transition: border-color 0.3s, box-shadow 0.3s; }
.pub-row:hover { border-color: var(--gold); box-shadow: var(--shadow-sm); }
.pub-row .yr { font-family: var(--font-display); font-size: 1.6rem; color: var(--ink); font-weight: 600; }
.pub-row h3 { font-family: var(--font-body); font-size: 1rem; font-weight: 700; margin: 0 0 4px; letter-spacing: 0; line-height: 1.5; }
.pub-row .j { font-size: 13.5px; color: var(--gold-deep); font-weight: 600; }
.pub-row .go { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); transition: all 0.3s; }
.pub-row:hover .go { background: var(--ink); color: var(--gold-2); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 60px; align-items: start; }
.info-cards { display: grid; gap: 16px; }
.info-card { display: flex; gap: 18px; align-items: center; padding: 24px 26px; border-radius: var(--radius); background: #fff; border: 1px solid var(--line); transition: transform .35s var(--ease), box-shadow .35s; }
.info-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.info-card .ic { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--ink); color: var(--gold-2); }
.info-card span { display: block; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.info-card strong { color: var(--ink); font-size: 1.02rem; word-break: break-word; }
.form-card { padding: 44px; border-radius: var(--radius-lg); background: #fff; box-shadow: var(--shadow-lg); border: 1px solid var(--line); }
.form-card .order-form { padding: 0; }

/* ---------- Success ---------- */
.success-wrap { min-height: 80vh; display: grid; place-items: center; padding: calc(var(--nav-h) + 60px) 0 40px; background: radial-gradient(800px 500px at 50% 0%, rgba(201, 164, 92, 0.18), transparent 60%), var(--ivory); }
.success-card { max-width: 620px; text-align: center; padding: 60px 50px; border-radius: var(--radius-xl); background: #fff; box-shadow: var(--shadow-lg); }
.success-icon { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 26px; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold-2), var(--gold-deep)); color: var(--ink); box-shadow: var(--shadow-gold); animation: pop 0.7s var(--ease); }
@keyframes pop { from { transform: scale(0.4); opacity: 0; } }
.order-summary { margin: 30px 0; padding: 22px; border-radius: var(--radius); background: var(--paper); text-align: left; display: grid; gap: 8px; font-size: 14.5px; }
.order-summary div { display: flex; justify-content: space-between; gap: 20px; }
.order-summary strong { color: var(--ink); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; right: 24px; bottom: 24px; z-index: 100; display: grid; gap: 10px; }
.toast { display: flex; gap: 12px; align-items: center; padding: 16px 20px; border-radius: 14px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 14.5px; max-width: 380px; animation: toastIn 0.5s var(--ease); border-left: 4px solid var(--gold); }
.toast.error { border-left-color: var(--danger); }
.toast.hide { opacity: 0; transform: translateY(10px); transition: all 0.4s; }
@keyframes toastIn { from { opacity: 0; transform: translateY(20px); } }

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Marquee */
.marquee { position: relative; z-index: 3; background: var(--gold); color: var(--ink); overflow: hidden; padding: 18px 0; transform: rotate(-1.2deg); margin: -30px -20px 0; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.3); }
.marquee-track { display: flex; gap: 50px; width: max-content; animation: marquee 50s linear infinite; font-family: var(--font-display); font-size: 1.35rem; font-style: italic; white-space: nowrap; }
.marquee-track span { display: inline-flex; align-items: center; gap: 50px; }
.marquee-track span::after { content: "✦"; font-style: normal; font-size: 0.9rem; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Responsive ---------- */
/* Small laptops: tighter menu so all links fit on one line (the ☰ menu takes over at 900px). */
@media (max-width: 1240px) {
  .nav-inner { gap: 14px; }
  .nav-links { gap: 2px; }
  .nav-links a { padding: 9px 11px; font-size: 14px; }
  .nav-account-name { display: none; }
}
@media (max-width: 1080px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 1100px) {
  .hero .container, .about-grid, .author-grid, .preview-grid, .faq-grid, .book-hero .container, .author-hero .container, .contact-grid, .cta-inner { grid-template-columns: 1fr; }
  .hero { padding-bottom: 170px; }
  .hero-visual { min-height: 520px; margin-top: 10px; }
  .hero-content { text-align: left; }
  .highlight-grid, .chapter-grid { grid-template-columns: repeat(2, 1fr); }
  /* Publications stay in one horizontal row: swipe / scroll sideways when four don't fit. */
  .pub-grid { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; margin-inline: -24px; padding: 8px 24px 14px; scroll-padding-inline: 24px; scrollbar-width: thin; }
  .pub-grid .pub-card { flex: 0 0 min(320px, 80%); scroll-snap-align: start; }
  .pub-grid .pub-card.reveal { opacity: 1; transform: none; }  /* off-screen cards would otherwise fade in mid-swipe */
  .detail-layout { grid-template-columns: 1fr; }
  .order-card { position: static; }
  .faq-aside { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-track { grid-auto-columns: calc((100% - 24px) / 2); }
  .collage { height: 540px; max-width: 560px; }
  .portrait { margin-inline: auto; }
  .author-hero .portrait { max-width: 380px; }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn { display: none; }
  .nav-toggle { display: block; }
  .stats-card { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n + 3) { border-top: 1px solid var(--line); }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  :root { --nav-h: 72px; }
  .container { width: calc(100% - 32px); }
  .section { padding: 90px 0; }
  .hero { padding-top: calc(var(--nav-h) + 30px); }
  .hero-visual { min-height: 420px; }
  .hero-helix { opacity: 0.35; }
  .book-hero .container { gap: 50px; }
  .hero-ring { width: 360px; height: 360px; }
  .book3d.lg { --w: 220px; --d: 26px; }
  .book3d.md { --w: 210px; }
  .float-card { padding: 10px 12px; font-size: 11.5px; }
  .float-card strong { font-size: 13px; }
  .float-card .fc-icon { width: 32px; height: 32px; }
  .float-card.fc-1 { left: 0; top: 4%; }
  .float-card.fc-2 { right: 0; bottom: 2%; }
  .float-card.fc-3 { display: none; }
  .hero-facts { gap: 18px; }
  .scroll-hint { display: none; }
  .highlight-grid, .chapter-grid, .check-list { grid-template-columns: 1fr; }
  .collage { height: 420px; }
  .collage-badge { width: 116px; height: 116px; top: 10px; }
  .collage-badge strong { font-size: 28px; }
  .cta-banner { padding: 56px 26px; border-radius: var(--radius-lg); }
  .subscribe-form { flex-direction: column; border-radius: 22px; }
  .subscribe-form input { padding: 14px 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .testimonial-track { grid-auto-columns: 88%; }
  .portrait-card { left: 0; }
  .portrait-sig { right: 50%; transform: translateX(50%); bottom: -22px; white-space: nowrap; font-size: 14px; }
  .portrait-card { bottom: 60px; }
  .portrait::before { inset: 16px -12px -16px 12px; }
  .toc-chapter summary { grid-template-columns: 44px 1fr auto; padding: 18px; gap: 12px; }
  .toc-chapter .toc-pages { display: none; }
  .toc-num { width: 42px; height: 42px; font-size: 1.1rem; }
  .toc-body { padding: 0 18px 22px; }
  .peek-strip { grid-template-columns: repeat(2, 1fr); }
  .order-form { grid-template-columns: 1fr; padding: 22px; }
  .form-card { padding: 26px 20px; }
  .timeline::before { left: 19px; }
  .tl-item { grid-template-columns: 40px 1fr; gap: 6px 16px; }
  .tl-period { grid-column: 2; text-align: left; padding: 0; order: -1; }
  .tl-dot { grid-row: 1 / span 2; grid-column: 1; }
  .pub-row { grid-template-columns: 1fr auto; }
  .pub-row .yr { grid-column: 1 / -1; font-size: 1.2rem; }
  .search-box { min-width: 0; width: 100%; }
  .success-card { padding: 44px 24px; }
  .stat { padding: 24px 20px; }
  .marquee-track { font-size: 1.1rem; }
}

/* Account button in the nav */
.nav-account { display: inline-flex; align-items: center; gap: 9px; padding: 5px 14px 5px 5px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); color: #fff; font-size: 14px; font-weight: 700; transition: border-color 0.25s, background 0.25s; }
.nav-account:hover { border-color: var(--gold-2); background: rgba(255, 255, 255, 0.06); }
.nav-account > .icon { width: 32px; height: 32px; padding: 7px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--gold-2), var(--gold-deep)); color: var(--ink); font-size: 12.5px; font-weight: 800; overflow: hidden; }
.nav-avatar img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 900px) {
  .nav-account { padding: 4px; border: 0; }
  .nav-account-name { display: none; }
}
