/* Harmatliget — design system (emerald + gold) */
:root {
  --bg: #0a1210;
  --bg-elevated: #101816;
  --bg-soft: #15201c;
  --border: rgba(196, 165, 116, 0.18);
  --border-strong: rgba(196, 165, 116, 0.35);
  --text: #ece7df;
  --text-muted: #9a9388;
  --accent: #c4a574;
  --accent-soft: #a88b5c;
  --accent-dim: rgba(196, 165, 116, 0.12);
  --success: #5a9e78;
  --danger: #c47a6a;
  --focus: #e8d5b0;
  --radius: 4px;
  --radius-lg: 10px;
  --font: "Outfit", "Segoe UI", sans-serif;
  --font-display: "Instrument Serif", Georgia, serif;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
  --header-h: 72px;
  --max: 1120px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background:
    radial-gradient(ellipse 80% 50% at 10% -10%, rgba(196, 165, 116, 0.09), transparent 50%),
    radial-gradient(ellipse 60% 40% at 90% 0%, rgba(40, 110, 80, 0.08), transparent 45%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--focus);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10000;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: var(--bg);
  font-weight: 600;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: rgba(10, 12, 16, 0.88);
  backdrop-filter: blur(12px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
}

.logo-img {
  display: block;
  width: auto;
  height: 48px;
  max-width: min(180px, 42vw);
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(232, 199, 107, 0.25));
}

.logo-mark {
  width: 40px;
  height: 40px;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1.1;
}

.logo-text span {
  display: block;
  font-family: var(--font);
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.footer-logo {
  display: inline-block;
  margin: 0 0 0.85rem;
  text-decoration: none;
}

.footer-logo img {
  display: block;
  width: auto;
  height: 56px;
  max-width: 220px;
  object-fit: contain;
  filter: drop-shadow(0 0 12px rgba(232, 199, 107, 0.2));
}

.footer-tagline {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0 0 1rem;
  max-width: 22rem;
}

.footer-tagline strong {
  color: var(--accent);
  font-weight: 600;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem 1.25rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

.header-credits {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-dim);
  font-size: 0.85rem;
  white-space: nowrap;
}

.header-credits strong {
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.65rem 1.35rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease), color 0.25s var(--ease), transform 0.2s var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  background: var(--accent);
  color: #14110c;
}

.btn-primary:hover {
  background: var(--focus);
  color: #14110c;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--text);
}

.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn-danger {
  background: transparent;
  border-color: rgba(196, 122, 106, 0.5);
  color: var(--danger);
}

.btn-sm {
  min-height: 36px;
  padding: 0.4rem 0.9rem;
  font-size: 0.85rem;
}

/* Hero */
.hero {
  position: relative;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3.5rem, 7vw, 5rem);
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(105deg, rgba(10, 12, 16, 0.92) 35%, rgba(10, 12, 16, 0.55) 70%, rgba(10, 12, 16, 0.75)),
    url("../assets/images/hero-bg.svg") center / cover no-repeat;
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 4.5rem);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -0.02em;
}

.hero-lead {
  max-width: 34rem;
  margin: 0 0 1.75rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

/* Sections */
.section {
  padding: clamp(3rem, 6vw, 4.5rem) 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-block: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4vw, 2.6rem);
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.section-lead {
  max-width: 40rem;
  margin: 0 0 2rem;
  color: var(--text-muted);
}

.grid-3 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(3, 1fr);
}

.grid-2 {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(2, 1fr);
}

.feature {
  padding: 0;
}

.feature h3 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
}

.feature p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.feature-num {
  display: block;
  margin-bottom: 0.75rem;
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

/* Game cards — interaction containers */
.games-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.game-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.game-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.game-card-visual {
  aspect-ratio: 16 / 10;
  background: linear-gradient(145deg, #1a1f2a, #0e1118);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.game-card-visual svg {
  width: 56%;
  opacity: 0.9;
}

.game-card-body {
  padding: 1.1rem 1.2rem 1.3rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.game-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.6rem;
}

.tag {
  padding: 0.15rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.game-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.15rem;
}

.game-card p {
  margin: 0 0 1rem;
  flex: 1;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* Comparison table */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.compare-table th,
.compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.compare-table th {
  background: var(--bg-soft);
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
}

.compare-table tr:last-child td {
  border-bottom: none;
}

.compare-table tbody tr:hover td {
  background: var(--accent-dim);
}

/* Accordion */
.accordion {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.accordion-item + .accordion-item {
  border-top: 1px solid var(--border);
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border: none;
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.accordion-trigger::after {
  content: "";
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
  flex-shrink: 0;
}

.accordion-trigger[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

.accordion-panel {
  display: none;
  padding: 0 1.25rem 1.25rem;
  background: var(--bg-elevated);
  color: var(--text-muted);
}

.accordion-panel[data-open="true"] {
  display: block;
}

/* Glossary tooltip */
.glossary-term {
  color: var(--accent);
  border-bottom: 1px dotted var(--accent);
  cursor: help;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font: inherit;
  padding: 0;
}

.glossary-tip {
  position: absolute;
  z-index: 200;
  max-width: 280px;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.5;
}

/* Filters */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  align-items: end;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.filter-group label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.filter-group select {
  min-height: 42px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 0.9rem;
}

/* Forms */
.form {
  display: grid;
  gap: 1.1rem;
  max-width: 520px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field label {
  font-weight: 500;
  font-size: 0.92rem;
}

.form-field input,
.form-field textarea {
  min-height: 44px;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
}

.form-field textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Page header */
.page-header {
  padding: 2.75rem 0 1.5rem;
}

.page-header h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  margin: 0 0 0.75rem;
}

.page-header p {
  margin: 0;
  max-width: 42rem;
  color: var(--text-muted);
}

.prose {
  max-width: 720px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 2.5rem 0 0.75rem;
}

.prose h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

.prose p,
.prose ul,
.prose ol {
  color: var(--text-muted);
}

.prose ul,
.prose ol {
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

/* Game page */
.game-layout {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: start;
}

.game-stage {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  padding: 1rem;
  min-height: 360px;
}

.game-stage canvas,
.game-stage .game-root {
  width: 100%;
  display: block;
  border-radius: var(--radius);
  touch-action: manipulation;
}

.game-aside h2 {
  font-size: 1.25rem;
  margin: 0 0 0.75rem;
}

.paytable {
  width: 100%;
  font-size: 0.88rem;
  border-collapse: collapse;
}

.paytable th,
.paytable td {
  padding: 0.45rem 0.5rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}

.credits-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--accent-dim);
}

/* Footer */
.site-footer {
  margin-top: 3rem;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--border);
  background: #07080b;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

.footer-col h3 {
  margin: 0 0 0.85rem;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li + li {
  margin-top: 0.45rem;
}

.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
}

.footer-col a:hover {
  color: var(--text);
}

.footer-disclaimer {
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-legal-entity {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 1rem;
  line-height: 1.55;
}

/* Overlays */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(5, 6, 8, 0.82);
  backdrop-filter: blur(6px);
}

.overlay[hidden] {
  display: none !important;
}

.modal {
  width: min(100%, 440px);
  padding: 2rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow);
  animation: modal-in 0.35s var(--ease);
}

.modal h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
}

.modal p {
  margin: 0 0 1.5rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.modal-actions {
  display: grid;
  gap: 0.65rem;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: rgba(18, 21, 28, 0.97);
  backdrop-filter: blur(10px);
}

.cookie-banner[hidden] {
  display: none !important;
}

.cookie-inner {
  width: min(100%, var(--max));
  margin-inline: auto;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr auto;
  align-items: center;
}

.cookie-inner p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.session-toast {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 850;
  width: min(calc(100% - 2rem), 340px);
  padding: 1.15rem 1.25rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  box-shadow: var(--shadow);
  animation: modal-in 0.35s var(--ease);
}

.session-toast[hidden] {
  display: none !important;
}

.session-toast h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.session-toast p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* Contact / info blocks */
.info-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.info-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}

.info-list strong {
  display: block;
  color: var(--text);
  margin-bottom: 0.2rem;
}

/* Probability calculator */
.calc-panel {
  display: grid;
  gap: 1rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
}

.calc-result {
  padding: 1rem;
  border-radius: var(--radius);
  background: var(--accent-dim);
  font-variant-numeric: tabular-nums;
}

.calc-result strong {
  color: var(--accent);
  font-size: 1.35rem;
}

/* Home featured game */
.featured-game {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-elevated);
}

.featured-game-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.featured-game-head h2 {
  margin: 0;
  font-size: 1.2rem;
}

.featured-game-body {
  padding: 1rem;
}

/* 404 */
.page-404 {
  text-align: center;
  padding: 5rem 0 6rem;
}

.page-404 h1 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 5rem);
  margin: 0 0 0.5rem;
  color: var(--accent);
}

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

/* Responsive */
@media (max-width: 960px) {
  .grid-3,
  .footer-grid,
  .game-layout {
    grid-template-columns: 1fr 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .logo-img {
    height: 40px;
    max-width: 132px;
  }

  .footer-logo img {
    height: 48px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 1rem;
    background: rgba(10, 12, 16, 0.98);
    border-bottom: 1px solid var(--border);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 0.5rem;
    border-bottom: 1px solid var(--border);
  }

  .header-credits {
    margin-left: auto;
    margin-right: 0.35rem;
  }

  .grid-3,
  .grid-2,
  .footer-grid,
  .game-layout,
  .cookie-inner {
    grid-template-columns: 1fr;
  }

  .cookie-actions {
    width: 100%;
  }

  .cookie-actions .btn {
    flex: 1;
  }
}
