/* ==========================================================
   SunPlay Studio - sunplaystudio.com
   Rebuild: clean grid, disciplined decoration, confident type.
   ========================================================== */

:root {
  --c-orange:    #FF6B35;
  --c-orange-2:  #E55A25;
  --c-yellow:    #FFD23F;
  --c-yellow-2:  #FFE57A;
  --c-green:     #5CB85C;

  --c-bg:        #FFF8F0;
  --c-bg-2:      #FFF4E8;
  --c-bg-3:      #FFEED7;
  --c-card:      #FFFFFF;

  --c-ink:       #3D2B1F;
  --c-ink-2:     #8B6E5A;
  --c-line:      rgba(61, 43, 31, 0.10);

  --shadow-sm:   0 2px 8px rgba(255,107,53,.10);
  --shadow-md:   0 8px 24px rgba(255,107,53,.15);
  --shadow-lg:   0 20px 60px rgba(255,107,53,.18);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --grad-sun: linear-gradient(135deg, #FFD23F 0%, #FF6B35 100%);
  --grad-soft: linear-gradient(180deg, #FFE8C4 0%, #FFF8F0 60%);

  --ff-head: 'Fredoka One', 'Baloo 2', system-ui, sans-serif;
  --ff-body: 'Nunito', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--ff-body);
  font-weight: 600;
  font-size: 17px;
  line-height: 1.55;
  color: var(--c-ink);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
::selection { background: var(--c-yellow); color: var(--c-ink); }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--c-orange-2);
  margin-bottom: 20px;
}
.eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-sun);
  box-shadow: 0 0 0 4px rgba(255,107,53,.12);
}

/* ===================== TOPBAR ===================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 240, 0.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--c-line);
}
.topbar-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 14px clamp(20px, 4vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.wordmark {
  font-family: var(--ff-head);
  font-size: 22px;
  letter-spacing: .2px;
  text-decoration: none;
  color: var(--c-ink);
}
.wm-sun {
  background: var(--grad-sun);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.topnav {
  list-style: none;
  display: flex;
  gap: 4px;
  margin: 0; padding: 0;
}
.topnav a {
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  color: var(--c-ink);
  padding: 8px 14px;
  border-radius: 999px;
  transition: background .15s ease, color .15s ease;
}
.topnav a:hover { background: rgba(255,107,53,.10); color: var(--c-orange-2); }

/* ===================== BUTTONS ===================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: 999px;
  font-family: var(--ff-body);
  font-weight: 800;
  font-size: 16px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  cursor: pointer;
  border: 2px solid transparent;
}
.btn--primary {
  background: var(--grad-sun);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255,107,53,.35);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(255,107,53,.45);
}
.btn--ghost {
  background: transparent;
  color: var(--c-ink);
  border-color: rgba(61,43,31,.18);
}
.btn--ghost:hover {
  background: #fff;
  border-color: var(--c-orange);
  color: var(--c-orange-2);
}

/* ===================== HERO ===================== */

.hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(80px, 14vh, 140px) 0 clamp(100px, 16vh, 160px);
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 600px at 90% -10%, rgba(255,210,63,.45), transparent 60%),
    radial-gradient(700px 500px at -10% 100%, rgba(255,107,53,.10), transparent 60%),
    var(--c-bg);
}
.hero-glow {
  position: absolute;
  top: -180px; right: -180px;
  width: 560px; height: 560px;
  border-radius: 50%;
  background: var(--grad-sun);
  filter: blur(30px);
  opacity: calc(.55 * var(--sun-intensity, 1));
}

.hero-fruit {
  position: absolute;
  z-index: 0;
  pointer-events: auto;
  cursor: pointer;
  filter: drop-shadow(0 18px 24px rgba(255,107,53,.22));
  animation: float 4s ease-in-out infinite;
  transition: transform .35s cubic-bezier(.2,.9,.3,1.4), filter .35s ease;
  will-change: transform;
}
.hero-fruit:hover {
  transform: scale(1.18) rotate(-6deg);
  filter: drop-shadow(0 22px 30px rgba(255,107,53,.35));
  z-index: 2;
}
.hero-fruit--1 { top: 62%; left:  4%;  width: clamp(80px, 9vw, 130px); animation-delay: -.2s; animation-duration: 4.4s; }
.hero-fruit--2 { top: 14%; right: 6%;  width: clamp(70px, 8vw, 110px); animation-delay: -1.2s; animation-duration: 4.6s; }
.hero-fruit--3 { top: 22%; left: 8%;   width: clamp(55px, 6vw, 80px);  animation-delay: -.8s;  animation-duration: 3.6s; }
.hero-fruit--4 { top: 70%; right: 10%; width: clamp(65px, 7vw, 95px);  animation-delay: -1.6s; animation-duration: 5s; }
.hero-fruit--5 { top: 50%; right: 2%;  width: clamp(55px, 6vw, 78px);  animation-delay: -.5s;  animation-duration: 4.2s; }
.hero-fruit--6 { top: 40%; left: 1%;   width: clamp(50px, 5.5vw, 72px); animation-delay: -2s;  animation-duration: 4.8s; }
.hero-fruit--7 { top: 8%;  left: 32%;  width: clamp(45px, 5vw, 68px);  animation-delay: -1.4s; animation-duration: 5.2s; }
.hero-fruit--8 { top: 82%; left: 40%;  width: clamp(48px, 5.5vw, 76px); animation-delay: -.9s; animation-duration: 4.4s; }

@keyframes float {
  0%, 100% { transform: translateY(0)    rotate(-3deg); }
  50%      { transform: translateY(-14px) rotate(3deg); }
}
.hero-fruit:hover { animation-play-state: paused; }

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 820px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--c-orange-2);
  margin: 0 0 20px;
}
.hero-eyebrow .eyebrow-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--grad-sun);
  box-shadow: 0 0 0 4px rgba(255,107,53,.12);
}
.hero-title {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 1.02;
  letter-spacing: -1.5px;
  margin: 0 0 22px;
  color: var(--c-ink);
  text-wrap: balance;
}
.hero-title em {
  font-style: normal;
  background: var(--grad-sun);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero-sub {
  max-width: 560px;
  font-size: clamp(17px, 1.5vw, 19px);
  color: var(--c-ink-2);
  margin: 0 0 32px;
  text-wrap: pretty;
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ===================== GAME ===================== */

.game {
  padding: clamp(60px, 9vw, 100px) 0;
  background: var(--c-bg);
}

.game-card {
  position: relative;
  background: #fff;
  border-radius: var(--r-xl);
  padding: clamp(28px, 4vw, 48px);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--c-line);
  overflow: hidden;
}
.game-card::before {
  content: "";
  position: absolute;
  top: -140px; right: -140px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,210,63,.35), transparent 70%);
  pointer-events: none;
}

.game-card-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: clamp(16px, 2.4vw, 24px);
  margin-bottom: 28px;
  position: relative;
}
.game-icon {
  width: clamp(72px, 9vw, 100px);
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  overflow: hidden;
  background: var(--grad-sun);
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}
.game-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

.game-head { min-width: 0; }
.game-title {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1;
  margin: 0;
  background: var(--grad-sun);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  letter-spacing: -.5px;
}
.game-sub {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(16px, 1.8vw, 20px);
  color: var(--c-ink);
  margin: 6px 0 0;
}

.game-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--c-bg-2);
  border: 1.5px solid rgba(92, 184, 92, .30);
  font-weight: 800;
  font-size: 13px;
  color: var(--c-ink);
  white-space: nowrap;
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--c-orange);
}
.dot--green {
  background: var(--c-green);
  box-shadow: 0 0 0 4px rgba(92,184,92,.18);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(92,184,92,.18); }
  50%      { box-shadow: 0 0 0 7px rgba(92,184,92,.08); }
}

.game-card-body { position: relative; max-width: 720px; }
.game-lede {
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.6;
  color: var(--c-ink);
  margin: 0 0 16px;
  text-wrap: pretty;
}
.game-copy {
  font-size: 16px;
  color: var(--c-ink-2);
  margin: 0;
  text-wrap: pretty;
}

.facts {
  list-style: none;
  padding: 0;
  margin: clamp(28px, 4vw, 40px) 0 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  border-top: 1px dashed var(--c-line);
  padding-top: clamp(24px, 3vw, 32px);
  position: relative;
}
.fact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}
.fact + .fact {
  border-left: 1px solid var(--c-line);
}
.fact-num {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(28px, 3.5vw, 40px);
  line-height: 1;
  color: var(--c-orange);
  letter-spacing: -.5px;
}
.fact-num small {
  font-size: .5em;
  vertical-align: super;
  color: var(--c-orange-2);
  opacity: .7;
  margin: 0 2px;
}
.fact-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--c-ink-2);
  letter-spacing: .02em;
}

/* ===================== IN THE WORKS ===================== */

.next {
  padding: clamp(60px, 9vw, 100px) 0;
  background: var(--c-bg-2);
  position: relative;
  overflow: hidden;
}
.next::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(500px 300px at 85% 0%, rgba(255,210,63,.25), transparent 60%);
  pointer-events: none;
}

.next-head {
  max-width: 620px;
  margin: 0 0 clamp(36px, 5vw, 48px);
  position: relative;
}
.next-title {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -.5px;
}
.next-body {
  color: var(--c-ink-2);
  font-size: 17px;
  margin: 0;
  text-wrap: pretty;
}

.teasers {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  position: relative;
}
.teaser {
  position: relative;
  aspect-ratio: 5 / 4;
  border-radius: var(--r-lg);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.teaser:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.teaser--a { background: linear-gradient(135deg, #FFE57A, #FFB27A); }
.teaser--b { background: linear-gradient(135deg, #FFB27A, #FF8966); }
.teaser--c { background: linear-gradient(135deg, #FFD27A, #FF6B35); }

.teaser::before {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255,255,255,.45), transparent 55%);
  mix-blend-mode: screen;
}
.qmark {
  font-family: var(--ff-head);
  font-size: clamp(60px, 8vw, 88px);
  color: #fff;
  line-height: 1;
  text-shadow: 0 10px 30px rgba(61,43,31,.2);
  position: relative;
}
.t-label {
  position: absolute;
  bottom: 16px; left: 18px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-weight: 800;
  color: rgba(255,255,255,.9);
}

/* ===================== CONTACT ===================== */

.contact {
  padding: clamp(70px, 10vw, 120px) 0;
  background: var(--c-bg);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.contact::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% -30%, rgba(255,210,63,.30), transparent 55%);
  pointer-events: none;
}
.contact-inner { position: relative; }
.contact .eyebrow { justify-content: center; }
.contact-title {
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.05;
  margin: 0 0 14px;
  letter-spacing: -.5px;
  text-wrap: balance;
}
.contact-sub {
  color: var(--c-ink-2);
  margin: 0 auto 32px;
  max-width: 540px;
  text-wrap: pretty;
}
.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  color: var(--c-ink);
  text-decoration: none;
  font-family: var(--ff-head);
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 26px);
  padding: 14px 24px 14px 16px;
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  border: 2px solid rgba(255,107,53,.15);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.contact-email:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--c-orange);
}
.ce-at {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  background: var(--grad-sun);
  border-radius: 50%;
  color: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 18px;
}

/* ===================== FOOTER ===================== */

.foot {
  background: var(--c-bg);
  padding: 28px 0 36px;
  border-top: 1px solid var(--c-line);
}
.foot-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: var(--c-ink-2);
  font-size: 14px;
  font-weight: 700;
}
.foot-mark {
  font-family: var(--ff-head);
  color: var(--c-ink);
  font-size: 16px;
}
.foot-sun {
  background: var(--grad-sun);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  font-weight: 400;
}
.foot-links {
  display: flex;
  gap: 18px;
}
.foot-links a {
  text-decoration: none;
  transition: color .15s ease;
}
.foot-links a:hover { color: var(--c-orange-2); }

/* ===================== TWEAKS PANEL ===================== */

.tweaks {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 60;
  width: 260px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 20px 50px rgba(61,43,31,.18);
  border: 2px solid rgba(255,107,53,.2);
  padding: 16px;
  display: none;
  font-size: 13px;
}
.tweaks[data-open="1"] { display: block; }
.tweaks h4 {
  font-family: var(--ff-head);
  font-size: 18px;
  margin: 0 0 10px;
  color: var(--c-ink);
}
.tweaks label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 10px 0;
  color: var(--c-ink-2);
  font-weight: 700;
}
.tweaks input[type=range] { width: 120px; }

/* ===================== RESPONSIVE ===================== */

@media (max-width: 780px) {
  .topnav { display: none; }

  .game-card-top {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
  }
  .game-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .facts { grid-template-columns: repeat(2, 1fr); gap: 20px 12px; }
  .fact:nth-child(3) { border-left: none; }

  .teasers { grid-template-columns: 1fr 1fr; }
  .teaser--c { grid-column: 1 / -1; aspect-ratio: 5 / 2.6; }

  .foot-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
  .teasers { grid-template-columns: 1fr; }
  .teaser--c { aspect-ratio: 5 / 4; }
  .hero-fruit--1 { top: 72%; width: 80px; }
  .hero-fruit--2 { top: 8%;  width: 70px; }
  .hero-fruit--3 { top: 12%; left: 2%; width: 52px; }
  .hero-fruit--4 { top: 62%; right: 3%; width: 60px; }
  .hero-fruit--5, .hero-fruit--6, .hero-fruit--7, .hero-fruit--8 { display: none; }
  .hero-cta { flex-direction: column; align-items: stretch; }
  .hero-cta .btn { width: 100%; }
}

/* ===================== REDUCED MOTION ===================== */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}
