/* Stuffer Play — design system. Dark-only, 60/30/10: black / silver / duck yellow. Logical properties used so RTL (Hebrew) works later. */
:root {
  color-scheme: dark;
  /* 60% — Jet black */
  --bg: #111316;
  --surface: #1b1e23;     /* derived from the black, for cards/header/footer */
  --surface-2: #272b32;   /* borders, pills, hover */
  /* 30% — Silver */
  --text: #d9dce1;
  --muted: #9aa1ad;       /* derived from the silver */
  /* 10% — Brand accent: duck yellow (decided 2026-11-13).
     Every glow/neon/hover uses these tokens. To switch the brand color, swap all three for a preset:
       duck yellow (current):  --accent: #ffd800;  --accent-rgb: 255, 216, 0;   --accent-hover: #ffe55c;
       Stuffer orange (old):   --accent: #ee8c2b;  --accent-rgb: 238, 140, 43;  --accent-hover: #f5a65b;
       turquoise (option):     --accent: #2ec4b6;  --accent-rgb: 46, 196, 182;  --accent-hover: #5fd8cc;
     SVG files can't read CSS tokens; change the hex there too:
     img/logo.svg, img/favicon.svg, img/ducks/duck-neon.svg. */
  --accent: #ffd800;
  --accent-rgb: 255, 216, 0;
  --accent-hover: #ffe55c; /* lighter accent for hovers */
  --accent-ink: #111316;  /* text on the accent is always black (white fails contrast) */
  --link: var(--accent);
  --radius: 16px;
  --maxw: 1100px;
  --gap: 20px;
  --font: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.1rem); }
p { margin: 0 0 1em; }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: 16px; }
.section { padding-block: 48px; }
.muted { color: var(--muted); }
.skip-link { position: absolute; inset-inline-start: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 8px 12px; z-index: 100; }
.skip-link:focus { inset-inline-start: 8px; }

/* Header / nav */
.site-header { background: var(--surface); border-block-end: 1px solid var(--surface-2); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.25rem; }
.brand img { width: 40px; height: 40px; }
.nav-toggle { display: none; min-width: 44px; min-height: 44px; background: transparent; color: var(--text); border: 2px solid var(--surface-2); border-radius: 10px; font: inherit; cursor: pointer; }
.nav { display: flex; gap: 8px; }
.nav a { color: var(--text); text-decoration: none; padding: 10px 14px; border-radius: 10px; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover { background: var(--surface-2); }
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
  .nav { display: none; flex-direction: column; width: 100%; }
  .nav.open { display: flex; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 22px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 800; text-decoration: none; border: 2px solid var(--accent); cursor: pointer; font-family: inherit; font-size: 1rem; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--muted); }
.store-badge img { height: 56px; width: auto; }

/* Hero */
.hero { padding-block: 56px 8px; }
.hero p.lead { font-size: 1.25rem; color: var(--muted); max-width: 60ch; }

/* Games grid + card */
.games-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); }
@media (max-width: 520px) { .games-grid { grid-template-columns: minmax(0, 1fr); } }
.card { background: var(--surface); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-img { aspect-ratio: 16 / 9; width: 100%; object-fit: cover; background: var(--surface-2); }
.card-body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-body h3 { margin: 0; }
.card-actions { margin-block-start: auto; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* Video (click-to-load) */
.video { position: relative; aspect-ratio: 16 / 9; width: 100%; background: #000; border-radius: var(--radius); overflow: hidden; }
.video iframe, .video .video-play, .video .video-play img { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; object-fit: cover; }
.video .video-play { padding: 0; border: 0; background: #000; cursor: pointer; }
.video .video-play::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px; border-radius: 50%; background: rgba(0,0,0,.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/50% no-repeat; }
.video .video-play:hover::after { background-color: var(--accent); }
.video noscript a { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; }

/* Screenshots row */
.shots { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 8px; }
.shots img { height: 280px; width: auto; border-radius: 12px; scroll-snap-align: start; flex: none; }

/* Legal / long-form text */
.prose { max-width: 70ch; }
.prose h2 { margin-block-start: 1.6em; }
.prose table { border-collapse: collapse; width: 100%; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--surface-2); padding: 8px 10px; text-align: start; }

/* Footer */
.site-footer { background: var(--surface); border-block-start: 1px solid var(--surface-2); padding-block: 28px; margin-block-start: 48px; color: var(--muted); }
.site-footer a { color: var(--text); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-block-start: 8px; }

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

/* Lucide icons (inline sprite) */
.icon { width: 1.25em; height: 1.25em; flex: none; vertical-align: -0.2em; stroke: currentColor; }
.btn .icon { margin-inline-end: 8px; }
.features { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.features li { display: flex; gap: 10px; align-items: flex-start; }
.features .icon { color: var(--accent); margin-block-start: .2em; }
.notice { background: var(--surface-2); border-inline-start: 4px solid var(--accent); padding: 12px 16px; border-radius: 8px; margin-block-end: 1.5em; }
.pill { display: inline-block; background: var(--surface-2); border-radius: 999px; padding: 2px 12px; font-size: .9rem; margin-inline-end: 6px; }

/* Palette refinements */
h1, h2, h3 { color: #f3f4f6; }
a:hover { color: var(--accent-hover); }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); filter: none; }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--text); }
.video .video-play:hover::after { background-color: var(--accent); }

/* ===== Gaming look: neon glow, grid floor, tap duck ===== */
.site-header { border-image: linear-gradient(90deg, transparent, var(--accent), transparent) 1; border-block-end-width: 1px; }
.brand img { filter: drop-shadow(0 0 8px rgba(var(--accent-rgb),.6)); }

.btn { box-shadow: 0 0 18px rgba(var(--accent-rgb),.35); transition: box-shadow .2s, background-color .2s, transform .2s; }
.btn:hover { box-shadow: 0 0 30px rgba(var(--accent-rgb),.7); transform: translateY(-1px); }
.btn-ghost { box-shadow: none; }
.btn-ghost:hover { box-shadow: 0 0 18px rgba(var(--accent-rgb),.35); border-color: var(--accent); }

.card { border: 1px solid var(--surface-2); transition: transform .2s, box-shadow .2s, border-color .2s; }
.card:hover, .card:focus-within { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 12px 40px rgba(var(--accent-rgb),.25); }

/* underline spans the heading text and fades out like a neon tube */
section.section h2 { width: fit-content; max-width: 100%; }
section.section h2::after { content: ""; display: block; width: 100%; height: 4px; margin-block-start: 10px; border-radius: 2px; background: linear-gradient(90deg, var(--accent) 35%, transparent); filter: drop-shadow(0 0 7px rgba(var(--accent-rgb), .7)); }

/* Hero */
.hero-bg { position: relative; overflow: hidden; isolation: isolate; }
.hero-bg::before { content: ""; position: absolute; inset-block-start: -25%; inset-inline-end: -10%; width: 70%; aspect-ratio: 1; background: radial-gradient(closest-side, rgba(var(--accent-rgb),.28), transparent); z-index: -1; }
.hero-bg::after { content: ""; position: absolute; inset-inline: -20%; inset-block-end: 0; height: 55%; z-index: -1;
  background-image: linear-gradient(rgba(var(--accent-rgb),.28) 1px, transparent 1px), linear-gradient(90deg, rgba(var(--accent-rgb),.28) 1px, transparent 1px);
  background-size: 48px 48px; transform: perspective(300px) rotateX(62deg); transform-origin: bottom;
  -webkit-mask-image: linear-gradient(to top, #000, transparent 85%); mask-image: linear-gradient(to top, #000, transparent 85%); }
.hero h1 { text-shadow: 0 0 28px rgba(var(--accent-rgb),.45); }
.hero-split { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 24px; padding-block: 48px 40px; }
.hero-art { position: relative; display: grid; justify-items: center; gap: 6px; }
@media (max-width: 760px) { .hero-split { grid-template-columns: 1fr; padding-block: 32px 24px; } .hero-art { order: 2; } }

.duck-tap { background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.duck-tap img, .duck-small { width: min(320px, 62vw); height: auto; filter: drop-shadow(0 0 6px rgba(var(--accent-rgb),.9)) drop-shadow(0 0 22px rgba(var(--accent-rgb),.55)); animation: duck-float 4s ease-in-out infinite; }
.duck-small { width: 150px; margin-block-end: 12px; }

.tap-count { margin: 0; font-weight: 800; color: var(--accent); text-shadow: 0 0 14px rgba(var(--accent-rgb),.6); min-height: 1.6em; }
.plus-one { position: absolute; inset-block-start: 30%; font-weight: 800; font-size: 1.6rem; color: var(--accent); text-shadow: 0 0 12px var(--accent); pointer-events: none; animation: rise .7s ease-out forwards; }
@keyframes duck-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-12px) rotate(1deg); } }
@keyframes duck-bump { 0% { transform: scale(1); } 40% { transform: scale(1.12) rotate(-5deg); } 100% { transform: scale(1); } }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-70px); } }

/* ===== Animated duck (inline SVG): opaque fills, breathing, blink, tap squish + arm flap ===== */
.duck-svg { width: min(320px, 62vw); height: auto; overflow: visible; display: block;
  filter: drop-shadow(0 0 6px rgba(var(--accent-rgb),.9)) drop-shadow(0 0 22px rgba(var(--accent-rgb),.55)); animation: duck-float 4s ease-in-out infinite; }
.duck-tap img { animation: none; }
.duck-svg .c1, .duck-svg .c2, .duck-svg .c3 { stroke: var(--accent); stroke-width: 7px; stroke-linejoin: round; stroke-linecap: round; stroke-miterlimit: 10; }
.duck-svg .c1 { fill: #342619; }   /* beak + feet */
.duck-svg .c2 { fill: #201b18; }   /* body */
.duck-svg .c3 { fill: none; }
.duck-svg .c4 { fill: #2a2018; }   /* arms */
.duck-svg .c6 { fill: #39291a; }   /* arm shading */
.duck-svg .c5 { clip-path: url(#duck-clip-2); }
.duck-svg .c7 { clip-path: url(#duck-clip-1); }
.duck-svg ellipse, .duck-svg circle { fill: var(--accent); }

/* idle: breathing + gentle arm sway + blink */
#drake_2 { transform-origin: 600px 1040px; animation: duck-breathe 3.6s ease-in-out infinite; }
#arm_1 { transform-origin: 210px 430px; animation: sway-l 3.6s ease-in-out infinite; }
#arm_1-2 { transform-origin: 790px 420px; animation: sway-r 3.6s ease-in-out infinite; }
#eye_2 { transform-origin: 261px 299px; animation: blink 5s infinite; }
#eye_1 { transform-origin: 626px 282px; animation: blink 5s infinite; }
@keyframes duck-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.012, 1.03); } }
@keyframes sway-l { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-4deg); } }
@keyframes sway-r { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(4deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }

/* on tap: squish + arm flap (like the hatching animation in the game) */
.duck-tap.bump #drake_2 { animation: duck-squish .5s ease-out; }
.duck-tap.bump #arm_1 { animation: flap-l .5s ease-out; }
.duck-tap.bump #arm_1-2 { animation: flap-r .5s ease-out; }
@keyframes duck-squish { 0% { transform: scale(1, 1); } 25% { transform: scale(1.13, .85); } 55% { transform: scale(.92, 1.1); } 80% { transform: scale(1.03, .98); } 100% { transform: scale(1, 1); } }
@keyframes flap-l { 0% { transform: rotate(0); } 30% { transform: rotate(-26deg); } 60% { transform: rotate(10deg); } 100% { transform: rotate(0); } }
@keyframes flap-r { 0% { transform: rotate(0); } 30% { transform: rotate(26deg); } 60% { transform: rotate(-10deg); } 100% { transform: rotate(0); } }

/* ===== Game page: banner, local video, screenshots, crew ===== */
.game-banner { width: 100%; height: auto; margin-block-start: 28px; border-radius: var(--radius); border: 1px solid var(--surface-2); box-shadow: 0 0 40px rgba(var(--accent-rgb),.18); }
.video.video-local { aspect-ratio: 9 / 16; width: min(320px, 100%); margin-inline: auto; border: 2px solid var(--accent); border-radius: 24px; box-shadow: 0 0 30px rgba(var(--accent-rgb),.35); }
.video-local video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000; }
.caption { text-align: center; font-size: .95rem; margin-block-start: 12px; }
.shots img { height: 420px; border: 1px solid var(--surface-2); }
@media (max-width: 520px) { .shots img { height: 340px; } }
.shots { scrollbar-color: var(--accent) var(--surface); }



/* ===== Meet the crew ===== */
.meet { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--gap); }
.meet-card { background: var(--surface); border: 1px solid var(--surface-2); border-radius: var(--radius); padding: 24px 22px; display: grid; justify-items: center; text-align: center; gap: 6px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.meet-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 10px 30px rgba(var(--accent-rgb),.25); }
.meet-card img { width: auto; max-width: 100%; height: 170px; margin-block-end: 8px; filter: drop-shadow(0 6px 10px rgba(0,0,0,.4)); }
.meet-card h3 { margin: 0; color: var(--accent); }
.meet-card p { margin: 0; color: var(--text); font-size: .98rem; }

/* Hero breathing, same feel as the game's lobby (2.5s, scaleY 1 -> .97, anchored at the feet) */
.meet-card img.breathe { transform-origin: 50% 100%; animation: hero-breathe 2.5s ease-in-out infinite; }
@keyframes hero-breathe { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.97); } }
.meet-card img { width: 100%; height: 190px; object-fit: contain; object-position: bottom; }
.meet-card img.breathe { transform-origin: 50% 100%; }
.meet { max-width: 720px; }

/* Whole card is clickable: the card's main link stretches over it (keeps one link for screen readers) */
.card { position: relative; cursor: pointer; }
.card-link::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.card:hover .card-link { background: var(--accent-hover); box-shadow: 0 0 30px rgba(var(--accent-rgb),.7); }
.card-link:hover { transform: none; } /* a transform would shrink the stretched click area to the button */
