:root {
  color-scheme: dark;
  --ink: #0b1115;
  --ink-soft: #121b20;
  --ink-lift: #17242a;
  --paper: #f4ead7;
  --paper-soft: #d8cab1;
  --moon: #f6d38d;
  --ember: #d98f4b;
  --moss: #8ead78;
  --plum: #4b334e;
  --border: rgba(244, 234, 215, 0.16);
  --shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--paper);
  background:
    linear-gradient(180deg, rgba(11, 17, 21, 0.72), rgba(11, 17, 21, 0.96)),
    linear-gradient(135deg, #0b1115 0%, #162129 45%, #22172a 100%);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 17, 21, 0.84);
  backdrop-filter: blur(18px);
}

.site-nav {
  width: 100%;
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 0;
  padding: 0 clamp(18px, 3vw, 34px);
}

.site-nav a {
  color: var(--paper);
  text-decoration: none;
}

.brand-link {
  color: var(--moon) !important;
  font-weight: 700;
  font-size: clamp(0.95rem, 1.4vw, 1.12rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 18px;
  margin-left: auto;
}

.nav-links a,
.text-link {
  color: var(--moon);
  font-weight: 700;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a:focus-visible,
.text-link:hover,
.text-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.nav-links a[aria-current="page"] {
  color: var(--paper);
}

.home-page {
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
}

.home-page .site-header {
  position: fixed;
  width: 100%;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(11, 17, 21, 0.9), rgba(11, 17, 21, 0.42) 72%, transparent);
}

.home-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  background-image:
    linear-gradient(180deg, rgba(11, 17, 21, 0.02), rgba(11, 17, 21, 0.14) 52%, rgba(11, 17, 21, 0.38)),
    url("storybook-night-watchers-lion-facing-gazelle.png");
  background-position: center top;
  background-size: cover;
}

.hero-quote {
  position: absolute;
  left: clamp(28px, 8vw, 118px);
  bottom: clamp(28px, 6vh, 58px);
  z-index: 1;
  width: min(520px, calc(100% - 56px));
  margin: 0;
  color: rgba(246, 234, 215, 0.92);
  font-size: clamp(0.98rem, 1.45vw, 1.18rem);
  font-style: italic;
  line-height: 1.52;
  text-align: left;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.8);
  pointer-events: none;
}

.hero-quote p {
  margin: 0;
}

.hero-inner,
.list-shell,
.story-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding: 36px 0 46px;
  text-align: center;
}

h1,
h2 {
  margin: 0;
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: 0;
}

.home-hero h1 {
  max-width: 780px;
  margin: 0 auto;
  font-size: clamp(2.6rem, 6vw, 5.25rem);
  text-wrap: balance;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.48);
}

.list-shell {
  padding: 42px 0 64px;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.page-title {
  margin-bottom: 28px;
  font-size: clamp(1.9rem, 4vw, 3.1rem);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.art-card {
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(13, 20, 23, 0.82);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

.art-card a {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  background: #d8cab1;
}

.art-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.art-card figcaption {
  display: grid;
  gap: 4px;
  padding: 13px 14px 15px;
}

.art-card span {
  color: var(--moon);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.art-card strong {
  color: var(--paper);
  font-size: 1.02rem;
  font-weight: 500;
  line-height: 1.22;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-heading h2 {
  font-size: clamp(1.65rem, 3vw, 2.45rem);
}

.story-list {
  width: min(900px, 100%);
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: story;
  border-top: 1px solid var(--border);
}

.story-list li {
  min-width: 0;
  counter-increment: story;
  border-bottom: 1px solid var(--border);
}

.story-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 18px 0;
  color: var(--paper);
  background: transparent;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease, padding 160ms ease;
}

.story-card:hover,
.story-card:focus-visible {
  color: var(--moon);
  background: rgba(246, 211, 141, 0.06);
  padding-left: 12px;
  padding-right: 12px;
}

.story-card h3 {
  margin: 0;
  font-size: clamp(1.04rem, 1.8vw, 1.32rem);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0;
  text-wrap: balance;
}

.story-page {
  background:
    linear-gradient(180deg, rgba(11, 17, 21, 0.76), rgba(11, 17, 21, 0.96)),
    url("storybook-night-watchers-lion-facing-gazelle.png") top center / min(1900px, 160vw) auto no-repeat,
    linear-gradient(135deg, #0b1115 0%, #162129 55%, #22172a 100%);
}

.story-shell {
  width: min(900px, calc(100% - 40px));
  padding: 62px 0 76px;
}

.story-header {
  margin-bottom: 34px;
}

.story-header h1 {
  max-width: 760px;
  font-size: clamp(1.28rem, 2.2vw, 1.78rem);
  font-weight: 600;
  text-wrap: balance;
  text-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

.story-header p {
  margin: 18px 0 0;
  color: var(--paper-soft);
}

.story-body {
  padding: clamp(24px, 5vw, 44px);
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(13, 20, 23, 0.82);
  box-shadow: var(--shadow);
}

.story-body p,
.stanza {
  max-width: 36rem;
  margin-left: auto;
  margin-right: auto;
}

.story-body p {
  margin-top: 0;
  margin-bottom: 1.08em;
  color: #f6eddf;
  font-size: clamp(1.05rem, 2vw, 1.22rem);
  line-height: 1.72;
}

.stanza {
  margin-top: 0;
  margin-bottom: 1.65em;
}

.stanza p {
  margin-bottom: 0.1em;
}

.prose + .stanza,
.stanza + .prose {
  margin-top: 1.8em;
}

@media (max-width: 760px) {
  .hero-inner,
  .list-shell,
  .page-shell,
  .story-shell {
    width: min(100% - 28px, 1000px);
  }

  .site-nav {
    min-height: 58px;
    gap: 14px;
    padding: 0 14px;
  }

  .nav-links {
    gap: 14px;
  }

  .home-hero {
    min-height: 100vh;
    min-height: 100svh;
    background-position: 62% top;
  }

  .hero-quote {
    left: 18px;
    bottom: 24px;
    width: min(100% - 36px, 520px);
    font-size: 0.98rem;
    line-height: 1.45;
  }

  .story-card {
    padding: 16px 0;
  }

  .story-shell {
    padding-top: 38px;
  }
}
