/* tapmochi.com — Tapmochi Games. No web fonts, no trackers. Light + dark. */

:root {
  color-scheme: light dark;
  --bg: #fff8f1;
  --bg-soft: #fdeee3;
  --bg-card: #ffffff;
  --line: #f0dccd;
  --text: #2b1d30;
  --text-dim: #6b5a70;
  --accent: #e8457a;        /* links/buttons: 4.6:1 on white */
  --accent-ink: #ffffff;
  --accent-soft: #ff5c8a;
  --mochi: #fff6ee;
  --shadow: 0 10px 30px rgba(120, 60, 80, 0.10);
  --radius: 22px;
  --wrap: 1080px;
  --font: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17111d;
    --bg-soft: #1f1727;
    --bg-card: #261d30;
    --line: #3a2d47;
    --text: #f7eef4;
    --text-dim: #c3b3c8;
    --accent: #ff7aa2;
    --accent-ink: #2b1020;
    --accent-soft: #ff93b5;
    --mochi: #fff1e6;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

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

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: var(--accent-ink);
  padding: 12px 20px; z-index: 100; border-radius: 0 0 12px 0;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; min-height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 1.2rem; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none;
}
.brand svg { width: 34px; height: 34px; flex: none; }
.brand-dim { color: var(--text-dim); font-weight: 600; }

.site-header nav { display: flex; gap: 22px; font-size: 0.95rem; font-weight: 700; }
.site-header nav a { color: var(--text-dim); text-decoration: none; padding: 6px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--text); }

/* ---------- hero ---------- */

.hero { position: relative; padding: 72px 0 64px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -40% -20% auto auto;
  width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent-soft) 22%, transparent), transparent 68%);
  pointer-events: none;
}
.hero-inner { position: relative; display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 40px; align-items: center; }

.eyebrow {
  text-transform: uppercase; letter-spacing: 0.16em;
  font-size: 0.78rem; font-weight: 800; color: var(--accent); margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(2.3rem, 6vw, 3.8rem); line-height: 1.06;
  letter-spacing: -0.03em; margin: 0 0 18px; font-weight: 800;
}
.lede { font-size: 1.12rem; color: var(--text-dim); max-width: 50ch; margin: 0 0 28px; }

.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.btn {
  display: inline-block; padding: 13px 26px; border-radius: 999px;
  font-weight: 800; font-size: 0.98rem; text-decoration: none;
  transition: transform 0.18s, background 0.18s, border-color 0.18s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border: 2px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text-dim); }

.hero-art { display: flex; justify-content: center; }
.hero-art svg { width: min(320px, 80%); height: auto; filter: drop-shadow(0 18px 30px rgba(232, 69, 122, 0.25)); }

/* ---------- games ---------- */

.games { padding: 56px 0 80px; }
.section-h { font-size: clamp(1.7rem, 3.4vw, 2.3rem); letter-spacing: -0.025em; font-weight: 800; margin: 0 0 8px; }
.section-sub { color: var(--text-dim); margin: 0 0 32px; }

.game-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.game {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.game-banner { aspect-ratio: 1024 / 500; width: 100%; object-fit: cover; background: var(--bg-soft); }
.game-body { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.game-head { display: flex; align-items: center; gap: 14px; }
.game-icon { width: 64px; height: 64px; border-radius: 16px; flex: none; border: 1px solid var(--line); }
.game h3 { margin: 0; font-size: 1.3rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }
.game-meta { margin: 2px 0 0; font-size: 0.88rem; color: var(--text-dim); }
.game p.desc { margin: 0; color: var(--text-dim); }
.game-links { margin-top: auto; display: flex; gap: 18px; flex-wrap: wrap; font-weight: 700; font-size: 0.95rem; }

.badge {
  display: inline-block; font-size: 0.74rem; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent);
  vertical-align: middle;
}

/* ---------- about ---------- */

.about { padding: 64px 0; background: var(--bg-soft); border-block: 1px solid var(--line); }
.about-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.about-grid li { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.about-grid h3 { margin: 0 0 6px; font-size: 1.1rem; font-weight: 800; }
.about-grid p { margin: 0; color: var(--text-dim); font-size: 0.96rem; }

.contact { padding: 64px 0 72px; text-align: center; }
.contact p { color: var(--text-dim); margin: 0 auto 22px; max-width: 52ch; }

/* ---------- footer ---------- */

.site-footer { padding: 32px 0 40px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--text-dim); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; }
.site-footer p { margin: 0; }
.site-footer nav { display: flex; gap: 8px 20px; flex-wrap: wrap; }
.site-footer a { color: var(--text-dim); text-decoration: none; }
.site-footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- legal / support pages ---------- */

.legal { padding: 52px 0 80px; }
.legal .wrap { max-width: 820px; }
.legal h1 { font-size: clamp(1.9rem, 4.4vw, 2.6rem); letter-spacing: -0.03em; margin: 0 0 12px; font-weight: 800; line-height: 1.15; }
.legal .updated { color: var(--text-dim); margin: 0 0 32px; font-size: 0.94rem; }
.legal h2 { font-size: 1.32rem; font-weight: 800; margin: 36px 0 10px; letter-spacing: -0.02em; }
.legal h3 { font-size: 1.08rem; font-weight: 800; margin: 24px 0 8px; }
.legal p, .legal li { color: var(--text-dim); overflow-wrap: anywhere; }
.legal strong { color: var(--text); }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.support-actions { margin: 24px 0 8px; }

.notfound { padding: 96px 0; text-align: center; }
.notfound h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 10px; }
.notfound p { color: var(--text-dim); margin: 0 0 24px; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
  .hero { padding: 44px 0 36px; }
  .hero-inner { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { order: -1; }
  .hero-art svg { width: 168px; }
  .game-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .header-inner { min-height: 58px; }
  .brand { font-size: 1.08rem; }
  .brand-dim { display: none; }
  .site-header nav { gap: 16px; font-size: 0.9rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

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

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
