/* ---------- tokens ---------- */
:root {
  --bg: #f8fcfb;
  --surface: #ffffff;
  --surface-2: #eef7f4;
  --line: #e1eeea;
  --text: #102624;
  --muted: #3c5552;
  --accent: #0e8573;
  --accent-deep: #0a6b5c;
  --sky: #5bb4ec;
  --lemon: #ffd166;
  --accent-ink: #ffffff;
  --shadow: 0 1px 2px rgba(24, 50, 48, .04), 0 10px 30px rgba(34, 120, 110, .07);
  --shadow-hover: 0 2px 4px rgba(24, 50, 48, .05), 0 18px 44px rgba(34, 120, 110, .14);
  --thumb-ink: #1d3b38;
  --radius: 24px;
  --sans: "Inter", "SF Pro Text", -apple-system, "Geist", system-ui, sans-serif;
  color-scheme: light;
}
/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: var(--sans); font-size: 19px; line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s, color .3s;
}
html, body { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.025em; line-height: 1.1; font-weight: 600; }
h2 { font-size: clamp(34px, 4.4vw, 48px); }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.eyebrow { margin: 0 0 14px; font-size: 15px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }

/* ---------- header ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner { max-width: 1120px; margin: 0 auto; padding: 14px clamp(16px, 4vw, 32px); display: flex; align-items: center; gap: 24px; }
.logo { white-space: nowrap; display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.logo-icon { position: relative; width: 22px; height: 22px; }
.logo-icon i { position: absolute; display: block; transition: transform .4s cubic-bezier(.3,1.5,.6,1); }
.logo-icon i:nth-child(1) { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); left: 0; top: 0; }
.logo-icon i:nth-child(2) { width: 10px; height: 10px; border-radius: 3px; background: var(--sky); right: 0; top: 2px; }
.logo-icon i:nth-child(3) { width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent; border-bottom: 10px solid var(--lemon); left: 6px; bottom: 0; }
.logo:hover .logo-icon i:nth-child(1) { transform: translate(2px, 2px); }
.logo:hover .logo-icon i:nth-child(2) { transform: rotate(45deg); }
.logo:hover .logo-icon i:nth-child(3) { transform: translateY(-2px); }
.nav-links { margin-left: auto; display: flex; gap: 28px; font-size: 18px; font-weight: 500; }
.nav-links a { color: var(--muted); transition: color .2s; }
.nav-links a:hover { color: var(--text); }
/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 52px; padding: 14px 28px; border-radius: 999px; font-weight: 600; font-size: 18px;
  transition: transform .2s, box-shadow .2s, background-color .2s;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 6px 18px rgba(14, 133, 115, .25); }
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-deep); box-shadow: 0 10px 26px rgba(14, 133, 115, .32); }

/* ---------- hero ---------- */
.hero { position: relative; padding-block: clamp(80px, 14vh, 160px) clamp(64px, 10vh, 120px); }
.hero > * { position: relative; }
.hero-bg {
  position: absolute; top: -80px; bottom: 0; left: 50%; width: 100vw; transform: translateX(-50%); z-index: 0; pointer-events: none;
}
.hero-bg i { position: absolute; border-radius: 50%; filter: blur(60px); opacity: .55; }
.hero-bg i:nth-child(1) { width: 420px; height: 420px; background: #b8f0e2; right: 8%; top: 40px; }
.hero-bg i:nth-child(2) { width: 340px; height: 340px; background: #c9e6fb; right: 28%; top: 220px; animation-delay: -5s; }
.hero-bg i:nth-child(3) { width: 260px; height: 260px; background: #fff0c2; right: 4%; top: 330px; animation-delay: -10s; }
.hero h1 { font-size: clamp(44px, 8vw, 92px); font-weight: 650; letter-spacing: -.04em; margin-bottom: 24px; }
.hero .soft { color: var(--accent); }
.lede { max-width: 600px; margin: 0 0 36px; font-size: clamp(20px, 2.2vw, 23px); color: var(--muted); }

/* ---------- sections ---------- */
.section { padding-block: clamp(64px, 10vh, 112px); }
.section-head { margin-bottom: 40px; }

/* ---------- games ---------- */
.game-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .game-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .game-grid { grid-template-columns: repeat(3, 1fr); } }
.game {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); transition: transform .3s, box-shadow .3s;
}
.game:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); border-color: #cdebe3; }
.thumb {
  aspect-ratio: 16 / 10; display: grid; place-items: center;
  background: var(--tint); color: var(--thumb-ink);
}
.game:hover .ic { transform: scale(1.06) rotate(-2deg); }
.game-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 22px 24px 24px; }
.badge {
  font-size: 15px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  background: var(--surface-2); color: var(--accent-deep);
}
.game h3 { font-size: 26px; }
.game p { margin: 0 0 8px; color: var(--muted); font-size: 18px; }
.btn-card {
  margin-top: auto; min-height: 50px; padding: 12px 22px; font-size: 17px;
  background: var(--surface-2); color: var(--text);
}
.btn-card:hover { background: var(--accent); color: var(--accent-ink); }
.btn-card { color: var(--accent-deep); }
.btn-card:hover span { transform: translateX(3px); }
.btn-card span { transition: transform .2s; }
.btn-card.is-soon { color: var(--muted); cursor: default; }
.btn-card.is-soon:hover { background: var(--surface-2); color: var(--muted); }

/* CSS placeholder icons */
.ic { transition: transform .4s cubic-bezier(.3,1.4,.6,1); font-weight: 600; }
.ic-grid10, .ic-slide { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.ic-grid10 span, .ic-slide span, .ic-sums span, .ic-cross span {
  display: grid; place-items: center; height: 34px; border-radius: 9px;
  background: rgba(255,255,255,.75); font-size: 16px;
}
.ic-grid10 .hl { background: #ff9f6b; color: #fff; }
.ic-pixel { display: grid; grid-template-columns: repeat(5, 18px); gap: 4px; }
.ic-pixel span { height: 18px; border-radius: 4px; background: rgba(255,255,255,.6); }
.ic-pixel span.on { background: var(--accent); }
.ic-slide span { background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.06); }
.ic-slide span.gap { background: transparent; box-shadow: inset 0 0 0 2px rgba(43,39,35,.15); }
.ic-sums { display: grid; grid-template-columns: repeat(3, 34px) 30px; gap: 6px; }
.ic-sums span.off { color: rgba(43,39,35,.3); background: rgba(255,255,255,.35); text-decoration: line-through; }
.ic-sums span.target { background: none; color: #5d55a0; font-size: 14px; }
.ic-cross { display: grid; grid-template-columns: repeat(5, 26px); grid-auto-rows: 26px; gap: 4px; }
.ic-cross span { height: 26px; border-radius: 7px; font-size: 14px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ic-cross span.op { background: none; box-shadow: none; color: #3f6b95; }
.ic-arrow { display: grid; grid-template-columns: repeat(3, 34px); gap: 6px; }
.ic-arrow span { display: grid; place-items: center; height: 34px; border-radius: 9px; background: #fff; font-size: 18px; color: #8a6a2c; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.ic-arrow span.go { background: #f4b740; color: #fff; transform: translateX(10px); }
.ic-cross span.blank { background: rgba(255,255,255,.5); box-shadow: inset 0 0 0 2px #3f6b95; }

/* ---------- philosophy ---------- */
.pillars { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pillar { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.pillar:nth-child(2) .pillar-num { background: #e3f2fc; color: #3a8fc7; }
.pillar:nth-child(3) .pillar-num { background: #fff3d1; color: #c08a12; }
.pillar-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #dcf5ee; font-size: 14px; color: var(--accent-deep); font-weight: 600; margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.pillar h3 { font-size: 23px; margin-bottom: 10px; }
.pillar p { margin: 0; color: var(--muted); font-size: 18px; }

/* ---------- about / contact ---------- */
.about-body { display: grid; gap: 20px 48px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); max-width: 960px; }
.about-body p { margin: 0; color: var(--muted); font-size: 20px; }
.contact { text-align: center; }
.contact-card { padding: clamp(40px, 6vw, 72px) 24px; border-radius: 32px; background: linear-gradient(135deg, #e2f7f1 0%, #e6f2fc 60%, #fff6dc 100%); }
.contact h2 { margin-bottom: 14px; }
.contact p { margin: 0 auto 32px; max-width: 460px; color: var(--muted); }

.footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px;
  padding-block: 28px 40px; border-top: 1px solid var(--line);
  font-size: 17px; color: var(--muted);
}

/* ---------- motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
.game.reveal.in:hover { transform: translateY(-4px); }

@media (max-width: 720px) {
  .nav-links { gap: 14px; font-size: 16px; }
  .logo { font-size: 18px; }
  .nav-links a[href="#philosophy"], .nav-links a[href="#about"] { display: none; }
}
a:focus-visible, button:focus-visible { outline: 3px solid var(--sky); outline-offset: 3px; border-radius: 12px; }

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