/* ============================================================
   HK Kunifish Game - Global Styles
   WARM GAME STUDIO EDITION — friendly casual-gaming aesthetic
   ============================================================ */

:root {
  --bg: #1a1029;
  --bg-2: #241636;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-2: rgba(255, 255, 255, 0.1);
  --border: rgba(255, 255, 255, 0.12);
  --text: #fff7ec;
  --text-muted: #cdb8d8;
  --warm: #ff7e3a;
  --pink: #ff5087;
  --gold: #ffb84d;
  --cream: #fde0a8;
  --grad: linear-gradient(135deg, #ff7e3a 0%, #ff5087 55%, #ffb84d 100%);
  --grad-soft: linear-gradient(135deg, rgba(255,126,58,.22), rgba(255,80,135,.18));
  --grad-warm: linear-gradient(135deg, rgba(255,126,58,.32), rgba(253,224,168,.18));
  --radius: 18px;
  --radius-lg: 26px;
  --shadow: 0 18px 48px rgba(10,4,22,.55);
  --shadow-warm: 0 18px 48px rgba(255,126,58,.3);
  --font: 'Poppins', 'Segoe UI', system-ui, sans-serif;
  --display: 'Fredoka', 'Poppins', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .brand-name, .btn, .stat h3, .game-card-tag, .section-eyebrow, .hero-badge, .meta-item .v {
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: -.2px;
}

/* ---------- Layout container (max-width, centered) ---------- */
.container { width: min(1120px, 92%); margin-inline: auto; }
.container.narrow { width: min(820px, 92%); }

/* ---------- Layout helpers ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 32px; }
.text-center { text-align: center; }

/* ---------- Warm game-studio background ---------- */
.bg-orb {
  position: fixed; inset: 0; z-index: -2; overflow: hidden;
  background:
    radial-gradient(1100px 700px at 8% -10%, #4a1f5d 0%, transparent 60%),
    radial-gradient(900px 700px at 110% 20%, #4d152b 0%, transparent 55%),
    radial-gradient(1100px 700px at 60% 115%, #5a2a08 0%, transparent 60%),
    var(--bg);
}
.bg-orb::before, .bg-orb::after, .bg-orb .orb3 {
  content: ""; position: absolute; border-radius: 50%; filter: blur(120px);
  opacity: .55; animation: drift 18s ease-in-out infinite;
}
.bg-orb::before { width: 520px; height: 520px; background: #ff7e3a; top: -100px; left: -80px; }
.bg-orb::after { width: 460px; height: 460px; background: #ff5087; bottom: -130px; right: -60px; animation-delay: -9s; }
.bg-orb .orb3 { width: 380px; height: 380px; background: #ffb84d; top: 45%; left: 55%; animation-delay: -4s; opacity: .35; }
@keyframes drift {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(30px,-26px) scale(1.1); }
}

/* Soft dotted grid */
.bg-grid {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,.06) 1.4px, transparent 1.4px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 35%, #000 18%, transparent 78%);
}

/* ---------- Buttons (chunky friendly) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 32px; border-radius: 14px;
  font-family: var(--display); font-weight: 700; font-size: 15px;
  letter-spacing: .3px;
  transition: transform .25s, box-shadow .25s;
  cursor: pointer; border: 0; position: relative;
}
.btn:hover { transform: translateY(-3px); }
.btn-primary {
  background: var(--grad); color: #fff;
  box-shadow: 0 12px 28px rgba(255,126,58,.42);
}
.btn-primary:hover { box-shadow: 0 18px 42px rgba(255,80,135,.5); }
.btn-ghost {
  background: rgba(255,255,255,.08); color: var(--text);
  border: 1.5px solid rgba(255,255,255,.22); backdrop-filter: blur(8px);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Navbar ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  background: rgba(26,16,41,.78);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 54px; height: 54px; border-radius: 16px;
  background: var(--cream); display: grid; place-items: center; padding: 4px;
  box-shadow: 0 8px 22px rgba(255,126,58,.35);
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 700; color: var(--text); }
.brand-name .hl { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { padding: 9px 18px; border-radius: 12px; font-size: 14px; font-weight: 600; color: var(--text-muted); transition: .22s; }
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.08); }
.nav-links a.active { color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(255,126,58,.4); }
.nav-toggle { display: none; background: none; border: 0; color: var(--text); font-size: 26px; cursor: pointer; }
.nav .btn { padding: 11px 24px; font-size: 13px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 180px 0 120px; text-align: center; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: -2px; z-index: -1;
  background: radial-gradient(700px 420px at 50% 8%, rgba(255,126,58,.2), transparent 70%);
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 9px 20px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: rgba(255,126,58,.18); border: 1.5px solid rgba(255,126,58,.55);
  color: var(--cream); margin-bottom: 28px; letter-spacing: 1px;
  box-shadow: 0 6px 22px rgba(255,126,58,.22);
}
.hero h1 {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 86px); line-height: 1.04; font-weight: 700;
  max-width: 960px; margin: 0 auto 24px;
  text-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.hero h1 .grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 6px 22px rgba(255,126,58,.35));
}
.hero p.lead { font-size: clamp(16px, 2.3vw, 20px); color: var(--text-muted); max-width: 700px; margin: 0 auto 40px; }
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.scroll-hint { margin-top: 64px; color: var(--text-muted); font-size: 13px; letter-spacing: 2px; animation: bob 2s infinite; }
@keyframes bob { 0%,100%{ transform: translateY(0);} 50%{ transform: translateY(8px);} }

/* ---------- Section base ---------- */
.section { padding: 100px 0; }
.section-head { text-align: center; margin-bottom: 60px; }
.section-eyebrow {
  display: inline-block; color: var(--warm); text-transform: uppercase;
  letter-spacing: 3px; font-size: 13px; font-weight: 700; margin-bottom: 14px;
  padding: 6px 18px; border-radius: 999px; background: rgba(255,126,58,.14);
  border: 1.5px solid rgba(255,126,58,.4);
}
.section h2 {
  font-size: clamp(32px, 4.6vw, 50px); font-weight: 700; line-height: 1.12;
  font-family: var(--display); max-width: 720px; margin: 0 auto;
}
.section-head p { color: var(--text-muted); max-width: 640px; margin: 16px auto 0; font-size: 16px; }

/* ---------- Game cards (warm chunky tiles) ---------- */
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
@media (max-width: 900px) { .games-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .games-grid { grid-template-columns: 1fr; } }
.game-card {
  position: relative; border-radius: 24px; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.1);
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.game-card:hover { transform: translateY(-8px); border-color: rgba(255,126,58,.6); box-shadow: 0 24px 56px rgba(255,126,58,.32); }
.game-card-media { position: relative; aspect-ratio: 16/9; overflow: hidden; }
.game-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.game-card:hover .game-card-media img { transform: scale(1.06); }
.game-card-media::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg,transparent 40%,rgba(26,16,41,.92)); }
.game-card-tag {
  position: absolute; top: 14px; left: 14px; z-index: 2;
  padding: 7px 15px; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  border-radius: 10px; background: rgba(26,16,41,.78); border: 1.5px solid rgba(255,126,58,.55);
  backdrop-filter: blur(6px); color: var(--cream);
}
.game-card-body { padding: 26px; }
.game-card-body h3 { font-size: 22px; margin-bottom: 8px; }
.game-card-body p { color: var(--text-muted); font-size: 14px; margin-bottom: 18px; }
.game-card-meta { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: var(--text-muted); }
.game-card-arrow { color: var(--warm); font-size: 18px; }
.game-card .btn { width: 100%; justify-content: center; }

/* Icon-style game cards (logo + brand background) */
.game-card-icon { aspect-ratio: 16/9; display: grid; place-items: center; position: relative; overflow: hidden; }
.game-card-icon::before { content:""; position:absolute; inset:0; background: radial-gradient(420px 240px at 50% 110%, rgba(255,255,255,.2), transparent 70%); }
.game-card-icon::after {
  content:""; position:absolute; width: 280px; height: 280px; border-radius: 50%;
  filter: blur(90px); opacity: .55; animation: pulseGlow 6s ease-in-out infinite;
}
@keyframes pulseGlow { 0%,100%{opacity:.45;} 50%{opacity:.8;} }
.game-card-icon img {
  width: 142px; height: 142px; object-fit: cover; border-radius: 32px;
  box-shadow: 0 18px 40px rgba(0,0,0,.55), 0 0 0 4px rgba(255,255,255,.14);
  transition: transform .4s; position: relative; z-index: 1;
}
.game-card:hover .game-card-icon img { transform: translateY(-5px) scale(1.05) rotate(-3deg); }
/* Brand backgrounds per game */
.bg-stickman { background: linear-gradient(135deg, #2a1454 0%, #5b1f72 55%, #2a1640 100%); }
.bg-stickman::after { background: #9b5bff; }
.bg-runic { background: linear-gradient(135deg, #3d1810 0%, #7a3220 55%, #2d1730 100%); }
.bg-runic::after { background: #ff8c1a; }
.bg-wizard { background: linear-gradient(135deg, #0d2a4e 0%, #1a5570 55%, #1f1840 100%); }
.bg-wizard::after { background: #2fd0ff; }

/* Featured hero game */
.featured {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center;
  background: var(--grad-warm); border: 1.5px solid rgba(255,126,58,.4);
  border-radius: 28px; padding: 44px; margin-bottom: 40px; position: relative; overflow: hidden;
}
.featured::before { content:""; position:absolute; inset:0; background: radial-gradient(500px 320px at 90% 10%, rgba(255,80,135,.22), transparent 70%); }
.featured-media { position: relative; border-radius: 18px; overflow: hidden; box-shadow: var(--shadow); border: 1.5px solid rgba(255,255,255,.12); }
.featured-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.featured-content { position: relative; }
.featured-content .eyebrow { color: var(--warm); letter-spacing: 2.5px; text-transform: uppercase; font-size: 12px; font-weight: 700; font-family: var(--display); }
.featured-content h3 { font-size: clamp(26px, 4vw, 40px); margin: 14px 0 12px; font-family: var(--display); }
.featured-content p { color: var(--text-muted); margin-bottom: 24px; }
.featured-badges { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chip {
  padding: 8px 16px; border-radius: 999px; background: rgba(255,255,255,.08);
  border: 1.5px solid rgba(255,255,255,.14); font-size: 12px; color: var(--text-muted); font-weight: 600;
}

/* ---------- Features (about) ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.feature-card {
  padding: 32px; border-radius: 22px;
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.1);
  transition: .3s; position: relative; overflow: hidden;
}
.feature-card:hover { border-color: rgba(255,126,58,.5); transform: translateY(-4px); }
.feature-icon {
  width: 62px; height: 62px; border-radius: 18px;
  background: var(--grad); display: grid; place-items: center;
  font-size: 28px; margin-bottom: 20px; box-shadow: 0 10px 24px rgba(255,126,58,.35);
}
.feature-card h4 { font-size: 19px; margin-bottom: 10px; font-family: var(--display); }
.feature-card p { color: var(--text-muted); font-size: 14px; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; text-align: center; }
.stat {
  padding: 30px 10px; border-radius: 22px;
  background: rgba(255,255,255,.05); border: 1.5px solid rgba(255,255,255,.1);
  transition: .3s;
}
.stat:hover { border-color: rgba(255,126,58,.5); transform: translateY(-3px); }
.stat h3 { font-size: 44px; font-weight: 700; background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stat p { color: var(--text-muted); font-size: 14px; margin-top: 6px; font-weight: 600; letter-spacing: 1px; }

/* ---------- Games showcase page ---------- */
.game-hero { position: relative; padding: 170px 0 80px; }
.game-hero::before { content:""; position:absolute; inset:-2px; z-index:-1; background: radial-gradient(600px 360px at 25% 0%, rgba(255,126,58,.2), transparent 70%); }
.game-hero-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.game-hero-content { max-width: 560px; }
.game-hero-art { position: relative; }
.game-hero-icon {
  width: 142px; height: 142px; border-radius: 32px;
  box-shadow: 0 18px 44px rgba(255,126,58,.42);
  margin-bottom: 24px; background: var(--cream); padding: 0;
}
.game-hero-icon img { width: 100%; height: 100%; border-radius: 32px; object-fit: cover; }
.game-hero h1 { font-size: clamp(36px, 5.2vw, 58px); font-weight: 700; line-height: 1.05; margin: 14px 0 12px; font-family: var(--display); }
.game-hero .tagline { color: var(--text-muted); font-size: 18px; margin-bottom: 26px; }
.game-meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 24px 0; }
.meta-item {
  padding: 16px; border-radius: 14px; background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1); transition: .3s;
}
.meta-item:hover { border-color: rgba(255,126,58,.5); }
.meta-item .k { font-size: 11px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text-muted); font-weight: 600; }
.meta-item .v { font-size: 16px; font-weight: 700; margin-top: 4px; }

/* Screenshots gallery */
.shots-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px; }
.shot { position: relative; border-radius: 18px; overflow: hidden; border: 1.5px solid rgba(255,255,255,.1); cursor: pointer; transition: .3s; background: var(--surface); }
.shot:hover { transform: translateY(-4px); border-color: rgba(255,126,58,.6); box-shadow: 0 18px 44px rgba(255,126,58,.3); }
.shot img { width: 100%; aspect-ratio: 16/9; object-fit: cover; }
.shot.portrait img { aspect-ratio: 9/16; }

/* Portrait game hero shots (e.g. Wizard Survivor) */
.hero-portrait-shots { display: flex; gap: 16px; justify-content: center; margin-top: 4px; }
.hero-portrait-shots img {
  height: clamp(360px, 44vh, 480px);
  aspect-ratio: 9/16;
  object-fit: cover;
  border-radius: 26px;
  border: 1.5px solid rgba(255,126,58,.4);
  box-shadow: 0 22px 54px rgba(255,126,58,.35);
  transition: transform .35s;
}
.hero-portrait-shots img:hover { transform: translateY(-5px); }
@media (max-width: 560px) { .hero-portrait-shots img { height: 300px; } }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8,4,16,.94); display: none; align-items: center; justify-content: center; padding: 40px; backdrop-filter: blur(10px); }
.lightbox.open { display: flex; }
.lightbox img { max-width: min(1100px, 92vw); max-height: 86vh; border-radius: 12px; box-shadow: 0 30px 80px rgba(0,0,0,.7); border: 1.5px solid rgba(255,255,255,.14); }
.lightbox-close { position: absolute; top: 24px; right: 30px; background: none; border: 0; color: #fff; font-size: 34px; cursor: pointer; }

/* ---------- CTA ---------- */
.cta { text-align: center; background: var(--grad-warm); border: 1.5px solid rgba(255,126,58,.4); border-radius: 28px; padding: 64px 30px; position: relative; overflow: hidden; }
.cta::before { content:""; position:absolute; inset:0; background: radial-gradient(480px 300px at 50% 110%, rgba(255,80,135,.22), transparent 70%); }
.cta h2 { font-size: clamp(28px, 4.2vw, 44px); margin-bottom: 14px; font-family: var(--display); }
.cta p { color: var(--text-muted); margin-bottom: 28px; max-width: 560px; margin-inline: auto; }

/* ---------- Legal pages ---------- */
.legal { padding: 155px 0 90px; }
.legal h1 { font-size: clamp(32px,4.2vw,48px); margin-bottom: 30px; font-family: var(--display); }
.legal .updated { color: var(--text-muted); font-size: 14px; margin-bottom: 40px; }
.legal-block {
  background: rgba(255,255,255,.04); border: 1.5px solid rgba(255,255,255,.1);
  border-left: 4px solid var(--warm); border-radius: 16px; padding: 34px; margin-bottom: 22px;
}
.legal-block h2 { font-size: 20px; margin-bottom: 14px; color: var(--cream); font-family: var(--display); }
.legal-block p, .legal-block li { color: var(--text-muted); font-size: 15px; margin-bottom: 10px; }
.legal-block ul { list-style: disc; padding-left: 22px; margin-top: 6px; }
.legal-block ul li { margin-bottom: 8px; }
.legal-block a { color: var(--warm); }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid rgba(255,255,255,.08); background: rgba(16,8,28,.85); padding: 70px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 50px; }
.footer h4 { font-size: 14px; margin-bottom: 18px; color: var(--text); font-family: var(--display); text-transform: uppercase; letter-spacing: 1.5px; }
.footer p, .footer a { color: var(--text-muted); font-size: 14px; }
.footer a:hover { color: var(--warm); }
.footer li { margin-bottom: 10px; }
.footer-bottom { border-top: 1px solid var(--border); padding: 22px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; color: var(--text-muted); font-size: 13px; }
.footer-bottom .links { display: flex; gap: 20px; }
/* Footer brand block: logo + name inline, description on its own line */
.footer .brand { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.footer .brand .brand-logo { width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0; }
.footer .brand .brand-name { font-size: 20px; }
.footer .brand p { flex-basis: 100%; margin-top: 6px; line-height: 1.8; max-width: 260px; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Utilities ---------- */
.text-grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.center { text-align: center; }
.mt-20 { margin-top: 20px; } .mt-40 { margin-top: 40px; }
.pill { display:inline-block; padding:7px 16px; border-radius:999px; background:rgba(255,126,58,.14); border:1.5px solid rgba(255,126,58,.4); font-size:12px; color:var(--cream); font-weight:600; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 76px; right: 0; flex-direction: column; align-items: stretch;
    background: rgba(26,16,41,.98); width: min(320px, 80vw); padding: 20px; gap: 4px;
    transform: translateX(100%); transition: transform .3s;
    border-left: 1px solid rgba(255,255,255,.08); height: calc(100vh - 76px);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links .btn { justify-content: center; }
  .nav-toggle { display: block; }
  .featured, .game-hero-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { padding: 150px 0 90px; }
  .section { padding: 70px 0; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}
