@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,650;0,9..144,750;1,9..144,500&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap");

:root {
  --bg: #f7f3ec;
  --bg-deep: #ebe4d8;
  --fg: #1c1916;
  --muted: #6b6358;
  --line: rgba(28, 25, 22, 0.09);
  --accent: #c04e1a;
  --accent-glow: rgba(192, 78, 26, 0.22);
  --accent-soft: rgba(192, 78, 26, 0.11);
  --teal: #1a5c52;
  --teal-soft: rgba(26, 92, 82, 0.12);
  --gold: #9a7b2f;
  --card: rgba(255, 252, 247, 0.88);
  --card-solid: #fffdf9;
  --max: 42rem;
  --wide: 62rem;
  --space: 1rem;
  --radius: 14px;
  --radius-lg: 22px;
  --touch: 44px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --shadow-sm: 0 2px 12px rgba(28, 25, 22, 0.05);
  --shadow-md: 0 12px 40px rgba(28, 25, 22, 0.08);
  --shadow-lg: 0 24px 64px rgba(28, 25, 22, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.68;
  font-size: 1.0625rem;
  overflow-x: clip;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(192, 78, 26, 0.07), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(26, 92, 82, 0.06), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(154, 123, 47, 0.05), transparent 45%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -0.025em;
}

h1 {
  font-size: clamp(2rem, 6vw, 3.15rem);
  font-weight: 750;
}

h2 {
  font-size: clamp(1.35rem, 3.5vw, 1.85rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1rem;
}

a {
  color: var(--teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.page-wrap {
  position: relative;
  z-index: 1;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 130;
  /* Solid wash (no backdrop-filter) so fixed mobile nav is not clipped */
  background: rgba(247, 243, 236, 0.96);
  border-bottom: 1px solid var(--line);
  padding: 0.55rem 1rem;
  padding-top: max(0.55rem, env(safe-area-inset-top));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
}

.site-header-inner {
  max-width: var(--wide);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  position: relative;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: auto;
  z-index: 2;
}

body.nav-open {
  overflow: hidden;
}

.brand {
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 1.2rem;
  color: var(--fg);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.brand span {
  color: var(--accent);
}

.brand:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-solid);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--fg);
}

.site-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 120;
  background: rgba(18, 16, 14, 0.55);
  padding: 0;
  flex-direction: column;
  gap: 0;
  border: none;
  box-shadow: none;
  max-height: none;
  overflow: hidden;
}

.site-nav.is-open {
  display: flex;
  animation: nav-in 0.22s ease;
}

.site-nav.is-open::before {
  content: "";
  display: block;
  height: calc(3.6rem + env(safe-area-inset-top));
  flex-shrink: 0;
}

.site-nav-panel {
  flex: 1;
  min-height: 0;
  background: linear-gradient(180deg, var(--card-solid) 0%, var(--bg) 100%);
  border-top: 1px solid var(--line);
  border-radius: 18px 18px 0 0;
  box-shadow: var(--shadow-lg);
  padding: 0.85rem 1rem calc(1.5rem + env(safe-area-inset-bottom));
  padding-left: max(1rem, env(safe-area-inset-left));
  padding-right: max(1rem, env(safe-area-inset-right));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

@keyframes nav-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.nav-group-label {
  display: block;
  margin: 0.85rem 0 0.35rem;
  padding: 0 0.35rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-group-label:first-child {
  margin-top: 0.15rem;
}

.site-nav a {
  display: flex;
  align-items: center;
  padding: 0.7rem 0.85rem;
  min-height: var(--touch);
  color: var(--fg);
  text-decoration: none;
  border-radius: 12px;
  font-size: 1.02rem;
  font-weight: 550;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  background: var(--accent-soft);
  color: var(--accent);
  text-decoration: none;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav,
  .site-nav.is-open {
    display: flex;
    position: static;
    inset: auto;
    flex-direction: row;
    flex-wrap: wrap;
    border: none;
    padding: 0;
    background: transparent;
    gap: 0.05rem 0.2rem;
    box-shadow: none;
    justify-content: flex-end;
    max-height: none;
    overflow: visible;
    margin-left: auto;
    order: 2;
    z-index: auto;
    animation: none;
  }

  .site-nav.is-open::before {
    display: none;
  }

  .site-nav-panel {
    display: contents;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 0;
    overflow: visible;
  }

  .header-actions {
    order: 3;
    margin-left: 0.35rem;
  }

  .nav-group-label {
    display: none;
  }

  .site-nav a {
    min-height: auto;
    padding: 0.4rem 0.55rem;
    font-size: 0.84rem;
    border-radius: 8px;
  }
}

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 0 1.1rem 3.5rem;
  padding-left: max(1.1rem, env(safe-area-inset-left));
  padding-right: max(1.1rem, env(safe-area-inset-right));
  padding-bottom: max(3.5rem, env(safe-area-inset-bottom));
  width: 100%;
}

.narrow {
  max-width: var(--max);
}

.hero-band {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  min-height: clamp(300px, 56vh, 560px);
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.hero-band img {
  width: 100%;
  height: 100%;
  min-height: clamp(300px, 56vh, 560px);
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.06);
  animation: hero-drift 32s ease-in-out alternate infinite;
  will-change: transform;
}

@keyframes hero-drift {
  from {
    transform: scale(1.06) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.14) translate3d(-1.5%, -1%, 0);
  }
}

.hero-band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(28, 25, 22, 0.22) 0%,
    rgba(28, 25, 22, 0.28) 35%,
    rgba(28, 25, 22, 0.55) 68%,
    var(--bg) 100%
  );
}

.hero-band-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2rem 1.1rem 2.4rem;
  padding-left: max(1.1rem, env(safe-area-inset-left));
  padding-right: max(1.1rem, env(safe-area-inset-right));
}

.hero-band-caption .hero-kicker {
  color: rgba(255, 252, 247, 0.9);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}

.hero-band-caption h1 {
  color: #fffdf9;
  text-shadow: 0 2px 28px rgba(0, 0, 0, 0.45);
  max-width: none;
  margin: 0;
  font-size: clamp(1.85rem, 7.2vw, 3.2rem);
  line-height: 1.08;
}

@media (min-width: 720px) {
  .hero-band-caption h1 {
    max-width: 14ch;
  }
}

.hero {
  margin-bottom: 1.75rem;
  padding-top: 0.85rem;
}

.hero-links {
  margin: -0.35rem 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.hero-links a {
  font-weight: 600;
}

.hero-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.65rem;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 38em;
  line-height: 1.7;
}

.hero-lede strong {
  color: var(--fg);
  font-weight: 600;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.lane-grid {
  display: grid;
  gap: 1.15rem;
  margin: 2.5rem 0;
}

@media (min-width: 540px) {
  .lane-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .lane-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.35rem;
  }
}

.lane-card {
  background: var(--card);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.lane-card:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 78, 26, 0.28);
  box-shadow: var(--shadow-md);
}

.lane-card-art {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-deep);
}

.lane-card-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.lane-card:hover .lane-card-art img {
  transform: scale(1.04);
}

.lane-card-body {
  padding: 1.25rem 1.35rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.lane-card h2 {
  margin: 0;
  font-size: 1.2rem;
}

.lane-card h2 a {
  color: var(--fg);
  text-decoration: none;
}

.lane-card h2 a:hover {
  color: var(--accent);
}

.lane-card p {
  margin: 0;
  font-size: 0.94rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.6;
}

.lane-card .rank {
  font-size: 0.72rem;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.lane-card .card-link {
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  margin-top: 0.35rem;
}

.lane-card.secondary {
  opacity: 0.94;
}

.lane-card.secondary .rank {
  color: var(--muted);
}

.lane-card.featured {
  grid-column: 1 / -1;
}

@media (min-width: 960px) {
  .lane-card.featured {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
  }

  .lane-card.featured .lane-card-art {
    aspect-ratio: auto;
    min-height: 240px;
  }
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.5rem 0 1.25rem;
}

@media (max-width: 539px) {
  .btn-row-hero {
    flex-direction: column;
  }

  .btn-row-hero .btn {
    width: 100%;
  }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch);
  padding: 0.75rem 1.45rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #a84315 100%);
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  color: #fff;
  text-decoration: none;
  box-shadow: 0 6px 28px var(--accent-glow);
}

.btn-secondary {
  background: var(--card-solid);
  color: var(--fg);
  border-color: var(--line);
}

.btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
  text-decoration: none;
}

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-right: 0.35rem;
  margin-bottom: 0.35rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag-roadmap {
  background: rgba(107, 99, 88, 0.12);
  color: var(--muted);
}

.tag-live {
  background: var(--teal-soft);
  color: var(--teal);
}

.section {
  margin: 3rem 0;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

.section h2 {
  margin: 0 0 1.15rem;
}

.section-lede {
  color: var(--muted);
  max-width: 36em;
  margin-bottom: 1.5rem;
}

.manifesto {
  background: linear-gradient(145deg, var(--card-solid) 0%, rgba(255, 253, 249, 0.6) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.manifesto::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(180deg, var(--accent), var(--teal));
}

.manifesto blockquote {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 3vw, 1.65rem);
  font-weight: 500;
  font-style: italic;
  line-height: 1.45;
  color: var(--fg);
}

.manifesto cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 500;
}

.ecosystem-strip {
  display: grid;
  gap: 0.85rem;
  margin: 2rem 0;
}

@media (min-width: 540px) {
  .ecosystem-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

.eco-tile {
  text-align: center;
  padding: 1.35rem 1rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--fg);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.eco-tile:hover {
  border-color: var(--teal);
  transform: translateY(-2px);
  text-decoration: none;
  color: var(--teal);
}

.eco-tile strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.25rem;
}

.eco-tile span {
  font-size: 0.85rem;
  color: var(--muted);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.pill {
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: var(--card-solid);
  border: 1px solid var(--line);
  color: var(--muted);
}

.now-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.now-list li {
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.now-list li:last-child {
  border-bottom: none;
}

.now-list strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  display: block;
  margin-bottom: 0.35rem;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--line);
  margin: 1.5rem 0;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: calc(-1.5rem - 5px);
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.timeline-item h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.timeline-item p {
  font-size: 0.94rem;
  color: var(--muted);
}

.shop-grid {
  display: grid;
  gap: 1.15rem;
}

@media (min-width: 540px) {
  .shop-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shop-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s ease;
}

.shop-item:hover {
  box-shadow: var(--shadow-md);
}

.shop-item h3 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
}

.split-feature {
  display: grid;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}

@media (min-width: 768px) {
  .split-feature {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.split-feature img {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  width: 100%;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin: 1.5rem 0;
}

.stat {
  min-width: 6rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 750;
  color: var(--accent);
  line-height: 1;
}

.stat-label {
  font-size: 0.82rem;
  color: var(--muted);
  margin-top: 0.25rem;
}

.site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 2.5rem 1rem;
  padding-bottom: max(2.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer a {
  color: var(--muted);
}

.site-footer a:hover {
  color: var(--accent);
}

.site-footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: flex-start;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--fg);
  font-weight: 650;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1rem;
  z-index: 200;
}

.skip-link:focus {
  left: 0;
}

.page-hero-mini {
  padding: 2rem 0 1rem;
}

.page-hero-mini h1 {
  margin: 0 0 0.5rem;
}

code {
  font-size: 0.88em;
  background: rgba(28, 25, 22, 0.06);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
}

/* Theme toggle */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  padding: 0.45rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card-solid);
  cursor: pointer;
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  color: var(--fg);
  margin-left: 0;
  flex-shrink: 0;
}

@media (min-width: 900px) {
  .theme-toggle {
    min-width: 2.5rem;
    min-height: 2.5rem;
  }
}

/* Book catalog */
.catalog-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  margin: 1.5rem 0;
}

.catalog-search {
  flex: 1 1 12rem;
  min-height: var(--touch);
  padding: 0.65rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 1rem;
  background: var(--card-solid);
  color: var(--fg);
}

.catalog-search:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

.filter-pill {
  cursor: pointer;
  border: none;
  font: inherit;
  transition: background 0.15s ease, color 0.15s ease;
}

.filter-pill.is-active {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: rgba(192, 78, 26, 0.35);
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 1.25rem 1rem;
  margin: 1.5rem 0 2.5rem;
}

@media (min-width: 540px) {
  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
    gap: 1.5rem 1.25rem;
  }
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s ease;
}

.book-card:hover {
  transform: translateY(-4px);
  text-decoration: none;
}

.book-cover {
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  background: var(--bg-deep);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-cover-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.85rem;
  background: linear-gradient(160deg, var(--g1, #1a5c52) 0%, var(--g2, #0d3d36) 100%);
}

.book-cover-fallback span {
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: rgba(255, 252, 247, 0.95);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
}

.book-meta h3 {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.35;
  font-weight: 650;
}

.book-meta p {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.book-meta .tag {
  margin-top: 0.35rem;
  font-size: 0.65rem;
  padding: 0.15rem 0.45rem;
}

.catalog-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2rem;
  color: var(--muted);
}

.featured-covers {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 1.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.featured-covers .book-card {
  flex: 0 0 8.5rem;
  scroll-snap-align: start;
}

.catalog-count {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0;
}

main.catalog-main {
  max-width: var(--wide);
}

/* Dark theme */
[data-theme="dark"] {
  --bg: #12100e;
  --bg-deep: #1c1916;
  --fg: #f5f0e8;
  --muted: #a89f92;
  --line: rgba(245, 240, 232, 0.1);
  --accent: #e07040;
  --accent-glow: rgba(224, 112, 64, 0.25);
  --accent-soft: rgba(224, 112, 64, 0.14);
  --teal: #5cb8a8;
  --teal-soft: rgba(92, 184, 168, 0.14);
  --card: rgba(28, 25, 22, 0.75);
  --card-solid: #1c1916;
  --shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 12px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.45);
}

[data-theme="dark"] body::before {
  background:
    radial-gradient(ellipse 80% 50% at 10% 0%, rgba(224, 112, 64, 0.08), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(92, 184, 168, 0.06), transparent 50%);
}

[data-theme="dark"] .site-header {
  background: rgba(18, 16, 14, 0.96);
}

[data-theme="dark"] code {
  background: rgba(245, 240, 232, 0.08);
}

[data-theme="dark"] .hero-band::after {
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.25) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.65) 70%,
    var(--bg) 100%
  );
}

[data-theme="dark"] .site-nav {
  background: linear-gradient(180deg, var(--card-solid) 0%, var(--bg) 100%);
}

.shop-book-grid {
  display: grid;
  gap: 1rem;
  margin: 1.25rem 0 2rem;
}

@media (min-width: 540px) {
  .shop-book-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.shop-book {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
}

.shop-book-cover {
  flex: 0 0 5rem;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.shop-book-cover img {
  width: 5rem;
  height: auto;
  display: block;
}

.shop-book h3 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1rem;
}

.shop-book p {
  margin: 0 0 0.65rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.shop-section-grid {
  display: grid;
  gap: 1.15rem;
  margin: 1.5rem 0;
}

@media (min-width: 540px) {
  .shop-section-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.author-grid {
  display: grid;
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

@media (min-width: 540px) {
  .author-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .author-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.author-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.author-card-mark {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--g1), var(--g2));
  box-shadow: var(--shadow-sm);
}

.author-card h3 {
  margin: 0;
  font-size: 1.15rem;
}

.author-card p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--muted);
  flex: 1;
  line-height: 1.6;
}

.tool-lane-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 640px) {
  .tool-lane-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.tool-lane {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.tool-lane h3 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
}

.tool-lane p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.reading-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.reading-list li {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.reading-list li:last-child {
  border-bottom: none;
}

.contact-grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

@media (min-width: 540px) {
  .contact-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.35rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
  border-color: rgba(192, 78, 26, 0.3);
  transform: translateY(-2px);
}

.contact-card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.contact-card p {
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  color: var(--muted);
}

.contact-card a {
  font-weight: 600;
  word-break: break-all;
}

/* Single title spotlight (The Velvet Arrangement) */
.book-spotlight {
  display: grid;
  gap: 1.5rem;
  align-items: start;
  margin: 1.75rem auto 2.75rem;
  padding: 1.25rem 0;
  max-width: var(--wide);
}

.book-spotlight--velvet {
  position: relative;
  overflow: hidden;
  padding: 1.65rem 1.35rem 1.85rem;
  border-radius: calc(var(--radius-lg) + 4px);
  background:
    radial-gradient(ellipse 80% 60% at 15% 20%, rgba(192, 78, 26, 0.22), transparent 55%),
    radial-gradient(ellipse 70% 50% at 90% 80%, rgba(90, 40, 70, 0.35), transparent 50%),
    linear-gradient(165deg, #141014 0%, #1c141a 45%, #120e12 100%);
  color: #f5f0e8;
  box-shadow:
    var(--shadow-lg),
    0 0 0 1px rgba(255, 252, 247, 0.06),
    0 24px 80px rgba(20, 10, 16, 0.35);
}

.book-spotlight--velvet::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(125deg, rgba(255, 255, 255, 0.05), transparent 40%);
}

@media (min-width: 720px) {
  .book-spotlight {
    grid-template-columns: minmax(11rem, 17rem) 1fr;
    gap: 2.5rem;
    align-items: center;
  }

  .book-spotlight--velvet {
    padding: 2rem 2.25rem;
  }
}

.book-spotlight-cover {
  position: relative;
  z-index: 1;
  max-width: 15.5rem;
  margin: 0 auto;
  width: 100%;
}

.book-spotlight-cover::after {
  content: "";
  position: absolute;
  inset: 12% -8% -8%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(192, 78, 26, 0.45), transparent 70%);
  filter: blur(18px);
  opacity: 0.85;
}

.book-spotlight-cover img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow:
    0 20px 50px rgba(0, 0, 0, 0.55),
    0 0 0 1px rgba(255, 252, 247, 0.08);
  transition: transform 0.35s ease;
}

.book-spotlight-cover a:hover img,
.book-spotlight-cover:hover img {
  transform: translateY(-4px) scale(1.015);
}

.book-spotlight-body {
  position: relative;
  z-index: 1;
}

.book-spotlight-body h2 {
  margin: 0.35rem 0 0.25rem;
  font-size: clamp(1.7rem, 4.5vw, 2.25rem);
  line-height: 1.15;
  color: #fffdf9;
}

.book-spotlight-body h2 a {
  text-decoration: none;
  color: inherit;
}

.book-spotlight-body h2 a:hover {
  color: #f0a070;
}

.book-spotlight-by {
  margin: 0 0 0.85rem;
  color: rgba(245, 240, 232, 0.72);
  font-size: 1.02rem;
}

.book-spotlight-body p {
  color: rgba(245, 240, 232, 0.86);
}

.book-spotlight-body .rank,
.book-spotlight--velvet .hero-kicker {
  display: inline-block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e07040;
  font-weight: 700;
}

.book-spotlight--velvet .tag-live {
  background: rgba(92, 184, 168, 0.18);
  color: #7fd0c2;
}

.book-spotlight--velvet .tag-roadmap {
  background: rgba(224, 112, 64, 0.18);
  color: #f0a070;
}

.btn-on-dark.btn-primary {
  background: linear-gradient(135deg, #e07040 0%, #c04e1a 100%);
  box-shadow: 0 8px 28px rgba(224, 112, 64, 0.35);
}

.btn-on-dark.btn-secondary {
  background: rgba(255, 252, 247, 0.06);
  color: #fffdf9;
  border-color: rgba(255, 252, 247, 0.2);
}

.btn-on-dark.btn-secondary:hover {
  border-color: #e07040;
  color: #f0a070;
  background: rgba(255, 252, 247, 0.1);
  text-decoration: none;
}

@media (max-width: 539px) {
  .book-spotlight--velvet .btn-row {
    flex-direction: column;
  }

  .book-spotlight--velvet .btn-row .btn {
    width: 100%;
  }
}

.lane-card {
  border-radius: calc(var(--radius-lg) + 2px);
}

.lane-card-art {
  position: relative;
}

.lane-card-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(28, 25, 22, 0.18) 100%);
  pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-band img {
    animation: none;
    transform: none;
  }

  .site-nav.is-open {
    animation: none;
  }
}

/* —— Novelmate Studio home / product —— */
.brand-nm {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  font-size: 1.15rem;
}

.brand-nm span {
  color: var(--accent);
  font-weight: 500;
}

.nm-hero {
  position: relative;
  min-height: min(92vh, 720px);
  display: grid;
  align-items: end;
  overflow: clip;
  background: #0e0c0a;
  color: #fffdf9;
}

.nm-hero--compact {
  min-height: min(70vh, 520px);
}

.nm-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.nm-hero-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(8, 6, 5, 0.78) 0%, rgba(8, 6, 5, 0.45) 55%, rgba(8, 6, 5, 0.2) 100%),
    linear-gradient(180deg, rgba(8, 6, 5, 0.15) 0%, rgba(8, 6, 5, 0.55) 55%, rgba(8, 6, 5, 0.88) 100%);
  pointer-events: none;
}

.nm-hero-copy {
  position: relative;
  z-index: 1;
  width: min(100% - 2rem, var(--wide));
  margin: 0 auto;
  padding: 4.5rem 0 2.75rem;
  padding-left: max(0px, env(safe-area-inset-left));
  padding-right: max(0px, env(safe-area-inset-right));
  padding-bottom: max(2.75rem, env(safe-area-inset-bottom));
}

.nm-hero-brand {
  margin: 0 0 0.65rem;
  font-size: clamp(1.35rem, 4vw, 1.85rem);
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #fffdf9;
}

.nm-hero-copy h1 {
  margin: 0 0 0.85rem;
  max-width: 16ch;
  font-family: var(--font-display);
  font-weight: 750;
  font-size: clamp(2rem, 7vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: #fffdf9;
}

.nm-hero-sub {
  margin: 0 0 1.5rem;
  max-width: 34ch;
  font-size: 1.05rem;
  line-height: 1.55;
  color: rgba(255, 253, 249, 0.88);
}

.nm-eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.nm-promise h2,
.nm-storyband-body h2,
.nm-pipeline h2,
.nm-moods h2,
.nm-gallery h2,
.nm-honest h2,
.nm-cta h2 {
  font-family: var(--font-display);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.nm-proof-strip {
  display: grid;
  gap: 1rem;
  width: min(100% - 2rem, var(--wide));
  margin: 0 auto 2.5rem;
}

@media (min-width: 720px) {
  .nm-proof-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }
}

.nm-proof {
  margin: 0;
}

.nm-proof img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.nm-proof h3 {
  margin: 0.85rem 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 650;
}

.nm-proof p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.nm-storyband {
  display: grid;
  gap: 0;
  margin: 0 0 2.75rem;
  background: #14110e;
  color: #fffdf9;
}

@media (min-width: 860px) {
  .nm-storyband {
    grid-template-columns: 1.15fr 1fr;
    align-items: stretch;
  }
}

.nm-storyband-media {
  min-height: 240px;
}

.nm-storyband-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
}

.nm-storyband-body {
  padding: 1.75rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

@media (min-width: 860px) {
  .nm-storyband-body {
    padding: 2.5rem 2.25rem;
  }
}

.nm-storyband-body .nm-eyebrow {
  color: #e07040;
}

.nm-storyband-body h2 {
  margin: 0;
  color: #fffdf9;
  font-size: clamp(1.55rem, 3.5vw, 2.1rem);
}

.nm-storyband-body p {
  margin: 0 0 0.5rem;
  color: rgba(255, 253, 249, 0.84);
  line-height: 1.6;
  max-width: 38ch;
}

.nm-steps {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 800px) {
  .nm-steps {
    gap: 1.5rem;
  }
}

.nm-steps li {
  display: grid;
  gap: 0.85rem;
  align-items: center;
}

@media (min-width: 640px) {
  .nm-steps li {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.25rem;
  }

  .nm-steps li:nth-child(even) {
    direction: rtl;
  }

  .nm-steps li:nth-child(even) > * {
    direction: ltr;
  }
}

.nm-steps img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.nm-steps strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.25rem;
}

.nm-steps span {
  color: var(--muted);
  line-height: 1.5;
}

.nm-mood-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

@media (min-width: 540px) {
  .nm-mood-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .nm-mood-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .nm-mood-grid figure:nth-child(4),
  .nm-mood-grid figure:nth-child(5) {
    grid-column: span 1;
  }
}

.nm-mood-grid figure {
  margin: 0;
}

.nm-mood-grid img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.nm-mood-grid figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.nm-gallery-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 720px) {
  .nm-gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.85rem;
  }
}

.nm-gallery-grid img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
}

.nm-gallery-grid img:first-child {
  grid-column: 1 / -1;
  aspect-ratio: 21 / 9;
  min-height: 180px;
}

.nm-feature-banners {
  display: grid;
  gap: 0.75rem;
  width: min(100% - 2rem, var(--wide));
  margin: 0 auto 2.5rem;
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 800px) {
  .nm-feature-banners {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nm-banner {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  min-height: 120px;
  color: #fffdf9;
  text-decoration: none;
}

.nm-banner img {
  width: 100%;
  height: 100%;
  min-height: 140px;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
}

.nm-banner span {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.65rem;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 0.95rem;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.65);
}

.nm-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, 0.72) 100%);
  pointer-events: none;
}

.nm-banner:hover img {
  transform: scale(1.04);
}

.nm-banner:hover {
  text-decoration: none;
  color: #fffdf9;
}

@media (prefers-reduced-motion: reduce) {
  .nm-banner:hover img {
    transform: none;
  }
}

.nm-inline-art {
  display: block;
  width: 100%;
  max-width: 40rem;
  height: auto;
  margin: 1.25rem 0 0;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.nm-duo {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .nm-duo {
    grid-template-columns: 1.4fr 1fr;
  }
}

.nm-duo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  aspect-ratio: 16 / 10;
  box-shadow: var(--shadow-sm);
}

.nm-cta {
  text-align: left;
}

.nm-cta .btn-row {
  flex-wrap: wrap;
}

@media (max-width: 539px) {
  .nm-hero-copy .btn-row {
    flex-direction: column;
  }

  .nm-hero-copy .btn {
    width: 100%;
    justify-content: center;
    min-height: var(--touch);
  }

  .nm-feature-banners {
    grid-template-columns: 1fr;
  }
}

.page-velvet-home .site-header,
.page-novelmate-product .site-header {
  background: rgba(14, 12, 10, 0.92);
}

.page-velvet-home .site-header .brand,
.page-novelmate-product .site-header .brand,
.page-velvet-home .site-nav a,
.page-novelmate-product .site-nav a,
.page-velvet-home .nav-toggle,
.page-novelmate-product .nav-toggle {
  color: #fffdf9;
}

.page-velvet-home .brand span,
.page-novelmate-product .brand-nm span {
  color: #e07040;
}

.page-velvet-home .site-nav a[aria-current="page"],
.page-novelmate-product .site-nav a[aria-current="page"] {
  color: #e07040;
}

@media (max-width: 899px) {
  .page-velvet-home .site-nav,
  .page-novelmate-product .site-nav {
    background: linear-gradient(180deg, #1a1612 0%, #0e0c0a 100%);
  }
}

.nm-hero--velvet .nm-hero-img {
  object-position: center 35%;
}

.velvet-scene-grid img:first-child {
  grid-column: 1 / -1;
}

.nm-gallery-grid--dense {
  grid-template-columns: 1fr 1fr;
}

@media (min-width: 720px) {
  .nm-gallery-grid--dense {
    grid-template-columns: repeat(3, 1fr);
  }
}

.nm-gallery-grid--dense img {
  aspect-ratio: 3 / 2;
  min-height: 120px;
}

.nm-gallery-grid--dense img:first-child {
  grid-column: auto;
  aspect-ratio: 3 / 2;
}
