:root {
  --ink: #120e10;
  --cream: #f3e8d2;
  --paper: #d8c7a7;
  --blue: #89b4d4;
  --blue-deep: #142d44;
  --wine: #651d29;
  --wine-bright: #a33a43;
  --copper: #c47b43;
  --line: rgba(243, 232, 210, .28);
  --max: 1240px;
  --display: Georgia, "Times New Roman", serif;
  --sans: Arial, Helvetica, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body { margin: 0; color: var(--cream); background: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.55; overflow-x: hidden; }
a { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }

.grain { position: fixed; inset: 0; z-index: 20; pointer-events: none; opacity: .07; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E"); }

.site-header { position: absolute; top: 0; left: 0; width: 100%; z-index: 12; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px clamp(22px, 5vw, 72px); border-bottom: 1px solid rgba(255,255,255,.17); }
.brand { display: flex; align-items: center; gap: 13px; color: var(--cream); text-decoration: none; text-transform: uppercase; font-weight: 800; letter-spacing: .08em; }
.brand-mark { width: 38px; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid var(--copper); border-radius: 50%; color: var(--copper); font-family: var(--display); font-size: 1.35rem; }
.nav { display: flex; align-items: center; gap: clamp(16px, 3vw, 38px); }
.nav a { color: var(--cream); text-decoration: none; font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }
.nav a:hover, .nav a:focus-visible { color: #fff; text-decoration: underline; text-underline-offset: 7px; }

.hero { position: relative; min-height: 100svh; display: grid; align-items: end; isolation: isolate; overflow: hidden; background: #173149 url("../../backgrounds/hero-motel.png") center/cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(7,11,17,.88) 0%, rgba(9,14,20,.62) 40%, rgba(9,12,16,.04) 72%), linear-gradient(0deg, rgba(13,8,9,.75) 0%, transparent 46%); }
.hero-copy { width: min(720px, 92vw); padding: 150px clamp(22px, 6vw, 90px) clamp(60px, 9vw, 120px); }
.eyebrow { margin: 0 0 18px; color: var(--copper); font-size: .79rem; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 720px; margin-bottom: 22px; font-family: var(--display); font-size: clamp(4.25rem, 10vw, 9.5rem); font-weight: 500; line-height: .78; letter-spacing: -.07em; }
.hero h1 span { display: block; margin-left: .7em; color: var(--blue); font-style: italic; }
.dek { max-width: 570px; margin-bottom: 34px; color: rgba(255,255,255,.8); font-size: clamp(1.05rem, 1.7vw, 1.3rem); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.button { position: relative; min-height: 54px; display: inline-flex; align-items: center; justify-content: center; gap: 13px; padding: 0 24px; border: 1px solid rgba(255,255,255,.22); clip-path: polygon(10px 0,100% 0,100% calc(100% - 10px),calc(100% - 10px) 100%,0 100%,0 10px); background: linear-gradient(135deg, #742432, #42141d); color: #fff; text-decoration: none; text-transform: uppercase; letter-spacing: .1em; font: 800 .78rem/1 var(--sans); cursor: pointer; box-shadow: inset 0 1px rgba(255,255,255,.14), 0 10px 28px rgba(0,0,0,.2); transition: transform .2s ease, filter .2s ease; }
.button::after { content: "↗"; color: var(--copper); font-size: 1rem; }
.button:hover, .button:focus-visible { transform: translateY(-3px); filter: brightness(1.16); }
.button.secondary { background: rgba(10,18,24,.58); backdrop-filter: blur(9px); }
.button.copy::after { content: "▣"; }

.ticker-rail { display: grid; grid-template-columns: 1.1fr .9fr; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--cream); color: var(--ink); }
.ticker-stamp { min-height: 330px; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(34px, 6vw, 78px); background: var(--blue); border-right: 1px solid rgba(18,14,16,.22); }
.ticker-stamp strong { font-family: var(--display); font-size: clamp(4rem, 9vw, 8.5rem); font-weight: 500; line-height: .9; letter-spacing: -.07em; }
.ticker-stamp small { max-width: 430px; font-size: .85rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.desk-note { display: grid; align-content: center; gap: 20px; padding: clamp(34px, 6vw, 78px); }
.desk-note p { max-width: 520px; font-family: var(--display); font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.12; }
.desk-note .signature { color: var(--wine); font: italic 1.2rem var(--display); }

.story-window { position: relative; min-height: 100svh; display: grid; align-items: end; background: #18232b url("../../backgrounds/courtyard-story.png") center/cover no-repeat; }
.story-window::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent 0 38%, rgba(8,11,14,.45) 62%, rgba(8,11,14,.94) 100%), linear-gradient(0deg, rgba(7,8,10,.72), transparent 55%); }
.story-card { position: relative; z-index: 1; width: min(630px, calc(100% - 44px)); margin: 0 clamp(22px, 6vw, 90px) clamp(44px, 7vw, 90px) auto; padding: clamp(28px, 5vw, 58px); border: 1px solid var(--line); background: rgba(18,14,16,.72); backdrop-filter: blur(16px); }
.story-card h2, .manifesto h2, .lore-title { font-family: var(--display); font-size: clamp(3.3rem, 7vw, 7.3rem); font-weight: 500; line-height: .9; letter-spacing: -.055em; }
.story-card p { max-width: 50ch; color: rgba(255,255,255,.77); }

.manifesto { padding: clamp(70px, 10vw, 140px) clamp(22px, 6vw, 90px); background: var(--wine); }
.manifesto-inner { max-width: var(--max); margin: auto; }
.manifesto-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 50px; border-top: 1px solid rgba(255,255,255,.25); }
.rule { min-height: 255px; padding: 30px 28px 30px 0; border-right: 1px solid rgba(255,255,255,.25); }
.rule + .rule { padding-left: 28px; }
.rule:last-child { border-right: 0; }
.rule .num { display: block; margin-bottom: 55px; color: var(--copper); font: italic 1.15rem var(--display); }
.rule h3 { font-family: var(--display); font-size: 2rem; font-weight: 500; }
.rule p { color: rgba(255,255,255,.7); }

.footer { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 30px; padding: 70px clamp(22px, 6vw, 90px) 34px; background: var(--blue); color: var(--ink); }
.footer-word { font-family: var(--display); font-size: clamp(4rem, 12vw, 12rem); line-height: .7; letter-spacing: -.08em; }
.footer-meta { text-align: right; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .13em; }

.lore-hero { min-height: 83svh; display: grid; align-items: end; position: relative; padding: 155px clamp(22px, 6vw, 90px) clamp(55px, 8vw, 100px); background: linear-gradient(90deg,rgba(9,11,14,.3),rgba(8,11,14,.82)), url("../../backgrounds/courtyard-story.png") center/cover no-repeat; }
.lore-hero .lore-title { max-width: 900px; margin-bottom: 24px; }
.lore-hero .intro { max-width: 600px; font-size: 1.2rem; color: rgba(255,255,255,.78); }
.chapter { display: grid; grid-template-columns: .65fr 1.35fr; gap: clamp(30px, 8vw, 120px); padding: clamp(70px, 11vw, 150px) clamp(22px, 7vw, 110px); border-bottom: 1px solid var(--line); }
.chapter:nth-child(even) { background: var(--cream); color: var(--ink); }
.chapter-no { color: var(--copper); font: italic 1.2rem var(--display); }
.chapter-copy { max-width: 700px; }
.chapter h2 { font-family: var(--display); font-size: clamp(2.7rem, 5vw, 5.4rem); font-weight: 500; line-height: .95; letter-spacing: -.045em; }
.chapter p { font-size: clamp(1.05rem, 1.5vw, 1.22rem); }
.chapter .pull { margin-top: 36px; padding-left: 25px; border-left: 3px solid var(--copper); font: italic clamp(1.45rem, 2.5vw, 2.2rem)/1.25 var(--display); }

.toast { position: fixed; right: 22px; bottom: 22px; z-index: 50; padding: 14px 18px; background: var(--cream); color: var(--ink); border-left: 4px solid var(--wine); font-weight: 800; transform: translateY(120px); opacity: 0; transition: .3s ease; }
.toast.show { transform: translateY(0); opacity: 1; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 760px) {
  .site-header { padding: 18px 20px; }
  .brand span:last-child { display: none; }
  .nav { gap: 16px; }
  .nav a { font-size: .7rem; }
  .hero { background-position: 62% center; }
  .hero::before { background: linear-gradient(0deg, rgba(7,11,17,.92) 0%, rgba(7,11,17,.55) 67%, rgba(7,11,17,.1)); }
  .hero-copy { padding-left: 22px; padding-right: 22px; }
  h1 { font-size: clamp(4rem, 22vw, 6.4rem); }
  .hero h1 span { margin-left: .25em; }
  .ticker-rail, .manifesto-grid, .chapter { grid-template-columns: 1fr; }
  .ticker-stamp { min-height: 260px; border-right: 0; border-bottom: 1px solid rgba(18,14,16,.22); }
  .story-window { background-position: 38% center; }
  .story-window::before { background: linear-gradient(0deg, rgba(8,11,14,.94), transparent 80%); }
  .story-card { margin-left: 22px; }
  .rule, .rule + .rule { min-height: 0; padding: 28px 0; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.25); }
  .rule:last-child { border-bottom: 0; }
  .rule .num { margin-bottom: 20px; }
  .footer { grid-template-columns: 1fr; }
  .footer-meta { text-align: left; }
  .chapter { gap: 22px; }
}

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