:root {
  --bg: #10120f;
  --surface: rgba(255, 255, 255, 0.08);
  --surface-strong: rgba(255, 255, 255, 0.14);
  --text: #fff8e9;
  --muted: rgba(255, 248, 233, 0.74);
  --soft: rgba(255, 248, 233, 0.15);
  --accent: #f0b43c;
  --accent-2: #7bd7c2;
  --ink: #17110b;
  --hero: linear-gradient(125deg, #15160f 0%, #301b0c 42%, #7a4d12 100%);
  --pattern: rgba(255, 209, 112, 0.14);
  --shadow: 0 26px 80px rgba(0, 0, 0, 0.34);
  --font-display: Constantia, "Palatino Linotype", Palatino, Georgia, serif;
  --font-body: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  --font-ui: "Segoe UI", "Trebuchet MS", Arial, sans-serif;
  color-scheme: dark;
  font-family: var(--font-body);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

body[data-theme="velvet"] {
  --bg: #170d16;
  --surface: rgba(255, 245, 240, 0.08);
  --surface-strong: rgba(255, 245, 240, 0.15);
  --text: #fff4ef;
  --muted: rgba(255, 244, 239, 0.72);
  --soft: rgba(255, 244, 239, 0.16);
  --accent: #e88a67;
  --accent-2: #d9b65d;
  --ink: #1a0b12;
  --hero: linear-gradient(125deg, #1b0f1f 0%, #5c1741 48%, #cc6a37 100%);
  --pattern: rgba(255, 177, 132, 0.15);
}

body[data-theme="neon"] {
  --bg: #081113;
  --surface: rgba(231, 255, 251, 0.08);
  --surface-strong: rgba(231, 255, 251, 0.15);
  --text: #edfffb;
  --muted: rgba(237, 255, 251, 0.72);
  --soft: rgba(159, 243, 225, 0.16);
  --accent: #55e6c6;
  --accent-2: #f4cf4b;
  --ink: #061514;
  --hero: linear-gradient(125deg, #081113 0%, #103533 48%, #cb9526 100%);
  --pattern: rgba(85, 230, 198, 0.15);
}

body[data-theme="garden"] {
  --bg: #12150d;
  --surface: rgba(255, 252, 230, 0.08);
  --surface-strong: rgba(255, 252, 230, 0.15);
  --text: #fffbe8;
  --muted: rgba(255, 251, 232, 0.72);
  --soft: rgba(204, 224, 146, 0.16);
  --accent: #cfe17a;
  --accent-2: #e0a544;
  --ink: #111507;
  --hero: linear-gradient(125deg, #11150d 0%, #2d4821 45%, #b16b23 100%);
  --pattern: rgba(207, 225, 122, 0.15);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.site {
  min-height: 100vh;
  position: relative;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.70) 0%, rgba(0, 0, 0, 0.42) 46%, rgba(0, 0, 0, 0.76) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.58) 100%),
    url("../assets/tavern-bg.png?v=1") center / cover no-repeat;
  isolation: isolate;
}

.site::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(circle at 18% 72%, rgba(240, 180, 60, 0.22), transparent 22%),
    radial-gradient(circle at 74% 38%, rgba(240, 180, 60, 0.14), transparent 32%);
  mix-blend-mode: screen;
  opacity: 0.55;
  pointer-events: none;
}

#foam-canvas {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.16;
  mix-blend-mode: screen;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
  border-radius: 8px;
  font-size: 21px;
  flex: 0 0 auto;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0;
  white-space: nowrap;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(390px, 0.82fr);
  gap: 70px;
  align-items: center;
  min-height: calc(100vh - 78px);
  padding: 26px 0 66px;
}

.copy {
  max-width: 690px;
}

h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(58px, 7vw, 96px);
  line-height: 0.94;
  letter-spacing: 0;
  font-weight: 800;
  text-wrap: balance;
  text-shadow: 0 16px 42px rgba(0, 0, 0, 0.52);
}

.lead {
  max-width: 610px;
  margin: 28px 0 0;
  color: rgba(255, 248, 233, 0.86);
  font-family: var(--font-body);
  font-size: clamp(18px, 2.1vw, 24px);
  line-height: 1.42;
  text-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

.mini-stats {
  display: flex;
  flex-direction: row;
  gap: 12px;
  width: 100%;
  margin-top: 42px;
}

.stat {
  min-height: 90px;
  padding: 16px;
  background: rgba(15, 10, 4, 0.54);
  border: 1px solid rgba(255, 225, 162, 0.18);
  border-radius: 8px;
  backdrop-filter: blur(14px);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 20px;
  margin-bottom: 7px;
}

.stat span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.cta-row {
  margin-top: 22px;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 58px;
  padding: 16px 26px;
  border: 1px solid rgba(255, 225, 162, 0.45);
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

.cta-button:hover,
.cta-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.30);
  filter: brightness(1.05);
  outline: none;
}

.oracle {
  position: relative;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
}

.oracle-screen {
  min-height: 650px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.mage-stage {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 485px;
  padding: 0;
  background: rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.mage-art {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 485px;
  object-fit: cover;
  object-position: center 28%;
  filter: saturate(1.04) contrast(1.03);
}

.fortune {
  display: grid;
  gap: 12px;
  padding: 22px;
  border-top: 1px solid rgba(255, 225, 162, 0.12);
  background: rgba(18, 10, 4, 0.78);
}

.fortune strong {
  font-family: var(--font-display);
  font-size: 17px;
}

.fortune p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 980px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    padding: 18px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 32px;
  }

  .copy {
    max-width: none;
  }

  .oracle {
    width: min(560px, 100%);
    margin: 0 auto;
  }

}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 24px, 1180px);
  }

  .brand-name {
    white-space: normal;
  }

  .hero {
    gap: 26px;
    padding-bottom: 68px;
  }

  .lead {
    font-size: 18px;
  }

  .mini-stats {
    grid-template-columns: 1fr;
  }

  .stat {
    min-height: 78px;
  }

  .oracle-screen {
    min-height: 500px;
  }

  .mage-stage {
    min-height: 420px;
    padding-inline: 12px;
  }

  .mage-art {
    min-height: 420px;
    object-position: center 24%;
  }
}
