/* ── Romaine.st — board-game design system ─────────────────────────────────── */
:root {
  --cream: #F5EFDC;
  --cream-hi: #FAF6E9;
  --ink: #1C1B17;
  --red: #E5393F;
  --red-deep: #B5232B;
  --green: #1FB25A;
  --green-deep: #178A46;
  --gold: #C9A227;
  --blue: #2E7BC4;
  --felt: #0B1F19;
  --display: "Passion One", "Arial Black", sans-serif;
  --label: "Oswald", "Arial Narrow", sans-serif;
  --body: "Public Sans", -apple-system, "Segoe UI", sans-serif;
  --border: 3px solid var(--ink);
  --card-shadow: 8px 8px 0 rgba(12, 22, 17, 0.35);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* scroll smoothing is handled by Lenis (CSS smooth-scroll would fight it) */

body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--felt);
  overflow-x: hidden;
}

/* ── 3D stage ── */
#scene {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* ── loader ── */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}
#loader p {
  font-family: var(--label);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
}
.loader-die {
  width: 64px;
  height: 64px;
  background: var(--cream-hi);
  border: var(--border);
  border-radius: 12px;
  box-shadow: 5px 5px 0 rgba(28, 27, 23, 0.25);
  display: grid;
  grid-template: repeat(3, 1fr) / repeat(3, 1fr);
  padding: 8px;
  animation: dieshake 1.1s ease-in-out infinite;
}
.loader-die span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--ink);
  place-self: center;
}
.loader-die span:nth-child(1) { grid-area: 1 / 1; }
.loader-die span:nth-child(2) { grid-area: 1 / 3; }
.loader-die span:nth-child(3) { grid-area: 2 / 2; }
.loader-die span:nth-child(4) { grid-area: 3 / 1; }
.loader-die span:nth-child(5) { grid-area: 3 / 3; }
@keyframes dieshake {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  25% { transform: rotate(6deg) translateY(-10px); }
  50% { transform: rotate(-4deg) translateY(0); }
  75% { transform: rotate(9deg) translateY(-6px); }
}

/* ── nav ── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 28px;
  pointer-events: none;
}
#nav > * { pointer-events: auto; }
.logo-chip {
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.04em;
  color: #FFFDF5;
  background: var(--red);
  border: var(--border);
  border-radius: 8px;
  padding: 4px 14px 6px;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(12, 22, 17, 0.4);
  transition: transform 0.15s ease;
}
.logo-chip:hover { transform: translate(-1px, -2px) rotate(-1deg); }
#nav nav { display: flex; gap: 22px; margin-left: auto; }
#nav nav a {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  border-bottom: 2px solid transparent;
  padding-bottom: 2px;
}
#nav nav a:hover { border-bottom-color: var(--red); }
.btn-money {
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--ink);
  background: #BFE3C2;
  border: var(--border);
  border-radius: 6px;
  padding: 8px 18px;
  text-decoration: none;
  box-shadow: 4px 4px 0 rgba(12, 22, 17, 0.4);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-money:hover { transform: translate(-1px, -2px); box-shadow: 6px 6px 0 rgba(12, 22, 17, 0.4); }

/* ── theme song button ── */
.theme-btn {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: var(--border);
  background: var(--cream-hi);
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 4px 4px 0 rgba(12, 22, 17, 0.4);
  transition: transform 0.15s ease, background 0.2s ease, color 0.2s ease;
}
.theme-btn:hover { transform: translate(-1px, -2px); }
.theme-btn.playing {
  background: var(--red);
  color: #FFFDF5;
}
.theme-btn.playing span {
  display: inline-block;
  animation: notebounce 0.34s ease-in-out infinite alternate;
}
@keyframes notebounce {
  from { transform: rotate(-12deg) translateY(0); }
  to { transform: rotate(10deg) translateY(-3px); }
}

/* ── sections ── */
#content { position: relative; z-index: 10; pointer-events: none; }
section {
  min-height: 120vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 12vh 6vw;
  position: relative;
}
section#hero { min-height: 100vh; justify-content: flex-end; padding-bottom: 5vh; }
section#cta { min-height: 120vh; }
.sec-center { align-items: center; text-align: center; }
.sec-left   { align-items: flex-start; }
.sec-right  { align-items: flex-end; }

/* ── hero ── */
.hero-inner { pointer-events: auto; max-width: 880px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.kicker {
  display: inline-block;
  font-family: var(--label);
  font-weight: 600;
  font-size: clamp(11px, 1.2vw, 14px);
  letter-spacing: 0.34em;
  text-indent: 0.34em; /* optically recentre the letterspaced text */
  color: var(--cream-hi);
  background: var(--ink);
  border-radius: 6px;
  padding: 8px 18px 9px;
  box-shadow: 4px 4px 0 rgba(12, 22, 17, 0.35);
  margin-bottom: 20px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(64px, 11vw, 158px);
  line-height: 0.92;
  letter-spacing: 0.01em;
  color: #FFFDF5;
  background: var(--red);
  border: 4px solid var(--ink);
  border-radius: 16px;
  box-shadow: 10px 10px 0 rgba(12, 22, 17, 0.45), inset 0 -8px 0 var(--red-deep);
  display: inline-block;
  padding: 8px 36px 18px;
  transform: rotate(-1.2deg);
}
.wordmark .dot { color: #FFE9B8; }
.tagline {
  display: inline-block;
  margin: 26px auto 0;
  font-size: clamp(15px, 1.8vw, 19px);
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream-hi);
  border: var(--border);
  border-radius: 12px;
  padding: 16px 28px 18px;
  box-shadow: 6px 6px 0 rgba(12, 22, 17, 0.35);
  transform: rotate(0.7deg); /* plays against the banner's -1.2deg tilt */
}
.tagline strong { color: var(--red); }
.hero-ctas { margin-top: 34px; display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

.btn-red, .btn-ghost {
  font-family: var(--label);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.14em;
  text-decoration: none;
  border-radius: 8px;
  padding: 14px 30px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn-red {
  color: #FFFDF5;
  background: var(--red);
  border: var(--border);
  box-shadow: 5px 5px 0 rgba(12, 22, 17, 0.45);
}
.btn-red:hover { transform: translate(-1px, -3px); box-shadow: 8px 8px 0 rgba(12, 22, 17, 0.45); }
.btn-ghost {
  color: var(--cream-hi);
  background: rgba(12, 22, 17, 0.35);
  border: 3px solid var(--cream-hi);
}
.btn-ghost:hover { background: rgba(12, 22, 17, 0.6); transform: translate(-1px, -3px); }

.scroll-hint {
  margin: 60px auto 0;
  width: 26px;
  height: 44px;
  border: 3px solid var(--cream-hi);
  border-radius: 14px;
  opacity: 0.8;
}
.scroll-hint span {
  display: block;
  width: 5px;
  height: 9px;
  border-radius: 3px;
  background: var(--cream-hi);
  margin: 7px auto 0;
  animation: hintdrop 1.6s ease-in-out infinite;
}
@keyframes hintdrop {
  0% { transform: translateY(0); opacity: 1; }
  70% { transform: translateY(16px); opacity: 0; }
  100% { transform: translateY(0); opacity: 0; }
}

/* ── panels ── */
.panel {
  pointer-events: auto;
  max-width: 560px;
  background: rgba(250, 246, 233, 0.97);
  border: var(--border);
  border-radius: 14px;
  box-shadow: var(--card-shadow);
  padding: 34px 38px 38px;
}
.panel h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(34px, 4.2vw, 52px);
  line-height: 1.0;
  letter-spacing: 0.01em;
  margin: 10px 0 16px;
}
.panel h2 em { color: var(--red); font-style: normal; }
.panel p { font-size: 16px; line-height: 1.65; }
.panel p + p { margin-top: 12px; }
.tile-tag {
  display: inline-block;
  font-family: var(--label);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.2em;
  color: #FFFDF5;
  background: var(--ink);
  border-radius: 5px;
  padding: 5px 12px 6px;
}
.tile-tag.deed-blue { background: var(--blue); }

.chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.chips li {
  font-family: var(--label);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  background: var(--cream);
  box-shadow: 3px 3px 0 rgba(12, 22, 17, 0.2);
}

/* ── deeds (portfolio) ── */
.deeds {
  pointer-events: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  margin-top: 34px;
  max-width: 1080px;
}
.deed {
  width: 235px;
  background: var(--cream-hi);
  border: var(--border);
  border-radius: 10px;
  box-shadow: var(--card-shadow);
  overflow: hidden;
  transition: transform 0.2s ease;
}
.deed:hover { transform: translateY(-8px) rotate(-1deg); }
.deed header {
  background: var(--deed, var(--green));
  color: #FFFDF5;
  text-align: center;
  font-family: var(--label);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.22em;
  padding: 12px 10px;
  border-bottom: var(--border);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.deed header strong {
  display: block;
  font-family: var(--display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.deed-cat {
  text-align: center;
  font-size: 12.5px;
  font-style: italic;
  padding: 10px 12px 4px;
  color: #555048;
}
.deed ul { list-style: none; padding: 8px 16px 16px; }
.deed li {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 6px 2px;
  border-bottom: 1px dashed rgba(28, 27, 23, 0.25);
}
.deed li:last-child { border-bottom: none; }
.deed li span:first-child { font-weight: 600; }
.deed li.hot span:last-child { color: var(--red); font-weight: 700; }

/* ── card stacks ── */
.panel-slim { max-width: 520px; }
.stacks {
  pointer-events: auto;
  display: flex;
  gap: 40px;
  margin-top: 44px;
  flex-wrap: wrap;
  justify-content: center;
}
.stack3d { perspective: 1200px; cursor: pointer; }
.flipcard {
  position: relative;
  width: 300px;
  height: 195px;
  transform-style: preserve-3d;
  transition: transform 0.1s;
}
.face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border: var(--border);
  border-radius: 12px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.face-front span {
  font-family: var(--display);
  font-weight: 900;
  font-size: 92px;
  line-height: 1;
  color: #FFFDF5;
  text-shadow: 3px 3px 0 rgba(0, 0, 0, 0.25);
}
.face-front em {
  font-family: var(--label);
  font-weight: 600;
  font-style: normal;
  font-size: 15px;
  letter-spacing: 0.3em;
  color: #FFFDF5;
}
.face-chance { background: #E5722A; }
.face-chest { background: var(--gold); }
.face-back {
  background: var(--cream-hi);
  transform: rotateY(180deg);
  padding: 18px 24px;
  text-align: center;
}
.face-back h3 {
  font-family: var(--label);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.26em;
  color: var(--red);
}
.face-back p { font-size: 14.5px; line-height: 1.5; }
.face-back small {
  font-family: var(--label);
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  opacity: 0.55;
}
.stack-label {
  text-align: center;
  margin-top: 14px;
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.24em;
  color: var(--cream);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

/* ── jail card ── */
.jail-card {
  margin-top: 24px;
  display: flex;
  gap: 18px;
  align-items: center;
  background: var(--cream);
  border: var(--border);
  border-radius: 10px;
  padding: 18px 20px;
  box-shadow: 4px 4px 0 rgba(12, 22, 17, 0.2);
}
.jail-bars {
  flex: 0 0 64px;
  height: 84px;
  border: 3px solid var(--ink);
  border-radius: 6px;
  background:
    repeating-linear-gradient(90deg,
      transparent 0 9px, var(--ink) 9px 13px) #F7941D;
}
.jail-card h3 {
  font-family: var(--label);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
  color: var(--red-deep);
}
.jail-card p { font-size: 14px; line-height: 1.55; }

/* ── stats ── */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 26px;
}
.stats div {
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--cream);
  padding: 14px 18px;
  box-shadow: 3px 3px 0 rgba(12, 22, 17, 0.18);
}
.stats strong {
  display: block;
  font-family: var(--display);
  font-weight: 900;
  font-size: 34px;
  color: var(--red);
  line-height: 1;
}
.stats span {
  font-family: var(--label);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ── CTA ── */
.panel-cta {
  max-width: 640px;
  text-align: center;
  /* stop near centre instead of riding the overscroll to the top */
  position: sticky;
  top: max(10vh, calc(50vh - 300px));
}
.panel-cta .big {
  font-size: clamp(56px, 8vw, 96px);
  margin-bottom: 24px;
}
.btn-roll {
  font-size: clamp(20px, 2.6vw, 30px);
  padding: 24px 54px;
  display: inline-flex;
  align-items: center;
  gap: 20px;
  letter-spacing: 0.16em;
  transition: font-size 0.4s ease, padding 0.4s ease, gap 0.4s ease;
}
.btn-roll:disabled { opacity: 0.75; cursor: wait; transform: none; }
.btn-roll .die-ico {
  font-size: 1.55em;
  line-height: 0.8;
  display: inline-block;
  animation: diewobble 2.2s ease-in-out infinite;
}
.btn-roll .d2 { animation-delay: -1.1s; }
@keyframes diewobble {
  0%, 100% { transform: rotate(-10deg); }
  50% { transform: rotate(12deg); }
}
.btn-roll.rolling .die-ico { animation: diespin 0.3s linear infinite; }
@keyframes diespin { to { transform: rotate(360deg); } }
.btn-roll.rolled { font-size: 16px; padding: 14px 30px; gap: 12px; }
.roll-sub {
  margin-top: 18px;
  font-size: 14px;
  font-style: italic;
  opacity: 0.65;
}
.roll-result {
  display: none;
  margin-top: 22px;
  font-size: 17px;
  line-height: 1.5;
  overflow: hidden;
}
.roll-result.shown { display: block; }
.roll-result strong { color: var(--red); }
.cta-reveal { display: none; margin-top: 18px; overflow: hidden; }
.cta-reveal.shown { display: block; }
.reveal-line { font-style: italic; opacity: 0.8; margin-bottom: 12px; }
.email {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(26px, 4vw, 40px);
  color: var(--ink);
  text-decoration: none;
  border-bottom: 4px solid var(--red);
}
.email:hover { color: var(--red); }

footer {
  pointer-events: auto;
  margin-top: 14vh;
  text-align: center;
  color: var(--cream);
  font-size: 13.5px;
  background: rgba(12, 22, 17, 0.62);
  border-radius: 12px;
  padding: 14px 26px;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
footer .fine { margin-top: 8px; font-size: 11.5px; opacity: 0.65; }

/* ── responsive ── */
@media (max-width: 760px) {
  #nav { padding: 10px 14px; gap: 12px; }
  #nav nav { display: none; }
  .logo-chip { font-size: 17px; }
  section { padding: 10vh 6vw; min-height: 105vh; }
  .sec-left, .sec-right { align-items: center; }
  .panel { padding: 26px 24px 30px; }
  .wordmark { padding: 6px 18px 12px; }
  .kicker { display: none; } /* the 3-D banner already says it */
  .tagline { padding: 12px 18px 14px; }
  .deeds { justify-content: center; }
  .deed { width: min(280px, 86vw); }
  .flipcard { width: min(300px, 84vw); }
  .stats strong { font-size: 27px; }
}

/* short landscape screens: keep the 3-D banner visible above the wordmark */
@media (min-width: 761px) and (max-height: 980px) {
  .wordmark { font-size: clamp(56px, 8vw, 112px); }
  .tagline { margin-top: 20px; font-size: 16px; }
  .hero-ctas { margin-top: 24px; }
  .scroll-hint { margin-top: 36px; }
}

/* ── reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  .loader-die, .scroll-hint span, .btn-roll .die-ico { animation: none; }
}
