/* Author: VIVI x Codex */
:root {
  --bg: #f5f0e7;
  --paper: rgba(255, 251, 246, 0.78);
  --paper-strong: rgba(255, 252, 248, 0.9);
  --ink: #151515;
  --ink-soft: rgba(21, 21, 21, 0.62);
  --line: rgba(21, 21, 21, 0.12);
  --accent: #d74f2a;
  --accent-deep: #8f270d;
  --green: #2f5948;
  --sand: #d7c0a3;
  --blue-black: #192028;
  --shadow: 0 28px 70px rgba(20, 20, 20, 0.14);
  --content-width: 1880px;
  --page-gutter: 28px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
  scroll-behavior: smooth;
}

body {
  height: 100%;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(215, 79, 42, 0.16), transparent 26%),
    radial-gradient(circle at right 12% top 22%, rgba(47, 89, 72, 0.12), transparent 28%),
    linear-gradient(180deg, #f7f3eb 0%, #efe6d8 100%);
  font-family: "Noto Serif SC", "Songti SC", serif;
  overflow: hidden;
}

body::selection {
  background: rgba(215, 79, 42, 0.18);
}

a,
button {
  color: inherit;
}

button {
  font: inherit;
}

.page-noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.08)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160' viewBox='0 0 160 160'%3E%3Cg fill='%23000000' fill-opacity='.08'%3E%3Ccircle cx='12' cy='18' r='1'/%3E%3Ccircle cx='48' cy='33' r='1'/%3E%3Ccircle cx='98' cy='21' r='1'/%3E%3Ccircle cx='130' cy='44' r='1'/%3E%3Ccircle cx='30' cy='88' r='1'/%3E%3Ccircle cx='78' cy='72' r='1'/%3E%3Ccircle cx='121' cy='99' r='1'/%3E%3Ccircle cx='149' cy='132' r='1'/%3E%3Ccircle cx='58' cy='141' r='1'/%3E%3Ccircle cx='17' cy='126' r='1'/%3E%3C/g%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

.site-header {
  position: fixed;
  top: 20px;
  left: 24px;
  right: 24px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.site-mark {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.72);
  backdrop-filter: blur(14px);
  text-decoration: none;
}

.site-mark-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #f7c49a);
  box-shadow: 0 0 0 6px rgba(215, 79, 42, 0.08);
}

.site-mark-text {
  display: grid;
  gap: 2px;
}

.site-mark-text strong,
.site-mark-text span {
  display: block;
}

.site-mark-text strong {
  font-size: 15px;
  letter-spacing: 0.04em;
}

.site-mark-text span,
.poster-tag,
.poster-index,
.kicker,
.hero-meta p,
.hero-meta li,
.quote-nav a,
.soundbite-button,
.poster-note {
  font-family: "IBM Plex Mono", monospace;
}

.site-mark-text span {
  color: var(--ink-soft);
  font-size: 12px;
}

.soundbite-button {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 248, 0.78);
  backdrop-filter: blur(14px);
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease;
}

.soundbite-button:hover,
.soundbite-button:focus-visible {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
}

.quote-nav {
  position: fixed;
  right: 24px;
  top: 50%;
  z-index: 18;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.quote-nav a {
  display: inline-flex;
  justify-content: flex-end;
  padding: 6px 10px;
  border-right: 2px solid transparent;
  color: var(--ink-soft);
  font-size: 11px;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.quote-nav a:hover,
.quote-nav a:focus-visible,
.quote-nav a.is-active {
  color: var(--ink);
  border-color: var(--accent);
  transform: translateX(-4px);
}

main {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
}

.hero,
.poster {
  min-height: 100vh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero {
  display: grid;
  place-items: center;
  padding: 112px var(--page-gutter) 40px;
}

.hero-grid,
.poster-shell {
  width: min(var(--content-width), calc(100vw - (var(--page-gutter) * 2)));
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 28px;
}

.hero-copy,
.hero-meta,
.poster-shell {
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.hero-copy,
.hero-meta {
  background: var(--paper);
  backdrop-filter: blur(18px);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: 42px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
}

.kicker,
.hero-meta p,
.poster-tag {
  margin: 0 0 16px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.hero-copy .kicker {
  margin-bottom: 22px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: rgba(21, 21, 21, 0.72);
  text-transform: none;
}

.hero h1,
.poster h2,
.poster-text {
  margin: 0;
  line-height: 0.96;
}

.hero h1,
.poster h2 {
  font-weight: 900;
  letter-spacing: -0.05em;
  white-space: nowrap;
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
}

.hero h1 {
  max-width: 9ch;
  font-size: clamp(3.9rem, 10vw, 8.8rem);
}

.hero h1 span {
  color: var(--accent-deep);
}

.title-line {
  display: block;
  white-space: nowrap;
}

.title-line-small {
  font-size: 0.72em;
  letter-spacing: -0.035em;
}

.hero-lede {
  max-width: 22ch;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1rem, 2vw, 1.35rem);
  line-height: 1.75;
}

.hero-meta ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 14px;
}

.hero-meta li {
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  letter-spacing: 0.07em;
  line-height: 1.7;
  text-transform: uppercase;
}

.poster {
  display: grid;
  place-items: center;
  padding: 32px var(--page-gutter);
}

.poster-shell {
  position: relative;
  display: grid;
  align-items: end;
  min-height: calc(100vh - 64px);
  padding: 40px;
  overflow: hidden;
}

.poster-shell::before,
.poster-shell::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  opacity: 0.8;
  filter: blur(6px);
}

.poster-shell::before {
  width: 28vw;
  height: 28vw;
  min-width: 220px;
  min-height: 220px;
  top: -10vw;
  right: -6vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.48), transparent 65%);
}

.poster-shell::after {
  width: 18vw;
  height: 18vw;
  min-width: 180px;
  min-height: 180px;
  bottom: -7vw;
  left: -4vw;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 70%);
}

.poster-index {
  position: absolute;
  top: 28px;
  right: 30px;
  margin: 0;
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: rgba(255, 255, 255, 0.84);
  opacity: 0.8;
}

.poster-body {
  position: relative;
  z-index: 1;
  max-width: 1000px;
}

#quote-1 .poster-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 64px);
}

#quote-9 .poster-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: calc(100vh - 64px);
}

.poster h2 {
  font-size: clamp(4rem, 12vw, 10rem);
  max-width: none;
}

.title-compact {
  font-size: clamp(3rem, 8.8vw, 7.2rem);
}

.title-compact-wide {
  font-size: clamp(2.45rem, 6.9vw, 5.6rem);
}

.poster-text {
  max-width: 28ch;
  margin-top: 22px;
  font-size: clamp(1.15rem, 2vw, 1.7rem);
  line-height: 1.38;
  text-wrap: balance;
}

.poster-note {
  position: relative;
  z-index: 1;
  max-width: 48ch;
  margin: 28px 0 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  line-height: 1.8;
  text-transform: uppercase;
}

.poster-warm .poster-shell {
  background:
    linear-gradient(135deg, rgba(255, 250, 241, 0.14), rgba(255, 250, 241, 0)),
    linear-gradient(135deg, #d6502c 0%, #8a220a 100%);
  color: #fff8f1;
}

.poster-paper .poster-shell {
  background:
    linear-gradient(160deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0.08)),
    linear-gradient(135deg, #f5ecdc 0%, #d9c0a0 100%);
  color: #241d18;
}

.poster-paper .poster-index,
.poster-paper .poster-note,
.poster-paper .poster-tag {
  color: rgba(36, 29, 24, 0.66);
}

.poster-ink .poster-shell {
  background:
    radial-gradient(circle at top right, rgba(232, 109, 66, 0.22), transparent 26%),
    linear-gradient(135deg, #161c24 0%, #26313d 100%);
  color: #f5efe5;
}

.poster-sand .poster-shell {
  background:
    radial-gradient(circle at top right, rgba(255, 232, 205, 0.14), transparent 24%),
    linear-gradient(135deg, #7a5137 0%, #3f281d 100%);
  color: #fff6eb;
}

.poster-sand .poster-tag,
.poster-sand .poster-note,
.poster-sand .poster-index {
  color: rgba(255, 241, 226, 0.9);
}

.poster-sand .poster-text {
  color: rgba(255, 244, 232, 0.92);
}

.poster-sand .poster-body,
.poster-sand .poster-note {
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.18);
}

.poster-green .poster-shell {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #24493c 0%, #0f221d 100%);
  color: #f1f1e8;
}

.poster-closing .poster-shell {
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 237, 212, 0.22), transparent 24%),
    linear-gradient(160deg, #1a1513 0%, #342019 100%);
  color: #fff5eb;
}

.poster.active .poster-shell {
  transform: scale(1.005);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 24;
  padding: 11px 18px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(18, 18, 18, 0.82);
  color: #fff7ec;
  font: 500 12px/1 "IBM Plex Mono", monospace;
  letter-spacing: 0.08em;
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1080px) {
  .quote-nav {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy,
  .hero-meta,
  .poster-shell {
    padding: 28px;
  }

  .hero-copy {
    min-height: calc(100vh - 64px);
  }

  .poster-shell {
    min-height: auto;
    padding-top: 64px;
    padding-bottom: 28px;
  }
}

@media (max-width: 720px) {
  :root {
    --page-gutter: 12px;
  }

  .site-header {
    top: 12px;
    left: 12px;
    right: 12px;
    align-items: flex-start;
    flex-direction: column;
  }

  .soundbite-button {
    width: 100%;
  }

  .hero,
  .poster {
    padding-left: var(--page-gutter);
    padding-right: var(--page-gutter);
  }

  .hero {
    padding-top: 132px;
  }

  .hero h1 {
    font-size: clamp(2.8rem, 15vw, 4.9rem);
  }

  .poster h2 {
    font-size: clamp(2.85rem, 14vw, 4.9rem);
  }

  .title-compact {
    font-size: clamp(2.3rem, 9.2vw, 4rem);
  }

  .title-compact-wide {
    font-size: clamp(1.85rem, 7.4vw, 3.2rem);
  }

  .poster-text {
    margin-top: 18px;
    font-size: 1.05rem;
  }

  .poster-note {
    margin-top: 22px;
    line-height: 1.65;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .soundbite-button,
  .quote-nav a,
  .toast {
    transition: none;
  }
}
