/* ==========================================================================
   Naked Foot Books — Redesign
   Luxury editorial: image-led, didone serif, warm ivory & ink
   ========================================================================== */

/* --------------------------------------------------------------------------
   Fonts (self-hosted variable woff2, latin subset)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/bodoni-moda-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/bodoni-moda-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('/assets/fonts/jost-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Jost';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url('/assets/fonts/jost-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* --------------------------------------------------------------------------
   Tokens
   -------------------------------------------------------------------------- */
:root {
  --ink: #191410;
  --ink-soft: #57493d;
  --ink-faint: #8a7c6e;
  --ivory: #f4eee4;
  --cream: #faf7f1;
  --paper: #fffdf9;
  --nude: #c9a284;
  --terra: #9c5c39;
  --rule: rgba(25, 20, 16, 0.14);
  --rule-light: rgba(244, 238, 228, 0.22);

  --serif: 'Bodoni Moda', 'Didot', 'Playfair Display', serif;
  --sans: 'Jost', 'Futura', sans-serif;

  --header-h: 5.25rem;
  --pad: clamp(1.25rem, 4vw, 4rem);
  --ease-out: cubic-bezier(0.2, 0.65, 0.2, 1);
}

/* --------------------------------------------------------------------------
   Base — reset & structural rules live in assets/platform/base.css
   -------------------------------------------------------------------------- */
body {
  font-family: var(--sans);
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
}

/* Film grain over everything — keeps flat surfaces from feeling digital */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip-link {
  background: var(--ink);
  color: var(--ivory);
}

/* --------------------------------------------------------------------------
   Type Utilities
   -------------------------------------------------------------------------- */
.section-eyebrow {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--terra);
  margin-bottom: 1.25rem;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 5.5vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.section-title em {
  font-weight: 400;
}

/* Animated underline link */
.link-line {
  position: relative;
  display: inline-block;
  padding-bottom: 0.2em;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}

.link-line::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform-origin: right;
  transition: transform 0.45s var(--ease-out);
}

.link-line:hover::after {
  transform: scaleX(0.35);
  transform-origin: left;
}

.link-line.is-disabled {
  color: var(--ink-faint);
  pointer-events: none;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 1em 2.75em;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  border: 1px solid currentColor;
  transition: background 0.35s var(--ease-out), color 0.35s var(--ease-out),
    border-color 0.35s var(--ease-out);
}

.btn-light {
  color: var(--ivory);
}

.btn-light:hover {
  background: var(--ivory);
  color: var(--ink);
}

.btn-solid {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--ivory);
}

.btn-solid:hover {
  background: transparent;
  color: var(--ink);
}

.link-light {
  color: var(--ivory);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--rule-light);
  padding-bottom: 0.25em;
  transition: border-color 0.3s;
}

.link-light:hover {
  border-color: var(--ivory);
}

/* --------------------------------------------------------------------------
   Announcement Bar
   -------------------------------------------------------------------------- */
.announce {
  background: var(--ink);
  color: var(--ivory);
  text-align: center;
  padding: 0.6rem var(--pad);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  transition: background 0.4s var(--ease-out), border-color 0.4s var(--ease-out),
    color 0.4s var(--ease-out);
}

/* Transparent variant sits over the hero until the page scrolls */
.site-header.is-overlay:not(.scrolled) {
  background: transparent;
  border-color: transparent;
  color: var(--ivory);
}

.nav {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--pad);
  gap: 2rem;
}

.nav-side {
  display: flex;
  gap: 2.5rem;
}

.nav-side-right {
  justify-content: flex-end;
}

.nav-side a {
  position: relative;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 0.35em 0;
}

.nav-side a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.nav-side a:hover::after,
.nav-side a[aria-current='page']::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-shop {
  color: var(--terra);
}

.site-header.is-overlay:not(.scrolled) .nav-shop {
  color: var(--nude);
}

.wordmark {
  text-align: center;
  line-height: 1.1;
}

.wordmark-main {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.wordmark-sub {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.5rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.site-header.is-overlay:not(.scrolled) .wordmark-sub {
  color: var(--ivory);
  opacity: 0.7;
}

/* Mobile toggle */
.nav-toggle {
  display: none;
  position: absolute;
  right: var(--pad);
  width: 2.5rem;
  height: 2.5rem;
  z-index: 160;
}

.nav-toggle span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1.5rem;
  height: 1px;
  background: currentColor;
  transition: transform 0.35s var(--ease-out);
}

.nav-toggle span:first-child {
  transform: translate(-50%, calc(-50% - 4px));
}

.nav-toggle span:last-child {
  transform: translate(-50%, calc(-50% + 4px));
}

body.nav-open .nav-toggle span:first-child {
  transform: translate(-50%, -50%) rotate(45deg);
}

body.nav-open .nav-toggle span:last-child {
  transform: translate(-50%, -50%) rotate(-45deg);
}

/* Full-screen mobile menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  background: var(--cream);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s var(--ease-out), visibility 0.45s;
}

body.nav-open .nav-overlay {
  opacity: 1;
  visibility: visible;
}

/* Keep the wordmark and close button above the open menu, in ink */
body.nav-open .site-header,
body.nav-open .site-header.is-overlay:not(.scrolled) {
  z-index: 200;
  color: var(--ink);
  background: transparent;
  border-color: transparent;
}

body.nav-open .site-header.is-overlay:not(.scrolled) .wordmark-sub {
  color: var(--ink-faint);
  opacity: 1;
}

.nav-overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.nav-overlay-links a {
  font-family: var(--serif);
  font-size: clamp(1.75rem, 7vw, 2.75rem);
  font-weight: 500;
  transition: font-style 0.2s, color 0.3s;
}

.nav-overlay-links a:hover {
  font-style: italic;
  color: var(--terra);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  margin-top: calc(-1 * var(--header-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: hero-drift 14s var(--ease-out) both;
}

@keyframes hero-drift {
  from { transform: scale(1.08); }
  to { transform: scale(1); }
}

.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(25, 20, 16, 0.72) 0%, rgba(25, 20, 16, 0.18) 45%, rgba(25, 20, 16, 0.28) 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 var(--pad) clamp(4rem, 10vh, 7rem);
  color: var(--ivory);
}

.hero-eyebrow {
  font-size: 0.6875rem;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  margin-bottom: 1.75rem;
  animation: rise 1s var(--ease-out) 0.2s both;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3.25rem, 10.5vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.hero-title .line {
  display: block;
  animation: rise 1.1s var(--ease-out) 0.35s both;
}

.hero-title .line.italic {
  font-style: italic;
  font-weight: 400;
  animation-delay: 0.5s;
}

.hero-sub {
  max-width: 34em;
  margin-top: 1.75rem;
  font-size: clamp(0.9375rem, 1.4vw, 1.0625rem);
  font-weight: 300;
  letter-spacing: 0.02em;
  opacity: 0.92;
  animation: rise 1.1s var(--ease-out) 0.7s both;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 2.5rem;
  margin-top: 2.75rem;
  animation: rise 1.1s var(--ease-out) 0.85s both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(1.75rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-cue {
  position: absolute;
  right: var(--pad);
  bottom: 0;
  z-index: 1;
  height: clamp(4rem, 9vh, 6.5rem);
  width: 1px;
  overflow: hidden;
}

.hero-cue span {
  position: absolute;
  inset: 0;
  background: var(--ivory);
  opacity: 0.75;
  animation: cue 2.2s var(--ease-out) infinite;
}

@keyframes cue {
  from { transform: translateY(-100%); }
  55% { transform: translateY(0); }
  to { transform: translateY(100%); }
}

/* --------------------------------------------------------------------------
   Ticker
   -------------------------------------------------------------------------- */
.ticker {
  overflow: hidden;
  background: var(--ink);
  color: var(--ivory);
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule-light);
}

.ticker-track {
  display: flex;
  width: max-content;
  animation: ticker 36s linear infinite;
}

.ticker-track span {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  padding-right: 0.5em;
}

.ticker-track i {
  font-style: normal;
  color: var(--nude);
  padding: 0 0.75em;
}

@keyframes ticker {
  to { transform: translateX(-50%); }
}

/* --------------------------------------------------------------------------
   Section Head
   -------------------------------------------------------------------------- */
/* Three-across editorial header: eyebrow left, title centered, link right */
.section-head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 2rem;
  padding: 0 var(--pad);
  margin-bottom: clamp(2.5rem, 6vh, 4.5rem);
}

.section-head .section-eyebrow {
  justify-self: start;
}

.section-head .link-line {
  justify-self: end;
}

.section-head .section-eyebrow {
  margin-bottom: 0.75rem;
}

.section-head .link-line {
  margin-bottom: 0.6rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Featured / Book Cards
   -------------------------------------------------------------------------- */
.featured {
  padding: clamp(4.5rem, 10vh, 8rem) 0;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3.5rem 2rem;
  padding: 0 var(--pad);
}

.book-card {
  display: flex;
  flex-direction: column;
}

.book-media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--ivory);
}

.book-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.015);
  transition: transform 1.4s var(--ease-out), filter 0.6s;
}

.book-card:hover .book-media img {
  transform: scale(1.07);
}

.is-upcoming .book-media img {
  filter: saturate(0.55) brightness(0.96);
}

.book-chip {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.45em 1em;
  background: var(--cream);
  color: var(--ink);
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.is-upcoming .book-chip {
  background: var(--ink);
  color: var(--ivory);
}

.book-meta {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding-top: 1.5rem;
}

.book-origin {
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.75rem;
}

.book-origin em {
  font-family: var(--serif);
  font-size: 1.15em;
  letter-spacing: 0.1em;
}

.book-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.375rem, 2vw, 1.625rem);
  line-height: 1.15;
  letter-spacing: -0.005em;
}

.book-title a {
  transition: color 0.3s;
}

.book-title a:hover {
  color: var(--terra);
}

.book-author {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.book-desc {
  margin-top: 0.9rem;
  font-size: 0.875rem;
  line-height: 1.7;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: auto;
  padding-top: 1.25rem;
}

.book-formats {
  font-size: 0.625rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* --------------------------------------------------------------------------
   Story
   -------------------------------------------------------------------------- */
.story {
  display: grid;
  grid-template-columns: 5fr 6fr;
  background: var(--cream);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.story-media {
  overflow: hidden;
}

.story-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.story-body {
  padding: clamp(3.5rem, 8vh, 7rem) var(--pad);
  max-width: 42rem;
}

.story-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.25rem, 4.5vw, 3.75rem);
  line-height: 1.05;
  margin-bottom: 1.75rem;
}

.story-title em {
  font-weight: 400;
}

.story-lead {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 3.5rem;
}

.story-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.story-steps li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-top: 1px solid var(--rule);
}

.step-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.75rem;
  color: var(--nude);
  line-height: 1;
}

.story-steps h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.story-steps p {
  font-size: 0.9063rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Quote Break
   -------------------------------------------------------------------------- */
.quote-break {
  position: relative;
  min-height: 68vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  text-align: center;
}

.quote-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.quote-break::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(25, 20, 16, 0.55);
}

.quote-break blockquote {
  position: relative;
  z-index: 1;
  color: var(--ivory);
  padding: 6rem var(--pad);
}

.quote-break p {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 4rem);
  line-height: 1.2;
}

.quote-break cite {
  display: block;
  margin-top: 2rem;
  font-style: normal;
  font-size: 0.6875rem;
  letter-spacing: 0.38em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* --------------------------------------------------------------------------
   Formats
   -------------------------------------------------------------------------- */
.formats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  padding: clamp(4rem, 9vh, 7rem) var(--pad);
}

.format {
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

.format-num {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--terra);
}

.format h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.625rem;
  margin: 0.75rem 0 0.6rem;
}

.format p {
  font-size: 0.9063rem;
  color: var(--ink-soft);
  max-width: 26em;
}

/* --------------------------------------------------------------------------
   Community
   -------------------------------------------------------------------------- */
.community {
  display: grid;
  grid-template-columns: 6fr 5fr;
  background: var(--cream);
  border-top: 1px solid var(--rule);
}

.community-body {
  order: -1;
  padding: clamp(3.5rem, 8vh, 6.5rem) var(--pad);
  max-width: 44rem;
}

.community-body .section-title {
  font-size: clamp(2rem, 4vw, 3.25rem);
  margin-bottom: 2.5rem;
}

.community-media {
  overflow: hidden;
}

.community-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.field label {
  display: block;
  font-size: 0.625rem;
  font-weight: 400;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 0.4rem;
}

.field input,
.field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 0.5rem 0;
  border-radius: 0;
  resize: vertical;
  transition: border-color 0.3s;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.comment-form .btn {
  align-self: flex-start;
}

.comments-list {
  display: flex;
  flex-direction: column;
}

.comments-empty {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.0625rem;
  color: var(--ink-faint);
}

.comment {
  padding: 1.5rem 0;
  border-top: 1px solid var(--rule);
}

.comment-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.comment-name {
  font-weight: 400;
  letter-spacing: 0.06em;
  font-size: 0.9375rem;
}

.comment-date {
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.comment p {
  font-size: 0.9063rem;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Page Hero (catalog)
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  min-height: clamp(24rem, 55vh, 34rem);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.page-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.page-hero-scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(25, 20, 16, 0.78), rgba(25, 20, 16, 0.25));
}

.page-hero-content {
  position: relative;
  z-index: 1;
  padding: 0 var(--pad) clamp(2.5rem, 6vh, 4rem);
  color: var(--ivory);
}

.breadcrumb {
  font-size: 0.625rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 1.25rem;
}

.breadcrumb span[aria-hidden] {
  padding: 0 0.75em;
}

.breadcrumb a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.page-hero-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: 1;
  animation: rise 1s var(--ease-out) 0.15s both;
}

.page-hero-title em {
  font-weight: 400;
}

.page-hero-sub {
  margin-top: 1rem;
  font-size: 0.9375rem;
  letter-spacing: 0.08em;
  opacity: 0.9;
  animation: rise 1s var(--ease-out) 0.35s both;
}

/* --------------------------------------------------------------------------
   Catalog
   -------------------------------------------------------------------------- */
.catalog {
  padding: clamp(2.5rem, 6vh, 4.5rem) var(--pad) clamp(4.5rem, 10vh, 8rem);
}

.catalog-bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 2rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--rule);
  margin-bottom: clamp(2.5rem, 6vh, 4rem);
}

.catalog-filters {
  display: flex;
  gap: 2.5rem;
}

.filter-btn {
  position: relative;
  padding: 0.35em 0;
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  transition: color 0.3s;
}

.filter-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}

.filter-btn:hover {
  color: var(--ink);
}

.filter-btn.active {
  color: var(--ink);
}

.filter-btn.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.catalog-count {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.9375rem;
  color: var(--ink-faint);
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4rem 2rem;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--ivory);
  padding: clamp(3.5rem, 8vh, 6rem) var(--pad) 2rem;
}

.footer-mark {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 8.5vw, 7.5rem);
  line-height: 1;
  letter-spacing: 0.02em;
  padding-bottom: clamp(2rem, 5vh, 3.5rem);
  border-bottom: 1px solid var(--rule-light);
  text-wrap: balance;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.5fr;
  gap: 3rem;
  padding: clamp(2.5rem, 6vh, 4rem) 0;
}

.footer-col h4,
.footer-news h4 {
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--nude);
  margin-bottom: 1.25rem;
}

.footer-col a {
  display: block;
  font-size: 0.9063rem;
  opacity: 0.82;
  padding: 0.3rem 0;
  transition: opacity 0.3s, transform 0.3s var(--ease-out);
}

.footer-col a:hover {
  opacity: 1;
  transform: translateX(4px);
}

.footer-news p {
  font-size: 0.9063rem;
  opacity: 0.82;
  margin-bottom: 1.5rem;
  max-width: 26em;
}

.news-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 24rem;
  border-bottom: 1px solid var(--rule-light);
  transition: border-color 0.3s;
}

.news-form:focus-within {
  border-color: var(--ivory);
}

.news-form input {
  flex: 1;
  font: inherit;
  font-size: 0.9375rem;
  color: var(--ivory);
  background: transparent;
  border: none;
  padding: 0.6rem 0;
}

.news-form input::placeholder {
  color: var(--ivory);
  opacity: 0.5;
}

.news-form input:focus {
  outline: none;
}

.news-form button {
  font-size: 1.25rem;
  color: var(--nude);
  transition: transform 0.3s var(--ease-out);
}

.news-form button:hover {
  transform: translateX(4px);
}

.footer-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule-light);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.65;
}

.footer-bottom a {
  margin-left: 1.5rem;
}

.footer-bottom a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   Book Page (generated from templates/book.html)
   -------------------------------------------------------------------------- */
.book-page {
  display: grid;
  grid-template-columns: 5fr 6fr;
  border-bottom: 1px solid var(--rule);
}

.book-page-media {
  position: relative;
  overflow: hidden;
  background: var(--ivory);
}

.book-page-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-page-media .book-chip {
  top: 1.5rem;
  left: 1.5rem;
}

.book-page-body {
  padding: clamp(2.5rem, 6vh, 5rem) var(--pad);
  max-width: 42rem;
}

.book-page-body .breadcrumb {
  color: var(--ink-faint);
  opacity: 1;
  margin-bottom: 2rem;
}

.book-page-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(2.5rem, 5.5vw, 4.25rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.75rem;
}

.book-page-body .book-author {
  margin-bottom: 1.75rem;
}

.book-page-desc {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--ink-soft);
  margin-bottom: 2.75rem;
}

.book-page-formats {
  margin-bottom: 2.75rem;
}

.format-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--rule);
}

.format-row:last-child {
  border-bottom: 1px solid var(--rule);
}

.format-row-name {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.125rem;
}

.format-row-note {
  font-size: 0.8125rem;
  color: var(--ink-soft);
  text-align: right;
}

.format-row.is-off .format-row-name {
  color: var(--ink-faint);
}

.format-row.is-off .format-row-note {
  color: var(--ink-faint);
  font-style: italic;
}

.book-page-cta {
  background: var(--cream);
  border: 1px solid var(--rule);
  padding: 1.75rem 2rem 2rem;
}

.book-page-cta-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.book-page-cta p {
  font-size: 0.9063rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}

.book-page-cta .news-form {
  border-bottom-color: var(--rule);
  max-width: none;
}

.book-page-cta .news-form:focus-within {
  border-bottom-color: var(--ink);
}

.book-page-cta .news-form input {
  color: var(--ink);
}

.book-page-cta .news-form input::placeholder {
  color: var(--ink-faint);
  opacity: 1;
}

.book-page-cta .news-form button {
  color: var(--terra);
}

.book-more {
  padding: clamp(4rem, 9vh, 7rem) 0;
}

@media (max-width: 900px) {
  .book-page {
    grid-template-columns: 1fr;
  }

  .book-page-media {
    max-height: 70vh;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .story,
  .community {
    grid-template-columns: 1fr;
  }

  .story-media,
  .community-media {
    max-height: 55vh;
  }

  .community-media {
    order: -2;
  }
}

@media (max-width: 900px) {
  .featured-grid,
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .formats {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .format {
    padding: 1.75rem 0;
  }
}

@media (max-width: 820px) {
  .nav-side {
    display: none;
  }

  .nav {
    display: flex;
    justify-content: center;
  }

  .wordmark-main {
    white-space: nowrap;
  }

  .wordmark-sub {
    display: none;
  }

  .nav-toggle {
    display: block;
  }
}

@media (max-width: 560px) {
  .featured-grid,
  .catalog-grid {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .section-head {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .section-head .section-eyebrow,
  .section-head .link-line {
    justify-self: start;
  }

  .catalog-bar {
    flex-direction: column;
    gap: 1.25rem;
  }

  .catalog-filters {
    gap: 1.75rem;
    flex-wrap: wrap;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
  }

  .footer-bottom a {
    margin: 0 1.5rem 0 0;
  }
}

/* --------------------------------------------------------------------------
   Reduced Motion (generic rules live in assets/platform/base.css)
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .ticker-track {
    animation: none;
  }
}

/* --------------------------------------------------------------------------
   Form status + newsletter landing pages (Phase 3 backend)
   -------------------------------------------------------------------------- */
.form-status {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  line-height: 1.5;
  color: currentColor;
  opacity: 0.75;
  min-height: 1.2em;
  margin-top: 0.6rem;
}

.note-page {
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  gap: 1.4rem;
  padding: var(--pad);
  background: var(--ivory);
}

.note-mark {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
}

.note-title {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  font-weight: 500;
  line-height: 1.05;
  color: var(--ink);
}

.note-title em {
  font-style: italic;
  color: var(--terra);
}

.note-text {
  font-family: var(--sans);
  max-width: 36ch;
  line-height: 1.6;
  color: var(--ink-soft);
}

/* --------------------------------------------------------------------------
   Buy buttons + checkout notices (Phase 4 Stripe)
   -------------------------------------------------------------------------- */
.format-row-buy {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-shrink: 0;
}

.format-row-price {
  font-family: var(--serif);
  font-size: 1rem;
  font-weight: 500;
}

.buy-btn {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45em 1.1em;
  background: var(--ink);
  color: var(--ivory);
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.2s var(--ease-out), color 0.2s var(--ease-out);
}

.buy-btn:hover:not(:disabled) {
  background: transparent;
  color: var(--ink);
}

.buy-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.checkout-notice {
  font-family: var(--sans);
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 0.8rem 1rem;
  border: 1px solid var(--rule);
  background: var(--cream);
  margin-bottom: 1.4rem;
}

@media (max-width: 640px) {
  .format-row {
    flex-wrap: wrap;
  }

  .format-row-buy {
    width: 100%;
    justify-content: flex-end;
  }
}
