:root {
  --ink: #0b0b0c;
  --ink-soft: #121214;
  --panel: rgba(16, 16, 18, 0.84);
  --panel-strong: rgba(10, 10, 12, 0.94);
  --parchment: #f2ede4;
  --parchment-dim: #d0c9bc;
  --scar: #8f3131;
  --scar-bright: #ae4545;
  --gold: #b9a46d;
  --gold-soft: #d3c18d;
  --mist: #b8b7b4;
  --line: rgba(185, 164, 109, 0.26);
  --shadow: rgba(0, 0, 0, 0.72);
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--parchment);
  font-family: var(--serif);
  line-height: 1.7;
  background:
    linear-gradient(rgba(10,10,11,.78), rgba(10,10,11,.9)),
    url("../images/background1.png") center / cover fixed no-repeat;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 14% 12%, rgba(185,164,109,.09), transparent 28%),
    radial-gradient(circle at 88% 42%, rgba(143,49,49,.12), transparent 32%),
    linear-gradient(90deg, rgba(0,0,0,.55), transparent 24%, transparent 76%, rgba(0,0,0,.55));
}
a { color: inherit; }
img { max-width: 100%; display: block; }

/* NAVIGATION */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(185,164,109,.2);
  background: rgba(7,7,8,.88);
  backdrop-filter: blur(14px);
}
.nav-inner {
  width: min(1180px, calc(100% - 36px));
  min-height: 70px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.nav-mark {
  text-decoration: none;
  font-size: .82rem;
  letter-spacing: .22em;
  color: var(--gold-soft);
  white-space: nowrap;
}
.site-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 0;
  margin: 0;
}
.site-nav a:not(.nav-mark) {
  position: relative;
  text-decoration: none;
  color: var(--parchment-dim);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  transition: color .25s ease;
}
.site-nav a:not(.nav-mark)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 100%;
  bottom: -8px;
  height: 1px;
  background: var(--gold);
  transition: right .25s ease;
}
.site-nav a:hover { color: var(--parchment); }
.site-nav a:hover::after { right: 0; }

/* HERO */
.hero {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 72px 18px 82px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 160px;
  background: linear-gradient(transparent, rgba(6,6,7,.92));
  pointer-events: none;
}
.hero-inner {
  width: min(1180px, 100%);
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(350px, .7fr);
  align-items: center;
  gap: clamp(48px, 8vw, 110px);
  position: relative;
  z-index: 1;
}
.eyebrow {
  margin: 0 0 18px;
  color: var(--gold-soft);
  font-size: .76rem;
  letter-spacing: .28em;
  text-transform: uppercase;
}
.hero h1 {
  margin: 0;
  font-size: clamp(3.2rem, 7vw, 6.6rem);
  line-height: .9;
  letter-spacing: .06em;
  font-weight: 500;
  text-shadow: 0 12px 42px rgba(0,0,0,.75);
}
.hero h2 {
  margin: 20px 0 0;
  font-weight: 400;
  font-size: clamp(1.15rem, 2.2vw, 1.6rem);
  color: var(--parchment-dim);
  letter-spacing: .04em;
}
.hero-copy {
  max-width: 580px;
  margin: 30px 0 34px;
  color: #d4cec4;
  font-size: 1.03rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 22px;
  border: 1px solid var(--gold);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: .7rem;
  transition: transform .25s ease, background .25s ease, color .25s ease, border-color .25s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: #111; }
.btn-primary:hover { background: var(--gold-soft); }
.btn-secondary { color: var(--gold-soft); background: rgba(0,0,0,.2); }
.btn-secondary:hover { border-color: var(--parchment); color: var(--parchment); }
.hero-art {
  position: relative;
  max-width: 440px;
  justify-self: end;
}
.hero-art::before {
  content: "";
  position: absolute;
  inset: 7% -10% -5%;
  border: 1px solid rgba(185,164,109,.28);
  transform: rotate(2deg);
  z-index: -1;
}
.hero-art::after {
  content: "";
  position: absolute;
  inset: 18% -22% 14% 32%;
  z-index: -2;
  background: rgba(143,49,49,.22);
  filter: blur(38px);
}
.hero-art img {
  width: 100%;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  object-position: center;
  border: 1px solid rgba(185,164,109,.36);
  box-shadow: 0 36px 90px rgba(0,0,0,.78);
}
.hero-stamp {
  position: absolute;
  right: -34px;
  bottom: 42px;
  width: 126px;
  height: 126px;
  border: 1px solid rgba(185,164,109,.5);
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 18px;
  background: rgba(8,8,9,.86);
  color: var(--gold-soft);
  text-transform: uppercase;
  letter-spacing: .13em;
  font-size: .63rem;
  line-height: 1.5;
  box-shadow: 0 20px 45px rgba(0,0,0,.5);
}

/* SHARED CONTENT */
.site-main { background: linear-gradient(rgba(6,6,7,.92), rgba(9,9,10,.72) 14%, rgba(9,9,10,.7) 86%, rgba(6,6,7,.96)); }
.content-section {
  padding: clamp(78px, 9vw, 128px) 18px;
  position: relative;
}
.content-section + .content-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: min(1120px, calc(100% - 36px));
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--line) 18%, var(--line) 82%, transparent);
}
.section-inner { width: min(1120px, 100%); margin: 0 auto; }
.section-kicker {
  margin: 0 0 10px;
  color: var(--scar-bright);
  font-size: .72rem;
  letter-spacing: .26em;
  text-transform: uppercase;
}
.section-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.65rem);
  line-height: 1.05;
  font-weight: 500;
  letter-spacing: .025em;
}
.section-rule {
  width: 82px;
  height: 1px;
  margin: 26px 0;
  background: linear-gradient(90deg, var(--gold), transparent);
}
.section-lead { max-width: 650px; color: var(--parchment-dim); font-size: 1.05rem; }
.split {
  display: grid;
  grid-template-columns: minmax(280px, .82fr) minmax(0, 1fr);
  gap: clamp(44px, 7vw, 90px);
  align-items: center;
}
.split.reverse { grid-template-columns: minmax(0, 1fr) minmax(280px, .82fr); }
.split.reverse .media-frame { order: 2; }
.split.reverse .section-copy { order: 1; }
.media-frame {
  position: relative;
  padding: 12px;
  border: 1px solid rgba(185,164,109,.26);
  background: rgba(0,0,0,.22);
  box-shadow: 0 28px 70px rgba(0,0,0,.46);
}
.media-frame::before {
  content: "";
  position: absolute;
  inset: 22px -14px -14px 22px;
  border: 1px solid rgba(143,49,49,.24);
  pointer-events: none;
  z-index: -1;
}
.media-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
  filter: saturate(.83) contrast(1.04);
}
.quote-panel {
  margin-top: 34px;
  padding: 24px 28px 24px 30px;
  border-left: 2px solid var(--scar);
  background: linear-gradient(90deg, rgba(143,49,49,.1), transparent);
  color: #d5cec2;
  font-style: italic;
  font-size: 1.05rem;
}

/* HOUSES */
.houses-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 32px;
  margin-bottom: 42px;
}
.houses-head .section-lead { margin: 0; max-width: 520px; }
.house-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.house-card {
  min-height: 265px;
  position: relative;
  padding: 30px 24px 26px;
  overflow: hidden;
  border: 1px solid rgba(185,164,109,.17);
  background: linear-gradient(145deg, rgba(26,26,29,.94), rgba(9,9,11,.9));
  transition: transform .28s ease, border-color .28s ease;
}
.house-card::before {
  content: attr(data-mark);
  position: absolute;
  right: -4px;
  bottom: -32px;
  color: rgba(185,164,109,.05);
  font-size: 8rem;
  line-height: 1;
}
.house-card:hover { transform: translateY(-5px); border-color: rgba(185,164,109,.42); }
.house-no { color: var(--scar-bright); font-size: .69rem; letter-spacing: .2em; }
.house-card h4 { margin: 45px 0 12px; color: var(--gold-soft); font-size: 1.28rem; font-weight: 500; }
.house-card p { margin: 0; color: #bdb7ae; font-size: .93rem; }

/* CODEX FEATURE */
.codex-feature {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(330px, .8fr) minmax(0, 1fr);
  gap: clamp(50px, 8vw, 100px);
  align-items: center;
}
.codex-image-wrap { position: relative; }
.codex-image-wrap img {
  width: min(430px, 100%);
  margin: 0 auto;
  filter: drop-shadow(0 32px 45px rgba(0,0,0,.72));
}
.codex-image-wrap::after {
  content: "";
  position: absolute;
  left: 18%; right: 18%; bottom: 3%; height: 28px;
  background: rgba(0,0,0,.72);
  filter: blur(18px);
  border-radius: 50%;
  z-index: -1;
}
.codex-actions { margin-top: 30px; display: flex; gap: 14px; flex-wrap: wrap; }
.codex-note {
  margin-top: 28px;
  color: #9f9a92;
  font-size: .82rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}

/* CHARACTERS */
.character-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 46px;
}
.character-card {
  position: relative;
  overflow: hidden;
  min-height: 510px;
  border: 1px solid rgba(185,164,109,.18);
  background: #0e0e10;
  box-shadow: 0 22px 50px rgba(0,0,0,.28);
}
.character-card img { width: 100%; height: 360px; object-fit: cover; object-position: top center; filter: saturate(.8) contrast(1.05); transition: transform .45s ease; }
.character-card:hover img { transform: scale(1.025); }
.character-copy { padding: 22px 22px 24px; border-top: 1px solid rgba(185,164,109,.15); }
.character-copy h4 { margin: 0 0 7px; color: var(--gold-soft); font-size: 1.25rem; font-weight: 500; }
.character-copy p { margin: 0; color: #aaa59e; font-size: .91rem; }

/* AUTHOR */
.author-panel {
  width: min(1000px, 100%);
  margin: 0 auto;
  padding: clamp(28px, 5vw, 58px);
  display: grid;
  grid-template-columns: 240px 1fr;
  align-items: center;
  gap: clamp(34px, 6vw, 70px);
  border: 1px solid rgba(185,164,109,.2);
  background: linear-gradient(120deg, rgba(24,24,27,.9), rgba(9,9,11,.92));
  box-shadow: 0 34px 85px rgba(0,0,0,.34);
}
.author-panel img { width: 100%; aspect-ratio: 4/5; object-fit: cover; object-position: top center; border: 1px solid rgba(185,164,109,.22); }
.author-panel p { color: var(--parchment-dim); }

/* FOOTER */
footer {
  padding: 42px 18px;
  border-top: 1px solid rgba(185,164,109,.18);
  background: #050506;
  color: #8f8b84;
}
.footer-inner {
  width: min(1120px, 100%);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  font-size: .8rem;
  letter-spacing: .06em;
}
footer a { color: var(--gold-soft); text-decoration: none; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr .72fr; gap: 40px; }
  .house-grid, .character-grid { grid-template-columns: repeat(2, 1fr); }
  .codex-feature { grid-template-columns: .8fr 1fr; }
}

@media (max-width: 760px) {
  .nav-inner { width: min(100% - 24px, 1180px); min-height: 62px; flex-direction: column; justify-content: center; padding: 11px 0 12px; gap: 8px; }
  .site-nav ul { gap: 13px; justify-content: center; }
  .site-nav a:not(.nav-mark) { font-size: .62rem; letter-spacing: .1em; }
  .hero { min-height: auto; padding-top: 54px; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-copy { margin-left: auto; margin-right: auto; }
  .hero-actions { justify-content: center; }
  .hero-art { justify-self: center; width: min(78vw, 390px); }
  .hero-stamp { width: 104px; height: 104px; right: -20px; bottom: 24px; font-size: .55rem; }
  .split, .split.reverse, .codex-feature { grid-template-columns: 1fr; }
  .split.reverse .media-frame, .split.reverse .section-copy { order: initial; }
  .media-frame { width: min(86vw, 480px); margin: 0 auto; }
  .houses-head { align-items: flex-start; flex-direction: column; }
  .author-panel { grid-template-columns: 1fr; text-align: center; }
  .author-panel img { width: min(240px, 70vw); margin: auto; }
  .section-rule { margin-left: auto; margin-right: auto; }
  .section-copy { text-align: center; }
  .quote-panel { text-align: left; }
  .codex-feature { text-align: center; }
  .codex-actions { justify-content: center; }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 520px) {
  .content-section { padding-left: 14px; padding-right: 14px; }
  .house-grid, .character-grid { grid-template-columns: 1fr; }
  .character-card { min-height: 0; }
  .character-card img { height: 430px; }
  .btn { width: 100%; }
  .hero h1 { font-size: clamp(2.8rem, 16vw, 4.5rem); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
