/* Northern Reel Club — site styles (CSS variables + nesting) */
@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700;800&family=Source+Sans+3:wght@400;500;600;700&display=swap");

:root {
  --lav-50: #f7f6f9;
  --lav-100: #f0eef3;
  --lav-200: #e4e0ea;
  --lav-300: #d2ccd9;
  --lav-500: #8a8396;
  --lav-700: #4f4958;
  --ink: #1a1520;
  --accent: #7b2d6e;
  --accent-dark: #5c2253;
  --accent-soft: #efe0ec;
  --surface: #ffffff;
  --tint-a: #f0eef3;
  --tint-b: #e9e4ef;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-inner: inset 0 1px 2px rgba(26, 21, 32, 0.06);
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 48px;
  --space-7: 64px;
  --container: 1120px;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", sans-serif;
  --line: 1.55;
  --focus: 0 0 0 3px var(--accent-soft), 0 0 0 5px var(--accent);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: var(--line);
  color: var(--ink);
  background-color: var(--lav-100);
  background-image: url("/assets/noise.png");
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 2px;
  transition: background-size 0.25s ease;
}

a:hover,
a:focus-visible {
  background-size: 100% 2px;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.01em;
  margin: 0 0 var(--space-3);
}

h1 {
  font-size: clamp(2.4rem, 6vw, 3.75rem);
  font-weight: 800;
  text-transform: uppercase;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.4rem);
  text-transform: uppercase;
}

h3 {
  font-size: 1.35rem;
  text-transform: uppercase;
}

p {
  margin: 0 0 var(--space-3);
  max-width: 70ch;
}

.container {
  width: min(100% - var(--space-4), var(--container));
  margin-inline: auto;
}

/* Age notice — under header */
.age-strip {
  background: var(--ink);
  color: var(--lav-100);
  font-size: 0.875rem;
  padding: var(--space-2) var(--space-3);
  text-align: centre;
  text-align: center;

  & a {
    color: #f2c9ea;
    font-weight: 600;
  }
}

/* Nav — classic top bar */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--lav-300);
  position: sticky;
  top: 0;
  z-index: 40;

  & .site-header__inner {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-height: 64px;
    padding-block: var(--space-2);
  }

  & .brand {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--ink);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 1.35rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    background-image: none;
    flex-shrink: 0;

    & img {
      width: 40px;
      height: 40px;
    }
  }

  & .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-left: auto;
    list-style: none;
    padding: 0;

    & a {
      color: var(--ink);
      font-weight: 600;
      font-size: 0.95rem;
    }
  }

  & .coin-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: var(--space-2);
    padding: 6px 12px;
    background: var(--accent-soft);
    color: var(--accent-dark);
    border-radius: 999px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    border: 1px solid transparent;
    box-shadow: var(--shadow-inner);

    &::before {
      content: "";
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: var(--accent);
      flex-shrink: 0;
    }
  }
}

.nav-toggle {
  display: none;
  margin-left: auto;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-weight: 700;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
  }

  .site-header {
    & .nav-links {
      display: none;
      width: 100%;
      flex-direction: column;
      margin: 0;
      padding-bottom: var(--space-3);
    }

    & .coin-chip {
      margin-left: 0;
    }

    &.is-open .nav-links {
      display: flex;
    }

    & .site-header__inner {
      flex-wrap: wrap;
    }
  }
}

/* Buttons — solid accent fill */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  text-decoration: none;
  background-image: none;
  transition: background 0.15s ease, transform 0.15s ease;
  box-shadow: var(--shadow-inner);

  &:hover {
    background: var(--accent-dark);
    color: #fff;
  }

  &:active {
    transform: translateY(1px);
  }

  &--ghost {
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    box-shadow: none;

    &:hover {
      background: var(--accent-soft);
      color: var(--accent-dark);
    }
  }

  &--sm {
    padding: 8px 14px;
    font-size: 0.9rem;
  }

  &:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }
}

/* Badges with leading dot */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;

  &::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent);
  }
}

/* Section index labels 01 / 02 / 03 */
.section-index {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: var(--space-2);
}

/* Alternating tinted bands */
.band {
  padding: var(--space-6) 0;

  &--tint {
    background: var(--tint-b);
  }

  &--soft {
    background: var(--tint-a);
  }

  &--surface {
    background: var(--surface);
  }
}

/* Bento */
.bento {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(12, 1fr);

  & > * {
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--lav-300);
    box-shadow: var(--shadow-inner);
    padding: var(--space-4);
  }
}

.hero {
  padding: var(--space-6) 0 var(--space-5);

  &__grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }

  &__copy p {
    font-size: 1.125rem;
    color: var(--lav-700);
  }

  &__panel {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--lav-300);
    box-shadow: var(--shadow-inner);
    background: var(--surface);

    & img {
      width: 100%;
      aspect-ratio: 8 / 5;
      object-fit: cover;
    }
  }
}

@media (max-width: 800px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.free-banner {
  background: var(--accent);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius);
  margin: var(--space-4) 0;

  & strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1.35rem;
    text-transform: uppercase;
    margin-bottom: 4px;
  }

  & p {
    margin: 0;
    color: #f7eef5;
    max-width: none;
  }

  & a {
    color: #fff;
    font-weight: 700;
  }
}

/* Game tiles — two-column: art left, copy right */
.games-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}

.game-tile {
  display: grid;
  grid-template-columns: minmax(140px, 42%) 1fr;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--lav-300);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-inner);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  min-height: 180px;

  &:hover {
    transform: translateY(-4px);
  }

  &__art {
    background: var(--lav-200);
    min-height: 160px;

    & img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      min-height: 180px;
    }
  }

  &__body {
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    justify-content: center;
  }

  &__theme {
    margin: 0;
    color: var(--lav-700);
    font-size: 0.95rem;
  }

  & h3 {
    margin: 0;
  }
}

@media (max-width: 640px) {
  .game-tile {
    grid-template-columns: 1fr;

    &__art img {
      min-height: 160px;
      aspect-ratio: 16 / 10;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  .game-tile {
    transition: none;

    &:hover {
      transform: none;
    }
  }

  a {
    transition: none;
  }
}

/* Picker */
.picker {
  display: grid;
  gap: var(--space-3);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));

  &__option {
    text-align: left;
    padding: var(--space-4);
    border-radius: var(--radius);
    border: 1px solid var(--lav-300);
    background: var(--surface);
    cursor: pointer;
    font: inherit;
    color: inherit;
    box-shadow: var(--shadow-inner);
    transition: border-color 0.15s ease, background 0.15s ease;

    &:hover,
    &[aria-pressed="true"] {
      border-color: var(--accent);
      background: var(--accent-soft);
    }

    & strong {
      display: block;
      font-family: var(--font-display);
      text-transform: uppercase;
      font-size: 1.2rem;
      margin-bottom: 6px;
      color: var(--accent);
    }
  }
}

.picker-result {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--lav-300);
  box-shadow: var(--shadow-inner);
  display: none;

  &.is-visible {
    display: block;
  }
}

/* FAQ */
.faq {
  & .myth-fact {
    display: grid;
    gap: var(--space-3);
    grid-template-columns: 1fr 1fr;
    margin-bottom: var(--space-5);
  }

  & .mf-card {
    padding: var(--space-4);
    border-radius: var(--radius);
    border: 1px solid var(--lav-300);
    box-shadow: var(--shadow-inner);

    &--myth {
      background: var(--lav-200);
    }

    &--fact {
      background: var(--accent-soft);
    }

    & .label {
      font-family: var(--font-display);
      font-weight: 800;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: var(--accent);
      margin-bottom: var(--space-2);
    }
  }

  & details {
    border-bottom: 1px solid var(--lav-300);
    padding: var(--space-3) 0;

    & summary {
      cursor: pointer;
      font-weight: 700;
      font-family: var(--font-display);
      font-size: 1.2rem;
      text-transform: uppercase;
    }

    & p {
      margin-top: var(--space-2);
      color: var(--lav-700);
    }
  }
}

@media (max-width: 700px) {
  .faq .myth-fact {
    grid-template-columns: 1fr;
  }
}

.disclaimer {
  font-size: 0.9rem;
  color: var(--lav-700);
  padding: var(--space-4);
  border-radius: var(--radius);
  background: var(--lav-200);
  border: 1px solid var(--lav-300);

  & p:last-child {
    margin-bottom: 0;
  }
}

/* Prose pages */
.page-hero {
  padding: var(--space-6) 0 var(--space-4);

  & p.lead {
    font-size: 1.15rem;
    color: var(--lav-700);
  }
}

.prose {
  & h2 {
    margin-top: var(--space-5);
  }

  & ul,
  & ol {
    padding-left: 1.2rem;
    margin: 0 0 var(--space-3);
    max-width: 70ch;
  }

  & li {
    margin-bottom: 6px;
  }

  & .figure {
    margin: var(--space-4) 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--lav-300);
    box-shadow: var(--shadow-inner);

    & figcaption {
      padding: var(--space-2) var(--space-3);
      font-size: 0.9rem;
      color: var(--lav-700);
      background: var(--surface);
    }
  }
}

.split-media {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}

@media (max-width: 760px) {
  .split-media {
    grid-template-columns: 1fr;
  }
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--lav-200);
  padding: var(--space-6) 0 var(--space-5);
  margin-top: var(--space-6);

  & a {
    color: #f2c9ea;
  }

  & h3 {
    color: #fff;
    font-size: 1.1rem;
  }

  & .footer-grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: var(--space-5);
  }

  & ul {
    list-style: none;
    padding: 0;
    margin: 0;

    & li {
      margin-bottom: 8px;
    }
  }

  & .footer-note {
    font-size: 0.875rem;
    color: var(--lav-300);
    max-width: 80ch;
  }
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--surface);
  border-top: 2px solid var(--accent);
  padding: var(--space-3) var(--space-4);
  box-shadow: 0 -4px 20px rgba(26, 21, 32, 0.08);
  display: none;

  &.is-visible {
    display: block;
  }

  & .cookie-banner__inner {
    width: min(100%, var(--container));
    margin-inline: auto;
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
    justify-content: space-between;
  }

  & p {
    margin: 0;
    flex: 1 1 280px;
    font-size: 0.95rem;
  }
}

/* Forms */
.form {
  display: grid;
  gap: var(--space-3);
  max-width: 520px;

  & label {
    display: grid;
    gap: 6px;
    font-weight: 600;
  }

  & input,
  & textarea,
  & select {
    font: inherit;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--lav-300);
    background: var(--surface);
    box-shadow: var(--shadow-inner);
  }

  & textarea {
    min-height: 140px;
    resize: vertical;
  }
}

.form-status {
  padding: var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-dark);
  display: none;

  &.is-visible {
    display: block;
  }
}

/* Game shell */
.game-page {
  padding-bottom: var(--space-6);
}

.game-shell {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr 300px;

  @media (max-width: 900px) {
    grid-template-columns: 1fr;
  }
}

.game-panel {
  background: var(--surface);
  border: 1px solid var(--lav-300);
  border-radius: var(--radius);
  box-shadow: var(--shadow-inner);
  padding: var(--space-4);
  min-height: 360px;
}

.game-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);

  & .panel {
    background: var(--surface);
    border: 1px solid var(--lav-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow-inner);
    padding: var(--space-3);
  }

  & .balance-line {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: var(--accent);
  }

  & .bet-control {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;

    & input {
      width: 88px;
      padding: 8px;
      border-radius: var(--radius-sm);
      border: 1px solid var(--lav-300);
      font: inherit;
      font-variant-numeric: tabular-nums;
    }
  }
}

.game-result {
  min-height: 1.5em;
  font-weight: 600;
  color: var(--accent-dark);
}

.noscript-note {
  padding: var(--space-4);
  background: var(--accent-soft);
  border-radius: var(--radius);
  border: 1px solid var(--lav-300);
}

/* —— Game themes (flat vector, bold shapes, no gradients) —— */

/* Steampunk Prize Wheel */
.game--steampunk {
  --g-bg: #d4c4a8;
  --g-brass: #a87c44;
  --g-dark: #463424;
  --g-rivet: #5a442c;
  background: var(--g-bg);
  border: 3px solid var(--g-dark);
  border-radius: var(--radius);
  padding: var(--space-4);
  position: relative;

  & .wheel-stage {
    display: grid;
    place-items: center;
    position: relative;
    min-height: 340px;
  }

  & .wheel {
    width: min(300px, 80vw);
    height: min(300px, 80vw);
    border-radius: 50%;
    border: 8px solid var(--g-dark);
    position: relative;
    overflow: hidden;
    transition: transform 4s cubic-bezier(0.12, 0.75, 0.12, 1);
    background: var(--g-brass);
  }

  & .wheel-seg {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 20px;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 0.95rem;
    color: #fff;
    text-shadow: 0 1px 0 #23180e;
    transform-origin: center center;
    pointer-events: none;
  }

  & .wheel-pointer {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 14px solid transparent;
    border-right: 14px solid transparent;
    border-top: 28px solid var(--g-dark);
    z-index: 2;
  }

  & .wheel-hub {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--g-dark);
    border: 4px solid var(--g-brass);
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

/* Egypt Video Slots */
.game--egypt {
  --g-sand: #d6be8c;
  --g-gold: #c49a3a;
  --g-ink: #3c281c;
  --g-teal: #285a50;
  background: var(--g-sand);
  border: 3px solid var(--g-ink);
  border-radius: var(--radius);
  padding: var(--space-4);

  & .slots-frame {
    background: var(--g-ink);
    border: 4px solid var(--g-gold);
    border-radius: var(--radius-sm);
    padding: var(--space-3);
  }

  & .slots-reels {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    background: var(--g-ink);
  }

  & .reel {
    background: #f5ecd4;
    border: 2px solid var(--g-gold);
    height: 210px;
    overflow: hidden;
    position: relative;
  }

  & .reel-strip {
    display: flex;
    flex-direction: column;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  & .sym {
    height: 70px;
    display: grid;
    place-items: center;
    font-size: 1.8rem;
    font-family: var(--font-display);
    font-weight: 800;
    color: var(--g-ink);
    border-bottom: 1px solid #cbb88a;
  }

  & .sym--scarab { color: var(--g-teal); }
  & .sym--ankh { color: var(--g-gold); }
  & .sym--wild { color: #7b2d6e; }
  & .sym--scatter { color: #8b4513; }

  & .payline-mark {
    height: 2px;
    background: var(--accent);
    margin: 8px 0;
  }

  & .slots-paytable {
    margin-top: var(--space-3);
    font-size: 0.85rem;
    color: var(--g-ink);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 6px;
  }
}

/* Northern Lights Scratch */
.game--aurora {
  --g-night: #1c243a;
  --g-pine: #121c28;
  --g-aurora: #3c7890;
  --g-glow: #6478b4;
  background: var(--g-night);
  border: 3px solid var(--g-pine);
  border-radius: var(--radius);
  padding: var(--space-4);
  color: #e8eef8;

  & .scratch-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    max-width: 360px;
    margin: 0 auto;
    touch-action: none;
  }

  & .scratch-cell {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    background: var(--g-aurora);
    border: 3px solid var(--g-glow);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    user-select: none;

    & .reveal {
      position: absolute;
      inset: 0;
      display: grid;
      place-items: center;
      font-size: 2rem;
      font-family: var(--font-display);
      font-weight: 800;
      background: #e4e0ea;
      color: var(--ink);
    }

    & .cover {
      position: absolute;
      inset: 0;
      background: repeating-linear-gradient(
        -45deg,
        #6478b4,
        #6478b4 8px,
        #3c7890 8px,
        #3c7890 16px
      );
      transition: opacity 0.15s ease;
      z-index: 1;
    }

    &.is-revealed .cover {
      opacity: 0;
      pointer-events: none;
    }
  }

  & .aurora-bars {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-3);
    height: 16px;

    & span {
      flex: 1;
      border-radius: 4px;
    }

    & span:nth-child(1) { background: #3ca078; }
    & span:nth-child(2) { background: #5078b4; }
    & span:nth-child(3) { background: #8c5aa0; }
    & span:nth-child(4) { background: #3c8c8c; }
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.sr-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}
