/* SYD Games — sydgames.com
   Tokens: ink #1E2140 · paper #F4F6FB · teal #2EC4B6 · coral #FF6B6B · indigo #5B5FEF (+ darker "lip" shades)
   Type: Outfit (400/500/700/800). Scale ≈ 1.25 from 18px. */
@font-face { font-family: Outfit; font-weight: 400; font-display: swap; src: url(/assets/fonts/outfit-400.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 500; font-display: swap; src: url(/assets/fonts/outfit-500.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 700; font-display: swap; src: url(/assets/fonts/outfit-700.woff2) format("woff2"); }
@font-face { font-family: Outfit; font-weight: 800; font-display: swap; src: url(/assets/fonts/outfit-800.woff2) format("woff2"); }
@font-face { font-family: Fredoka; font-weight: 700; font-display: swap; src: url(/assets/fonts/fredoka-700.woff2) format("woff2"); }

:root {
  --ink: #1E2140;
  --ink-soft: #565B7A;
  --paper: #F4F6FB;
  --line: #DCE0EC;
  --teal: #2EC4B6; --teal-lip: #1E8C82;
  --coral: #FF6B6B; --coral-lip: #C9484A;
  --indigo: #5B5FEF; --indigo-lip: #3C3FB8;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 32px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18px/1.6 Outfit, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--indigo-lip); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--indigo); }
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-weight: 800; line-height: 1.12; letter-spacing: -0.015em; margin: 0 0 0.5em; }
h1 { font-size: clamp(36px, 6vw, 56px); }
h2 { font-size: clamp(28px, 4vw, 35px); }
h3 { font-size: 22px; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }
.lead { font-size: clamp(20px, 2.4vw, 25px); font-weight: 500; line-height: 1.45; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

main > section, .top, .foot-inner { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
main > section { margin-block: clamp(48px, 8vw, 96px); }

/* ---------- header ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 22px; }
.brand img { width: 170px; height: auto; }
.top nav { display: flex; gap: clamp(16px, 3vw, 32px); }
.top nav a { color: var(--ink); font-weight: 500; text-decoration: none; padding: 6px 2px; border-bottom: 3px solid transparent; }
.top nav a:hover, .top nav a[aria-current="page"] { border-bottom-color: var(--teal); }

/* ---------- home hero: the logo you can press ---------- */
.hero { text-align: center; margin-top: clamp(24px, 6vw, 64px) !important; }
.keys { display: flex; justify-content: center; gap: clamp(10px, 2.2vw, 22px); }
.key {
  appearance: none; border: 0; padding: 0; background: none; cursor: pointer;
  width: clamp(88px, 21vw, 172px); -webkit-tap-highlight-color: transparent;
  border-radius: 24%;
}
.key svg { width: 100%; height: auto; display: block; overflow: visible; }
.key .lip { fill: var(--lip); }
.key .cap rect { fill: var(--face); }
.key .cap { transition: transform 90ms ease-out; }
.key:active .cap, .key[aria-pressed="true"] .cap { transform: translateY(6px); }
.key:focus-visible { outline-offset: 6px; }
.motto { margin: clamp(22px, 4vw, 36px) 0 0; font-weight: 800; font-size: clamp(30px, 5.4vw, 58px); letter-spacing: -0.02em; line-height: 1.1; }
.motto span { transition: color 160ms; }
.hero.on-s .w-s { color: var(--teal-lip); }
.hero.on-y .w-y { color: var(--coral-lip); }
.hero.on-d .w-d { color: var(--indigo); }

@media (prefers-reduced-motion: no-preference) {
  .key { animation: drop 620ms cubic-bezier(.2,.9,.3,1.25) both; }
  .key:nth-child(2) { animation-delay: 110ms; }
  .key:nth-child(3) { animation-delay: 220ms; }
  .motto { animation: fade 500ms 520ms both; }
  @keyframes drop { from { transform: translateY(-70px); opacity: 0; } 60% { opacity: 1; } to { transform: none; } }
  @keyframes fade { from { opacity: 0; } }
}

/* ---------- intro ---------- */
.intro { display: grid; grid-template-columns: minmax(0, 36em); }
.intro p:not(.lead) { color: var(--ink-soft); max-width: 34em; }

/* ---------- featured game (home) ---------- */
.section-title { margin-bottom: 24px; }
.game-feature {
  display: grid; grid-template-columns: auto 1fr minmax(160px, 260px); gap: 28px; align-items: center;
  background: #2F2A4A; color: #FBF3E4; text-decoration: none; border-radius: 32px;
  padding: 32px 36px 0; overflow: hidden; position: relative;
  background-image: radial-gradient(ellipse at 80% 110%, rgba(242,107,58,.45), rgba(242,107,58,0) 60%);
}
.game-feature:hover { color: #FBF3E4; }
.game-feature h3 { font-family: Fredoka, Outfit, sans-serif; font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: 0; }
.game-feature p { color: #E4DCEF; max-width: 30em; }
.gf-icon { width: 112px; border-radius: 26px; align-self: start; margin-top: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.gf-text { padding-bottom: 32px; }
.gf-shot { border-radius: 26px 26px 0 0; border: 6px solid #1B1730; border-bottom: 0; align-self: end; max-height: 360px; object-fit: cover; object-position: top; transition: transform 200ms ease-out; }
.game-feature:hover .gf-shot { transform: translateY(-8px); }

.status { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; padding: 6px 14px 6px 10px; border-radius: 999px; background: #fff; border: 2px solid var(--line); margin: 4px 0 0; color: var(--ink); }
.status .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(46,196,182,.22); }
.status.on-dark { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }

/* ---------- page head ---------- */
.page-head { margin-bottom: 32px !important; }
.page-head .lead { color: var(--ink-soft); max-width: 30em; }

/* ---------- catalog ---------- */
.catalog { margin-top: 0 !important; }
.cat-item { background: #fff; border-radius: 28px; overflow: hidden; border: 2px solid var(--line); }
.cat-media img { width: 100%; aspect-ratio: 1024 / 500; object-fit: cover; }
.cat-body { display: flex; gap: 20px; padding: 26px 28px 30px; align-items: flex-start; }
.cat-icon { width: 72px; border-radius: 18px; flex: none; }
.cat-body h2 { font-size: 28px; margin-bottom: 6px; }
.cat-body h2 a { color: var(--ink); text-decoration: none; }
.cat-body h2 a:hover { color: var(--indigo); }
.cat-body p { max-width: 38em; }
.meta { color: var(--ink-soft); font-size: 16px; font-weight: 500; }
.cat-next { display: flex; align-items: center; gap: 16px; margin-top: 24px; padding: 20px 24px; border: 2px dashed var(--line); border-radius: 22px; color: var(--ink-soft); }
.cat-next p { margin: 0; }

/* ---------- Worldsmith page ---------- */
.ws .ws-hero {
  max-width: none; margin: 0 0 clamp(48px, 8vw, 96px); padding: clamp(36px, 6vw, 72px) max(var(--gutter), calc((100% - var(--wrap)) / 2 + var(--gutter))) 0;
  background: linear-gradient(#3B3459, #2F2A4A); color: #FBF3E4;
  display: grid; grid-template-columns: 1fr minmax(260px, 440px); gap: 32px; align-items: end; overflow: hidden;
  background-image: radial-gradient(ellipse at 75% 100%, rgba(242,107,58,.5), rgba(242,107,58,0) 55%), linear-gradient(#3B3459, #2F2A4A);
}
.ws-hero-text { padding-bottom: clamp(36px, 6vw, 72px); }
.ws-icon { width: 88px; border-radius: 22px; margin-bottom: 20px; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.ws h1 { font-family: Fredoka, Outfit, sans-serif; font-weight: 700; letter-spacing: 0; font-size: clamp(44px, 7vw, 72px); margin-bottom: 18px; }
.ws-sub { display: block; font-size: 0.42em; color: #F2B544; margin-top: 6px; }
.ws-hero .lead { color: #E4DCEF; max-width: 28em; }
.ws-phones { position: relative; height: clamp(300px, 42vw, 470px); }
.ws-phones img { position: absolute; bottom: 0; width: 56%; border-radius: 28px 28px 0 0; border: 7px solid #1B1730; border-bottom: 0; }
.ws-phones .p1 { left: 0; height: 92%; object-fit: cover; object-position: top; }
.ws-phones .p2 { right: 0; height: 100%; object-fit: cover; object-position: top; box-shadow: -14px 0 30px rgba(0,0,0,.3); }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 36px); counter-reset: step; }
.steps li { counter-increment: step; }
.steps img { border-radius: 22px; border: 6px solid var(--ink); aspect-ratio: 390 / 600; object-fit: cover; object-position: top; margin-bottom: 18px; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 34px; height: 34px; margin-right: 10px; border-radius: 10px; background: #F26B3A; color: #fff; font-size: 18px; box-shadow: 0 4px 0 #C94A26; vertical-align: 3px; }
.steps p { color: var(--ink-soft); }

.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 40px; }
.facts li { position: relative; padding-left: 34px; color: var(--ink-soft); max-width: 30em; }
.facts li b { color: var(--ink); font-weight: 700; }
.facts li::before { content: ""; position: absolute; left: 0; top: 0.35em; width: 18px; height: 18px; border-radius: 6px; background: #F26B3A; box-shadow: 0 3px 0 #C94A26; }
.facts li:nth-child(3n+2)::before { background: #F2B544; box-shadow: 0 3px 0 #D08F1F; }
.facts li:nth-child(3n)::before { background: #2E9C9A; box-shadow: 0 3px 0 #1F7472; }

.gallery { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px; }
.gallery img { flex: none; width: clamp(180px, 24vw, 240px); border-radius: 22px; border: 6px solid var(--ink); scroll-snap-align: start; }
.ws-legal { color: var(--ink-soft); }
.ws-legal p { margin-bottom: 6px; }

/* ---------- legal ---------- */
.legal { max-width: 40em; }
.legal h1 { font-size: clamp(34px, 5vw, 44px); }
.legal h2 { font-size: 24px; margin-top: 1.6em; }
.legal .effective { color: var(--ink-soft); font-weight: 500; }
.legal ul { padding-left: 1.2em; }
.legal li { margin-bottom: 0.4em; }

.notfound { min-height: 40vh; }

/* ---------- footer ---------- */
.foot { background: var(--ink); color: #C9CCE0; margin-top: clamp(64px, 10vw, 120px); }
.foot-inner { display: grid; grid-template-columns: auto 1fr auto; gap: 8px 32px; align-items: center; padding-block: 36px 40px; }
.foot-inner img { width: 133px; }
.foot-tag { margin: 0; font-weight: 500; color: #fff; }
.foot-links { list-style: none; display: flex; gap: 22px; flex-wrap: wrap; padding: 0; margin: 0; justify-self: end; }
.foot a { color: #fff; }
.foot a:hover { color: var(--teal); }
.foot-copy { grid-column: 1 / -1; margin: 12px 0 0; font-size: 15px; }

/* ---------- small screens ---------- */
@media (max-width: 820px) {
  .game-feature { grid-template-columns: 1fr; padding: 26px 24px 0; gap: 18px; }
  .gf-icon { width: 84px; border-radius: 20px; }
  .gf-text { padding-bottom: 0; }
  .gf-shot { max-height: 280px; width: 70%; justify-self: center; }
  .ws .ws-hero { grid-template-columns: 1fr; }
  .ws-hero-text { padding-bottom: 8px; }
  .ws-phones { height: 360px; }
  .steps { grid-template-columns: 1fr; max-width: 420px; }
  .facts { grid-template-columns: 1fr; }
  .cat-body { flex-direction: column; gap: 14px; padding: 22px; }
  .foot-inner { grid-template-columns: 1fr; }
  .foot-links { justify-self: start; }
}
@media (max-width: 420px) {
  .brand img { width: 136px; }
  .top nav { gap: 14px; }
}
