/* WM Casino Online — информационно-обзорный портал
   Shared stylesheet. No external imports, no trackers. */

:root {
  --bg: #0f1115;
  --bg-elev: #171a21;
  --bg-card: #1c2029;
  --border: #2a2f3a;
  --text: #e6e8ec;
  --text-dim: #a6adba;
  --text-muted: #6e7686;
  --accent: #c8a24b;
  --accent-hover: #e0b864;
  --link: #9ec5fe;
  --link-hover: #c0dbff;
  --danger: #e57373;
  --success: #7bc47f;
  --radius: 6px;
  --radius-lg: 10px;
  --maxw: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
a:hover, a:focus {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

h1, h2, h3, h4 {
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
  margin: 1.8em 0 .6em;
}
h1 { font-size: 2rem; margin-top: 0; }
h2 { font-size: 1.45rem; border-bottom: 1px solid var(--border); padding-bottom: .35em; }
h3 { font-size: 1.15rem; color: var(--accent); }
h4 { font-size: 1rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: .05em; }

p { margin: 0 0 1em; }

ul, ol { padding-left: 1.4em; margin: 0 0 1em; }
li { margin-bottom: .35em; }

strong { color: #fff; }
em { color: var(--text-dim); font-style: normal; border-bottom: 1px dashed var(--border); }

code, kbd {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .92em;
  background: var(--bg-elev);
  padding: .12em .4em;
  border-radius: 3px;
  color: var(--accent);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

blockquote {
  margin: 1.5em 0;
  padding: .8em 1.2em;
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  color: var(--text-dim);
  border-radius: 0 var(--radius) var(--radius) 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .95rem;
}
th, td {
  padding: .7em 1em;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
th {
  background: var(--bg-elev);
  color: var(--accent);
  font-weight: 600;
}
tr:last-child td { border-bottom: none; }

/* Layout --------------------------------------------------- */

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 1.2rem;
}

.site-header {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(150%) blur(6px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-top: .9rem;
  padding-bottom: .9rem;
  flex-wrap: wrap;
}
.brand {
  font-weight: 700;
  color: var(--text);
  font-size: 1.05rem;
  letter-spacing: .02em;
  border-bottom: none;
  display: inline-flex;
  align-items: baseline;
  gap: .5em;
}
.brand:hover { color: var(--accent); border-bottom: none; }
.brand-accent { color: var(--accent); }

.site-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
}
.site-nav a {
  color: var(--text-dim);
  font-size: .93rem;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
.site-nav a:hover, .site-nav a.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

main.wrap {
  padding-top: 2.2rem;
  padding-bottom: 3rem;
}

.site-footer {
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .88rem;
  padding: 2rem 0 2.2rem;
  margin-top: 3rem;
}
.site-footer a { color: var(--text-dim); }
.site-footer .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem 2rem;
  margin-bottom: 1.5rem;
}
.site-footer h4 {
  color: var(--text);
  font-size: .78rem;
  margin: 0 0 .6em;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: .35em; }
.site-footer .copyright {
  border-top: 1px solid var(--border);
  padding-top: 1.2rem;
  text-align: center;
  font-size: .82rem;
  color: var(--text-muted);
}

/* Page-specific --------------------------------------------- */

.hero {
  padding: 2.5rem 0 1rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.hero h1 { margin-bottom: .4em; }
.hero .subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  margin: 0;
  max-width: 40em;
}

/* Hero illustration (SVG under hero block) */
.illustration {
  margin: 0 0 2.5rem;
  padding: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.illustration img,
.illustration svg {
  display: block;
  width: 100%;
  height: auto;
  max-height: 360px;
  object-fit: cover;
}
.illustration figcaption {
  padding: .6em 1em;
  color: var(--text-muted);
  font-size: .82rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-style: italic;
}

/* Inline illustrations inside article flow */
figure.inline-illust {
  margin: 1.8em 0;
  padding: 0;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
figure.inline-illust img { display: block; width: 100%; height: auto; }
figure.inline-illust figcaption {
  padding: .5em 1em;
  color: var(--text-muted);
  font-size: .8rem;
  border-top: 1px solid var(--border);
  font-style: italic;
}

.breadcrumb {
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span[aria-current] { color: var(--text-dim); }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.3rem;
  transition: border-color .15s ease, transform .15s ease;
  display: block;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.card:hover {
  border-color: var(--accent);
  color: var(--text);
  transform: translateY(-1px);
}
.card h3 { margin: 0 0 .4em; color: var(--accent); font-size: 1.05rem; }
.card p { margin: 0; color: var(--text-dim); font-size: .92rem; line-height: 1.5; }

.notice {
  padding: 1em 1.2em;
  border-radius: var(--radius);
  margin: 1.5em 0;
  border: 1px solid var(--border);
  background: var(--bg-elev);
}
.notice.warn { border-left: 3px solid var(--danger); }
.notice.info { border-left: 3px solid var(--accent); }
.notice p:last-child { margin-bottom: 0; }
.notice h4 { margin-top: 0; color: var(--text); }

dl.defs dt {
  color: var(--accent);
  font-weight: 600;
  margin-top: 1em;
}
dl.defs dd {
  margin: .2em 0 0 1.5em;
  color: var(--text-dim);
}

/* Glossary letter index */
.az-index {
  display: flex;
  flex-wrap: wrap;
  gap: .3em;
  margin: 1em 0 2em;
  padding: .8em 1em;
  background: var(--bg-elev);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.az-index a {
  display: inline-block;
  min-width: 1.8em;
  padding: .15em .4em;
  text-align: center;
  color: var(--text-dim);
  border: 1px solid transparent;
  border-radius: 3px;
  font-weight: 600;
  font-size: .88rem;
}
.az-index a:hover { color: var(--accent); border-color: var(--border); background: var(--bg-card); }

.tag {
  display: inline-block;
  font-size: .75rem;
  padding: .1em .55em;
  background: var(--bg-elev);
  color: var(--text-dim);
  border: 1px solid var(--border);
  border-radius: 999px;
  margin-right: .3em;
  border-bottom: 1px solid var(--border);
}

/* Responsive ------------------------------------------------ */

@media (max-width: 640px) {
  body { font-size: 15.5px; }
  h1 { font-size: 1.65rem; }
  h2 { font-size: 1.25rem; }
  .site-header .wrap { gap: .6rem; padding-top: .7rem; padding-bottom: .7rem; }
  .site-nav ul { gap: .7rem; }
  .site-nav a { font-size: .88rem; }
  main.wrap { padding-top: 1.5rem; padding-bottom: 2rem; }
  .hero { padding: 1.5rem 0 .5rem; margin-bottom: 1.8rem; }
  table { font-size: .88rem; }
  th, td { padding: .55em .7em; }
}

/* Respect user preferences --------------------------------- */

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

@media print {
  .site-header, .site-footer, .breadcrumb { display: none; }
  body { color: #000; background: #fff; }
  a { color: #000; border-bottom: 1px solid #000; }
}

/* Focus styles for a11y */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
