/* ═══════════════════════════════════════════════════════════════
   styles.css — Sticker Crafted Universe
   Single stylesheet shared by all pages.
   Load after theme.css (which provides the CSS variables).
   ═══════════════════════════════════════════════════════════════ */

/* ── Base resets ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ── Noise overlay ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.05'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: var(--noise-opacity);
  transition: opacity 0.3s ease;
}

/* ── Ambient glows ── */
.glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(130px);
  pointer-events: none;
  z-index: 0;
  opacity: var(--glow-opacity);
  transition: opacity 0.3s ease;
}
.glow-1 { width: 560px; height: 560px; background: var(--purple); top: -180px; left: -100px; }
.glow-2 { width: 380px; height: 380px; background: var(--green);  bottom: 0;   right: -80px; }

/* ════════════════════════════════════════════════════
   NAV
   ════════════════════════════════════════════════════ */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 48px;
  display: flex;
  align-items: center;
  gap: 20px;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s ease, border-color 0.3s ease;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-right: auto;
}
.nav-logo { width: 32px; height: 32px; }
.nav-name {
  font-family: 'DM Serif Display', serif;
  font-size: 0.95rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.nav-name span { color: var(--text); }
.nav-links { display: flex; gap: 24px; }
.nav-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--text); }

/* ── Theme toggle ── */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s, color 0.2s, background 0.3s;
}
.theme-toggle:hover { border-color: var(--purple); color: var(--purple); }
.theme-toggle svg {
  width: 17px; height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon-moon { display: block; }
.icon-sun  { display: none; }
[data-theme="light"] .icon-moon { display: none; }
[data-theme="light"] .icon-sun  { display: block; }

/* ════════════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════════════ */

/* ── Buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: var(--purple-btn);
  color: var(--purple-btn-text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 1rem;
  border-radius: 100px;
  text-decoration: none;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 40px rgba(167,139,250,0.2);
}
.btn-primary:hover {
  background: var(--purple-btn-hover);
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(167,139,250,0.35);
}
.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 30px;
  background: transparent;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  border-radius: 100px;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: transform 0.2s, border-color 0.2s;
}
.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(167,139,250,0.4);
}
.apple-icon { width: 16px; height: 16px; fill: currentColor; }

/* ── Section labels ── */
.section-label {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 14px;
}
.section-title {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.1;
  margin-bottom: 16px;
}
.section-body {
  color: var(--muted);
  font-size: 1rem;
  max-width: 520px;
  line-height: 1.7;
}

/* ── Divider ── */
.divider {
  position: relative;
  z-index: 1;
  height: 1px;
  background: var(--border);
  max-width: 900px;
  margin: 0 auto;
}

/* ── Brick logo mark (used in icon + banner + card)
      ORDER: smallest brick first (top), largest last (bottom)
      This is intentional — the stack grows from top to bottom ── */
.brick-stack { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.brick       { height: 10px; border-radius: 3px; opacity: 0.95; }
.brick-sm    { width: 44px; background: #c4b5fd; }   /* top    — smallest */
.brick-md    { width: 52px; background: #22d3ee; }   /* middle            */
.brick-lg    { width: 64px; background: #a78bfa; }   /* bottom — largest  */

/* Mini version (card icon) */
.mini-bricks { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.mini-brick  { height: 6px; border-radius: 2px; }
.mb-sm       { width: 18px; background: #c4b5fd; }
.mb-md       { width: 22px; background: #22d3ee; }
.mb-lg       { width: 28px; background: #a78bfa; }

/* Banner version (homepage card) — 4 bricks */
.ds-bricks { display: flex; flex-direction: column; gap: 9px; align-items: center; animation: float 4s ease-in-out infinite; }
.ds-brick  { height: 16px; border-radius: 5px; }
.b-xs      { width:  90px; background: #67e8f9; }    /* top    — smallest */
.b-sm      { width: 110px; background: #c4b5fd; }
.b-md      { width: 130px; background: #22d3ee; }
.b-lg      { width: 160px; background: #a78bfa; }    /* bottom — largest  */

/* ════════════════════════════════════════════════════
   HOMEPAGE — Game cards
   ════════════════════════════════════════════════════ */

.hero-homepage {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 0 auto;
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-eyebrow {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 24px;
  animation: fadeUp 0.5s ease both;
}
.hero-homepage h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(2.8rem, 8vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
  animation: fadeUp 0.5s 0.1s ease both;
}
.hero-homepage h1 em { font-style: italic; color: var(--purple); }
.hero-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
  animation: fadeUp 0.5s 0.2s ease both;
}

.games-section {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
  padding: 60px 24px 120px;
  animation: fadeUp 0.5s 0.3s ease both;
}
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-top: 24px;
}

.game-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s, background 0.3s;
}
.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card);
}

/* Banner */
.game-card-banner {
  height: 190px;
  background: var(--ds-banner);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.live-badge {
  position: absolute;
  top: 14px; right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 100px;
  font-size: 0.7rem;
  color: var(--green-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.live-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}

.game-card-body {
  padding: 24px 24px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.game-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: var(--card-gradient);
  border: 1px solid var(--border);
  margin-top: -40px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  box-shadow: 0 8px 24px var(--shadow);
}

.game-name {
  font-family: 'DM Serif Display', serif;
  font-size: 1.5rem;
  margin-bottom: 6px;
  color: var(--text);
}
.game-desc {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}
.game-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  gap: 12px;
  flex-wrap: wrap;
}
.game-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.meta-tag {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 4px 10px;
  background: var(--surface-2);
  border-radius: 100px;
  border: 1px solid var(--border);
}
.card-links { display: flex; gap: 10px; align-items: center; flex-shrink: 0; }
.link-learn {
  font-size: 0.82rem;
  color: var(--purple);
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.link-learn:hover { opacity: 0.7; }
.link-download {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  background: var(--purple-btn);
  color: var(--purple-btn-text);
  font-size: 0.82rem;
  font-weight: 500;
  border-radius: 100px;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s, background 0.2s;
}
.link-download:hover { background: var(--purple-btn-hover); transform: translateY(-1px); }

.coming-soon-card {
  background: var(--surface);
  border: 1px dashed var(--coming-border);
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 32px;
  gap: 10px;
  min-height: 280px;
  transition: background 0.3s ease;
}
.cs-icon  { font-size: 2rem; opacity: 0.3; }
.cs-label { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); opacity: 0.6; }
.cs-text  { font-family: 'DM Serif Display', serif; font-size: 1.1rem; color: var(--muted); opacity: 0.5; }

/* ════════════════════════════════════════════════════
   GAME PAGE — Hero, modes, themes, features, screenshots
   ════════════════════════════════════════════════════ */

.hero-game {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 120px 24px 80px;
  text-align: center;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  border-radius: 100px;
  font-size: 0.75rem;
  color: var(--green-text);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 24px;
  font-weight: 500;
  animation: fadeUp 0.6s ease both;
}
.badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s ease infinite;
}
.app-icon {
  width: 120px; height: 120px;
  border-radius: 28px;
  background: var(--ds-banner);
  border: 1px solid var(--border);
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 60px rgba(167,139,250,0.2), 0 20px 60px var(--shadow);
  animation: float 4s ease-in-out infinite;
}
.hero-game h1 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(3rem, 10vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  animation: fadeUp 0.6s 0.1s ease both;
}
.hero-game h1 em { font-style: italic; color: var(--purple); }
.tagline {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--muted);
  margin-bottom: 48px;
  animation: fadeUp 0.6s 0.2s ease both;
  letter-spacing: 0.08em;
}
.cta-group {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.3s ease both;
}
.scroll-hint {
  position: absolute;
  bottom: 36px; left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 0.6s 0.8s ease both;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(to bottom, var(--muted), transparent);
  animation: scrollPulse 2s ease infinite;
}

/* Sections */
.page-section {
  position: relative;
  z-index: 1;
  padding: 100px 24px;
}
.container { max-width: 900px; margin: 0 auto; }

/* Modes */
.modes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.mode-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  transition: transform 0.2s, border-color 0.2s, background 0.3s;
}
.mode-card:hover { transform: translateY(-4px); border-color: var(--border-hover); }
.mode-icon { font-size: 2rem; margin-bottom: 16px; }
.mode-name { font-family: 'DM Serif Display', serif; font-size: 1.4rem; margin-bottom: 8px; color: var(--text); }
.mode-desc { color: var(--muted); font-size: 0.9rem; line-height: 1.6; }
.mode-tag {
  display: inline-block;
  margin-top: 16px;
  padding: 4px 12px;
  border-radius: 100px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  font-weight: 500;
}
.tag-free   { background: var(--green-bg); color: var(--green-text); border: 1px solid var(--green-border); }
.tag-unlock { background: rgba(167,139,250,0.1); color: var(--purple); border: 1px solid rgba(167,139,250,0.2); }

/* Themes */
.themes-row { display: flex; gap: 12px; margin-top: 48px; flex-wrap: wrap; }
.theme-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.9rem;
  color: var(--text);
  transition: transform 0.2s, border-color 0.2s, background 0.3s;
}
.theme-pill:hover { transform: translateY(-2px); border-color: rgba(167,139,250,0.3); }
.theme-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.dot-zen    { background: #b8a9c9; }
.dot-ocean  { background: #67e8f9; }
.dot-forest { background: #86efac; }
.dot-space  { background: #c4b5fd; }

/* Features */
.features-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 48px;
}
.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  transition: background 0.3s ease;
}
.feature-check {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-bg);
  border: 1px solid var(--green-border);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 2px;
  font-size: 0.68rem; color: var(--green-text); font-weight: 600;
}
.feature-text { font-size: 0.88rem; color: var(--muted); line-height: 1.5; }
.feature-text strong { color: var(--text); font-weight: 500; }

/* Screenshots */
.ss-scroll {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  padding: 8px 40px 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  scroll-snap-type: x mandatory;
}
.ss-scroll::-webkit-scrollbar { display: none; }
.ss-card {
  flex-shrink: 0;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.ss-card img {
  height: 520px;
  width: auto;
  border-radius: 20px;
  display: block;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  background: var(--surface);
  min-width: 240px;
  transition: box-shadow 0.3s ease;
}
.ss-card p { font-size: 0.75rem; color: var(--muted); letter-spacing: 0.08em; text-transform: uppercase; }

/* CTA section */
.cta-section { text-align: center; padding: 120px 24px; position: relative; z-index: 1; }
.cta-inner {
  max-width: 580px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 32px;
  padding: 64px 48px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}
.cta-inner::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(167,139,250,0.1), transparent 70%);
  pointer-events: none;
}
.cta-inner h2 {
  font-family: 'DM Serif Display', serif;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin-bottom: 14px;
  position: relative;
  color: var(--text);
}
.cta-inner p { color: var(--muted); margin-bottom: 36px; position: relative; }

/* ════════════════════════════════════════════════════
   FOOTER
   ════════════════════════════════════════════════════ */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 28px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  transition: border-color 0.3s ease;
}
.footer-left { font-size: 0.8rem; color: var(--muted); }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.8rem; color: var(--muted); text-decoration: none; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }

/* ════════════════════════════════════════════════════
   KEYFRAMES
   ════════════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}

/* ════════════════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════════════════ */
@media (max-width: 600px) {
  nav { padding: 16px 20px; }
  .nav-links { gap: 14px; }
  footer { flex-direction: column; align-items: flex-start; padding: 24px 20px; }
  .hero-homepage { padding: 60px 24px 40px; }
  .hero-game { padding: 100px 20px 70px; }
  .games-section { padding: 40px 24px 80px; }
  .page-section { padding: 70px 20px; }
  .cta-inner { padding: 40px 24px; }
}
