:root {
  --bg: #1d1410;
  --bg-2: #2a1c15;
  --panel: rgba(42, 28, 21, 0.86);
  --ink: #f6e9d4;
  --muted: #c9b294;
  --orange: #e8792b;
  --gold: #f2b544;
  --teal: #3aa7a3;
  --red: #b8362c;
  --purple: #7c4dbd;
  --cream: #fbf3e4;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Karla", system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* The rug that ties the room together */
.rug {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.18;
  background:
    repeating-linear-gradient(45deg, transparent 0 22px, var(--red) 22px 26px, transparent 26px 48px),
    repeating-linear-gradient(-45deg, transparent 0 22px, var(--gold) 22px 26px, transparent 26px 48px),
    radial-gradient(circle at 50% 50%, var(--teal) 0 6px, transparent 7px) 0 0 / 48px 48px,
    var(--bg-2);
}

a { color: var(--gold); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(29, 20, 16, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 3px solid var(--orange);
}
.logo {
  font-family: "Bungee", sans-serif;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.2rem;
  white-space: nowrap;
}
.site-header nav { display: flex; gap: 18px; flex-wrap: wrap; justify-content: flex-end; }
.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.site-header nav a:hover { color: var(--gold); }

main { max-width: 1000px; margin: 0 auto; padding: 0 16px 48px; }

/* Hero */
.hero { text-align: center; padding: 72px 0 48px; }
.eyebrow { color: var(--teal); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; margin: 0; }
.hero h1 {
  font-family: "Bungee Shade", "Bungee", sans-serif;
  font-weight: 400;
  font-size: clamp(2.8rem, 10vw, 6rem);
  line-height: 1;
  margin: 16px 0;
  color: var(--gold);
  text-shadow: 4px 4px 0 var(--red);
}
.hero h1 span { color: var(--orange); display: block; }
.lede { max-width: 620px; margin: 0 auto 28px; color: var(--muted); font-size: 1.15rem; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-block;
  font: 700 1rem "Karla", sans-serif;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--orange);
  background: var(--orange);
  color: var(--bg);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); background: var(--gold); border-color: var(--gold); }
.btn-ghost { background: transparent; color: var(--orange); }
.btn-ghost:hover { color: var(--bg); }

.pins { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 48px; animation: wobble 4s ease-in-out infinite; }
.pins div { display: flex; gap: 8px; }
.pins span {
  width: 22px; height: 34px;
  background: var(--cream);
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  box-shadow: inset 0 9px 0 -5px var(--red);
}
@keyframes wobble { 50% { transform: rotate(2deg); } }

/* Panels */
.panel {
  background: var(--panel);
  border-radius: var(--radius);
  padding: 36px clamp(20px, 4vw, 44px);
  margin: 32px 0;
  box-shadow: var(--shadow);
  border: 1px solid rgba(242, 181, 68, 0.2);
}
.panel h2 {
  font-family: "Bungee", sans-serif;
  font-weight: 400;
  color: var(--orange);
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin: 0 0 8px;
}
.sub { color: var(--muted); margin-top: 0; }

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.pull {
  margin: 24px 0 0;
  padding: 18px 24px;
  border-left: 6px solid var(--teal);
  background: rgba(58, 167, 163, 0.12);
  font-size: 1.2rem;
  font-style: italic;
  border-radius: 0 12px 12px 0;
}

.precepts { counter-reset: p; list-style: none; padding: 0; display: grid; gap: 12px; }
.precepts li {
  counter-increment: p;
  position: relative;
  padding: 12px 16px 12px 64px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
}
.precepts li::before {
  content: counter(p);
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--gold); color: var(--bg);
  font-family: "Bungee", sans-serif;
}
.precepts strong { color: var(--gold); }

/* Oracle */
.oracle-form { display: flex; gap: 10px; flex-wrap: wrap; }
.oracle-form input {
  flex: 1 1 240px;
  font: inherit;
  padding: 12px 18px;
  border-radius: 999px;
  border: 2px solid var(--muted);
  background: var(--cream);
  color: var(--bg);
}
.oracle-form input:focus { outline: 3px solid var(--teal); border-color: var(--teal); }
.ball-wrap { display: flex; align-items: center; gap: 28px; margin-top: 28px; flex-wrap: wrap; justify-content: center; }
.ball {
  position: relative;
  width: 140px; height: 140px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #9a6be0, var(--purple) 45%, #2e1752 100%);
  box-shadow: var(--shadow), inset -10px -14px 24px rgba(0, 0, 0, 0.4);
}
.ball .hole { position: absolute; width: 18px; height: 18px; border-radius: 50%; background: #120a1f; }
.ball .hole:nth-child(1) { top: 34px; left: 48px; }
.ball .hole:nth-child(2) { top: 34px; left: 76px; }
.ball .hole:nth-child(3) { top: 66px; left: 62px; width: 22px; height: 22px; }
.ball.rolling { animation: roll 0.9s ease-in-out; }
@keyframes roll {
  0% { transform: rotate(0); }
  25% { transform: translateX(-12px) rotate(-90deg); }
  50% { transform: translateX(12px) rotate(180deg); }
  75% { transform: translateX(-6px) rotate(300deg); }
  100% { transform: rotate(360deg); }
}
.oracle-answer {
  flex: 1 1 280px;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--cream);
  min-height: 3em;
  margin: 0;
}

/* Quiz */
.quiz fieldset { border: none; padding: 0; margin: 0 0 22px; }
.quiz legend { font-weight: 700; color: var(--gold); margin-bottom: 8px; }
.quiz label {
  display: block;
  padding: 10px 14px;
  margin: 6px 0;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  border: 2px solid transparent;
}
.quiz label:hover { border-color: var(--muted); }
.quiz input { accent-color: var(--orange); margin-right: 10px; }
.quiz label:has(input:checked) { border-color: var(--orange); background: rgba(232, 121, 43, 0.15); }
.quiz-result {
  margin-top: 20px;
  padding: 22px;
  border-radius: 14px;
  background: var(--cream);
  color: var(--bg);
}
.quiz-result h3 { font-family: "Bungee", sans-serif; font-weight: 400; margin: 0 0 6px; color: var(--red); }
.quiz-result p { margin: 0; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.card {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  padding: 22px;
  border-top: 5px solid var(--teal);
  transition: transform 0.2s;
}
.card:nth-child(3n+2) { border-top-color: var(--orange); }
.card:nth-child(3n) { border-top-color: var(--purple); }
.card:hover { transform: translateY(-4px) rotate(-0.6deg); }
.card .emoji { font-size: 2.2rem; }
.card h3 { font-family: "Bungee", sans-serif; font-weight: 400; margin: 6px 0; color: var(--gold); }
.card p { margin: 0; color: var(--muted); font-size: 0.98rem; }

/* Bowling lane */
.lane {
  position: relative;
  height: 320px;
  max-width: 280px;
  margin: 0 auto;
  border-radius: 12px;
  background:
    linear-gradient(90deg, #3a2a20 0 14px, transparent 14px calc(100% - 14px), #3a2a20 calc(100% - 14px)),
    repeating-linear-gradient(90deg, #d9a35f 0 18px, #c98f4c 18px 20px);
  box-shadow: var(--shadow), inset 0 0 30px rgba(0, 0, 0, 0.35);
  cursor: pointer;
  overflow: hidden;
}
.lane:focus-visible { outline: 3px solid var(--teal); }
.lane-pins { position: absolute; top: 18px; left: 0; right: 0; height: 90px; }
.pin {
  position: absolute;
  width: 16px; height: 24px;
  margin-left: -8px;
  background: var(--cream);
  border-radius: 50% 50% 40% 40% / 60% 60% 40% 40%;
  box-shadow: inset 0 7px 0 -4px var(--red);
  transition: transform 0.4s, opacity 0.4s;
}
.pin.down { transform: rotate(80deg) translateY(-10px); opacity: 0.25; }
.lane-ball {
  position: absolute;
  bottom: 18px; left: 50%;
  width: 34px; height: 34px;
  margin-left: -17px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #9a6be0, var(--purple) 50%, #2e1752);
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.6, 1);
}
.bowl-result { text-align: center; font-weight: 700; font-size: 1.2rem; margin: 18px 0 0; min-height: 1.6em; }

/* Bar */
.recipe { display: flex; gap: 32px; align-items: center; flex-wrap: wrap; }
.recipe ul { flex: 1 1 260px; margin: 0; padding-left: 20px; }
.recipe li { margin: 6px 0; }
.recipe b { color: var(--gold); }
.glass {
  position: relative;
  width: 110px; height: 120px;
  flex: none;
  margin: 0 auto;
  border: 4px solid rgba(255, 255, 255, 0.6);
  border-top: none;
  border-radius: 0 0 18px 18px;
  overflow: hidden;
}
.glass .kahlua { position: absolute; inset: 40% 0 0; background: #4a2b18; }
.glass .cream {
  position: absolute; inset: 22% 0 50%;
  background: var(--cream);
  z-index: 1;
  animation: swirl 5s ease-in-out infinite;
  border-radius: 40% 60% 50% 50% / 30% 30% 70% 70%;
}
@keyframes swirl { 50% { transform: translateY(14px) scaleX(1.1); border-radius: 60% 40% 50% 50%; } }
.fineprint { color: var(--muted); font-size: 0.9rem; margin: 20px 0 0; }

/* Footer */
.site-footer {
  text-align: center;
  padding: 36px 16px 48px;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 3px solid var(--orange);
  background: rgba(29, 20, 16, 0.92);
}
.stranger { font-style: italic; color: var(--ink); font-size: 1.05rem; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header { flex-direction: column; padding: 10px 16px; gap: 6px; }
  .site-header nav { gap: 12px; justify-content: center; }
  .hero { padding-top: 40px; }
}

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