/* ==========================================================================
   Dowin — corporate site
   Light theme. One stylesheet for every page.
   ========================================================================== */

:root {
  /* surfaces */
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-tint: #f0f1fe;
  --surface: #ffffff;
  --border: #e6e8f2;
  --border-strong: #d5d8ea;

  /* ink */
  --ink: #14162b;
  --ink-2: #3a3f5c;
  --muted: #6b7192;

  /* brand */
  --accent: #5b4bff;
  --accent-ink: #4133e0;
  --accent-soft: #eceafe;
  --warm: #ff8a3d;
  --warm-soft: #fff1e6;
  --green: #12b76a;
  --green-soft: #e6f7ef;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(20, 22, 43, 0.05), 0 4px 12px rgba(20, 22, 43, 0.04);
  --shadow: 0 4px 12px rgba(20, 22, 43, 0.06), 0 20px 44px rgba(20, 22, 43, 0.08);
  --shadow-lg: 0 8px 24px rgba(20, 22, 43, 0.08), 0 32px 70px rgba(20, 22, 43, 0.12);

  --maxw: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Segoe UI', Inter, Roboto, system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent-ink);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  width: min(var(--maxw), 100% - 40px);
  margin-inline: auto;
}

.section {
  padding: 84px 0;
}

.section-soft {
  background: var(--bg-soft);
}

.section-tint {
  background: linear-gradient(180deg, var(--bg-tint), var(--bg-soft));
}

/* --------------------------------------------------------------- typography */
h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}

h1 {
  font-size: clamp(38px, 5.6vw, 62px);
}

h2 {
  font-size: clamp(28px, 3.6vw, 40px);
}

h3 {
  font-size: 20px;
  letter-spacing: -0.01em;
}

p {
  margin: 0 0 1em;
  color: var(--ink-2);
}

.lead {
  font-size: 19px;
  color: var(--ink-2);
  max-width: 62ch;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 44px;
}

.muted {
  color: var(--muted);
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.18s ease, background 0.18s ease,
    border-color 0.18s ease, color 0.18s ease;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 22px rgba(91, 75, 255, 0.28);
}

.btn-primary:hover {
  background: var(--accent-ink);
  box-shadow: 0 12px 28px rgba(91, 75, 255, 0.34);
}

.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--border-strong);
}

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

.btn-sm {
  padding: 9px 17px;
  font-size: 14px;
}

.arrow::after {
  content: '→';
  font-weight: 700;
}

/* ------------------------------------------------------------------- header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 22px;
  height: 72px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  font-size: 21px;
  letter-spacing: 0.14em;
  color: var(--ink);
  flex: none;
}

.logo:hover {
  text-decoration: none;
}

.logo svg {
  width: 32px;
  height: 32px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.nav a {
  padding: 8px 13px;
  border-radius: 9px;
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}

.nav a:hover {
  background: var(--bg-soft);
  color: var(--ink);
  text-decoration: none;
}

.nav a[aria-current='page'] {
  color: var(--accent-ink);
  background: var(--accent-soft);
}

.header-cta {
  flex: none;
}

.nav-toggle {
  display: none;
  margin-left: auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: var(--surface);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

/* --------------------------------------------------------------------- hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  background:
    radial-gradient(760px 420px at 78% -8%, #e9e6ff 0%, transparent 62%),
    radial-gradient(560px 360px at 6% 108%, #ffeede 0%, transparent 60%),
    linear-gradient(180deg, #ffffff, var(--bg-soft));
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  margin-bottom: 18px;
}

.hero .lead {
  font-size: 20px;
}

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

.hero-note {
  margin-top: 26px;
  font-size: 14px;
  color: var(--muted);
}

/* Abstract reel artwork used in the hero, built from CSS only. */
.hero-art {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 22px;
  border-radius: 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
}

.hero-art .tile {
  aspect-ratio: 1;
  border-radius: 16px;
  display: grid;
  place-items: center;
  font-size: 30px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(160deg, #8f83ff, #5b4bff);
  box-shadow: inset 0 -6px 14px rgba(0, 0, 0, 0.14), inset 0 4px 10px rgba(255, 255, 255, 0.3);
  animation: float 4.5s ease-in-out infinite;
}

.hero-art .tile:nth-child(2) { background: linear-gradient(160deg, #ffb877, #ff8a3d); animation-delay: 0.35s; }
.hero-art .tile:nth-child(3) { background: linear-gradient(160deg, #6fdcae, #12b76a); animation-delay: 0.7s; }
.hero-art .tile:nth-child(4) { background: linear-gradient(160deg, #ffd36f, #f0a91c); animation-delay: 0.2s; }
.hero-art .tile:nth-child(5) { background: linear-gradient(160deg, #9aa4ff, #5b4bff); animation-delay: 0.55s; }
.hero-art .tile:nth-child(6) { background: linear-gradient(160deg, #ff9db8, #e8447c); animation-delay: 0.9s; }
.hero-art .tile:nth-child(7) { background: linear-gradient(160deg, #7fd3ff, #2f97e0); animation-delay: 0.45s; }
.hero-art .tile:nth-child(8) { background: linear-gradient(160deg, #ffc46f, #ff8a3d); animation-delay: 0.8s; }
.hero-art .tile:nth-child(9) { background: linear-gradient(160deg, #b79bff, #7a54ff); animation-delay: 1.1s; }

@keyframes float {
  50% { transform: translateY(-8px); }
}

/* -------------------------------------------------------------------- cards */
.grid {
  display: grid;
  gap: 22px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.22s ease, border-color 0.18s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--border-strong);
}

.card h3 {
  margin-bottom: 8px;
}

.card p:last-child {
  margin-bottom: 0;
}

.card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 21px;
}

.card-icon.warm { background: var(--warm-soft); color: #d9660f; }
.card-icon.green { background: var(--green-soft); color: #0b8a50; }

/* ---------------------------------------------------------- featured game */
.feature-game {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  overflow: hidden;
  border-radius: 26px;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.feature-game-art {
  position: relative;
  min-height: 340px;
  padding: 34px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(240, 192, 74, 0.2), transparent 70%),
    linear-gradient(160deg, #241533, #120b1c);
}

.feature-game-body {
  padding: 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 26px;
  margin: 22px 0 28px;
}

.stat-row .stat {
  min-width: 92px;
}

.stat b {
  display: block;
  font-size: 24px;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 13px;
  color: var(--muted);
}

/* ------------------------------------------------------ category browsing */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 36px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.16s, color 0.16s, background 0.16s;
}

.filter-chip span {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 700;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

.filter-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.filter-chip.is-active span {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.game-group {
  margin-bottom: 48px;
}

.game-group[hidden] {
  display: none;
}

.game-group:last-of-type {
  margin-bottom: 0;
}

.group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.group-head h2 {
  font-size: 26px;
  margin-bottom: 4px;
}

.group-head p {
  margin: 0;
  max-width: 58ch;
  font-size: 14.5px;
}

.group-count {
  flex: none;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* The category a card belongs to, so it still reads correctly once the groups
   are filtered down to a single row. */
.cat-badge {
  align-self: flex-start;
  width: fit-content;
  padding: 2px 9px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.cat-badge.slots {
  background: var(--accent-soft);
  color: var(--accent-ink);
}

.cat-badge.crash {
  background: var(--warm-soft);
  color: #c2410c;
}

.cat-badge.lanes {
  background: #e6f7fb;
  color: #0e7490;
}

.cat-badge.turbo {
  background: var(--bg-soft);
  color: var(--muted);
}

/* Crash games get their own thumbnail colour so the catalogue reads at a
   glance rather than every tile looking like the last one. */
.thumb-crash {
  background: linear-gradient(160deg, #3a1220, #120a1c) !important;
  color: #ff9a3d !important;
}

.thumb-lanes {
  background: linear-gradient(160deg, #12143a, #2a0b33 62%, #08060f) !important;
  color: #6ee7f9 !important;
}

.thumb-jungle {
  background: linear-gradient(160deg, #0d2a1a, #163d24 55%, #04120a) !important;
  color: #86efac !important;
}

/* ------------------------------------------------------------- game cards */
.game-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.game-card .thumb {
  aspect-ratio: 16 / 10;
  display: grid;
  place-items: center;
  position: relative;
  background: linear-gradient(160deg, #241533, #120b1c);
  color: #ffe08a;
  font-weight: 900;
  letter-spacing: 0.22em;
  font-size: 15px;
}

.game-card .thumb.soon {
  background: linear-gradient(160deg, #eceafe, #e2ddff);
  color: var(--accent-ink);
}

.game-card .body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.game-card .body .actions {
  margin-top: auto;
  padding-top: 14px;
}

.tag {
  display: inline-block;
  /* Inside a flex column a tag would otherwise stretch to the full width. */
  align-self: flex-start;
  width: fit-content;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--green-soft);
  color: #0b8a50;
}

.tag.soon {
  background: var(--bg-tint);
  color: var(--accent-ink);
}

.tag.grey {
  background: var(--bg-soft);
  color: var(--muted);
}

/* -------------------------------------------------------------------- news */
.news-item {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}

.news-item:first-of-type {
  border-top: 1px solid var(--border);
}

.news-date {
  font-size: 13px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 4px;
}

.news-item h3 {
  margin-bottom: 6px;
}

.news-item p {
  margin-bottom: 0;
}

/* ---------------------------------------------------------------- vacancies */
.job {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 22px 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  transition: border-color 0.18s, box-shadow 0.2s, transform 0.18s;
}

.job:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.job h3 {
  margin-bottom: 4px;
}

.job-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.job-meta span::after {
  content: '·';
  margin-left: 8px;
  opacity: 0.5;
}

.job-meta span:last-child::after {
  content: '';
}

/* ------------------------------------------------------------------- forms */
.form {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-2);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color 0.16s, box-shadow 0.16s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

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

.form-note {
  font-size: 13px;
  color: var(--muted);
}

.subscribe {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  max-width: 480px;
}

.subscribe input {
  flex: 1 1 240px;
  padding: 13px 16px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font: inherit;
  font-size: 15px;
}

.subscribe input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

/* ------------------------------------------------------------------- logos */
.logo-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 14px;
}

.logo-chip {
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 22px 14px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  text-align: center;
}

.logo-chip b {
  font-size: 14px;
  letter-spacing: 0.08em;
}

.logo-chip span {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ------------------------------------------------------------------ footer */
.site-footer {
  padding: 62px 0 30px;
  background: #10121f;
  color: #c9cde0;
}

.site-footer a {
  color: #c9cde0;
}

.site-footer a:hover {
  color: #fff;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: 34px;
  padding-bottom: 34px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer .logo {
  color: #fff;
}

.footer-col h4 {
  margin-bottom: 12px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8b91ad;
  font-weight: 700;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 9px;
  font-size: 14px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  justify-content: space-between;
  padding-top: 22px;
  font-size: 12.5px;
  color: #8b91ad;
}

.footer-note {
  max-width: 62ch;
  font-size: 13px;
  color: #8b91ad;
  margin-top: 14px;
}

/* -------------------------------------------------------------- page hero */
.page-hero {
  padding: 64px 0 46px;
  background: linear-gradient(180deg, var(--bg-tint), #ffffff);
  border-bottom: 1px solid var(--border);
}

/* --------------------------------------------------------------- callouts */
.callout {
  padding: 22px 26px;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--accent-soft);
  color: var(--ink-2);
  font-size: 15px;
}

.callout.warn {
  border-left-color: var(--warm);
  background: var(--warm-soft);
}

.callout p:last-child {
  margin-bottom: 0;
}

/* ----------------------------------------------------------------- demo */
.demo-frame {
  width: 100%;
  aspect-ratio: 16 / 11;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #120b1c;
  box-shadow: var(--shadow);
}

.demo-offline {
  display: grid;
  place-items: center;
  text-align: center;
  padding: 60px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-soft);
}

/* ------------------------------------------------------------------ mobile */
@media (max-width: 980px) {
  .hero-grid,
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .feature-game { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 780px) {
  .section { padding: 60px 0; }

  .nav {
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
  }

  .nav[hidden] { display: none; }
  .nav-toggle { display: block; }
  .header-cta { display: none; }

  .grid-2,
  .grid-3,
  .grid-4,
  .hero-grid { grid-template-columns: 1fr; }

  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .job { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .feature-game-body { padding: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art .tile { animation: none; }
  .btn:hover, .card:hover, .job:hover { transform: none; }
}
