/* games.hendrap.com — shares hendrap.com's Version 3 design system (Kindsight direction). */
:root {
  --primary: #de7653;
  --accent: #e1f079;
  --highlight: #e1f079;
  --ink: #0e0f0a;
  --ink-deep: #3d4128;
  --body: #4a4c40;
  --mute: #7a7b6e;
  --surface-dark: #3d4128;
  --surface-deep: #2b2e1b;
  --on-dark: #f1ece4;
  --pale: #ecefd3;
  --on-pale: #2b2e1b;
  --canvas: #fdfaf5;
  --canvas-soft: #f6f0e7;
  --line: rgba(14, 15, 10, .14);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  /* Spacing rhythm shared with hendrap.com: fluid from phone to desktop */
  --section-gap: clamp(72px, 8vw, 112px);
  --quote-gap: clamp(44px, 6vw, 84px);
  --radius: 24px;
  --font-display: "Fraunces", Georgia, serif;
  --font-sans: "Inter", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f1ece4; --ink-deep: #d6e27f; --body: #c3c0b3; --mute: #8f8d80;
    --surface-dark: #34381f; --surface-deep: #0c0d08; --pale: #292c1b; --on-pale: #e1f079;
    --canvas: #1c1e14; --canvas-soft: #13140d; --line: rgba(241, 236, 228, .14); --highlight: rgba(225, 240, 121, .3);
  }
}

* { box-sizing: border-box; }
html { background: var(--canvas-soft); scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas-soft); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.5; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: var(--primary); color: #0e0f0a; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
.shell { width: min(100% - 48px, 1200px); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.skip-link { position: fixed; z-index: 300; top: 8px; left: 8px; padding: 12px 18px; border-radius: 999px; background: var(--primary); color: #0e0f0a; font-weight: 700; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 24px; color: var(--body); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.kicker-dot { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); }
.serif { font-family: var(--font-display); font-weight: 300; letter-spacing: -.03em; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; padding: 8px 0; border-bottom: 1px solid var(--line); }
.site-header::before { content: ""; position: absolute; z-index: -1; inset: 0; background: color-mix(in srgb, var(--canvas-soft) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nav-shell { width: min(100% - 48px, 1200px); min-height: 56px; margin: auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.wordmark { display: flex; flex-direction: column; font-family: var(--font-display); font-size: 22px; font-weight: 400; letter-spacing: -.02em; line-height: 1.05; }
.wordmark span { color: var(--body); font-family: var(--font-sans); font-size: 10.5px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; }
.wordmark span b { color: var(--primary); font-weight: 700; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.nav > a { position: relative; }
.nav > a::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 5px; height: 5px; border-radius: 50%; background: currentColor; transform: translateX(-50%) scale(0); transition: transform .35s var(--ease-out); }
.nav > a:hover::after, .nav > a.active::after { transform: translateX(-50%) scale(1); }

/* Buttons: pills with a rounded fill that wipes up from below */
.magnetic { display: inline-block; will-change: transform; }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-height: 52px; padding: 0 26px; overflow: hidden; isolation: isolate; border: 0; border-radius: 999px; font: inherit; font-weight: 600; line-height: 1; white-space: nowrap; cursor: pointer; transition: gap .3s var(--ease-out), color .4s var(--ease-out); }
.btn::before { content: ""; position: absolute; z-index: -1; left: -10%; top: 100%; width: 120%; height: 200%; border-radius: 50%; background: var(--wipe, var(--accent)); transition: top .6s var(--ease-out); }
.btn:hover::before { top: -50%; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--primary); color: #0e0f0a; }
.btn-primary:hover { gap: 18px; color: #0e0f0a; }
.btn-ghost { border: 1px solid var(--ink); --wipe: var(--surface-dark); }
.btn-ghost:hover { color: #f1ece4; }
.btn-dark { min-height: 44px; padding: 0 22px; background: var(--ink); color: var(--canvas-soft); font-size: 14px; --wipe: var(--primary); }
.btn-dark:hover { color: #0e0f0a; }

/* Hero */
.hero { position: relative; min-height: calc(100svh - 73px); display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: 1fr auto; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 1fr); gap: 56px; align-items: center; padding: 40px 0 8px; }
.hero-copy { min-width: 0; }
.hero-copy .kicker { animation: fade .8s .1s var(--ease-out) both; }
.hero h1 { margin: 0; font-family: var(--font-display); font-size: clamp(3.6rem, 8.4vw, 8.6rem); font-weight: 300; line-height: .94; letter-spacing: -.03em; }
.line { display: block; overflow: hidden; padding: 0 .05em .16em; margin: 0 -.05em -.16em; }
.line > span { display: inline-block; animation: rise 1.1s var(--ease-out) both; }
.line:nth-child(2) > span { animation-delay: .1s; }
.line:nth-child(3) > span { animation-delay: .2s; }
.hero h1 em { font-style: italic; color: var(--ink-deep); background: linear-gradient(var(--highlight), var(--highlight)) no-repeat 0 88% / 0% .22em; -webkit-box-decoration-break: clone; box-decoration-break: clone; animation: underline 1s .95s cubic-bezier(.65, 0, .35, 1) forwards; }
.hero-intro { max-width: 520px; margin: 32px 0 0; color: var(--body); font-size: 18px; line-height: 1.6; animation: fade .8s .45s var(--ease-out) both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; animation: fade .8s .55s var(--ease-out) both; }
.hero-visual { position: relative; animation: unveil 1.3s .1s var(--ease-out) both; }
.feature { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--surface-dark); }
.feature-inner { position: absolute; inset: 0 0 -14%; }
.feature img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; animation: settle 1.8s var(--ease-out); transition: transform .8s var(--ease-out); }
.feature:hover img { transform: scale(1.03); }
.feature-status { position: absolute; left: 16px; right: 16px; bottom: 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin: 0; padding: 12px 16px; border-radius: 16px; background: rgba(43, 46, 27, .78); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #f1ece4; font-size: 13px; }
.feature-status strong { color: var(--accent); font-weight: 600; }
.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.pulse::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--accent); animation: ping 2s ease-out infinite; }
.badge, .badge-icon { position: absolute; top: -40px; right: -24px; width: 124px; height: 124px; }
.badge { animation: spin 20s linear infinite; }
.badge circle { fill: var(--accent); }
.badge text { fill: #2b2e1b; font-family: var(--font-sans); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; }
.badge-icon { display: grid; place-items: center; color: #2b2e1b; pointer-events: none; }
.marquee { overflow: hidden; padding-top: calc(var(--quote-gap) - 8px); animation: fade 1s .7s var(--ease-out) both; }
.marquee-track { display: flex; width: max-content; white-space: nowrap; will-change: transform; }
.marquee-track span { padding-right: .25em; color: var(--ink-deep); font-family: var(--font-display); font-size: clamp(2.2rem, 4.4vw, 4.4rem); font-style: italic; font-weight: 300; line-height: 1.2; letter-spacing: -.02em; }

/* Games grid */
.games { padding: var(--quote-gap) 0 var(--section-gap); }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 48px; padding-bottom: 32px; border-bottom: 1px solid var(--line); }
.section-head h2 { margin: 0; font-family: var(--font-display); font-size: clamp(3rem, 6vw, 5.6rem); font-weight: 300; line-height: .98; letter-spacing: -.03em; }
.section-head p { max-width: 420px; margin: 0; color: var(--body); font-size: 17px; }
.count { color: var(--primary); font-family: var(--font-display); font-style: italic; }
.game-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.game-card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 12px; border-radius: var(--radius); background: var(--canvas); }
.cover { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: 16px; background: var(--surface-dark); }
.cover img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; transition: transform .8s var(--ease-out); }
.game-card:hover .cover img, .game-card:hover .cover-type strong { transform: scale(1.045); }
.cover-type { display: flex; flex-direction: column; justify-content: space-between; height: 100%; padding: 28px; background: var(--surface-dark); color: var(--accent); }
.game-card:nth-child(3n) .cover-type { background: var(--pale); color: var(--on-pale); }
.cover-type span { align-self: flex-start; padding: 6px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: .8; }
.cover-type strong { max-width: 90%; font-family: var(--font-display); font-size: clamp(2.6rem, 4.4vw, 4.4rem); font-style: italic; font-weight: 300; line-height: 1; letter-spacing: -.03em; transform-origin: 0 100%; transition: transform .8s var(--ease-out); }
/* Play-mode filter and labels */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -12px 0 36px; }
.filters button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 18px; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink); font: 600 14px var(--font-sans); cursor: pointer; transition: background .25s ease, color .25s ease, border-color .25s ease; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: var(--canvas-soft); }
.filters button span { color: var(--primary); font-family: var(--font-display); font-style: italic; font-size: 16px; }
.filters svg, .chip-mode svg, .how-label svg { flex: none; width: 16px; height: 16px; }
.chip-mode { position: absolute; z-index: 2; top: 16px; right: 16px; display: inline-flex; align-items: center; gap: 7px; padding: 7px 12px; border-radius: 999px; background: rgba(14, 15, 10, .74); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: #f1ece4; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.chip-mode svg { width: 14px; height: 14px; color: var(--accent); }
.game-card[hidden] { display: none; }
.js .game-card.reveal.is-out { opacity: 0; transform: translateY(14px) scale(.97); transition-duration: .26s; }
.how-group + .how-group { margin-top: 44px; }
.how-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 16px; color: var(--ink); font: 700 13px var(--font-sans); letter-spacing: .07em; text-transform: uppercase; }
.how-label svg { color: var(--primary); }
.how-label span { color: var(--mute); font-weight: 500; letter-spacing: .04em; text-transform: none; }
.chip-new { position: absolute; z-index: 2; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 12px; border-radius: 999px; background: var(--accent); color: #2b2e1b; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 26px 18px 18px; }
.card-label { margin: 0 0 12px; color: var(--ink-deep); font-size: 12px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; }
.card-body h3 { margin: 0; font-family: var(--font-display); font-size: clamp(2.1rem, 3.4vw, 3.3rem); font-weight: 350; line-height: 1; letter-spacing: -.03em; }
.card-body > p { margin: 16px 0 0; color: var(--body); font-size: 15.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 20px 0 24px; }
.chips span { padding: 6px 11px; border-radius: 999px; background: var(--canvas-soft); color: var(--body); font-size: 12px; font-weight: 600; }
/* .card-body > .access beats the generic ".card-body > p" margin: 16px under the tags, 24px above the button */
.card-body > .access { display: flex; align-items: flex-start; gap: 10px; margin: -8px 0 24px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--canvas-soft); color: var(--body); font-size: 13.5px; line-height: 1.5; }
.access svg { flex: none; width: 16px; height: 16px; margin-top: 2px; color: var(--primary); }
.access a { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }
.access a:hover { color: var(--primary); }
/* Long game titles wrap inside the Play button instead of spilling past the card */
.card-foot .magnetic { max-width: 100%; }
.card-foot .btn { max-width: 100%; white-space: normal; text-align: left; line-height: 1.25; padding-block: 12px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: auto; }
.card-foot small { color: var(--mute); font-size: 12px; }
.soon { display: flex; flex-direction: column; justify-content: space-between; min-height: 420px; padding: 40px; border-radius: var(--radius); background: var(--surface-dark); color: var(--on-dark); }
.soon h3 { margin: 0; color: var(--accent); font-family: var(--font-display); font-size: clamp(2.6rem, 4.4vw, 4.4rem); font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.soon p { max-width: 380px; margin: 0; opacity: .85; }
.soon .dots { display: flex; gap: 10px; }
.soon .dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); animation: bob 1.4s ease-in-out infinite; }
.soon .dots i:nth-child(2) { background: var(--primary); animation-delay: .15s; }
.soon .dots i:nth-child(3) { animation-delay: .3s; }

/* How it works */
.how { padding: 0 0 var(--section-gap); }
.how h2 { margin: 0 0 32px; font-family: var(--font-display); font-size: clamp(2.4rem, 4.4vw, 4rem); font-weight: 300; letter-spacing: -.03em; }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { min-height: 220px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border-radius: var(--radius); background: var(--canvas); counter-increment: step; }
.steps li:nth-child(2) { background: var(--pale); color: var(--on-pale); }
.steps li::before { content: "0" counter(step); color: var(--primary); font-family: var(--font-display); font-size: 2.6rem; font-style: italic; font-weight: 300; }
.steps strong { display: block; font-family: var(--font-display); font-size: 1.9rem; font-weight: 350; line-height: 1.05; letter-spacing: -.02em; }
.steps p { margin: 10px 0 0; color: var(--body); font-size: 15px; }

/* Quote with curved edge */
.quote { position: relative; padding: 24vh 0 18vh; overflow: hidden; background: var(--surface-dark); color: var(--on-dark); }
.quote-curve { position: absolute; top: -1px; left: -15%; width: 130%; height: 14vh; border-radius: 0 0 50% 50%; background: var(--canvas-soft); box-shadow: 0 30px 60px rgba(0, 0, 0, .12); }
.quote-mark { display: block; height: .5em; color: var(--accent); font-family: var(--font-display); font-size: 9rem; line-height: 1; }
.quote blockquote { max-width: 1100px; margin: 0; font-family: var(--font-display); font-size: clamp(2.4rem, 5.4vw, 5.2rem); font-weight: 300; line-height: 1.05; letter-spacing: -.03em; }
.quote blockquote span { transition: opacity .2s linear; }
.quote p { margin: 40px 0 0; color: var(--accent); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }

/* Footer */
.footer { padding-top: 96px; background: var(--surface-deep); color: #f1ece4; }
.footer-grid { display: grid; grid-template-columns: 1fr .5fr .5fr; gap: 48px; padding-bottom: 72px; }
.footer-name { display: block; color: var(--accent); font-family: var(--font-display); font-size: clamp(3rem, 5.4vw, 5.6rem); font-style: italic; font-weight: 300; line-height: .95; letter-spacing: -.035em; }
.footer-grid p { margin-top: 26px; color: #c3c0b3; font-size: 13px; }
.footer-grid nav { display: flex; flex-direction: column; gap: 12px; font-size: 14px; font-weight: 500; }
.footer-grid a:hover { color: var(--accent); }
.footer-grid h4 { margin: 0 0 6px; color: #a9a797; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; }
.copyright { display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; border-top: 1px solid rgba(241, 236, 228, .16); color: #a9a797; font-size: 11px; }

/* Curtain when opening a game */
.curtain { position: fixed; z-index: 200; inset: 0; display: grid; place-items: center; background: var(--surface-dark); color: #f1ece4; pointer-events: none; visibility: hidden; transform: translateY(calc(100% + 16vh)); }
.curtain::before { content: ""; position: absolute; left: -10%; bottom: 100%; width: 120%; height: 14vh; margin-bottom: -1px; border-radius: 50% 50% 0 0; background: inherit; transition: height .7s var(--ease-out); }
.curtain span { display: flex; align-items: center; gap: 18px; font-family: var(--font-display); font-size: clamp(2.4rem, 6vw, 5rem); font-style: italic; font-weight: 300; letter-spacing: -.03em; opacity: 0; transform: translateY(24px); transition: opacity .4s .25s, transform .6s .25s var(--ease-out); }
.curtain i { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); }
.curtain.on { visibility: visible; transform: none; transition: transform .7s cubic-bezier(.76, 0, .24, 1); }
.curtain.on::before { height: 0; }
.curtain.on span { opacity: 1; transform: none; }

/* Scroll reveal (only when JS runs, so content is never hidden without it) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@keyframes rise { from { transform: translateY(110%); } }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } }
@keyframes underline { to { background-size: 100% .22em; } }
@keyframes unveil { from { clip-path: inset(8% 8% 8% 8% round 24px); opacity: 0; } to { clip-path: inset(-80px -80px -80px -80px round 24px); opacity: 1; } }
@keyframes settle { from { transform: scale(1.12); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ping { 75%, 100% { transform: scale(2.6); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-8px); } }

@media (max-width: 900px) {
  .shell, .nav-shell { width: min(100% - 32px, 1200px); }
  .nav > a:not(.keep) { display: none; }
  .hero { min-height: auto; }
  .hero-grid { grid-template-columns: 1fr; gap: 56px; padding-top: 36px; }
  .hero h1 { font-size: clamp(3.4rem, 15vw, 6rem); }
  .badge, .badge-icon { top: -44px; right: 8px; width: 96px; height: 96px; }
  .marquee-track span { font-size: clamp(1.9rem, 6.6vw, 3.2rem); }
  .game-grid, .steps { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .soon { min-height: 300px; }
  .quote { padding: 16vh 0 14vh; }
  .quote-mark { font-size: 6rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hero-intro { font-size: 16px; }
  .card-body { padding: 22px 10px 12px; }
  .card-foot { flex-direction: column; align-items: flex-start; }
  .soon { padding: 30px 26px; }
  .copyright { flex-direction: column; gap: 8px; }
}
@media (hover: none) { .feature:hover img, .game-card:hover .cover img { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
