html {
    scroll-behavior: smooth;
}

body.home-page {
    min-height: 100dvh;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 14% 6%, rgba(124, 58, 237, 0.32), transparent 32rem),
        radial-gradient(circle at 86% 14%, rgba(249, 115, 22, 0.22), transparent 28rem),
        radial-gradient(circle at 50% 96%, rgba(34, 197, 94, 0.14), transparent 30rem),
        linear-gradient(160deg, #0b1022, var(--bg));
    color: var(--text);
}

body.home-page.light-theme {
    background:
        radial-gradient(circle at 14% 6%, rgba(167, 139, 250, 0.34), transparent 32rem),
        radial-gradient(circle at 86% 14%, rgba(251, 146, 60, 0.24), transparent 28rem),
        radial-gradient(circle at 50% 96%, rgba(34, 197, 94, 0.14), transparent 30rem),
        linear-gradient(160deg, #fff7ed, #eef2ff);
}

.home-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1080px;
    margin-inline: auto;
    padding: 4px 16px calc(40px + env(safe-area-inset-bottom));
}

.home-content .icon-holder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ---------------------------------------------------------------
   Page-level blobs — fixed, full-viewport ambient glow behind
   hero AND sections (no filter: blur)
--------------------------------------------------------------- */
.home-blobs {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.home-blob {
    position: absolute;
    border-radius: 50%;
}

.home-blob-a {
    width: min(460px, 80vw);
    height: min(460px, 80vw);
    top: -70px;
    right: -130px;
    background: radial-gradient(circle at 32% 30%, rgba(139, 92, 246, 0.45), transparent 66%);
    animation: blobDriftA 17s ease-in-out infinite alternate;
}

.home-blob-b {
    width: min(420px, 76vw);
    height: min(420px, 76vw);
    top: 44%;
    left: -150px;
    background: radial-gradient(circle at 60% 40%, rgba(249, 115, 22, 0.32), transparent 66%);
    animation: blobDriftB 21s ease-in-out infinite alternate;
}

.home-blob-c {
    width: min(400px, 70vw);
    height: min(400px, 70vw);
    top: 82%;
    right: 4%;
    background: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.22), transparent 66%);
    animation: blobDriftA 25s ease-in-out 3s infinite alternate;
}

@keyframes blobDriftA {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(-34px, 30px) scale(1.08); }
}

@keyframes blobDriftB {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(30px, -24px) scale(1.06); }
}

/* ---------------------------------------------------------------
   Hero — chunky clay squirl, floating decors
--------------------------------------------------------------- */
.home-hero {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: clamp(18px, 5vw, 44px) 12px clamp(26px, 6vw, 52px);
    overflow: hidden;
}

.hero-chip {
    position: absolute;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.26);
    box-shadow:
        inset 2px 2px 6px rgba(255, 255, 255, 0.24),
        inset -3px -3px 8px rgba(0, 0, 0, 0.26),
        0 8px 18px rgba(0, 0, 0, 0.28);
}

.hero-chip svg {
    width: 26px;
    height: 26px;
}

.hero-chip-dice {
    top: 6%;
    right: 6%;
    background: linear-gradient(140deg, #f97316, #ea580c);
    animation: heroFloatY 5s ease-in-out infinite;
}

.hero-chip-medal {
    top: 14%;
    left: 8%;
    background: linear-gradient(140deg, #f59e0b, #d97706);
    animation: heroFloatY 6.2s ease-in-out 0.6s infinite;
}

.hero-chip-heart {
    top: 46%;
    left: 2%;
    background: linear-gradient(140deg, #ec4899, #db2777);
    animation: heroFloatY 5.6s ease-in-out 1.1s infinite;
}

@keyframes heroFloatY {
    0%, 100% { transform: translateY(0) rotate(-5deg); }
    50% { transform: translateY(-10px) rotate(6deg); }
}

.hero-icon {
    width: clamp(88px, 22vw, 112px);
    height: clamp(88px, 22vw, 112px);
    border-radius: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(140deg, #a78bfa, #7c3aed);
    border: 3px solid rgba(255, 255, 255, 0.3);
    box-shadow:
        inset 3px 3px 10px rgba(255, 255, 255, 0.26),
        inset -4px -4px 12px rgba(0, 0, 0, 0.32),
        0 16px 34px rgba(124, 58, 237, 0.4);
    margin-bottom: 18px;
    animation: heroBounce 4.2s ease-in-out infinite;
}

.hero-icon svg {
    width: clamp(46px, 12vw, 62px);
    height: auto;
}

@keyframes heroBounce {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
}

.hero-title {
    margin: 0;
    font-size: clamp(2.5rem, 11vw, 4.4rem);
    line-height: 1.1;
    font-weight: 700;
    background: linear-gradient(135deg, #a78bfa, #f97316 70%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 6px 22px rgba(124, 58, 237, 0.35));
}

.hero-sub {
    margin: 10px 0 0;
    max-width: 560px;
    font-size: clamp(0.95rem, 3.4vw, 1.15rem);
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    line-height: 1.9;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
}

.btn-primary,
.btn-ghost {
    min-height: 54px;
    padding: 12px 30px;
    border-radius: 18px;
    font-size: 1.05rem;
    font-family: "Nazanin", sans-serif;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.btn-primary {
    min-width: 168px;
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    color: #fff;
    border: 0;
    box-shadow:
        inset 2px 2px 8px rgba(255, 255, 255, 0.26),
        inset -3px -3px 10px rgba(0, 0, 0, 0.26),
        0 10px 24px rgba(124, 58, 237, 0.36);
}

.btn-primary .icon-holder svg {
    width: 20px;
    height: 20px;
}

.btn-ghost {
    background: var(--panel-strong);
    color: var(--text);
    border: 2px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.08),
        inset -3px -3px 9px rgba(0, 0, 0, 0.24),
        0 8px 18px rgba(0, 0, 0, 0.2);
}

.btn-primary:hover,
.btn-ghost:hover {
    transform: translateY(-2px);
    filter: brightness(1.07);
}

.btn-primary:active,
.btn-ghost:active {
    transform: translateY(1px) scale(0.97);
}

/* Scroll hint under the CTA */
.hero-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--muted);
    font-family: "Nazanin", sans-serif;
    font-size: 0.85rem;
}

.hero-scroll-arrow {
    display: inline-flex;
    color: var(--accent);
    animation: heroScrollNudge 1.8s ease-in-out infinite;
}

.hero-scroll-arrow svg {
    width: 20px;
    height: 20px;
}

@keyframes heroScrollNudge {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(6px); }
}

.hero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 24px;
}

.hero-mini {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 8px 16px;
}

.hero-mini-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
    background: linear-gradient(135deg, #34d399, #10b981);
    box-shadow: 0 0 10px rgba(52, 211, 153, 0.6);
}

.hero-mini:nth-child(2) .hero-mini-dot {
    background: linear-gradient(135deg, #a78bfa, #7c3aed);
    box-shadow: 0 0 10px rgba(167, 139, 250, 0.6);
}

/* ---------------------------------------------------------------
   Sections
--------------------------------------------------------------- */
.home-section {
    position: relative;
    z-index: 1;
    margin-bottom: 42px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
    padding-inline: 4px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    font-size: clamp(1.2rem, 3.6vw, 1.45rem);
    font-weight: 700;
}

.section-title-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: var(--accent);
    background: linear-gradient(140deg, rgba(167, 139, 250, 0.22), rgba(167, 139, 250, 0.08));
    border: 2px solid rgba(167, 139, 250, 0.28);
    box-shadow:
        inset 2px 2px 5px rgba(255, 255, 255, 0.1),
        inset -2px -2px 6px rgba(0, 0, 0, 0.2);
}

.section-title-icon svg {
    width: 22px;
    height: 22px;
}

.section-count {
    font-size: 0.8rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 7px 14px;
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   Game tools — clay tiles
--------------------------------------------------------------- */
.games-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.game-tile {
    --tile-a: #64748b;
    --tile-b: #475569;
    --tile-glow: rgba(100, 116, 139, 0.32);
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 22px;
    background: var(--panel);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
    -webkit-user-select: none;
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.06),
        inset -3px -3px 10px rgba(0, 0, 0, 0.24),
        0 8px 20px rgba(0, 0, 0, 0.18);
}

button.game-tile {
    width: 100%;
    font-family: inherit;
    text-align: inherit;
}

.game-tile:hover {
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.24);
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.06),
        inset -3px -3px 10px rgba(0, 0, 0, 0.24),
        0 14px 30px rgba(0, 0, 0, 0.22),
        0 0 26px var(--tile-glow);
}

.game-tile:hover .tile-icon {
    transform: rotate(-7deg) scale(1.06);
}

.game-tile:active {
    transform: translateY(1px) scale(0.98);
}

.tile-icon {
    width: 52px;
    height: 52px;
    min-width: 52px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    border-radius: 17px;
    background: linear-gradient(140deg, var(--tile-a), var(--tile-b));
    border: 2px solid rgba(255, 255, 255, 0.26);
    box-shadow:
        inset 2px 2px 6px rgba(255, 255, 255, 0.22),
        inset -3px -3px 8px rgba(0, 0, 0, 0.3),
        0 6px 14px var(--tile-glow);
    transition: transform 0.2s ease;
}

.tile-icon svg {
    width: 27px;
    height: 27px;
}

/* Game icons are baked with brand colors (presentation attrs) — force
   white stroke so they read clearly on the gradient squircle */
.tile-icon .icon-holder svg {
    stroke: #fff;
    stroke-width: 2.1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

.tile-body {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.tile-name {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: "Nazanin", sans-serif;
    line-height: 1.35;
}

.tile-desc {
    font-size: 0.8rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    line-height: 1.55;
}

.tile-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.76rem;
    font-family: "Nazanin", sans-serif;
    color: #fff;
    background: linear-gradient(135deg, #f59e0b, #f97316);
    border-radius: 999px;
    padding: 4px 12px;
    box-shadow:
        inset 1px 1px 4px rgba(255, 255, 255, 0.3),
        inset -2px -2px 6px rgba(0, 0, 0, 0.22),
        0 4px 12px rgba(245, 158, 11, 0.4);
}

.tile-badge svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.3;
}

/* Per-game clay accents */
.game-tile--alias    { --tile-a: #fb923c; --tile-b: #ea580c; --tile-glow: rgba(249, 115, 22, 0.34); }
.game-tile--panto    { --tile-a: #f472b6; --tile-b: #e11d48; --tile-glow: rgba(236, 72, 153, 0.34); }
.game-tile--scatter  { --tile-a: #a78bfa; --tile-b: #7c3aed; --tile-glow: rgba(139, 92, 246, 0.34); }
.game-tile--draw     { --tile-a: #22d3ee; --tile-b: #0284c7; --tile-glow: rgba(6, 182, 212, 0.34); }
.game-tile--snake    { --tile-a: #4ade80; --tile-b: #16a34a; --tile-glow: rgba(34, 197, 94, 0.34); }
.game-tile--paper    { --tile-a: #818cf8; --tile-b: #4f46e5; --tile-glow: rgba(99, 102, 241, 0.34); }
.game-tile--notebook { --tile-a: #2dd4bf; --tile-b: #0d9488; --tile-glow: rgba(20, 184, 166, 0.34); }

/* "به زودی" tiles */
.game-tile--soon {
    pointer-events: none;
    cursor: default;
    opacity: 0.9;
    border-style: dashed;
    border-color: rgba(255, 255, 255, 0.16);
}

.game-tile--soon .tile-icon {
    filter: saturate(0.5) brightness(0.95);
}

.game-tile--soon .tile-name {
    color: var(--muted);
}

.game-tile--soon::after {
    content: "";
    position: absolute;
    top: -40%;
    bottom: -40%;
    left: 0;
    width: 34%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.14), transparent);
    transform: translateX(-220%) skewX(-18deg);
    animation: tileShine 3.1s ease infinite;
}

@keyframes tileShine {
    0% { transform: translateX(-220%) skewX(-18deg); }
    55% { transform: translateX(420%) skewX(-18deg); }
    100% { transform: translateX(420%) skewX(-18deg); }
}

/* ---------------------------------------------------------------
   Blog preview on home (بلاگ)
--------------------------------------------------------------- */
.section-title-icon--blog {
    color: #0891b2;
    background: linear-gradient(140deg, rgba(34, 211, 238, 0.22), rgba(34, 211, 238, 0.08));
    border-color: rgba(34, 211, 238, 0.28);
}

.section-title-icon--blog svg {
    stroke: #0891b2;
}

.blog-view-all {
    font-size: 0.85rem;
    font-family: "Nazanin", sans-serif;
    color: var(--accent);
    text-decoration: none;
    padding: 7px 16px;
    border-radius: 999px;
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: background 0.2s, color 0.2s;
}

.blog-view-all:hover {
    background: var(--panel-strong);
    color: var(--text);
}

.blog-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

  .blog-preview-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px 18px;
    border-radius: 22px;
    background: var(--panel);
    border: 2px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    text-decoration: none;
    color: var(--text);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.06),
        inset -3px -3px 10px rgba(0, 0, 0, 0.24),
        0 8px 20px rgba(0, 0, 0, 0.18);
  }

  .blog-preview-image {
      display: block;
      width: calc(100% + 36px);
      height: auto;
      max-width: none;
      aspect-ratio: 2 / 1;
      object-fit: cover;
      margin: -16px -18px 10px;
      border-radius: 20px 20px 0 0;
      background: #20183b;
      border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  }

.blog-preview-card:hover {
    transform: translateY(-3px);
    border-color: rgba(34, 211, 238, 0.35);
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.06),
        inset -3px -3px 10px rgba(0, 0, 0, 0.24),
        0 14px 30px rgba(0, 0, 0, 0.22),
        0 0 22px rgba(34, 211, 238, 0.12);
}

.blog-preview-card:active {
    transform: translateY(1px) scale(0.98);
}

.blog-preview-cat {
    display: inline-block;
    align-self: flex-start;
    font-size: 0.72rem;
    font-family: "Nazanin", sans-serif;
    font-weight: 600;
    color: #0891b2;
    background: rgba(34, 211, 238, 0.12);
    border: 1px solid rgba(34, 211, 238, 0.3);
    border-radius: 999px;
    padding: 3px 10px;
}

.blog-preview-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: "Nazanin", sans-serif;
    line-height: 1.5;
    color: var(--text);
}

body.light-theme .blog-preview-title {
    color: #17122b;
}

.blog-preview-summary {
    margin: 0;
    font-size: 0.82rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-preview-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.75rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    margin-top: 2px;
}

.blog-preview-date .icon-holder svg {
    width: 14px;
    height: 14px;
}

body.light-theme .blog-preview-card {
    border-color: rgba(70, 43, 124, 0.12);
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.55),
        inset -3px -3px 10px rgba(70, 43, 124, 0.08),
        0 8px 20px rgba(70, 43, 124, 0.1);
}

body.light-theme .blog-preview-card:hover {
    border-color: rgba(6, 182, 212, 0.35);
}

body.light-theme .blog-view-all {
    border-color: rgba(70, 43, 124, 0.15);
}

body.light-theme .section-title-icon--blog svg {
    stroke: #0891b2;
}

.blog-preview-card:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .blog-preview-card {
        transition: none;
    }
}

@media (min-width: 641px) {
    .blog-preview-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
}

@media (min-width: 1024px) {
    .blog-preview-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
}

@media (max-width: 430px) {
    .blog-preview-card {
        border-radius: 18px;
    }
    .blog-view-all {
        font-size: 0.8rem;
        padding: 6px 14px;
    }
}

/* ---------------------------------------------------------------
   About (معرفی شیندی)
--------------------------------------------------------------- */
.about-lead {
    max-width: 640px;
    margin: 0 auto 22px;
    text-align: center;
    font-size: 1rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    line-height: 2;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

.about-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 22px 16px;
    border-radius: 22px;
    background: var(--panel);
    border: 2px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.06),
        inset -3px -3px 10px rgba(0, 0, 0, 0.24),
        0 8px 20px rgba(0, 0, 0, 0.18);
}

.about-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: linear-gradient(140deg, #a78bfa, #7c3aed);
    border: 2px solid rgba(255, 255, 255, 0.26);
    box-shadow:
        inset 2px 2px 6px rgba(255, 255, 255, 0.22),
        inset -3px -3px 8px rgba(0, 0, 0, 0.3),
        0 6px 14px rgba(124, 58, 237, 0.34);
}

.about-card-icon .icon-holder svg {
    width: 28px;
    height: 28px;
    stroke: #fff;
    stroke-width: 2.1;
}

.about-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    font-family: "Nazanin", sans-serif;
}

.about-card-desc {
    font-size: 0.82rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
    line-height: 1.6;
}

/* ---------------------------------------------------------------
   Footer
--------------------------------------------------------------- */
.site-footer {
    position: relative;
    z-index: 1;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 26px 16px calc(22px + env(safe-area-inset-bottom));
    text-align: center;
}

.site-footer .container {
    max-width: 1080px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.site-footer p {
    margin: 0;
    font-size: 0.9rem;
    font-family: "Nazanin", sans-serif;
    color: var(--muted);
}

.site-footer .brand {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent), #f97316);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ---------------------------------------------------------------
   Light theme adjustments (borders & shadows need contrast on light)
--------------------------------------------------------------- */
body.light-theme .hero-title {
    filter: drop-shadow(0 6px 22px rgba(124, 58, 237, 0.22));
}

body.light-theme .home-blob-a {
    background: radial-gradient(circle at 32% 30%, rgba(139, 92, 246, 0.35), transparent 66%);
}

body.light-theme .home-blob-b {
    background: radial-gradient(circle at 60% 40%, rgba(249, 115, 22, 0.3), transparent 66%);
}

body.light-theme .home-blob-c {
    background: radial-gradient(circle at 50% 50%, rgba(34, 197, 94, 0.2), transparent 66%);
}

body.light-theme .game-tile,
body.light-theme .about-card {
    border-color: rgba(70, 43, 124, 0.12);
    box-shadow:
        inset 2px 2px 7px rgba(255, 255, 255, 0.55),
        inset -3px -3px 10px rgba(70, 43, 124, 0.08),
        0 8px 20px rgba(70, 43, 124, 0.1);
}

body.light-theme .game-tile:hover {
    border-color: rgba(109, 40, 217, 0.4);
}

body.light-theme .game-tile--soon {
    border-color: rgba(70, 43, 124, 0.22);
}

body.light-theme .tile-icon,
body.light-theme .about-card-icon {
    border-color: rgba(255, 255, 255, 0.55);
}

body.light-theme .hero-mini,
body.light-theme .section-count,
body.light-theme .btn-ghost {
    border-color: rgba(70, 43, 124, 0.15);
    box-shadow:
        inset 2px 2px 6px rgba(255, 255, 255, 0.5),
        inset -3px -3px 9px rgba(70, 43, 124, 0.08),
        0 8px 18px rgba(70, 43, 124, 0.1);
}

body.light-theme .site-footer {
    border-top-color: rgba(70, 43, 124, 0.12);
}

/* ---------------------------------------------------------------
   Accessibility: visible keyboard focus
--------------------------------------------------------------- */
.game-tile:focus-visible,
.btn-primary:focus-visible,
.btn-ghost:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
    border-radius: 22px;
}

/* ---------------------------------------------------------------
   Motion preferences
--------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .home-blob-a,
    .home-blob-b,
    .home-blob-c,
    .hero-chip-dice,
    .hero-chip-medal,
    .hero-chip-heart,
    .hero-icon,
    .hero-scroll-arrow,
    .game-tile--soon::after {
        animation: none;
    }
    .game-tile,
    .game-tile .tile-icon,
    .btn-primary,
    .btn-ghost {
        transition: none;
    }
}

/* ---------------------------------------------------------------
   Tablet / desktop — vertical tiles, 2 → 3 columns
--------------------------------------------------------------- */
@media (min-width: 641px) {
    .home-content {
        padding-inline: 24px;
    }
    .games-grid {
        grid-template-columns: 1fr 1fr;
        gap: 18px;
    }
    .game-tile {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 12px;
        padding: 22px 16px;
        min-height: 202px;
        text-align: center;
    }
    .tile-icon {
        width: 88px;
        height: 88px;
        min-width: 88px;
        border-radius: 28px;
    }
    .tile-icon svg {
        width: 46px;
        height: 46px;
    }
    .tile-body {
        align-items: center;
    }
    .tile-name {
        font-size: 1.12rem;
    }
    .tile-desc {
        font-size: 0.85rem;
    }
    .about-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (min-width: 1024px) {
    .games-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }
    #games .game-tile--crossword {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: center;
        min-height: 0;
        padding: 16px 22px;
        gap: 16px;
    }
    #games .game-tile--crossword .tile-icon {
        width: 62px;
        height: 62px;
        min-width: 62px;
        border-radius: 20px;
    }
    #games .game-tile--crossword .tile-icon svg {
        width: 32px;
        height: 32px;
    }
    #games .game-tile--crossword .tile-body {
        flex-direction: row;
        align-items: center;
        gap: 16px;
    }
}

/* ---------------------------------------------------------------
   Compact phones (≤430px): tighten hero spacing
--------------------------------------------------------------- */
@media (max-width: 430px) {
    .hero-chip-heart {
        display: none;
    }
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .btn-primary,
    .btn-ghost {
        width: 100%;
    }
    .game-tile {
        border-radius: 18px;
    }
}
