/* DigitalDice Games — static site stylesheet */

:root {
  --bg: #0a0a12;
  --bg-2: #12121e;
  --surface: #171726;
  --border: #26263a;
  --text: #ecebf5;
  --muted: #a3a1b8;
  --purple: #6c60b7;
  --red: #eb4b4b;
  --grad: linear-gradient(90deg, var(--purple), var(--red));
  --radius: 14px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1rem/1.65 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

a { color: #b3aaf0; text-underline-offset: 3px; }
a:hover { color: #fff; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 800; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--red); color: #fff; padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.eyebrow {
  display: inline-block;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted);
  margin-bottom: .8rem;
}

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 10, 18, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  height: 76px;
}
.brand { display: block; text-decoration: none; flex-shrink: 0; }
.site-header .brand img { width: 170px; height: 57px; }
.site-footer .brand img { width: 150px; height: 51px; }

.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--muted); text-decoration: none; font-weight: 600; font-size: .95rem;
  padding: 8px 12px; border-radius: 8px;
}
.nav a:hover { color: #fff; background: var(--surface); }
.nav a[aria-current="page"] { color: #fff; }
.nav a[aria-current="page"]::after {
  content: ""; display: block; height: 2px; margin-top: 2px; background: var(--grad); border-radius: 2px;
}

.nav a { white-space: nowrap; }

@media (max-width: 640px) {
  .site-header .wrap { flex-wrap: wrap; height: auto; padding-top: 10px; padding-bottom: 6px; gap: 4px; }
  .site-header .brand img { width: 128px; height: 43px; }
  .nav { width: 100%; justify-content: space-between; margin: 0 -9px; width: calc(100% + 18px); }
  .nav a { padding: 8px 9px; font-size: .9rem; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 700; font-size: .95rem; text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 24px -8px rgba(235, 75, 75, .6); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 30px -8px rgba(235, 75, 75, .75); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { color: #fff; border-color: #3a3a55; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Hero ---------- */

.hero {
  position: relative; overflow: hidden;
  padding: clamp(64px, 12vw, 130px) 0 clamp(56px, 9vw, 100px);
}
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto auto;
  width: 70vw; height: 70vw; max-width: 820px; max-height: 820px;
  background: radial-gradient(closest-side, rgba(108, 96, 183, .35), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: auto auto -45% -15%;
  width: 60vw; height: 60vw; max-width: 700px; max-height: 700px;
  background: radial-gradient(closest-side, rgba(235, 75, 75, .22), transparent 70%);
  pointer-events: none;
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: 40px;
}
.hero-mark {
  aspect-ratio: 800 / 706; width: 100%; max-width: 380px; justify-self: center;
  background: var(--grad);
  -webkit-mask: url(../img/ddg-mark.webp) center / contain no-repeat;
  mask: url(../img/ddg-mark.webp) center / contain no-repeat;
  filter: drop-shadow(0 20px 60px rgba(108, 96, 183, .35));
}
.hero-full { flex: 1; display: flex; align-items: center; }
main:has(> .hero-full) { display: flex; flex-direction: column; }
.hero-logo { width: min(100%, 460px); margin-bottom: 1.6rem; }
.hero .lead { font-size: 1.15rem; color: var(--muted); max-width: 34em; margin-bottom: 2rem; }

@media (max-width: 800px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-mark { order: -1; max-width: 200px; justify-self: start; }
}

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-2); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p { color: var(--muted); }

.page-head { padding: clamp(48px, 8vw, 88px) 0 clamp(24px, 4vw, 40px); }
.page-head p { color: var(--muted); max-width: 40em; font-size: 1.1rem; }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.card p:last-child { margin-bottom: 0; }
.card p { color: var(--muted); }

.service .icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--grad); margin-bottom: 18px;
}
.service .icon svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Games ---------- */

.game {
  display: grid; grid-template-columns: 180px 1fr; gap: 28px; align-items: center;
  padding: 24px;
}
.game img { width: 180px; height: 180px; border-radius: 28px; box-shadow: 0 16px 40px -16px rgba(0, 0, 0, .8); }
.game h3 { font-size: 1.6rem; margin-bottom: .3em; }
.game .tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tag {
  font-size: .78rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px;
}
@media (max-width: 600px) {
  .game { grid-template-columns: 1fr; }
  .game img { width: 128px; height: 128px; border-radius: 24px; }
}

.soon {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center;
  min-height: 180px;
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255, 255, 255, .025) 14px 28px),
    var(--surface);
  border-style: dashed;
}
.soon .badge {
  display: inline-block; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem;
  background: var(--red); color: #fff; padding: 4px 12px; border-radius: 6px; transform: rotate(-2deg);
  margin-bottom: 12px;
}

/* ---------- Contact ---------- */

.contact-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.contact-list h3 { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: .4em; }
.contact-list address { font-style: normal; }
.mail-big { font-size: clamp(1.3rem, 3.5vw, 1.8rem); font-weight: 800; text-decoration: none; word-break: break-word; }

.cta {
  text-align: center;
  background:
    radial-gradient(closest-side at 20% 0%, rgba(108, 96, 183, .35), transparent),
    radial-gradient(closest-side at 80% 100%, rgba(235, 75, 75, .25), transparent),
    var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: clamp(36px, 6vw, 64px) 24px;
}
.cta p { color: var(--muted); max-width: 32em; margin: 0 auto 1.6em; }
.cta .btn-row { justify-content: center; }

/* ---------- Legal pages ---------- */

.legal > * { max-width: 780px; }
.legal h2 { font-size: 1.5rem; margin-top: 2.2em; }
.legal h3 { margin-top: 1.8em; }
.legal h4 { margin-top: 1.4em; color: var(--text); }
.legal p, .legal li { color: #c9c7da; }
.legal li { margin-bottom: .5em; }
.legal li p { margin-bottom: .3em; }
.legal .meta { color: var(--muted); font-size: .95rem; }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 3.5em 0; }

.toc {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 2.5em;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: #706f6f;
  font-size: .85rem;
}
.site-footer .wrap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px;
}
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}
