:root {
  --bg: #f7f5f0;          /* warm off-white, paper feeling */
  --bg-alt: #efece4;
  --ink: #121212;         /* near-black text */
  --ink-soft: #2a2a2a;
  --muted: #6b665e;
  --rule: #1a1a1a;
  --accent: #b8371f;      /* deep, literary red — book-cover red, not SaaS red */
  --cream: #fdfbf6;
  --serif: "Fraunces", "Times New Roman", serif;
  --sans: "Manrope", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --maxw: 1280px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

img { max-width: 100%; display: block; }

::selection { background: var(--accent); color: var(--cream); }

/* Grain texture overlay for paper feel */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ---------------- NAV ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 22px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(247, 245, 240, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: rgba(26, 26, 26, 0.08); }

.nav-brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 20px;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 144;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-brand span { color: var(--accent); }
.nav-logo { height: 32px; width: auto; display: block; }

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
  align-items: center;
}
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-soft);
  position: relative;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -4px; left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  transition: all 0.2s;
}
.nav-cta:hover { background: var(--ink); color: var(--cream); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- HERO ---------------- */
.hero {
  min-height: 100vh;
  padding: 160px 40px 80px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
}

.hero-eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(56px, 8.5vw, 132px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  margin-bottom: 32px;
}
.hero h1 em {
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.hero-tag {
  font-size: 19px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 520px;
  margin-bottom: 44px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  font-family: var(--sans);
}
.btn-primary {
  background: var(--ink);
  color: var(--cream);
}
.btn-primary:hover { background: var(--accent); transform: translateY(-1px); }
.btn-secondary {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-secondary:hover { background: var(--ink); color: var(--cream); }
.btn-arrow { transition: transform 0.25s; }
.btn:hover .btn-arrow { transform: translateX(3px); }

.hero-portrait {
  position: relative;
  aspect-ratio: 4/5;
  background: var(--bg-alt);
  border-radius: 2px;
  overflow: hidden;
}
.hero-portrait-inner {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(18,18,18,0.3) 0%, transparent 50%),
    linear-gradient(to bottom, #3a3632 0%, #1a1917 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-portrait-inner .placeholder-label {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(253, 251, 246, 0.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 20px;
}
.hero-portrait-caption {
  position: absolute;
  bottom: 20px; left: 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cream);
  mix-blend-mode: difference;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.scroll-indicator::after {
  content: "";
  width: 1px;
  height: 32px;
  background: var(--muted);
  animation: scrollLine 2s ease-in-out infinite;
  transform-origin: top;
}
@keyframes scrollLine {
  0%, 100% { transform: scaleY(0.3); opacity: 0.3; }
  50% { transform: scaleY(1); opacity: 1; }
}

/* ---------------- SECTIONS ---------------- */
section { padding: 120px 40px; position: relative; }
.container { max-width: var(--maxw); margin: 0 auto; }

.section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-label::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}
.section-label .num {
  color: var(--accent);
  font-weight: 500;
}

h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(40px, 5.5vw, 76px);
  line-height: 1.0;
  letter-spacing: -0.025em;
  font-variation-settings: "opsz" 144;
  margin-bottom: 48px;
  max-width: 16ch;
}
h2 em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

h3 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 28px;
  line-height: 1.15;
  letter-spacing: -0.015em;
}

/* ---------------- ABOUT ---------------- */
.about {
  background: var(--bg);
  border-top: 1px solid rgba(26,26,26,0.08);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 100px;
  align-items: start;
}
.about-lede {
  font-family: var(--serif);
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.35;
  font-weight: 400;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
  margin-bottom: 32px;
}
.about-body p {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.7;
}
.about-body p:last-child { margin-bottom: 0; }
.about-body .pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 20px;
  margin: 32px 0;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

/* ---------------- COLLECTION (featured) ---------------- */
.collection {
  background: var(--ink);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}
.collection .section-label { color: rgba(253,251,246,0.55); }
.collection .section-label::before { background: var(--accent); }
.collection h2 { color: var(--cream); }

.collection-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 80px;
  align-items: center;
}

.collection-copy p {
  color: rgba(253,251,246,0.72);
  font-size: 18px;
  line-height: 1.65;
  margin-bottom: 20px;
  max-width: 52ch;
}
.collection-meta {
  display: flex;
  gap: 40px;
  margin: 40px 0 44px;
  padding-top: 32px;
  border-top: 1px solid rgba(253,251,246,0.15);
}
.meta-item .label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.5);
  margin-bottom: 6px;
}
.meta-item .value {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--cream);
}
.meta-item .value em { color: var(--accent); font-style: italic; }

.collection .btn-primary {
  background: var(--cream);
  color: var(--ink);
}
.collection .btn-primary:hover { background: var(--accent); color: var(--cream); }

/* Stacked "book" visual */
.book-stack {
  position: relative;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.book {
  position: absolute;
  width: 68%;
  aspect-ratio: 2/3;
  background: linear-gradient(135deg, #1a1917 0%, #2a2724 100%);
  border: 1px solid rgba(253,251,246,0.1);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5);
  border-radius: 2px;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
  display: flex;
  flex-direction: column;
  padding: 32px 28px;
  justify-content: space-between;
}
.book-1 { transform: translate(-40px, -20px) rotate(-6deg); background: linear-gradient(135deg, #5a1a0a 0%, #3a0e05 100%); }
.book-2 { transform: translate(0, 0) rotate(2deg); z-index: 2; }
.book-3 { transform: translate(36px, 24px) rotate(-3deg); background: linear-gradient(135deg, #2a2724 0%, #0f0e0c 100%); }

.book-stack:hover .book-1 { transform: translate(-60px, -30px) rotate(-9deg); }
.book-stack:hover .book-2 { transform: translate(0, -8px) rotate(2deg); }
.book-stack:hover .book-3 { transform: translate(56px, 32px) rotate(-1deg); }

.book .book-label {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.4);
}
.book .book-title {
  font-family: var(--serif);
  font-size: 20px;
  line-height: 1.1;
  color: rgba(253,251,246,0.9);
  font-variation-settings: "opsz" 144, "SOFT" 50;
}
.book .book-author {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.55);
}

/* Story list */
.story-list {
  margin-top: 120px;
  padding-top: 60px;
  border-top: 1px solid rgba(253,251,246,0.15);
}
.story-list-heading {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.5);
  margin-bottom: 40px;
}
.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
}
.story-item {
  padding: 28px 0;
  border-top: 1px solid rgba(253,251,246,0.1);
  display: flex;
  gap: 20px;
  align-items: baseline;
}
.story-num {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 0.1em;
  min-width: 32px;
}
.story-title {
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 400;
  color: rgba(253,251,246,0.9);
  font-variation-settings: "opsz" 144;
  font-style: italic;
}
.story-item:hover .story-title { color: var(--accent); }

/* ---------------- NOVEL TEASER ---------------- */
.novel {
  background: var(--bg);
  padding: 140px 40px;
}
.novel-inner {
  max-width: 960px;
  margin: 0 auto;
  text-align: center;
}
.novel .section-label { justify-content: center; }
.novel-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
  margin-bottom: 40px;
}
.novel-title em {
  font-style: italic;
  color: var(--accent);
}
.novel-logline {
  font-family: var(--serif);
  font-size: clamp(20px, 2vw, 26px);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 32ch;
  margin: 0 auto 36px;
  font-variation-settings: "opsz" 144;
}
.novel-note {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.novel-note .dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ---------------- TIKTOK ---------------- */
.tiktok {
  background: var(--bg-alt);
  border-top: 1px solid rgba(26,26,26,0.06);
  border-bottom: 1px solid rgba(26,26,26,0.06);
}
.tiktok-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 60px;
  flex-wrap: wrap;
  gap: 24px;
}
.tiktok-header h2 { margin-bottom: 0; }
.tiktok-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 4px;
  transition: all 0.2s;
}
.tiktok-link:hover { color: var(--accent); border-color: var(--accent); }

.tiktok-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.tiktok-card {
  aspect-ratio: 9/16;
  background: var(--ink);
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.tiktok-card:hover { transform: translateY(-6px); }
.tiktok-card-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%),
              linear-gradient(135deg, #2a2724 0%, #0f0e0c 100%);
}
.tiktok-card:nth-child(1) .tiktok-card-bg { background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%), linear-gradient(135deg, #5a1a0a 0%, #1a0a05 100%); }
.tiktok-card:nth-child(3) .tiktok-card-bg { background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%), linear-gradient(135deg, #1a1a2a 0%, #0a0a15 100%); }
.tiktok-card:nth-child(4) .tiktok-card-bg { background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%), linear-gradient(135deg, #3a2a1a 0%, #1a1208 100%); }

.tiktok-card-content {
  position: absolute;
  inset: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--cream);
}
.tiktok-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tiktok-play {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(253,251,246,0.15);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.tiktok-card:hover .tiktok-play { background: var(--accent); }
.tiktok-play svg { width: 14px; height: 14px; fill: var(--cream); }
.tiktok-handle {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  opacity: 0.75;
}
.tiktok-card-caption {
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.3;
  font-weight: 500;
  font-variation-settings: "opsz" 144;
}

/* ---------------- WRITING / FLASH FICTION ---------------- */
.writing {
  background: var(--bg-alt);
  border-top: 1px solid rgba(26,26,26,0.06);
}

.writing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 64px;
}

.writing-card {
  padding: 40px 36px;
  background: var(--bg);
  border: 1px solid rgba(26,26,26,0.1);
  border-radius: 2px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: border-color 0.3s ease, transform 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.writing-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
}

.writing-card-meta {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
}

.writing-card-quote {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.4;
  letter-spacing: -0.01em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  color: var(--ink);
  flex: 1;
}

.writing-card-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.writing-card-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  align-self: flex-start;
  transition: color 0.2s, border-color 0.2s;
}
.writing-card-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------------- CONTACT ---------------- */
.contact {
  background: rgb(18, 18, 18);
  color: var(--cream);
}
.contact .section-label { color: rgba(253,251,246,0.55); }
.contact .section-label::before { background: var(--accent); }
.contact h2 { color: var(--cream); margin-bottom: 32px; }

.contact-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 80px;
  align-items: center;
}
.contact-body {
  color: rgba(253,251,246,0.72);
  font-size: 18px;
  line-height: 1.7;
  margin-bottom: 20px;
  max-width: 54ch;
}
.contact-body:last-child { margin-bottom: 0; }
.contact-links {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-family: var(--sans);
  font-size: clamp(18px, 1.8vw, 22px);
  font-weight: 400;
  color: var(--cream);
  transition: color 0.2s;
}
.contact-link:hover { color: var(--accent); }
.contact-link-icon {
  width: 48px;
  height: 48px;
  border: 1px solid rgba(253,251,246,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, background 0.2s;
}
.contact-link:hover .contact-link-icon {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--cream);
}

/* ---------------- NEWSLETTER ---------------- */
.newsletter {
  background: var(--bg);
  padding: 160px 40px;
  text-align: center;
}
.newsletter-inner { max-width: 680px; margin: 0 auto; }
.newsletter h2 { margin: 0 auto 32px; max-width: 18ch; }
.newsletter p {
  color: var(--ink-soft);
  font-size: 18px;
  line-height: 1.6;
  margin-bottom: 44px;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-form {
  display: flex;
  gap: 12px;
  max-width: 480px;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
}
.newsletter-form input {
  flex: 1;
  min-width: 240px;
  padding: 16px 22px;
  border-radius: 999px;
  border: 1px solid rgba(26,26,26,0.2);
  background: var(--cream);
  font-family: var(--sans);
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.2s;
}
.newsletter-form input:focus {
  outline: none;
  border-color: var(--ink);
}
.newsletter-form input::placeholder { color: var(--muted); }
.newsletter-success {
  display: none;
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--accent);
  font-variation-settings: "opsz" 144;
}
.newsletter-success.show { display: block; }
.newsletter-form.hidden { display: none; }
.newsletter-micro {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 24px;
}

/* ---------------- FOOTER ---------------- */
footer {
  background: var(--ink);
  color: var(--cream);
  padding: 80px 40px 40px;
}
.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(253,251,246,0.12);
}
.footer-logo { height: 52px; width: auto; display: block; margin-bottom: 20px; opacity: 0.9; }
.footer-brand {
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
  margin-bottom: 16px;
  font-variation-settings: "opsz" 144;
}
.footer-brand span { color: var(--accent); font-style: italic; }
.footer-tagline {
  color: rgba(253,251,246,0.6);
  font-size: 15px;
  max-width: 36ch;
}
.footer-col h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.5);
  margin-bottom: 20px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a {
  color: rgba(253,251,246,0.8);
  font-size: 15px;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  max-width: var(--maxw);
  margin: 40px auto 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.4);
}

/* ---------------- TIKTOK PAGE ---------------- */
.nav-current { color: var(--accent) !important; }
.nav-current::after { width: 100% !important; background: var(--accent) !important; }

.tiktok-page-hero {
  background: var(--ink);
  color: var(--cream);
  padding: 180px 40px 120px;
  text-align: center;
  position: relative;
}
.tiktok-page-hero-inner { max-width: 800px; margin: 0 auto; }

.tiktok-page-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(52px, 8vw, 108px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variation-settings: "opsz" 144, "SOFT" 50;
  color: var(--cream);
  margin-bottom: 36px;
}
.tiktok-page-title em {
  font-style: italic;
  color: var(--accent);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.tiktok-page-sub {
  font-size: 20px;
  line-height: 1.65;
  color: rgba(253,251,246,0.68);
  max-width: 48ch;
  margin: 0 auto 48px;
}

.tiktok-profile-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 15px;
  font-weight: 600;
  color: var(--cream);
  background: rgba(253,251,246,0.1);
  border: 1px solid rgba(253,251,246,0.2);
  padding: 14px 28px;
  border-radius: 999px;
  transition: all 0.25s ease;
}
.tiktok-profile-link:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.tiktok-series-section {
  background: var(--bg);
  padding: 120px 40px;
  border-top: 1px solid rgba(26,26,26,0.08);
}

.series-block {}

.series-block-header {
  max-width: 720px;
  margin: 0 auto 64px;
  text-align: center;
}

.series-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(44px, 6vw, 80px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
  max-width: none;
  margin-bottom: 28px;
  padding-bottom: 36px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.series-desc {
  font-size: 18px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 auto;
}

.series-episodes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(26,26,26,0.1);
  border-bottom: 1px solid rgba(26,26,26,0.1);
}

.episode-card {
  padding: 52px 40px;
  text-align: center;
  border-right: 1px solid rgba(26,26,26,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.ep-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.episode-card:nth-child(3n),
.episode-card:last-child { border-right: none; }

.ep-num {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}

.ep-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  color: var(--ink);
  margin-bottom: 12px;
}

.ep-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  color: var(--muted);
  margin-bottom: 32px;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}

.ep-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  padding-bottom: 3px;
  transition: color 0.2s, border-color 0.2s;
}
.ep-link:hover { color: var(--accent); border-color: var(--accent); }

.ep-coming {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------------- MOTION ---------------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------------- RESPONSIVE ---------------- */
@media (max-width: 960px) {
  .tiktok-page-hero { padding: 140px 24px 80px; }
  .tiktok-series-section { padding: 80px 24px; }
  .series-episodes { grid-template-columns: 1fr; }
  .episode-card { border-right: none; border-top: 1px solid rgba(26,26,26,0.1); }
  .episode-card:first-child { border-top: none; }

  .nav { padding: 18px 24px; }
  .nav-toggle { display: flex; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid rgba(18,18,18,0.1);
    flex-direction: column;
    gap: 0;
    padding: 8px 0 16px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: 12px 24px;
    font-size: 16px;
  }
  .nav-links a::after { display: none; }
  .nav-links .nav-cta {
    margin: 8px 24px 0;
    display: inline-block;
    width: auto;
  }
  .hero { padding: 140px 24px 60px; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-portrait { max-width: 420px; }
  section { padding: 80px 24px; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .collection-layout { grid-template-columns: 1fr; gap: 60px; }
  .book-stack { display: none; }
  .collection-meta { flex-wrap: wrap; gap: 28px; }
  .story-grid { grid-template-columns: 1fr; }
  .tiktok-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .writing-grid { grid-template-columns: 1fr; gap: 20px; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr; gap: 40px; }
  .footer-brand { font-size: 36px; }
  .newsletter { padding: 100px 24px; }
}

@media (max-width: 480px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
  .tiktok-grid { grid-template-columns: 1fr 1fr; }
}

.newsletter-message {
  display: none;
  margin-top: 24px;
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.4;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}
.newsletter-message.show { display: block; }
.newsletter-message.success {
  font-style: italic;
  color: var(--accent);
}
.newsletter-message.error {
  color: var(--ink-soft);
  font-family: var(--sans);
  font-style: normal;
  font-size: 15px;
}
#mc-submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ── DARK MODE ── */
html[data-theme="dark"] {
  --bg: #151210;
  --bg-alt: #1c1814;
  --ink: #ede8df;
  --ink-soft: #d4cfc6;
  --muted: #7a7268;
  --cream: #201c18;
}

html[data-theme="dark"] body {
  background: var(--bg);
  color: var(--ink);
}

body { transition: background 0.25s ease, color 0.25s ease; }

html[data-theme="dark"] .app-nav,
html[data-theme="dark"] .admin-nav {
  border-bottom-color: rgba(237,232,223,0.08);
}

html[data-theme="dark"] .logout-btn,
html[data-theme="dark"] .logout-sm,
html[data-theme="dark"] .refresh-btn {
  border-color: rgba(237,232,223,0.2);
  color: var(--muted);
}

/* ── BETA READER THEME ── */
html[data-app="beta-reader"] {
  --accent: #1c6245;
  --bg: #f3f7f4;
  --bg-alt: #e8ede9;
  --cream: #f8fcf8;
}

html[data-app="beta-reader"][data-theme="dark"] {
  --bg: #0e1a13;
  --bg-alt: #162118;
  --ink: #e5ede7;
  --ink-soft: #cdd9d0;
  --muted: #6b8070;
  --cream: #1a2a1e;
  --accent: #3a9e6f;
}

/* ── WITNESS THEME ── */
html[data-app="witness"] {
  --accent: #5c3d8f;
  --bg: #f5f2f9;
  --bg-alt: #ede8f5;
  --cream: #f9f7fd;
}

html[data-app="witness"][data-theme="dark"] {
  --bg: #130e1f;
  --bg-alt: #1c1530;
  --ink: #e8e4f5;
  --ink-soft: #d0c9e8;
  --muted: #7268a0;
  --cream: #1f1838;
  --accent: #9c72d4;
}

/* ── MANUSCRIPT STUDIO THEME ── */
html[data-app="manuscript-studio"] {
  --accent: #1a4a7a;
}

html[data-app="manuscript-studio"][data-theme="dark"] {
  --accent: #4a90d0;
}

/* ── FONT SIZE ── */
html[data-font="sm"] { zoom: 0.9; }
html[data-font="lg"] { zoom: 1.15; }

/* ── PREF CONTROLS WIDGET ── */
.pref-controls {
  display: flex;
  align-items: center;
  gap: 2px;
}

.font-size-btns {
  display: flex;
  align-items: center;
  gap: 1px;
}

.font-size-btns button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px 8px;
  font-family: var(--serif);
  font-variation-settings: "opsz" 144;
  color: var(--muted);
  line-height: 1;
  border-radius: 5px;
  transition: color 0.15s, background 0.15s;
}
.font-size-btns button:nth-child(1) { font-size: 12px; }
.font-size-btns button:nth-child(2) { font-size: 17px; }
.font-size-btns button:nth-child(3) { font-size: 22px; }
.font-size-btns button.active {
  background: var(--ink);
  color: var(--cream);
}
.font-size-btns button:hover:not(.active) { color: var(--ink); }

.theme-btn {
  width: 36px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(26,26,26,0.2);
  background: transparent;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  padding: 0;
  flex-shrink: 0;
}

html[data-theme="dark"] .theme-btn {
  border-color: rgba(237,232,223,0.2);
}

.theme-btn::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
  transition: transform 0.3s ease;
  transform: translateX(0);
}

html[data-theme="dark"] .theme-btn::after {
  transform: translateX(16px);
}

/* ── BETA READER NAV BADGE ── */
.beta-reader-badge {
  color: #1c6245 !important;
  background: rgba(28, 98, 69, 0.08);
  border: 1px solid rgba(28, 98, 69, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s !important;
}
.beta-reader-badge:hover {
  background: rgba(28, 98, 69, 0.15) !important;
  color: #1c6245 !important;
  border-color: rgba(28, 98, 69, 0.45) !important;
}
.beta-reader-badge::after { display: none !important; }

.cmos-edit-badge {
  color: #b8371f !important;
  background: rgba(184, 55, 31, 0.08);
  border: 1px solid rgba(184, 55, 31, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s !important;
}
.cmos-edit-badge:hover {
  background: rgba(184, 55, 31, 0.15) !important;
  color: #b8371f !important;
  border-color: rgba(184, 55, 31, 0.45) !important;
}
.cmos-edit-badge::after { display: none !important; }

.witness-badge {
  color: #5c3d8f !important;
  background: rgba(30, 58, 96, 0.08);
  border: 1px solid rgba(30, 58, 96, 0.25);
  border-radius: 999px;
  padding: 5px 12px;
  font-weight: 600;
  transition: background 0.2s, border-color 0.2s !important;
}
.witness-badge:hover {
  background: rgba(30, 58, 96, 0.15) !important;
  color: #5c3d8f !important;
  border-color: rgba(30, 58, 96, 0.45) !important;
}
.witness-badge::after { display: none !important; }

/* ── OUTPUT ACTIONS (print / email) ── */
.output-actions { display: inline-flex; align-items: center; gap: 4px; }
.output-action-btn {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; padding: 0;
  border: 1px solid rgba(26,26,26,0.15); border-radius: 6px;
  background: none; cursor: pointer; color: var(--muted);
  transition: color 0.18s, border-color 0.18s;
  flex-shrink: 0;
}
.output-action-btn:hover:not(:disabled) { color: var(--ink); border-color: rgba(26,26,26,0.35); }
.output-action-btn:disabled { opacity: 0.28; cursor: not-allowed; }
html[data-theme="dark"] .output-action-btn { border-color: rgba(229,237,231,0.15); }

/* ── APP FOOTER 4-COL ── */
.app-footer-4col {
  background: var(--ink);
  padding: 56px 48px 40px;
  margin-top: auto;
}
html[data-theme="dark"] .app-footer-4col { background: #111; }
.app-footer-4col-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.footer-brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.footer-brand-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.02em;
  font-variation-settings: "opsz" 144;
  color: rgba(253,251,246,0.85);
  line-height: 1.3;
}
.footer-brand-name em { font-style: italic; color: var(--accent); }
.footer-brand-sep {
  font-family: var(--mono);
  font-size: 11px;
  color: rgba(253,251,246,0.25);
  letter-spacing: 0.1em;
  margin: 5px 0;
}
.app-footer-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.app-footer-col a {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(253,251,246,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.app-footer-col a:hover { color: var(--accent); }
.footer-tiktok-link {
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-tiktok-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.footer-tiktok-link:hover svg { opacity: 1; }
@media (max-width: 800px) {
  .app-footer-4col { padding: 48px 32px 36px; }
  .app-footer-4col-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
  .app-footer-4col { padding: 40px 24px 32px; }
  .app-footer-4col-inner { grid-template-columns: 1fr; gap: 24px; }
}
html[data-theme="dark"] .output-action-btn:hover:not(:disabled) { border-color: rgba(229,237,231,0.35); color: var(--ink); }
