/* ===========================
   THE OBSERVER MIND — STYLES
   =========================== */

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

:root {
  --ink: #1a1410;
  --ink-light: #3d3228;
  --parchment: #f7f2e8;
  --parchment-dark: #ede6d4;
  --parchment-darker: #d9cebc;
  --gold: #b8860b;
  --gold-light: #d4a017;
  --rust: #8b3a2a;
  --sage: #5a7a5a;
  --mist: #7a8a9a;
  --cream: #faf7f0;
  --story-bg: #fffef9;
  --border: rgba(26,20,16,0.12);
  --shadow: 0 2px 24px rgba(26,20,16,0.08);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Crimson Pro', Georgia, serif;
  background: var(--parchment);
  color: var(--ink);
  line-height: 1.8;
  font-size: 18px;
  overflow-x: hidden;
}

/* DISCLAIMER */
.disclaimer-banner {
  background: var(--ink);
  color: var(--parchment);
  text-align: center;
  padding: 10px 20px;
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  position: sticky;
  top: 0;
  z-index: 100;
}

/* HERO */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background: var(--ink);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 50%, rgba(184,134,11,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(139,58,42,0.1) 0%, transparent 60%),
    radial-gradient(ellipse 100% 100% at 50% 100%, rgba(90,122,90,0.08) 0%, transparent 50%);
  background-color: #1a1410;
}

/* ink paper texture */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='60' height='60' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 20px;
  max-width: 820px;
}

.site-eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-light);
  margin-bottom: 28px;
  opacity: 0.9;
}

.hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--parchment);
  line-height: 1.05;
  margin-bottom: 32px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hero-title .line1 { font-size: clamp(64px, 12vw, 120px); font-weight: 400; font-style: italic; color: var(--parchment); }
.hero-title .line2 { font-size: clamp(48px, 9vw, 90px); font-weight: 700; color: var(--gold-light); margin-top: -10px; }
.hero-title .line3 { font-size: clamp(48px, 9vw, 90px); font-weight: 400; color: var(--parchment); opacity: 0.6; margin-top: -10px; }
.hero-title .line4 { font-size: clamp(40px, 7vw, 72px); font-weight: 700; font-style: italic; color: var(--rust); margin-top: -4px; letter-spacing: -0.01em; }

.hero-sub {
  font-size: clamp(16px, 2.5vw, 20px);
  color: rgba(247,242,232,0.65);
  max-width: 600px;
  margin: 0 auto 48px;
  font-style: italic;
  line-height: 1.7;
}

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--gold);
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
}

.scroll-arrow {
  animation: bounce 2s infinite;
  font-size: 20px;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* HERO DECORATIVE CIRCLES */
.hero-deco { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.circle {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(184,134,11,0.15);
}
.c1 { width: 600px; height: 600px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.c2 { width: 900px; height: 900px; top: 50%; left: 50%; transform: translate(-50%,-50%); }
.c3 { width: 1200px; height: 1200px; top: 50%; left: 50%; transform: translate(-50%,-50%); opacity: 0.5; }

/* TABLE OF CONTENTS */
.toc-nav {
  background: var(--parchment-dark);
  border-bottom: 1px solid var(--border);
  padding: 80px 20px;
}

.toc-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.toc-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 400;
  font-style: italic;
  text-align: center;
  margin-bottom: 8px;
  color: var(--ink);
}

.toc-sub {
  text-align: center;
  color: var(--mist);
  font-style: italic;
  font-size: 16px;
  margin-bottom: 48px;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

.toc-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 6px;
  text-decoration: none;
  color: var(--ink-light);
  font-size: 14px;
  line-height: 1.4;
  transition: background 0.2s, color 0.2s;
  border: 1px solid transparent;
  font-family: 'Crimson Pro', serif;
}

.toc-item:hover {
  background: var(--parchment);
  border-color: var(--border);
  color: var(--rust);
}

.toc-num {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  color: var(--gold);
  min-width: 24px;
  padding-top: 2px;
  opacity: 0.8;
}

/* STORIES */
.stories-section {
  background: var(--cream);
  padding: 80px 20px;
}

.stories-container {
  max-width: 780px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.story-card {
  background: var(--story-bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: clamp(32px, 6vw, 64px) clamp(28px, 7vw, 72px);
  position: relative;
  margin-bottom: 48px;
  box-shadow: var(--shadow);
  transition: box-shadow 0.3s;
}

.story-card:hover {
  box-shadow: 0 4px 40px rgba(26,20,16,0.12);
}

/* left edge decoration */
.story-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 40px;
  bottom: 40px;
  width: 3px;
  background: linear-gradient(to bottom, var(--gold), var(--rust), var(--sage));
  border-radius: 0 2px 2px 0;
  opacity: 0.6;
}

.story-header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--parchment-darker);
  padding-bottom: 16px;
}

.story-number {
  font-family: 'Space Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--gold);
  white-space: nowrap;
  opacity: 0.8;
}

.story-category {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid;
}

.cat-wisdom  { color: var(--gold);    border-color: var(--gold);    background: rgba(184,134,11,0.06); }
.cat-humor   { color: var(--rust);    border-color: var(--rust);    background: rgba(139,58,42,0.06); }
.cat-zen     { color: var(--sage);    border-color: var(--sage);    background: rgba(90,122,90,0.06); }
.cat-life    { color: var(--mist);    border-color: var(--mist);    background: rgba(122,138,154,0.06); }

.story-title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: 24px;
  margin-top: 4px;
}

.story-body {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(16px, 2.2vw, 19px);
  line-height: 1.85;
  color: var(--ink-light);
}

.story-body p {
  margin-bottom: 18px;
}

.story-body p:last-child {
  margin-bottom: 0;
}

.story-moral {
  margin-top: 28px;
  padding: 16px 20px;
  background: var(--parchment-dark);
  border-left: 3px solid var(--gold);
  border-radius: 0 4px 4px 0;
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
}

.story-moral strong {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  display: block;
  margin-bottom: 6px;
  font-style: normal;
  font-weight: 400;
}

/* divider between stories */
.story-divider {
  text-align: center;
  color: var(--gold);
  font-size: 18px;
  letter-spacing: 12px;
  margin: 0 0 48px;
  opacity: 0.4;
}

/* FOOTER */
.site-footer {
  background: var(--ink);
  color: var(--parchment);
  padding: 80px 20px 48px;
}

.footer-inner {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-family: 'Playfair Display', serif;
  font-size: 32px;
  font-style: italic;
  font-weight: 400;
  color: var(--gold-light);
  margin-bottom: 16px;
}

.footer-tagline {
  font-style: italic;
  font-size: 17px;
  color: rgba(247,242,232,0.5);
  margin-bottom: 40px;
  line-height: 1.6;
}

.footer-disclaimer {
  background: rgba(247,242,232,0.05);
  border: 1px solid rgba(247,242,232,0.1);
  border-radius: 4px;
  padding: 24px;
  font-size: 13px;
  line-height: 1.7;
  color: rgba(247,242,232,0.55);
  margin-bottom: 24px;
  text-align: left;
}

.footer-disclaimer strong {
  color: var(--gold);
  font-weight: 400;
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.footer-copy {
  font-family: 'Space Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  color: rgba(247,242,232,0.25);
  margin-top: 16px;
}

/* BACK TO TOP */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: var(--ink);
  color: var(--gold);
  border: 1px solid rgba(184,134,11,0.4);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 99;
}

.back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gold);
  color: var(--ink);
}

/* RESPONSIVE */
@media (max-width: 600px) {
  .story-card { padding: 28px 22px; }
  .toc-grid { grid-template-columns: 1fr 1fr; }
}

/* READING PROGRESS BAR */
.progress-bar {
  position: fixed;
  top: 36px; /* below disclaimer */
  left: 0;
  height: 2px;
  background: var(--gold);
  width: 0%;
  z-index: 99;
  transition: width 0.1s linear;
}

/* FADE IN ANIMATION */
.story-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.story-card.visible {
  opacity: 1;
  transform: translateY(0);
}
