/* ============================================================
   Puzzlica – Shared Stylesheet
   Header · Footer · Buttons · Typography · Utils
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red:       #ff6b6b;
  --yellow:    #ffd93d;
  --green:     #6bcb77;
  --blue:      #4d96ff;
  --purple:    #c77dff;
  --dark:      #1a1a2e;
  --text:      #333;
  --muted:     #666;
  --bg:        #fff;
  --surface:   #f8f9ff;
  --radius:    20px;
  --shadow:    0 8px 32px rgba(0,0,0,.10);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.15);
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Poppins', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  opacity: 1;
  transition: opacity 0.25s ease;
}

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

.container {
  width: min(1160px, 100%);
  padding-inline: clamp(1rem, 5vw, 2.5rem);
  margin-inline: auto;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  line-height: 1.15;
}
h1 { font-size: clamp(2.4rem, 7vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1rem; }

.gradient-text {
  background: linear-gradient(90deg, var(--red), var(--yellow), var(--green));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-tag {
  display: inline-block;
  background: var(--yellow);
  color: #333;
  font-weight: 700;
  font-size: .85rem;
  padding: .25em .8em;
  border-radius: 50px;
  margin-bottom: .75rem;
  letter-spacing: .02em;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3rem;
}
.section-header p {
  margin-top: .75rem;
  color: var(--muted);
  font-size: 1.05rem;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  border: none;
}
.btn:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--yellow));
  color: #fff;
}
.btn-ghost {
  background: transparent;
  border: 2px solid rgba(255,255,255,.35);
  color: #fff;
}
.btn-ghost-dark {
  background: transparent;
  border: 2px solid rgba(0,0,0,.18);
  color: var(--dark);
}

/* ── Store badges ────────────────────────────────────────── */
.store-badge {
  height: 40px;
  width: auto;
  transition: transform var(--transition);
}
.store-badge:hover { transform: scale(1.05); }

.badge-link img {
  height: 36px;
  width: auto;
  transition: transform var(--transition);
}
.badge-link img:hover { transform: scale(1.05); }
.badge-coming-soon {
  position: relative;
  display: inline-block;
  cursor: default;
}
.badge-coming-soon img { opacity: .35; filter: grayscale(1); pointer-events: none; }
.badge-coming-soon img:hover { transform: none; }
.coming-soon-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--dark, #1a1a2e);
}

/* ── Tags ────────────────────────────────────────────────── */
.tag {
  background: var(--surface);
  color: var(--muted);
  font-size: .78rem;
  font-weight: 700;
  padding: .2em .7em;
  border-radius: 50px;
}

/* ── HEADER ───────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(26,26,46,.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  padding: .9rem 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: 1.5rem;
  color: #fff;
}
.logo-icon { width: 28px; height: 28px; flex-shrink: 0; }

.nav-links {
  display: flex;
  gap: 2rem;
}
.nav-links a {
  font-weight: 600;
  color: rgba(255,255,255,.72);
  transition: color var(--transition);
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px; left: 0;
  width: 0; height: 2px;
  background: var(--yellow);
  transition: width var(--transition);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--yellow); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 26px; height: 3px;
  background: #fff;
  border-radius: 3px;
  transition: var(--transition);
}

/* ── STATS BAND ───────────────────────────────────────────── */
.stats-band {
  background: var(--dark);
  padding: 2.5rem 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: 'Nunito', sans-serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  background: linear-gradient(90deg, var(--yellow), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.stat-label {
  display: block;
  color: rgba(255,255,255,.55);
  font-size: .85rem;
  font-weight: 600;
  margin-top: .25rem;
}

/* ── FOOTER ───────────────────────────────────────────────── */
.site-footer {
  background: var(--dark);
  color: rgba(255,255,255,.8);
  padding: 4rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand .logo { color: #fff; margin-bottom: .5rem; }
.footer-brand > p {
  font-size: .9rem;
  color: rgba(255,255,255,.42);
  margin-top: .5rem;
  line-height: 1.7;
  max-width: 260px;
}

.footer-social {
  display: flex;
  gap: .6rem;
  margin-top: 1.2rem;
}
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.55);
  transition: background var(--transition), color var(--transition);
}
.footer-social a:hover {
  background: var(--yellow);
  color: var(--dark);
}
.footer-social svg { width: 16px; height: 16px; fill: currentColor; }

.footer-col h4 {
  color: rgba(255,255,255,.88);
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 1.1rem;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.footer-col a {
  color: rgba(255,255,255,.45);
  font-size: .9rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--yellow); }

.footer-bottom {
  padding-top: 1.5rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.28);
}

/* ── Scroll-reveal ───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── Float animation ─────────────────────────────────────── */
@keyframes float {
  0%,100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-18px) scale(1.02); }
}

/* ══════════════════════════════════════════════════════════
   HOME PAGE
══════════════════════════════════════════════════════════ */

/* ── HERO ───────────────────────────────────────────────── */
.hero {
  background: linear-gradient(155deg, #0d0d20 0%, #1a1a2e 55%, #162040 100%);
  min-height: 90vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.hero-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
  padding-block: clamp(5rem, 12vh, 8rem);
}

.hero-badge {
  display: inline-block;
  background: rgba(255,217,61,.12);
  border: 1px solid rgba(255,217,61,.35);
  color: var(--yellow);
  font-weight: 700;
  font-size: .85rem;
  padding: .3em 1em;
  border-radius: 50px;
  margin-bottom: 1.2rem;
  letter-spacing: .02em;
}

.hero-title { color: #fff; margin-bottom: 1.2rem; }

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.1rem);
  color: rgba(255,255,255,.52);
  margin-bottom: 2rem;
  line-height: 1.75;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* Hero right: floating game preview cards */
.hero-right {
  position: relative;
  height: 440px;
}

.hero-game-float {
  position: absolute;
  background: rgba(255,255,255,.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 20px;
  padding: 1.1rem 1.4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #fff;
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  min-width: 210px;
  animation: float 7s ease-in-out infinite;
}
.hero-game-float--1 { top: 30px;   left: 10px;  animation-delay: 0s; }
.hero-game-float--2 { top: 180px;  right: 0;    animation-delay: 2.2s; }
.hero-game-float--3 { bottom: 45px; left: 55px; animation-delay: 4.4s; }

.hgf-icon {
  width: 54px; height: 54px;
  border-radius: 13px;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.hgf-meta { display: flex; flex-direction: column; gap: .1rem; }
.hgf-name { font-size: .95rem; line-height: 1.2; }
.hgf-stars { font-size: .78rem; color: var(--yellow); letter-spacing: .04em; }

/* ── GAMES SECTION (home) ────────────────────────────────── */
.games-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--surface);
}

.games-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.game-row {
  background: #fff;
  border-radius: var(--radius);
  padding: 2rem 2.25rem;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 2.25rem;
  align-items: center;
  border-left: 5px solid var(--accent-color, var(--red));
  transition: transform var(--transition), box-shadow var(--transition);
}
.game-row:hover {
  transform: translateX(6px);
  box-shadow: var(--shadow-lg);
}

.game-row-icon {
  width: 96px; height: 96px;
  border-radius: 22px;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

.game-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-bottom: .5rem;
}

.game-row-info h3 {
  color: var(--dark);
  font-size: 1.45rem;
  margin-bottom: .45rem;
}
.game-row-info p {
  color: var(--muted);
  font-size: .95rem;
  margin-bottom: 1rem;
  line-height: 1.55;
  max-width: 480px;
}

.game-row-link {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-weight: 700;
  font-size: .95rem;
  color: var(--accent-color, var(--red));
  transition: gap var(--transition);
  font-family: 'Nunito', sans-serif;
}
.game-row-link:hover { gap: .75rem; }

.game-row-stores {
  display: flex;
  flex-direction: column;
  gap: .7rem;
  align-items: center;
  flex-shrink: 0;
}
.game-row-stores .badge-link img { height: 38px; }

/* ── ABOUT SECTION (home) ────────────────────────────────── */
.about-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--bg);
}

.about-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text h2 { color: var(--dark); margin: .75rem 0 1rem; }
.about-text > p { color: var(--muted); margin-bottom: .8rem; line-height: 1.75; }

.value-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
  margin-top: 1.5rem;
}
.pill {
  background: var(--surface);
  border: 1.5px solid rgba(0,0,0,.07);
  border-radius: 50px;
  padding: .45em 1.1em;
  font-weight: 700;
  font-size: .88rem;
  color: var(--dark);
  font-family: 'Nunito', sans-serif;
}

.about-visual {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.about-game-card {
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  color: inherit;
}
.about-game-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.about-game-card:nth-child(1) { background: linear-gradient(140deg,#fff5f5 0%,#fffcf0 100%); }
.about-game-card:nth-child(2) { background: linear-gradient(140deg,#f0fff4 0%,#eef4ff 100%); }
.about-game-card:nth-child(3) {
  grid-column: 1 / -1;
  background: linear-gradient(140deg,#fdf5ff 0%,#fff5f5 100%);
  flex-direction: row;
  text-align: left;
  align-items: center;
}

.agc-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--icon-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.15);
}
.about-game-card h4 { color: var(--dark); font-size: .92rem; }
.about-game-card p  { color: var(--muted); font-size: .8rem; line-height: 1.4; }

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
  .hero-split { grid-template-columns: 1fr; }
  .hero-right {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: .5rem .25rem 1rem;
    scrollbar-width: none;
    width: 100%;
    height: auto;
    position: static;
    margin-top: 2rem;
  }
  .hero-right::-webkit-scrollbar { display: none; }
  .hero-game-float {
    position: static;
    animation: none;
    min-width: 200px;
    flex-shrink: 0;
  }
  .about-inner { grid-template-columns: 1fr; gap: 3rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 2rem; }
}

@media (max-width: 768px) {
  /* Nav */
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: rgba(18,18,36,.97);
    backdrop-filter: blur(12px);
    flex-direction: column;
    gap: 0;
    padding: 1rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,.4);
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a {
    display: block;
    padding: .75rem 2rem;
    font-size: 1rem;
  }
  .nav-links a::after { display: none; }
  .site-header { position: relative; }
  .nav-toggle { display: flex; }

  /* Stats */
  .stats-grid { grid-template-columns: repeat(2, 1fr); }

  /* Game rows */
  .game-row {
    grid-template-columns: auto 1fr;
    gap: 1.25rem;
  }
  .game-row-stores {
    grid-column: 1 / -1;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
  }
}

@media (max-width: 480px) {
  .hero-cta { flex-direction: column; }
  .btn { justify-content: center; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .about-visual { grid-template-columns: 1fr; }
  .about-game-card:nth-child(3) { flex-direction: column; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .game-row { grid-template-columns: 1fr; }
  .game-row-icon { width: 80px; height: 80px; }
}

/* ══════════════════════════════════════════════════════════
   PAGE TRANSITIONS
══════════════════════════════════════════════════════════ */
.page-loading,
.page-exit { opacity: 0; }

/* ══════════════════════════════════════════════════════════
   HERO BACKGROUND BLOBS
══════════════════════════════════════════════════════════ */
@keyframes blobDrift {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(30px, -20px) scale(1.08); }
  66%  { transform: translate(-20px, 15px) scale(0.95); }
  100% { transform: translate(0, 0) scale(1); }
}

.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.22;
  pointer-events: none;
  animation: blobDrift linear infinite;
}

.hero-blob--1 {
  width: 500px; height: 500px;
  background: var(--purple);
  top: -100px; right: -100px;
  animation-duration: 20s;
}
.hero-blob--2 {
  width: 420px; height: 420px;
  background: var(--blue);
  bottom: -80px; left: -80px;
  animation-duration: 25s;
  animation-delay: -8s;
}
.hero-blob--3 {
  width: 300px; height: 300px;
  background: var(--red);
  inset: 0;
  margin: auto;
  animation-duration: 16s;
  animation-delay: -4s;
}

/* ══════════════════════════════════════════════════════════
   EMAIL / NOTIFY SECTION
══════════════════════════════════════════════════════════ */
.notify-section {
  background: var(--dark);
  padding: clamp(4rem, 8vw, 6rem) 0;
  color: #fff;
}

.notify-inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}
.notify-inner h2 { color: #fff; margin-bottom: .75rem; }
.notify-inner > p {
  color: rgba(255,255,255,.6);
  margin-bottom: 1.75rem;
}

.notify-form {
  display: flex;
  gap: .75rem;
  max-width: 420px;
  margin: 0 auto 1rem;
}

.notify-form input[type="email"] {
  flex: 1;
  padding: .75rem 1.25rem;
  border-radius: 50px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(255,255,255,.1);
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color var(--transition), background var(--transition);
}
.notify-form input[type="email"]::placeholder { color: rgba(255,255,255,.45); }
.notify-form input[type="email"]:focus {
  border-color: rgba(255,217,61,.6);
  background: rgba(255,255,255,.15);
}

.notify-fine-print {
  font-size: .8rem;
  color: rgba(255,255,255,.35);
  margin-top: .5rem;
}

.notify-success {
  display: none;
  font-size: 1.1rem;
  color: var(--green);
  font-weight: 700;
  font-family: 'Nunito', sans-serif;
  padding: 1rem;
}

@media (max-width: 480px) {
  .notify-form { flex-direction: column; }
  .notify-form input[type="email"],
  .notify-form .btn { width: 100%; justify-content: center; }
}

/* ══════════════════════════════════════════════════════════
   ACCESSIBILITY
══════════════════════════════════════════════════════════ */

/* Focus ring */
:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

.btn:focus-visible             { border-radius: 50px; }
.logo:focus-visible            { border-radius: 8px; }
.footer-social a:focus-visible { border-radius: 50%; }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  @keyframes float {
    0%, 100% { transform: none; }
  }
  .hero-game-float { animation: none; }
  .reveal {
    transition: opacity 0.01ms, transform 0.01ms;
  }
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
