:root {
  --ink: #050505;
  --cream: #fff0e7;
  --peach: #f29a78;
  --peach-deep: #d85d43;
  --cyan: #8cecff;
  --line: rgba(255, 228, 214, 0.2);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--cream);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; }

.site-nav {
  position: fixed;
  z-index: 50;
  top: 18px;
  left: 50%;
  width: min(1160px, calc(100% - 32px));
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 10px 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(5, 5, 5, 0.72);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 40px rgba(0,0,0,.28);
}
.brand { display: flex; align-items: center; gap: 10px; font: 900 1rem/1 Impact, sans-serif; letter-spacing: .06em; }
.brand-knot {
  width: 30px; height: 30px; border-radius: 48% 52% 43% 57% / 56% 42% 58% 44%;
  background: repeating-radial-gradient(circle at 45% 45%, #ffb094 0 3px, #dd7356 4px 7px);
  box-shadow: inset -5px -5px 9px rgba(94,27,15,.55), 0 0 22px rgba(242,154,120,.38);
  transform: rotate(-12deg);
}
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-link { padding: 10px 14px; border-radius: 999px; color: #e9d9d1; font-weight: 700; font-size: .86rem; }
.nav-link:hover, .nav-link:focus-visible { background: rgba(255,255,255,.09); color: white; outline: none; }

.hero {
  min-height: 100svh;
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  background: #000 url('assets/backgrounds/hero-background.png') center/cover no-repeat;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(0,0,0,.94) 0%, rgba(0,0,0,.69) 34%, rgba(0,0,0,.08) 68%),
              linear-gradient(0deg, #050505 0%, transparent 25%);
}
.hero::after {
  content: '';
  position: absolute; inset: auto 0 0; height: 26%; z-index: -1;
  background: linear-gradient(transparent, #050505);
}
.hero-inner, .section-inner { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.hero-copy { width: min(650px, 60vw); padding-top: 100px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  margin: 0 0 18px; color: var(--peach); font-weight: 900; font-size: .78rem; letter-spacing: .18em;
}
.eyebrow::before { content: ''; width: 34px; height: 3px; background: var(--peach); box-shadow: 0 0 16px var(--peach); }
h1, h2, h3 { margin: 0; font-family: Impact, Haettenschweiler, "Arial Narrow Bold", sans-serif; font-weight: 900; text-transform: uppercase; }
h1 {
  max-width: 780px;
  font-size: clamp(4rem, 10.5vw, 9.5rem);
  line-height: .78;
  letter-spacing: -.035em;
  color: var(--cream);
  text-shadow: 0 5px 0 #9c402d, 0 10px 40px rgba(242,154,120,.34);
}
h1 .hat { display: block; color: var(--peach); transform: translateX(.12em) rotate(-2deg); }
.hero-lede { max-width: 520px; margin: 28px 0 0; color: #e7d7cf; font-size: clamp(1rem, 1.55vw, 1.22rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 30px; }
.yarn-button {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; padding: 0 24px;
  border: 0; cursor: pointer;
  color: #1b0905; background: linear-gradient(135deg, #ffd1bd, #ef8767 60%, #cb513c);
  border-radius: 46% 54% 48% 52% / 56% 43% 57% 44%;
  box-shadow: inset 0 2px 1px rgba(255,255,255,.55), inset 0 -6px 12px rgba(116,36,21,.34), 0 14px 35px rgba(225,101,70,.24);
  font-weight: 950; letter-spacing: .04em;
  transition: transform .2s ease, filter .2s ease;
}
.yarn-button::before {
  content: ''; width: 13px; height: 13px; border-radius: 42% 58% 49% 51%;
  background: repeating-radial-gradient(circle, #8e321f 0 2px, #ffc2aa 3px 4px);
  box-shadow: 0 0 0 3px rgba(255,239,230,.35);
}
.yarn-button:hover, .yarn-button:focus-visible { transform: translateY(-4px) rotate(-1deg); filter: brightness(1.08); outline: 3px solid var(--cyan); outline-offset: 4px; }
.yarn-button.ghost { color: var(--cream); background: rgba(8,8,8,.72); border: 1px solid rgba(255,196,172,.4); box-shadow: inset 0 0 24px rgba(242,154,120,.1); }
.yarn-button.is-copied { background: var(--cyan); }

.ca-strip {
  display: flex; align-items: center; gap: 14px; width: fit-content; max-width: 100%; margin-top: 18px;
  padding: 10px 16px; border-left: 3px solid var(--cyan); background: rgba(0,0,0,.56); backdrop-filter: blur(10px);
  color: #cfd9da; font: 700 .78rem/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
}
.ca-strip code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chapter { position: relative; padding: clamp(90px, 12vw, 160px) 0; overflow: hidden; }
.chapter-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(40px, 8vw, 110px); align-items: center; }
.display-card {
  position: relative; aspect-ratio: 4/5; border: 1px solid rgba(255,205,184,.25); border-radius: 46% 54% 52% 48% / 38% 44% 56% 62%;
  background: url('assets/backgrounds/lore-background.png') 24% center/cover no-repeat;
  box-shadow: var(--shadow), inset 0 0 0 10px rgba(0,0,0,.33);
  transform: rotate(-2deg);
}
.display-card::after { content: '01 / HAT AUTHORITY'; position: absolute; right: -24px; bottom: 45px; padding: 9px 14px; background: var(--cyan); color: #051316; font-weight: 950; font-size: .72rem; letter-spacing: .12em; transform: rotate(4deg); }
.section-title { font-size: clamp(3.2rem, 7vw, 6.6rem); line-height: .86; letter-spacing: -.025em; }
.section-title em { display: block; color: var(--peach); font-style: normal; }
.section-copy { max-width: 590px; margin: 26px 0; color: #cfc1ba; font-size: 1.05rem; }
.rule-list { display: grid; gap: 10px; padding: 0; margin: 30px 0 0; list-style: none; }
.rule-list li { display: grid; grid-template-columns: 46px 1fr; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding: 16px 0; font-weight: 800; }
.rule-list b { color: var(--peach); font: 900 1.35rem/1 Impact, sans-serif; }

.moods { padding: 90px 0 140px; background: radial-gradient(circle at 50% 0%, rgba(217,86,56,.22), transparent 42%); }
.mood-shell { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 40px; }
.mood-tabs { display: grid; gap: 12px; }
.mood-tab {
  display: grid; grid-template-columns: 70px 1fr; align-items: center; text-align: left;
  min-height: 88px; padding: 13px 18px; border: 1px solid var(--line); border-radius: 22px; color: #d9ccc6; background: rgba(255,255,255,.035); cursor: pointer;
}
.mood-tab span:first-child { font: 900 2rem/1 Impact, sans-serif; color: var(--peach); }
.mood-tab.active { transform: translateX(14px); color: #170907; background: var(--peach); box-shadow: 0 16px 50px rgba(242,154,120,.22); }
.mood-tab.active span:first-child { color: #fff0e7; }
.mood-stage { min-height: 288px; display: flex; flex-direction: column; justify-content: flex-end; padding: 34px; border-radius: 40px 24px 44px 30px; background: linear-gradient(145deg, #17100d, #080808); border: 1px solid var(--line); box-shadow: inset 0 0 70px rgba(242,154,120,.08); }
.mood-stage h3 { color: var(--peach); font-size: clamp(2.6rem, 6vw, 5rem); line-height: .9; }
.mood-stage p { max-width: 390px; margin: 16px 0 0; color: #d7c9c3; }

.final-cta { position: relative; min-height: 72vh; display: grid; place-items: center; text-align: center; background: linear-gradient(rgba(0,0,0,.18), #050505), url('assets/backgrounds/hero-background.png') center 46%/cover no-repeat; }
.final-cta::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle, transparent 5%, rgba(0,0,0,.86) 82%); }
.final-cta .section-inner { position: relative; }
.final-cta h2 { font-size: clamp(4rem, 10vw, 9rem); line-height: .8; text-shadow: 0 5px 0 #a34834; }
.final-cta .button-row { justify-content: center; }

.lore-hero {
  min-height: 100svh; display: grid; align-items: end; position: relative; isolation: isolate;
  background: #000 url('assets/backgrounds/lore-background.png') center/cover no-repeat;
}
.lore-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgba(0,0,0,.1), rgba(0,0,0,.35) 45%, rgba(0,0,0,.9) 80%), linear-gradient(0deg, #050505 0, transparent 48%); }
.lore-copy { width: min(620px, 50vw); margin: 0 0 10vh auto; }
.lore-copy h1 { font-size: clamp(4rem, 9vw, 8.2rem); }
.lore-copy p { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: #f1dfd6; }
.lore-body { padding: 110px 0 150px; }
.lore-prose { width: min(760px, 100%); margin: auto; }
.lore-prose p { margin: 0 0 1.4em; font-size: clamp(1.15rem, 2.1vw, 1.55rem); color: #d8c9c2; }
.lore-prose p:first-of-type::first-letter { float: left; margin: 7px 11px 0 0; color: var(--peach); font: 900 5.7rem/.72 Impact, sans-serif; }
.lore-quote { margin: 70px 0; padding: 38px 0; border-block: 1px solid var(--line); color: var(--cream); font: 900 clamp(2.6rem, 6vw, 5.5rem)/.9 Impact, sans-serif; text-transform: uppercase; }

.site-footer { display: flex; justify-content: space-between; gap: 20px; padding: 34px max(20px, calc((100vw - 1160px)/2)); border-top: 1px solid var(--line); color: #927f77; font-size: .82rem; }
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .65s ease, transform .65s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (max-width: 800px) {
  .site-nav { top: 10px; }
  .nav-link:not(.nav-keep) { display: none; }
  .hero { background-position: 63% center; align-items: end; }
  .hero::before { background: linear-gradient(0deg, #050505 0, rgba(0,0,0,.88) 38%, rgba(0,0,0,.05) 78%); }
  .hero-copy { width: 100%; padding: 0 0 10vh; }
  h1 { font-size: clamp(4rem, 19vw, 7rem); }
  .hero-lede { max-width: 92%; }
  .chapter-grid, .mood-shell { grid-template-columns: 1fr; }
  .display-card { width: min(86vw, 470px); margin: auto; }
  .mood-tab.active { transform: translateX(6px); }
  .lore-hero { background-position: 32% center; }
  .lore-hero::before { background: linear-gradient(0deg, #050505 0, rgba(0,0,0,.8) 48%, rgba(0,0,0,.1)); }
  .lore-copy { width: 100%; margin: 0 0 8vh; }
  .site-footer { flex-direction: column; }
}

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