/* Kapte Games — shared styles */
:root {
  --ink: #0d0d3d;          /* logo dark blue */
  --indigo: #4634f4;
  --violet: #8b2bff;
  --cyan: #00e5f2;
  --text: #2b2d4f;
  --muted: #62657f;
  --line: #e6e7f0;
  --mist: #f5f6fb;
  --paper: #ffffff;
  --mint: #6fe4b0;         /* Wordie Rush icon */
  --mint-deep: #0f5a3a;
  --radius: 28px;
  --wrap: 1120px;
  font-family: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 1.0625rem; line-height: 1.6; }
img { max-width: 100%; display: block; }
a { color: var(--indigo); text-underline-offset: 3px; }
a:hover { color: var(--violet); }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 3px; border-radius: 6px; }

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

/* Header */
.site-header { padding: 28px 0; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand img { height: 42px; width: auto; }

.pill {
  display: inline-flex; align-items: center; gap: 12px;
  height: 52px; padding: 0 24px;
  border: 1.5px solid currentColor; border-radius: 999px;
  background: transparent; color: var(--ink);
  font: inherit; font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em;
  text-decoration: none; cursor: pointer;
  transition: background 200ms, color 200ms;
}
.menu-open:hover { background: var(--ink); color: #fff; }
.menu-dots { display: inline-flex; gap: 4px; }
.menu-dots i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Cards home page */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cards-page { --menu-bg: #0b0b24; --menu-line: rgba(255, 255, 255, 0.38); background: var(--menu-bg); height: 100%; }
.cards-page body { height: 100%; margin: 0; color: #fff; background: var(--menu-bg); overflow: hidden; }

.menu-track {
  --pad: clamp(24px, 3vw, 48px);
  height: 100%;
  display: flex; align-items: center; gap: clamp(20px, 2.6vw, 48px);
  padding: var(--pad);
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scroll-padding-inline: var(--pad);
  scrollbar-width: none;
}
.menu-track::-webkit-scrollbar { display: none; }

.card {
  position: relative; flex: none;
  height: 100%; max-height: 900px; aspect-ratio: 0.52;
  display: flex; flex-direction: column; align-items: center;
  border: 1px solid var(--menu-line); border-radius: 44px;
  overflow: hidden;
  color: #fff; text-decoration: none;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  animation: card-in 800ms cubic-bezier(.2, .8, .2, 1) both;
  animation-delay: calc(var(--i) * 80ms + 100ms);
  transition: background 350ms ease, color 350ms ease, border-color 350ms ease;
}
@keyframes card-in { from { transform: translateY(56px); opacity: 0; } to { transform: none; opacity: 1; } }

.num {
  position: absolute; top: -1px; right: -1px;
  width: 84px; height: 84px;
  display: grid; place-items: center;
  border: 1px solid var(--menu-line);
  border-radius: 0 44px 0 44px;
  font-size: 1.25rem; font-variant-numeric: slashed-zero;
  transition: border-color 350ms;
}
.title {
  position: relative; z-index: 1;
  margin-top: clamp(64px, 11vh, 110px);
  text-align: center; text-transform: uppercase;
  font-size: clamp(1.3rem, 2vw, 1.75rem); line-height: 1.2; letter-spacing: 0.01em;
  text-decoration: underline 1.5px transparent; text-underline-offset: 7px;
  transition: text-decoration-color 350ms;
}
.card-note {
  display: inline-block; margin-top: 18px;
  text-transform: none; text-decoration: none; letter-spacing: 0;
  font-size: 0.95rem; line-height: 1.6; opacity: 0.8;
}

.art {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 68%;
  fill: none; stroke: currentColor; stroke-width: 1.2;
  opacity: 0.75; transition: opacity 350ms;
}
.art * { vector-effect: non-scaling-stroke; }
.art text { fill: currentColor; stroke: var(--menu-bg); stroke-width: 10px; paint-order: stroke; font-size: 34px; text-anchor: middle; transition: stroke 350ms; }
.art .swipe { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; transition: stroke-dashoffset 900ms ease; }
.art-soft { height: 45%; opacity: 0.45; }

/* Logo card: outline by default, filled when active */
.card-logo { justify-content: center; }
.logo-art { position: relative; z-index: 1; width: 76%; height: auto; margin-bottom: 8%; overflow: visible; }
.logo-art path { fill: transparent; stroke: currentColor; stroke-width: 1.6px; vector-effect: non-scaling-stroke; transition: fill 450ms ease, stroke 450ms ease; }

/* Active card: hover on desktop, centered card on touch screens */
@media (hover: hover) {
  .card:hover { background: var(--hover); color: var(--menu-bg); border-color: var(--hover); }
  .card:hover .num { border-color: currentColor; }
  .card:hover .title { text-decoration-color: currentColor; }
  .card:hover .art { opacity: 1; }
  .card:hover .art text { stroke: var(--hover); }
  .card:hover .swipe { stroke-dashoffset: 0; }
  .card:hover .logo-letters { fill: var(--menu-bg); }
  .card:hover .logo-shard { fill: url(#shardGrad); stroke: transparent; }
}
@media (hover: none) {
  .card.is-active { background: var(--hover); color: var(--menu-bg); border-color: var(--hover); }
  .card.is-active .num { border-color: currentColor; }
  .card.is-active .title { text-decoration-color: currentColor; }
  .card.is-active .art { opacity: 1; }
  .card.is-active .art text { stroke: var(--hover); }
  .card.is-active .swipe { stroke-dashoffset: 0; }
  .card.is-active .logo-letters { fill: var(--menu-bg); }
  .card.is-active .logo-shard { fill: url(#shardGrad); stroke: transparent; }
}
.card:focus-visible { outline: 2px solid #fff; outline-offset: 6px; }

@media (max-width: 760px) {
  .menu-track {
    --card-w: 78vw;
    padding: 0 calc((100vw - var(--card-w)) / 2);
    scroll-padding-inline: 0; gap: 16px; scroll-snap-type: x mandatory;
  }
  .card {
    width: var(--card-w); height: auto; max-height: calc(100% - 48px);
    border-radius: 36px; scroll-snap-align: center; scroll-snap-stop: always;
  }
  .num { width: 64px; height: 64px; border-radius: 0 36px 0 36px; font-size: 1.1rem; }
  .title { margin-top: 56px; font-size: 1.35rem; }
  .card-note { font-size: 0.875rem; }
}

/* Home: intro */
.intro { padding: 72px 0 56px; }
.intro h1 {
  margin: 0;
  max-width: 14ch;
  color: var(--ink);
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.intro p { max-width: 46ch; margin: 28px 0 0; font-size: 1.2rem; color: var(--muted); }

/* Home: game spotlight */
.spotlight {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 340px);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  padding: clamp(32px, 6vw, 80px);
  border-radius: var(--radius);
  background: var(--mint);
  color: var(--mint-deep);
  overflow: hidden;
}
.spotlight .icon {
  width: 112px;
  height: auto;
  aspect-ratio: 1;
  margin-bottom: 28px;
  border-radius: 22.5%;
  box-shadow: 0 18px 36px -18px rgba(15, 90, 58, 0.6);
}
.spotlight h2 {
  margin: 0;
  color: #06331f;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.spotlight .tagline { margin: 12px 0 0; font-size: 1.35rem; font-weight: 700; color: #06331f; }
.spotlight p { margin: 16px 0 0; max-width: 40ch; font-size: 1.15rem; line-height: 1.5; }
.status {
  display: inline-flex; align-items: center; gap: 10px;
  margin-top: 32px; padding: 12px 20px;
  border-radius: 999px; background: #06331f; color: #fff;
  font-weight: 600; font-size: 0.975rem; text-decoration: none;
}
.status svg { width: 18px; height: 18px; fill: currentColor; }
a.status:hover { color: #fff; background: #0a4a2d; }

.screen {
  margin: 0;
  justify-self: center;
  width: 100%;
  border-radius: 36px;
  padding: 8px;
  background: #06331f;
  box-shadow: 0 40px 80px -30px rgba(6, 51, 31, 0.7);
  transform: rotate(3deg);
  animation: pop 800ms cubic-bezier(.2, 1.3, .4, 1) both 150ms;
}
.screen img { width: 100%; height: auto; border-radius: 29px; }

@keyframes pop { from { transform: translateY(40px) rotate(8deg); opacity: 0; } to { transform: rotate(3deg); opacity: 1; } }

/* Home: contact */
.contact { padding: 88px 0 104px; }
.contact h2 { margin: 0; color: var(--ink); font-size: 1.75rem; letter-spacing: -0.02em; }
.contact p { margin: 10px 0 0; color: var(--muted); max-width: 52ch; }
.contact .mail { display: inline-block; margin-top: 18px; font-size: 1.35rem; font-weight: 700; }

/* Document pages */
.doc { padding: 40px 0 104px; }
.doc .wrap { max-width: 740px; }
.doc h1 { margin: 0; color: var(--ink); font-size: clamp(2.2rem, 5vw, 3.2rem); line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; }
.doc .updated { margin: 14px 0 40px; color: var(--muted); font-size: 0.95rem; }
.doc h2 { margin: 48px 0 12px; color: var(--ink); font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.01em; }
.doc h3 { margin: 28px 0 8px; color: var(--ink); font-size: 1.08rem; }
.doc p, .doc li { max-width: 68ch; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc .lead { font-size: 1.15rem; color: var(--text); }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
table { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 12px 16px; border-bottom: 1px solid var(--line); }
th { background: var(--mist); color: var(--ink); font-weight: 700; }
tr:last-child td { border-bottom: 0; }

/* Support page */
.support-card { margin: 8px 0 48px; padding: 28px 32px; border-radius: 20px; background: var(--mist); }
.support-card p { margin: 0; }
.support-card .mail { display: inline-block; margin-top: 8px; font-size: clamp(1.1rem, 4.6vw, 1.4rem); font-weight: 700; overflow-wrap: anywhere; }
details { border-bottom: 1px solid var(--line); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--line); }
summary { cursor: pointer; color: var(--ink); font-weight: 700; font-size: 1.08rem; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; font-size: 1.5rem; line-height: 1; color: var(--indigo); transition: transform 200ms; }
details[open] summary::after { transform: rotate(45deg); }
details p { margin: 12px 0 0; }

/* Footer */
.site-footer { background: var(--ink); color: #c9cae6; padding: 56px 0 40px; font-size: 0.95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.site-footer img { height: 32px; width: auto; }
.site-footer address { font-style: normal; margin-top: 16px; line-height: 1.7; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--cyan); }
.foot-links { display: flex; flex-direction: column; gap: 10px; }
.copy { flex-basis: 100%; margin: 24px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); color: #8f91b8; }

@media (max-width: 760px) {
  .brand img { height: 34px; }
  .pill { height: 44px; padding: 0 18px; font-size: 1rem; }
  .intro { padding: 40px 0 40px; }
  .spotlight { grid-template-columns: 1fr; }
  .spotlight .icon { width: 88px; }
  .screen { max-width: 280px; }
  .support-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { animation: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
