:root {
  --sand: #f1d37a;
  --sand-soft: #2a2417;
  --ink: #f5f0df;
  --muted: #b8c1bd;
  --oasis: #2dd4bf;
  --oasis-dark: #14a69a;
  --palm: #69b56d;
  --coral: #ff8a65;
  --night: #071015;
  --paper: #101a1f;
  --line: rgba(241, 211, 122, 0.16);
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  background:
    radial-gradient(circle at 12% 8%, rgba(45, 212, 191, 0.18), transparent 24rem),
    radial-gradient(circle at 82% 18%, rgba(255, 138, 101, 0.1), transparent 22rem),
    linear-gradient(180deg, #081116 0%, #10171c 44%, #0b1418 100%);
  letter-spacing: 0;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 56px);
  background: rgba(7, 16, 21, 0.9);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  font-weight: 900;
  background: linear-gradient(135deg, var(--oasis), var(--palm));
  border: 2px solid rgba(241, 211, 122, 0.35);
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(17, 127, 130, 0.24);
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 1rem;
}

.brand small {
  color: var(--muted);
  font-size: 0.78rem;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 6px;
}

.main-nav a,
.discord-link,
.primary-button,
.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-radius: 8px;
  font-weight: 750;
  text-decoration: none;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.main-nav a {
  color: var(--muted);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--oasis);
  background: rgba(45, 212, 191, 0.12);
}

.discord-link,
.primary-button {
  color: #061013;
  background: var(--oasis-dark);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.discord-link:hover,
.primary-button:hover,
.secondary-button:hover {
  transform: translateY(-1px);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101a1f;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: var(--ink);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.hero {
  position: relative;
  min-height: min(690px, calc(100vh - 74px));
  display: flex;
  align-items: center;
  overflow: hidden;
  background-image: url("assets/oasis-hero.png");
  background-position: center;
  background-size: cover;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 120px;
  background: linear-gradient(180deg, transparent, #081116);
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(20, 35, 52, 0.82), rgba(20, 35, 52, 0.32) 48%, rgba(20, 35, 52, 0.06)),
    linear-gradient(0deg, rgba(17, 127, 130, 0.18), transparent 46%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(680px, calc(100% - 32px));
  margin-left: clamp(16px, 7vw, 92px);
  color: white;
  padding-bottom: 72px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 850;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: var(--sand);
}

h2,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(2.1rem, 7vw, 5.8rem);
  line-height: 0.96;
  overflow-wrap: normal;
  word-break: normal;
}

h2 {
  margin: 0 0 12px;
  font-size: clamp(1.28rem, 2vw, 1.85rem);
  line-height: 1.15;
}

p {
  line-height: 1.68;
}

.hero-content p:not(.eyebrow) {
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.5vw, 1.18rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.primary-button,
.secondary-button {
  border: 1px solid transparent;
  cursor: pointer;
  font: inherit;
}

.secondary-button {
  color: white;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.38);
}

.section,
.page-title {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.section {
  padding: clamp(34px, 6vw, 72px) 0;
}

.page-title {
  padding: clamp(46px, 8vw, 92px) 0 18px;
}

.page-title p {
  max-width: 820px;
  color: var(--muted);
  font-size: 1.08rem;
}

.page-title h1::before {
  content: "✦ ";
  color: var(--oasis);
}

.page-title h1::after {
  content: " ✦";
  color: var(--sand);
}

.intro-grid,
.rules-list,
.wiki-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card,
.rules-list article,
.wiki-card,
.map-help {
  background: rgba(16, 26, 31, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.info-card,
.rules-list article,
.wiki-card,
.map-help {
  padding: clamp(18px, 3vw, 28px);
}

.card-icon {
  display: inline-grid;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  place-items: center;
  color: white;
  font-weight: 900;
  background: var(--coral);
  border-radius: 8px;
}

.play-section {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: clamp(22px, 5vw, 56px);
  align-items: start;
}

.steps {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  min-height: 74px;
  padding: 18px 18px 18px 72px;
  background: rgba(16, 26, 31, 0.9);
  border: 1px solid var(--line);
  border-left: 5px solid var(--oasis);
  border-radius: 8px;
  box-shadow: 0 14px 32px rgba(20, 35, 52, 0.1);
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 18px;
  top: 18px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: white;
  font-weight: 900;
  background: var(--oasis-dark);
  border-radius: 8px;
}

.rules-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.tag {
  display: inline-block;
  margin-left: 6px;
  padding: 0.16em 0.48em;
  color: var(--sand);
  font-size: 0.78em;
  font-weight: 850;
  background: rgba(241, 211, 122, 0.12);
  border: 1px solid rgba(241, 211, 122, 0.24);
  border-radius: 999px;
}

ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--muted);
  line-height: 1.7;
}

code {
  padding: 0.12em 0.34em;
  color: var(--oasis-dark);
  background: rgba(17, 127, 130, 0.1);
  border: 1px solid rgba(17, 127, 130, 0.18);
  border-radius: 6px;
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 0.92em;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 20px;
  align-items: start;
}

.map-frame {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.16), rgba(241, 211, 122, 0.12)),
    #0f1b20;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.map-frame iframe {
  width: 100%;
  height: 640px;
  display: block;
  border: 0;
}

.map-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  padding: 28px;
  text-align: center;
  color: var(--night);
}

.map-placeholder strong {
  font-size: clamp(1.4rem, 4vw, 2.6rem);
}

.map-placeholder span {
  color: var(--muted);
}

.map-frame.has-map .map-placeholder {
  display: none;
}

.wiki-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shop-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.shop-card {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: clamp(22px, 4vw, 36px);
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.08), transparent),
    rgba(16, 26, 31, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.shop-card.featured {
  border-color: rgba(45, 212, 191, 0.34);
}

.shop-card p {
  color: var(--muted);
}

.shop-card .primary-button {
  width: max-content;
  margin-top: 8px;
}

.shop-icon {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  color: #061013;
  font-weight: 950;
  background: linear-gradient(135deg, var(--sand), var(--oasis));
  border-radius: 8px;
}

.legacy-wiki[hidden] {
  display: none;
}

.wiki-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.wiki-sidebar {
  position: sticky;
  top: 88px;
  display: grid;
  gap: 8px;
  padding: 12px;
  background: rgba(16, 26, 31, 0.9);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wiki-sidebar button {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--muted);
  font: inherit;
  font-weight: 800;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.wiki-sidebar button:hover,
.wiki-sidebar button.active {
  color: var(--oasis);
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.25);
}

.wiki-content {
  min-width: 0;
}

.wiki-page {
  display: none;
  padding: clamp(18px, 3vw, 34px);
  background: rgba(16, 26, 31, 0.92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.wiki-page.active {
  display: block;
}

.wiki-page h2 {
  font-size: clamp(1.7rem, 3vw, 2.7rem);
}

.wiki-page h3 {
  margin: 26px 0 10px;
  font-size: 1.1rem;
}

.wiki-page h3::before,
.rules-list h2::before {
  content: "✧ ";
  color: var(--oasis);
}

.wiki-page p {
  color: var(--muted);
}

.wiki-note {
  padding: 14px 16px;
  color: var(--ink);
  background: rgba(241, 211, 122, 0.13);
  border: 1px solid rgba(215, 100, 73, 0.2);
  border-radius: 8px;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}

.mini-card {
  padding: 16px;
  background: rgba(7, 16, 21, 0.56);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mini-card strong {
  display: block;
  margin-bottom: 6px;
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 22px;
}

.recipe-list.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.recipe-card {
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(45, 212, 191, 0.06), transparent),
    rgba(7, 16, 21, 0.62);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.recipe-card h4 {
  margin: 0 0 10px;
  color: var(--sand);
  font-size: 1.02rem;
}

.recipe-card p {
  margin: 8px 0 0;
  font-size: 0.94rem;
  line-height: 1.55;
}

.recipe-card strong {
  color: var(--ink);
}

.ingredient-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin: 8px 0 12px;
  padding: 8px;
  background: rgba(245, 240, 223, 0.055);
  border: 1px solid rgba(241, 211, 122, 0.14);
  border-radius: 8px;
}

.ingredient-row img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  image-rendering: pixelated;
}

.ingredient-row span {
  margin-right: 6px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 750;
}

.subtabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 20px;
  padding: 6px;
  background: rgba(7, 16, 21, 0.58);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.subtabs button {
  min-height: 38px;
  padding: 8px 14px;
  color: var(--muted);
  font: inherit;
  font-weight: 850;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
}

.subtabs button.active,
.subtabs button:hover {
  color: var(--oasis);
  background: rgba(45, 212, 191, 0.12);
  border-color: rgba(45, 212, 191, 0.26);
}

.hookah-page {
  display: none;
}

.hookah-page.active {
  display: block;
}

.craft-layout {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  margin: 16px 0 22px;
}

.craft-grid {
  display: grid;
  grid-template-columns: repeat(3, 58px);
  grid-auto-rows: 58px;
  gap: 6px;
  padding: 10px;
  background: rgba(7, 16, 21, 0.6);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.craft-grid.small {
  grid-template-columns: repeat(3, 44px);
  grid-auto-rows: 44px;
  width: max-content;
  margin-bottom: 12px;
}

.slot {
  display: grid;
  place-items: center;
  background: rgba(245, 240, 223, 0.08);
  border: 1px solid rgba(241, 211, 122, 0.2);
  border-radius: 6px;
}

.slot.empty {
  background: rgba(245, 240, 223, 0.025);
}

.slot img {
  width: 34px;
  height: 34px;
  image-rendering: pixelated;
  object-fit: contain;
}

.craft-grid.small .slot img {
  width: 28px;
  height: 28px;
}

.slot.trophy {
  width: 82px;
  height: 82px;
}

.slot.trophy img {
  width: 52px;
  height: 52px;
}

.wiki-card {
  position: relative;
  overflow: hidden;
}

.wiki-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(180deg, var(--oasis), var(--coral));
}

.wiki-card p,
.info-card p,
.play-section p {
  color: var(--muted);
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 24px clamp(16px, 4vw, 56px);
  color: rgba(255, 255, 255, 0.78);
  background: var(--night);
}

.site-footer a {
  color: var(--sand);
  text-decoration: none;
}

@media (max-width: 860px) {
  .site-header {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }

  .menu-button {
    display: block;
  }

  .main-nav,
  .discord-link {
    display: none;
  }

  .site-header.nav-open .main-nav,
  .site-header.nav-open .discord-link {
    display: flex;
    grid-column: 1 / -1;
    width: 100%;
  }

  .site-header.nav-open .main-nav {
    flex-direction: column;
    align-items: stretch;
  }

  .site-header.nav-open .discord-link {
    justify-self: stretch;
  }

  .hero {
    min-height: 620px;
    background-position: center right;
  }

  .hero-content {
    margin: 0 auto;
    padding-top: 70px;
  }

  .intro-grid,
  .rules-list,
  .wiki-grid,
  .shop-grid,
  .wiki-shell,
  .play-section,
  .map-layout {
    grid-template-columns: 1fr;
  }

  .wiki-sidebar {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .map-frame,
  .map-frame iframe {
    min-height: 480px;
    height: 480px;
  }
}

@media (max-width: 520px) {
  .hero-actions,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .steps li {
    padding-left: 18px;
    padding-top: 68px;
  }

  .wiki-sidebar,
  .mini-grid,
  .recipe-list,
  .recipe-list.compact {
    grid-template-columns: 1fr;
  }
}
