/* Qeburavi — Desert Dice social games
   dune.css — terracotta sunset over plum dusk */

:root {
  --qb-night: #1b1220;
  --qb-dusk: #2a1a2e;
  --qb-slab: #35203a;
  --qb-flame: #ff7a3d;
  --qb-sand: #ffd166;
  --qb-cream: #f3e9df;
  --qb-muted: #b09aad;
  --qb-edge: #4a2f4f;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--qb-night);
  color: var(--qb-cream);
  font: 16px/1.7 "Trebuchet MS", "Segoe UI", Verdana, sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  margin: 0 0 .5em;
  line-height: 1.08;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: -.005em;
  font-family: "Arial Black", "Trebuchet MS", Impact, sans-serif;
}

h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.1rem; letter-spacing: .04em; }

p { margin: 0 0 1em; }
a { color: var(--qb-sand); }
img { max-width: 100%; display: block; }

.qb-inner { max-width: 1200px; margin-inline: auto; padding-inline: 26px; }

.qb-flag {
  display: inline-block;
  background: var(--qb-flame);
  color: #24131c;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 5px 12px;
  transform: skewX(-10deg);
  margin-bottom: 16px;
}

.qb-flag span { display: inline-block; transform: skewX(10deg); }

/* ---------- Nav with burger ---------- */
.qb-top {
  background: rgba(27, 18, 32, .95);
  border-bottom: 2px solid var(--qb-edge);
  position: sticky;
  top: 0;
  z-index: 80;
  backdrop-filter: blur(5px);
}

.qb-top__in {
  max-width: 1200px;
  margin-inline: auto;
  padding: 14px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.qb-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.qb-logo img { width: 40px; height: 40px; border-radius: 9px; }
.qb-logo b {
  font-family: "Arial Black", Impact, sans-serif;
  text-transform: uppercase;
  font-size: 1.16rem;
  color: var(--qb-cream);
  letter-spacing: .06em;
  display: block;
  line-height: 1.05;
}
.qb-logo i { font-style: normal; font-size: .6rem; letter-spacing: .24em; text-transform: uppercase; color: var(--qb-flame); }

.qb-burger {
  display: none;
  background: transparent;
  border: 2px solid var(--qb-edge);
  color: var(--qb-cream);
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
}

.qb-menu { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; align-items: center; flex-wrap: wrap; }

.qb-menu a {
  display: block;
  padding: 9px 14px;
  color: var(--qb-muted);
  text-decoration: none;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  border-bottom: 3px solid transparent;
}

.qb-menu a:hover { color: var(--qb-cream); }
.qb-menu a[aria-current="page"] { color: var(--qb-flame); border-bottom-color: var(--qb-flame); }

/* ---------- Buttons ---------- */
.qb-key {
  display: inline-block;
  padding: 14px 30px;
  background: var(--qb-flame);
  color: #23121b;
  font-weight: 900;
  font-size: .8rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 0;
  border-radius: 3px;
  cursor: pointer;
  box-shadow: 4px 4px 0 #7c2f14;
  transition: transform .15s, box-shadow .15s;
}

.qb-key:hover { transform: translate(2px, 2px); box-shadow: 2px 2px 0 #7c2f14; }

.qb-key--sand { background: var(--qb-sand); box-shadow: 4px 4px 0 #9c7620; }
.qb-key--sand:hover { box-shadow: 2px 2px 0 #9c7620; }

.qb-key--wire {
  background: transparent;
  color: var(--qb-cream);
  border: 2px solid var(--qb-edge);
  box-shadow: none;
}

.qb-key--wire:hover { border-color: var(--qb-flame); color: var(--qb-flame); transform: none; }

.qb-key:disabled { background: #5b4a5f; color: #a292a6; box-shadow: none; cursor: not-allowed; transform: none; }

/* ---------- Hero with diagonal cut ---------- */
.qb-hero {
  position: relative;
  min-height: 62vh;
  display: flex;
  align-items: center;
  padding: 84px 0 110px;
  background:
    linear-gradient(105deg, rgba(27,18,32,.95) 0%, rgba(27,18,32,.78) 42%, rgba(27,18,32,.22) 100%),
    url("../img/desert-hero.jpg") center / cover no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 52px), 0 100%);
}

.qb-hero h1 { max-width: 15ch; }
.qb-hero p { max-width: 46ch; color: #e2d2c6; font-size: 1.06rem; }
.qb-hero__row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Record ribbon ---------- */
.qb-ribbon {
  background: var(--qb-flame);
  color: #24131c;
  padding: 14px 0;
  margin-top: -40px;
  position: relative;
  z-index: 3;
}

.qb-ribbon__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; text-align: center; }
.qb-ribbon b { display: block; font-family: "Arial Black", Impact, sans-serif; font-size: 1.5rem; line-height: 1.1; }
.qb-ribbon span { font-size: .66rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }

/* ---------- Sections ---------- */
.qb-slice { padding: 76px 0; }
.qb-slice--dusk { background: var(--qb-dusk); }
.qb-lead-block { max-width: 640px; margin-bottom: 42px; }
.qb-lead-block--mid { margin-inline: auto; text-align: center; }

/* ---------- Scroll-snap carousel ---------- */
.qb-rail {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
}

.qb-rail::-webkit-scrollbar { height: 8px; }
.qb-rail::-webkit-scrollbar-thumb { background: var(--qb-edge); border-radius: 4px; }

.qb-slide {
  flex: 0 0 300px;
  scroll-snap-align: start;
  background: var(--qb-slab);
  border: 2px solid var(--qb-edge);
  border-radius: 6px;
  padding: 26px 22px;
}

.qb-slide__pip {
  display: block;
  width: 42px;
  height: 42px;
  line-height: 1;
  margin-bottom: 14px;
}

.qb-slide__pip svg { width: 100%; height: 100%; display: block; }

.qb-slide p { color: var(--qb-muted); font-size: .93rem; margin-bottom: 0; }

.qb-slide__state {
  display: inline-block;
  margin-top: 14px;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--qb-sand);
  border: 1px solid var(--qb-sand);
  padding: 3px 9px;
  border-radius: 3px;
}

/* ---------- Value grid 2x2 ---------- */
.qb-quad { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; background: var(--qb-edge); border: 2px solid var(--qb-edge); }
.qb-quad__cell { background: var(--qb-night); padding: 32px 28px; }
.qb-quad__cell p { color: var(--qb-muted); margin-bottom: 0; font-size: .95rem; }
.qb-quad__cell h3 { color: var(--qb-sand); }

/* ---------- Photo band ---------- */
.qb-band { display: grid; grid-template-columns: 1.1fr .9fr; gap: 46px; align-items: center; }
.qb-band img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  object-position: center;
  border: 3px solid var(--qb-flame);
  border-radius: 4px;
}

/* ---------- Dice game ---------- */
.qb-pit {
  background: var(--qb-slab);
  border: 2px solid var(--qb-edge);
  border-radius: 8px;
  padding: 36px 30px;
  text-align: center;
}

.qb-dice-field { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; margin: 28px 0; }

.qb-side { text-align: center; }
.qb-side h3 { color: var(--qb-muted); font-size: .72rem; letter-spacing: .22em; margin-bottom: 12px; }

.qb-dice-pair { display: flex; gap: 12px; justify-content: center; }

.qb-die {
  width: 74px;
  height: 74px;
  border-radius: 12px;
  color: var(--qb-cream);
  display: grid;
  place-items: center;
  filter: drop-shadow(0 6px 0 #b8a89b);
}

.qb-die svg { width: 100%; height: 100%; display: block; }

.qb-die--house { color: var(--qb-sand); filter: drop-shadow(0 6px 0 #9c7620); }
.qb-die.is-rolling { animation: qb-shake .28s linear infinite; }

@keyframes qb-shake {
  0% { transform: rotate(-9deg) translateY(0); }
  50% { transform: rotate(9deg) translateY(-6px); }
  100% { transform: rotate(-9deg) translateY(0); }
}

.qb-total { font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--qb-muted); margin-top: 12px; }
.qb-total b { display: block; font-family: "Arial Black", Impact, sans-serif; font-size: 1.7rem; color: var(--qb-flame); letter-spacing: 0; }

.qb-versus { font-family: "Arial Black", Impact, sans-serif; font-size: 1.4rem; color: var(--qb-edge); }

.qb-tally-bar { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; margin-bottom: 6px; }

.qb-tally {
  border: 2px solid var(--qb-edge);
  border-radius: 4px;
  padding: 10px 18px;
  min-width: 118px;
}

.qb-tally span { display: block; font-size: .6rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--qb-muted); }
.qb-tally b { font-family: "Arial Black", Impact, sans-serif; font-size: 1.5rem; color: var(--qb-sand); }

#qb-call { min-height: 1.8rem; font-weight: 700; color: var(--qb-sand); margin: 16px 0 0; }

.qb-odds { text-align: left; margin-top: 28px; border-top: 2px solid var(--qb-edge); padding-top: 22px; }
.qb-odds ul { color: var(--qb-muted); padding-left: 20px; font-size: .93rem; }
.qb-odds li { margin-bottom: 7px; }

/* ---------- Forms ---------- */
.qb-fields { display: grid; gap: 16px; }

.qb-fields label {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--qb-muted);
  margin-bottom: 6px;
}

.qb-fields input,
.qb-fields textarea,
.qb-fields select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 12px 14px;
  background: var(--qb-night);
  border: 2px solid var(--qb-edge);
  border-radius: 4px;
  color: var(--qb-cream);
  font: inherit;
}

.qb-fields input:focus,
.qb-fields textarea:focus,
.qb-fields select:focus { outline: 2px solid var(--qb-flame); outline-offset: 1px; }

.qb-flash { color: #8fdc9a; font-weight: 700; font-size: .92rem; }

.qb-line-form { display: flex; gap: 10px; flex-wrap: wrap; }
.qb-line-form input { flex: 1 1 220px; min-width: 0; }

.qb-fields textarea { resize: vertical; }

/* ---------- Legal ---------- */
.qb-sheet {
  background: var(--qb-dusk);
  border: 2px solid var(--qb-edge);
  border-radius: 6px;
  padding: 42px;
  max-width: 880px;
}

.qb-sheet h2 { font-size: 1.2rem; color: var(--qb-flame); margin-top: 32px; }
.qb-sheet h2:first-of-type { margin-top: 18px; }
.qb-sheet p { color: #ddccd6; }
.qb-sheet ul { color: var(--qb-muted); padding-left: 20px; }
.qb-sheet li { margin-bottom: 8px; }

/* ---------- Age check ---------- */
.qb-gatepost {
  position: fixed;
  inset: 0;
  background: rgba(15, 9, 18, .96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 950;
  padding: 20px;
}

.qb-gatepost__box {
  background: var(--qb-dusk);
  border: 3px solid var(--qb-flame);
  border-radius: 8px;
  max-width: 470px;
  padding: 36px 32px;
  text-align: center;
}

.qb-gatepost__box p { color: var(--qb-muted); font-size: .94rem; }
.qb-gatepost__row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }

.qb-stamp {
  display: inline-block;
  background: var(--qb-flame);
  color: #24131c;
  font-weight: 900;
  font-size: .8rem;
  letter-spacing: .12em;
  padding: 6px 14px;
  border-radius: 3px;
  margin-bottom: 14px;
}

/* ---------- Footer : centred logo ---------- */
.qb-bottom { background: var(--qb-dusk); border-top: 3px solid var(--qb-flame); padding: 48px 0 24px; text-align: center; }
.qb-bottom img { width: 52px; height: 52px; border-radius: 12px; margin: 0 auto 14px; }
.qb-bottom h4 { font-family: "Arial Black", Impact, sans-serif; text-transform: uppercase; letter-spacing: .1em; margin: 0 0 8px; font-size: 1.05rem; }
.qb-bottom p { color: var(--qb-muted); font-size: .92rem; max-width: 52ch; margin-inline: auto; }

.qb-bottom__links {
  display: flex;
  justify-content: center;
  gap: 8px 22px;
  flex-wrap: wrap;
  margin: 24px 0 20px;
  list-style: none;
  padding: 0;
}

.qb-bottom__links a { color: var(--qb-muted); text-decoration: none; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.qb-bottom__links a:hover { color: var(--qb-flame); }

.qb-bottom__tail { border-top: 1px solid var(--qb-edge); padding-top: 18px; font-size: .78rem; color: #8d7a89; }

/* ---------- 404 ---------- */
.qb-lost-page { text-align: center; padding: 96px 26px 88px; }
.qb-lost-page b {
  display: block;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(4.5rem, 16vw, 9rem);
  color: var(--qb-flame);
  line-height: 1;
  letter-spacing: -.03em;
}
.qb-lost-page p { color: var(--qb-muted); max-width: 42ch; margin-inline: auto; }
.qb-lost-page__row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  /* Overrides page-specific desktop column ratios in inline styles. */
  .qb-band { grid-template-columns: minmax(0, 1fr) !important; gap: 28px; }
  .qb-band > * { min-width: 0; }
  .qb-quad { grid-template-columns: 1fr; }
  .qb-burger { display: block; }
  .qb-menu {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border-top: 2px solid var(--qb-edge);
    margin-top: 12px;
    padding-top: 8px;
  }
  .qb-menu.is-open { display: flex; }
  .qb-menu a { border-bottom: 1px solid var(--qb-edge); }
  .qb-top__in { flex-wrap: wrap; }
}

@media (max-width: 560px) {
  .qb-hero { padding: 60px 0 84px; }
  .qb-sheet { padding: 24px 20px; }
  .qb-die { width: 58px; height: 58px; }
  .qb-dice-field { gap: 20px; }
}
