/* 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(11, 11, 36, 0.4); background: #fff; height: 100%; }
.cards-page body { height: 100%; margin: 0; color: var(--menu-bg); background: #fff; 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: var(--menu-bg); 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 var(--t), color var(--t), border-color var(--t);
}
@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(--line-c);
  border-radius: 0 44px 0 44px;
  font-size: 1.25rem; font-variant-numeric: slashed-zero;
  transition: border-color var(--t);
}
.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;
}
/* One straight underline under the whole title, drawn from the centre */
.title::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px;
  height: 1.5px; background: currentColor;
  transform: scaleX(0); transition: transform 450ms cubic-bezier(.2, .8, .2, 1);
}

.art {
  position: absolute; left: 0; right: 0; bottom: 0;
  width: 100%; height: 68%;
  fill: none; stroke: currentColor; stroke-width: 1.2;
}
.art * { vector-effect: non-scaling-stroke; }
.art text { fill: currentColor; stroke: var(--halo); stroke-width: 10px; paint-order: stroke; font-size: 34px; text-anchor: middle; transition: stroke var(--t); }
.art .swipe { vector-effect: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; stroke-dashoffset: 1.01; transition: stroke-dashoffset 900ms ease; }
.art-soft { height: 45%; }
.art-soft * { opacity: 0.6; }

/* 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 var(--t), stroke var(--t); }

/* Every colour change runs on one clock so nothing lags behind */
.card { --t: 350ms ease; --line-c: var(--menu-line); --halo: #fff; }
.card.is-active { background: var(--hover); color: var(--menu-bg); border-color: var(--menu-bg); --line-c: var(--menu-bg); --halo: var(--hover); }
.card.is-active .title::after { transform: scaleX(1); }
.card.is-active .swipe { stroke-dashoffset: 0; }
.title { white-space: nowrap; }
.card.is-active .logo-letters { fill: var(--menu-bg); }
.card.is-active .logo-shard { fill: url(#shardGrad); stroke: transparent; }

/* Small motion when a card becomes active */
.art .spark, .art .pulse, .art .float, .art .dot, .art .lock, .art .hands { transform-box: fill-box; transform-origin: center; }
.art .hands { transform-box: view-box; transform-origin: 40px 375px; }
.card.is-active .draw { stroke-dasharray: 1600; animation: draw 1100ms cubic-bezier(.4, 0, .2, 1) both; }
.card.is-active .draw.d2 { animation-delay: 90ms; }
.card.is-active .draw.d3 { animation-delay: 180ms; }
.card.is-active .draw.d4 { animation-delay: 270ms; }
.card.is-active .draw.check { stroke-width: 2; animation-delay: 380ms; }
.card.is-active .spark { animation: spark 900ms cubic-bezier(.2, .8, .2, 1); }
.card.is-active .spark.d2 { animation-delay: 150ms; }
.card.is-active .pulse { animation: pulse 1200ms ease-out; }
.card.is-active .pulse.d2 { animation-delay: 120ms; }
.card.is-active .pulse.d3 { animation-delay: 240ms; }
.card.is-active .float { animation: float 2400ms ease-in-out infinite; }
.card.is-active .float.d2 { animation-delay: -1200ms; }
.card.is-active .lock { animation: lock 700ms cubic-bezier(.3, 1.6, .5, 1) 300ms both; }
.card.is-active .dot { animation: dot 1100ms ease-in-out infinite; }
.card.is-active .dot.d2 { animation-delay: 150ms; }
.card.is-active .dot.d3 { animation-delay: 300ms; }
.card.is-active .hands { animation: hands 1400ms cubic-bezier(.4, 0, .2, 1); }

@keyframes draw  { from { stroke-dashoffset: 1600; } to { stroke-dashoffset: 0; } }
@keyframes spark { 0% { transform: scale(.4) rotate(-90deg); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes pulse { 0% { transform: scale(.94); } 45% { transform: scale(1.03); } 100% { transform: none; } }
@keyframes float { 0%, 100% { transform: none; } 50% { transform: translateY(-8px); } }
@keyframes lock  { 0% { transform: translateY(10px) scale(.8); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes dot   { 0%, 60%, 100% { transform: none; } 30% { transform: translateY(-9px); } }
@keyframes hands { from { transform: rotate(-360deg); } to { transform: none; } }

.card:focus-visible { outline: 2px solid var(--menu-bg); 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; }
}

/* 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, .card * { animation: none !important; }
  .title::after { transition: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
