/* ============ FunJoy Games — Global Styles ============ */
:root {
  --primary: #6C5CE7;
  --primary-dark: #5A4BD1;
  --accent: #FF6B6B;
  --gold: #FFD93D;
  --ink: #1A1B2E;
  --ink-soft: #55566B;
  --ink-mute: #8B8CA0;
  --bg: #FFFFFF;
  --bg-soft: #F6F6FB;
  --bg-dark: #14152A;
  --border: #E8E8F2;
  --radius: 16px;
  --shadow: 0 10px 40px rgba(26, 27, 46, .08);
  --shadow-lg: 0 24px 60px rgba(26, 27, 46, .14);
  --font: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  --display: 'Sora', 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1160px, 92%); margin: 0 auto; }

h1, h2, h3, h4 { font-family: var(--display); line-height: 1.18; letter-spacing: -.02em; }

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.header.scrolled { border-bottom-color: var(--border); box-shadow: 0 4px 24px rgba(26,27,46,.06); }

.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 40px; height: 40px; }
.brand .name { font-family: var(--display); font-weight: 700; font-size: 1.25rem; letter-spacing: -.02em; }
.brand .name span { color: var(--primary); }

.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-size: .95rem; font-weight: 500; color: var(--ink-soft);
  position: relative; padding: 6px 0; transition: color .25s;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 30px; border-radius: 999px;
  font-weight: 600; font-size: .95rem;
  cursor: pointer; border: none; transition: transform .25s, box-shadow .25s, background .25s;
}
.btn-primary {
  background: linear-gradient(135deg, #6C5CE7 0%, #A15AE8 52%, #F0526B 100%);
  color: #fff; box-shadow: 0 8px 24px rgba(108, 92, 231, .32);
  text-shadow: 0 1px 1px rgba(0, 0, 0, .08);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(108, 92, 231, .42); }
.btn-ghost {
  background: transparent; color: var(--ink);
  border: 1.5px solid var(--border);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-sm { padding: 10px 24px; font-size: .9rem; }

/* Nav CTA — override generic nav-link styling (specificity fix) */
.nav-links a.btn {
  padding: 12px 28px; margin-left: 6px;
  font-size: .89rem; font-weight: 600; line-height: 1.1;
  color: #fff; letter-spacing: .01em;
  box-shadow: 0 6px 18px rgba(108, 92, 231, .28);
}
.nav-links a.btn::after { display: none; }
.nav-links a.btn:hover {
  color: #fff; transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(108, 92, 231, .38);
}
.nav-links a.btn-ghost { color: var(--ink); box-shadow: none; }
.nav-links a.btn-ghost:hover { color: var(--primary); transform: none; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 180px 0 120px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 10%, rgba(108, 92, 231, .12), transparent),
    radial-gradient(ellipse 50% 40% at 10% 90%, rgba(255, 107, 107, .10), transparent),
    var(--bg);
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 60px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(108, 92, 231, .1); color: var(--primary);
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  padding: 8px 18px; border-radius: 999px; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(2.6rem, 5vw, 4.2rem); font-weight: 800; }
.hero h1 .grad {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { font-size: 1.15rem; color: var(--ink-soft); margin: 24px 0 40px; max-width: 520px; }
.hero-cta { display: flex; gap: 16px; flex-wrap: wrap; }

.hero-visual { position: relative; display: flex; justify-content: center; }
.hero-logo-wrap {
  position: relative; width: 100%; max-width: 440px; aspect-ratio: 1;
  background: linear-gradient(150deg, #F0EEFF, #FFF3F0);
  border-radius: 32px; display: flex; align-items: center; justify-content: center;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}
.hero-logo-wrap img { width: 55%; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-16px); } }

.float-chip {
  position: absolute; background: #fff; border-radius: 14px;
  box-shadow: var(--shadow); padding: 12px 18px;
  font-size: .85rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
}
.float-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.chip-1 { top: 8%; left: -8%; animation: float 5s ease-in-out infinite .5s; }
.chip-2 { bottom: 12%; right: -6%; animation: float 7s ease-in-out infinite 1s; }
.chip-3 { top: 20%; right: -10%; animation: float 6s ease-in-out infinite 1.5s; }

/* ---------- Sections ---------- */
.section { padding: 110px 0; }
.section.soft { background: var(--bg-soft); }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-head .eyebrow { margin-bottom: 16px; }
.section-head h2 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 800; }
.section-head p { color: var(--ink-soft); margin-top: 16px; font-size: 1.05rem; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 36px 28px; text-align: center; transition: transform .3s, box-shadow .3s;
}
.stat:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.stat .num { font-family: var(--display); font-size: 2.6rem; font-weight: 800; color: var(--primary); }
.stat .num em { font-style: normal; color: var(--accent); }
.stat .label { color: var(--ink-mute); font-size: .9rem; margin-top: 6px; font-weight: 500; }

/* Cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 40px 34px; transition: transform .3s, box-shadow .3s, border-color .3s;
}
.card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card .icon {
  width: 58px; height: 58px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.6rem; margin-bottom: 24px;
  background: rgba(108, 92, 231, .1);
}
.card h3 { font-size: 1.25rem; margin-bottom: 12px; }
.card p { color: var(--ink-soft); font-size: .96rem; }

/* Game tiles */
.game-tile {
  border-radius: 20px; overflow: hidden; position: relative;
  aspect-ratio: 4 / 5; display: flex; align-items: flex-end;
  color: #fff; transition: transform .35s;
}
.game-tile:hover { transform: translateY(-8px) scale(1.02); }
.game-tile .bg { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 5rem; }
.game-tile .info {
  position: relative; width: 100%; padding: 28px;
  background: linear-gradient(transparent, rgba(10, 10, 25, .82) 45%);
}
.game-tile .tag {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .1em;
  text-transform: uppercase; background: rgba(255,255,255,.18); backdrop-filter: blur(6px);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 10px;
}
.game-tile h3 { font-size: 1.3rem; }

/* About split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: center; }
.split .media {
  border-radius: 28px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: linear-gradient(150deg, #EDEBFF, #FFEFEA);
  aspect-ratio: 4 / 3.4; display: flex; align-items: center; justify-content: center;
}
.split .media img { width: 48%; }
.split h2 { font-size: clamp(1.9rem, 3.2vw, 2.6rem); margin-bottom: 20px; }
.split p { color: var(--ink-soft); margin-bottom: 16px; }

.checklist { margin: 28px 0 36px; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; color: var(--ink-soft); }
.checklist .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(108, 92, 231, .12); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; font-weight: 800; margin-top: 3px;
}

/* Values row */
.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 64px; }
.value { text-align: center; padding: 0 12px; }
.value .v-icon { font-size: 2rem; margin-bottom: 14px; }
.value h4 { font-size: 1.05rem; margin-bottom: 8px; }
.value p { color: var(--ink-mute); font-size: .9rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--primary) 0%, #8B7BF0 45%, var(--accent) 100%);
  border-radius: 28px; padding: 80px 60px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 400px; height: 400px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); top: -200px; right: -120px;
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); margin-bottom: 16px; }
.cta-band p { opacity: .9; max-width: 520px; margin: 0 auto 36px; }
.cta-band .btn { background: #fff; color: var(--primary); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.cta-band .btn:hover { transform: translateY(-2px); }

/* Contact page — centered single column */
.contact-intro { text-align: center; margin-bottom: 40px; }
.contact-intro h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-bottom: 14px; }
.contact-intro > p { color: var(--ink-soft); max-width: 520px; margin: 0 auto 28px; }

.email-pill {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 26px 12px 12px; border-radius: 999px;
  background: #fff; border: 1.5px solid var(--border);
  box-shadow: 0 10px 30px rgba(26, 27, 46, .08);
  font-weight: 600; font-size: 1rem; color: var(--ink);
  transition: border-color .25s, color .25s, transform .25s, box-shadow .25s;
}
.email-pill:hover {
  border-color: var(--primary); color: var(--primary);
  transform: translateY(-2px); box-shadow: 0 16px 38px rgba(108, 92, 231, .18);
}
.email-pill .pill-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(108, 92, 231, .1);
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
}
.email-pill .pill-icon svg {
  width: 17px; height: 17px; fill: none;
  stroke: var(--primary); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.reply-note { display: block; font-size: .85rem; color: var(--ink-mute); margin-top: 14px; }

/* Contact page */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact-info h2 { font-size: clamp(1.9rem, 3.2vw, 2.5rem); margin-bottom: 16px; }
.contact-info > p { color: var(--ink-soft); margin-bottom: 36px; }
.info-item { display: flex; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--border); }
.info-item:last-child { border-bottom: none; }
.info-item .i-icon {
  flex: none; width: 48px; height: 48px; border-radius: 14px;
  background: rgba(108, 92, 231, .1); display: flex; align-items: center;
  justify-content: center; font-size: 1.25rem;
}
.info-item h4 { font-size: 1rem; margin-bottom: 4px; }
.info-item p { color: var(--ink-soft); font-size: .92rem; }

.form-card {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  padding: 44px; box-shadow: var(--shadow);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: .88rem; font-weight: 600; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: .95rem; color: var(--ink);
  padding: 14px 16px; border: 1.5px solid var(--border); border-radius: 12px;
  background: var(--bg-soft); outline: none; transition: border-color .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 4px rgba(108, 92, 231, .12); background: #fff;
}
.field textarea { resize: vertical; min-height: 130px; }
.form-note { font-size: .82rem; color: var(--ink-mute); margin-top: 14px; }
.form-success {
  display: none; background: rgba(46, 204, 113, .1); color: #1E8E5A;
  border: 1px solid rgba(46, 204, 113, .3); border-radius: 12px;
  padding: 14px 18px; margin-top: 18px; font-size: .92rem; font-weight: 500;
}
.form-success.show { display: block; }

/* Page hero (inner pages) */
.page-hero {
  padding: 170px 0 90px; text-align: center;
  background:
    radial-gradient(ellipse 55% 60% at 50% 0%, rgba(108, 92, 231, .10), transparent),
    var(--bg);
}
.page-hero h1 { font-size: clamp(2.4rem, 4.6vw, 3.6rem); font-weight: 800; }
.page-hero p { color: var(--ink-soft); margin-top: 18px; font-size: 1.1rem; max-width: 620px; margin-inline: auto; }

/* Footer */
.footer { background: var(--bg-dark); color: #B9BACD; padding: 80px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 48px; padding-bottom: 56px; }
.footer .brand .name { color: #fff; }
.footer .brand .name span { color: #A79BFF; }
.footer p { font-size: .92rem; margin-top: 16px; max-width: 300px; }
.footer h4 { color: #fff; font-size: .95rem; margin-bottom: 20px; letter-spacing: .04em; }
.footer li { margin-bottom: 12px; }
.footer li a { font-size: .92rem; transition: color .25s; }
.footer li a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding: 26px 0; display: flex; justify-content: space-between; align-items: center;
  font-size: .85rem; color: #7E7F95;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-inner, .split, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .values { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links {
    position: fixed; top: 76px; left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 4px;
    padding: 20px 5%; border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    transform: translateY(-130%); transition: transform .35s;
  }
  .nav-links.open { transform: none; }
  .nav-links a { padding: 12px 0; width: 100%; }
  .nav-links a.btn { width: 100%; justify-content: center; padding: 14px 24px; margin: 10px 0 4px; }
  .nav-toggle { display: block; }
  .grid-3, .stats { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .section { padding: 80px 0; }
  .hero { padding: 140px 0 90px; }
  .chip-1, .chip-3 { display: none; }
}
