@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/fonts/cormorant-garamond-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/fonts/inter-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0b0a0d;
  --ink-light: #14121a;
  --ink-mid: #1c1924;
  --copper: #b7653f;
  --copper-light: #d78a5e;
  --copper-glow: rgba(183, 101, 63, 0.25);
  --parchment: #f2dec2;
  --parchment-dim: rgba(242, 222, 194, 0.7);
  --parchment-muted: rgba(242, 222, 194, 0.45);
  --teal: #45b8b3;
  --teal-glow: rgba(69, 184, 179, 0.2);
  --gray: #8f8284;
  --gray-dark: #5a5557;
  --serif: 'Cormorant Garamond', 'Georgia', serif;
  --sans: 'Inter', 'Helvetica Neue', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--ink);
  color: var(--parchment);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, var(--copper-glow), transparent 60%),
    radial-gradient(ellipse 60% 80% at 85% 90%, var(--teal-glow), transparent 55%),
    radial-gradient(ellipse 100% 100% at 50% 50%, rgba(11, 10, 13, 0.4), transparent);
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}

.site-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  animation: fadeIn 1.2s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

a {
  color: var(--copper-light);
  text-decoration: none;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}
a:hover {
  color: var(--teal);
  text-shadow: 0 0 18px var(--teal-glow);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(11, 10, 13, 0.75);
  border-bottom: 1px solid rgba(183, 101, 63, 0.18);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--parchment);
}
.brand-mark {
  width: 28px;
  height: 28px;
  border: 2px solid var(--copper);
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.brand-mark::before {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  border: 2px solid var(--teal);
  clip-path: polygon(0 50%, 100% 50%, 100% 100%, 0 100%);
}
.brand-sub {
  color: var(--gray);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  padding: 0.35rem 0;
  border-bottom: 1px solid transparent;
  transition: all 0.3s ease;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--copper-light);
  border-bottom-color: var(--copper);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.hero {
  position: relative;
  padding: 10rem 0 8rem;
  text-align: center;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--copper-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-title {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--parchment);
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
  text-shadow: 0 0 60px rgba(183, 101, 63, 0.3);
}
.hero-tagline {
  font-family: var(--serif);
  font-size: clamp(1rem, 2vw, 1.25rem);
  font-weight: 400;
  font-style: italic;
  color: var(--parchment-dim);
  max-width: 640px;
  margin: 0 auto 2.5rem;
  position: relative;
  z-index: 1;
  line-height: 1.6;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--copper);
  background: rgba(183, 101, 63, 0.08);
  color: var(--copper-light);
  cursor: pointer;
  transition: all 0.35s ease;
  text-decoration: none;
}
.btn:hover {
  background: rgba(183, 101, 63, 0.18);
  border-color: var(--copper-light);
  color: var(--parchment);
  box-shadow: 0 0 24px var(--copper-glow), inset 0 0 12px rgba(183, 101, 63, 0.1);
}
.btn-teal {
  border-color: var(--teal);
  background: rgba(69, 184, 179, 0.08);
  color: var(--teal);
}
.btn-teal:hover {
  background: rgba(69, 184, 179, 0.18);
  border-color: var(--teal);
  color: var(--parchment);
  box-shadow: 0 0 24px var(--teal-glow), inset 0 0 12px rgba(69, 184, 179, 0.1);
}

.section {
  padding: 5rem 0;
}
.section-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 600;
  color: var(--parchment);
  margin-bottom: 1rem;
  text-align: center;
}
.section-subtitle {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--gray);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 3rem;
}

.grimoire-list {
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
}
.grimoire-item {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(143, 130, 132, 0.15);
  transition: all 0.3s ease;
}
.grimoire-item:hover {
  background: rgba(183, 101, 63, 0.04);
  padding-left: 1rem;
  margin-left: -1rem;
}
.chapter-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--copper);
  min-width: 3rem;
}
.chapter-info {
  flex: 1;
}
.chapter-link {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--parchment);
  display: block;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}
.chapter-link:hover {
  color: var(--copper-light);
}
.chapter-desc {
  font-family: var(--serif);
  font-size: 0.95rem;
  font-style: italic;
  color: var(--gray);
  line-height: 1.5;
}
.chapter-progress {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(69, 184, 179, 0.3);
  border-radius: 2px;
  white-space: nowrap;
}

.prose {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--parchment);
}
.prose p {
  margin-bottom: 1.25rem;
  text-indent: 1.5rem;
}
.prose p:first-of-type {
  text-indent: 0;
}
.prose p:first-of-type::first-letter {
  font-size: 3.5rem;
  float: left;
  line-height: 0.8;
  padding-right: 0.5rem;
  color: var(--copper-light);
  font-weight: 600;
}

.chapter-header {
  text-align: center;
  padding: 4rem 0 2.5rem;
  border-bottom: 1px solid rgba(143, 130, 132, 0.15);
  margin-bottom: 3rem;
}
.chapter-header .chapter-num {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--copper);
  text-transform: uppercase;
  display: block;
  margin-bottom: 0.75rem;
}
.chapter-header h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  color: var(--parchment);
  line-height: 1.2;
  margin-bottom: 0.5rem;
}
.chapter-header .chapter-meta {
  font-family: var(--sans);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--gray);
  text-transform: uppercase;
}

.chapter-nav {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(143, 130, 132, 0.15);
}
.chapter-nav a {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--parchment-dim);
  padding: 0.75rem 1.25rem;
  border: 1px solid rgba(143, 130, 132, 0.2);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.chapter-nav a:hover {
  border-color: var(--copper);
  color: var(--copper-light);
  background: rgba(183, 101, 63, 0.06);
  box-shadow: 0 0 16px var(--copper-glow);
}

.updates-list {
  max-width: 720px;
  margin: 0 auto;
  list-style: none;
}
.update-card {
  padding: 1.75rem 0;
  border-bottom: 1px solid rgba(143, 130, 132, 0.15);
}
.update-date {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}
.update-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--parchment);
  margin-bottom: 0.5rem;
}
.update-body {
  font-family: var(--serif);
  font-size: 0.95rem;
  color: var(--parchment-dim);
  line-height: 1.6;
}

.char-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}
.char-card {
  background: linear-gradient(145deg, rgba(28, 25, 36, 0.6), rgba(20, 18, 26, 0.8));
  border: 1px solid rgba(183, 101, 63, 0.15);
  border-radius: 4px;
  padding: 1.75rem;
  transition: all 0.35s ease;
  position: relative;
  overflow: hidden;
}
.char-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--copper), var(--teal), transparent);
  opacity: 0;
  transition: opacity 0.35s ease;
}
.char-card:hover {
  border-color: rgba(183, 101, 63, 0.35);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), inset 0 0 24px rgba(183, 101, 63, 0.04);
  transform: translateY(-2px);
}
.char-card:hover::before {
  opacity: 1;
}
.char-portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--ink-light), var(--ink-mid));
  border: 1px solid rgba(183, 101, 63, 0.25);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--copper-light);
}
.char-name {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--parchment);
  margin-bottom: 0.25rem;
}
.char-meta {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 0.75rem;
}
.char-desc {
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--parchment-dim);
  line-height: 1.55;
}

.site-footer {
  padding: 3rem 0 2rem;
  text-align: center;
  border-top: 1px solid rgba(143, 130, 132, 0.1);
  margin-top: 4rem;
}
.site-footer p {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gray-dark);
}
.site-footer .brand-mark {
  margin: 0 auto 1rem;
}

.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }

.back-link {
  font-family: var(--sans);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 1rem;
  transition: color 0.3s ease;
}
.back-link:hover {
  color: var(--copper-light);
}

@media (max-width: 1180px) {
  .hero { padding: 7rem 0 5rem; }
}
@media (max-width: 820px) {
  .header-inner { padding: 0 1.25rem; height: 56px; }
  .nav-links { gap: 1rem; }
  .container { padding: 0 1.25rem; }
  .hero { padding: 5rem 0 4rem; }
  .grimoire-item { flex-direction: column; gap: 0.5rem; }
  .chapter-nav { flex-direction: column; }
  .char-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .nav-links { display: none; }
  .hero-actions { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
