:root {
  --paper: #efe3c6;
  --paper-deep: #e0cda8;
  --ink: #2f2a24;
  --muted: #5e564a;
  --green: #536c51;
  --blue: #627899;
  --purple: #7d6f9a;
  --orange: #b26a3c;
  --line: rgba(47, 42, 36, 0.2);
  --shadow: rgba(48, 36, 19, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(125, 111, 154, 0.08), transparent 30%),
    linear-gradient(180deg, #f7efdf 0%, #eadcb6 100%);
  min-height: 100vh;
  position: relative;
}

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

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(
      0deg,
      rgba(51, 42, 28, 0.035) 0px,
      rgba(51, 42, 28, 0.035) 1px,
      transparent 1px,
      transparent 4px
    );
  mix-blend-mode: multiply;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 5vw;
  background: rgba(239, 227, 198, 0.86);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}

.brand {
  text-decoration: none;
  color: var(--ink);
  display: flex;
  gap: 0.7rem;
  align-items: center;
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
}

.brand-mark {
  color: var(--orange);
}

.site-nav {
  display: flex;
  gap: 1.3rem;
}

.site-nav a,
.contact-list a {
  text-decoration: none;
  color: var(--ink);
  position: relative;
}

.site-nav a::after,
.contact-list a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.2rem;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

.site-nav a:hover::after,
.contact-list a:hover::after {
  transform: scaleX(1);
}

main {
  width: min(1100px, calc(100vw - 2rem));
  margin: 0 auto;
}

.chapter {
  margin: 2rem 0 0;
  padding: 3.5rem 2.4rem;
  border: 1px solid var(--line);
  background: rgba(250, 244, 230, 0.72);
  box-shadow: 0 8px 25px var(--shadow);
  position: relative;
}

.chapter::before {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border: 1px dashed rgba(47, 42, 36, 0.22);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 2rem;
  align-items: center;
  margin-top: 1rem;
}

.section-kicker {
  font-family: "Caveat", cursive;
  font-size: 1.6rem;
  color: var(--green);
  margin: 0 0 0.4rem;
}

h1,
h2,
h3,
.signature,
.title {
  font-family: "Cormorant Garamond", serif;
}

h1 {
  font-size: clamp(3rem, 6vw, 5.2rem);
  line-height: 0.95;
  margin: 0;
}

.tagline {
  font-family: "Caveat", cursive;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--orange);
  margin: 0.8rem 0 1.1rem;
}

.hero-text,
.game-copy p,
.journal-entry p,
.entry-text li,
.contact-list,
.site-footer p {
  font-size: 1.02rem;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.6rem;
}

.button {
  text-decoration: none;
  border: 1px solid var(--ink);
  padding: 0.8rem 1.15rem;
  color: var(--ink);
  background: transparent;
  transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover {
  transform: translateY(-1px);
  background: rgba(83, 108, 81, 0.08);
}

.button.primary {
  background: rgba(83, 108, 81, 0.15);
}

.hero-illustration {
  position: relative;
}

.hero-illustration img {
  border: 1px solid var(--line);
  background: #f3e8cc;
  box-shadow: 0 12px 30px rgba(47, 42, 36, 0.14);
}

.paper-note {
  position: absolute;
  background: rgba(244, 236, 210, 0.9);
  border: 1px dashed rgba(47, 42, 36, 0.35);
  padding: 0.35rem 0.6rem;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green);
  font-weight: 600;
}

.paper-note.a {
  top: -1.25rem;
  left: -1rem;
  transform: rotate(-7deg);
}

.paper-note.b {
  right: -1rem;
  bottom: -1rem;
  transform: rotate(5deg);
}

.chapter-header h2 {
  margin: 0 0 1.6rem;
  font-size: clamp(2rem, 4vw, 3rem);
}

.studio-journal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.creator-entry {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 248, 232, 0.7);
}

.portrait-frame {
  border: 1px dashed rgba(47, 42, 36, 0.22);
  padding: 0.6rem;
}

.signature {
  margin: 0;
  font-size: 2.15rem;
}

.title {
  margin: -0.25rem 0 0.5rem;
  font-size: 1.55rem;
  color: var(--purple);
}

.role {
  margin: 0 0 0.8rem;
  font-weight: 600;
}

.entry-text ul {
  margin: 0;
  padding-left: 1rem;
}

.game-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 1.8rem;
  align-items: center;
}

.game-art {
  margin: 0;
  border: 1px solid var(--line);
  padding: 0.9rem;
  background: #f6ecd1;
}

.announcement {
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
  margin: 0 0 0.8rem;
}

.journal-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.journal-entry {
  padding: 1rem;
  border: 1px solid var(--line);
  background: rgba(255, 249, 238, 0.7);
  min-height: 220px;
}

.entry-tag {
  display: inline-block;
  font-size: 0.74rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 0.5rem;
}

.journal-entry h3 {
  font-size: 2rem;
  margin: 0 0 0.7rem;
}

.image-note {
  grid-column: span 2;
}

.contact-list {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  font-size: 1.1rem;
}

.site-footer {
  width: min(1100px, calc(100vw - 2rem));
  margin: 2rem auto 3rem;
  padding: 1.3rem 1rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-title {
  margin: 0;
  font-family: "Cormorant Garamond", serif;
  font-size: 2rem;
}

.footer-tag {
  margin: 0.25rem 0 0;
  color: var(--muted);
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 900px) {
  .hero,
  .game-layout,
  .studio-journal,
  .journal-grid {
    grid-template-columns: 1fr;
  }

  .creator-entry {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    gap: 0.8rem;
  }

  .site-nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .image-note {
    grid-column: span 1;
  }
}

@media (max-width: 640px) {
  .chapter {
    padding: 2rem 1rem;
  }

  .site-header {
    padding-inline: 1rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}
