/* ============================================================
   GuessMoji — styles.css
   ============================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --purple:       #6C3FC5;
  --purple-dark:  #4B2A9A;
  --purple-light: #A07FE0;
  --yellow:       #FFD93D;
  --yellow-dark:  #F0C20A;
  --white:        #FFFFFF;
  --lavender:     #F0EAFF;
  --gray-soft:    #F7F5FF;
  --gray-text:    #5A5275;
  --gray-muted:   #8B7BA8;
  --text-dark:    #1E1035;

  --radius-sm:    8px;
  --radius-md:    16px;
  --radius-lg:    24px;
  --radius-xl:    32px;
  --radius-pill:  999px;

  --shadow-sm:    0 2px 8px rgba(108,63,197,0.10);
  --shadow-md:    0 6px 24px rgba(108,63,197,0.15);
  --shadow-lg:    0 16px 48px rgba(108,63,197,0.20);
  --shadow-phone: 0 24px 64px rgba(30,16,53,0.22);

  --transition:   0.2s ease;
  --max-w:        1140px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--white);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--purple); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-weight: 800; line-height: 1.2; color: var(--text-dark); }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { color: var(--gray-text); }

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(108,63,197,0.10);
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: 16px;
}
.navbar__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.navbar__logo img {
  height: 36px;
  width: auto;
}
.navbar__logo-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--purple);
  letter-spacing: -0.3px;
}
.navbar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  background: var(--purple);
  color: var(--white);
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.9rem;
  transition: background var(--transition), transform var(--transition);
  white-space: nowrap;
}
.navbar__cta:hover { background: var(--purple-dark); transform: translateY(-1px); text-decoration: none; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background: linear-gradient(135deg, var(--lavender) 0%, #fff 60%);
  padding: 56px 0 48px;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero__left { display: flex; flex-direction: column; gap: 24px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--yellow);
  color: var(--text-dark);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.4px;
  width: fit-content;
}

.hero__headline { color: var(--text-dark); }
.hero__headline span { color: var(--purple); }

.hero__sub {
  font-size: 1.05rem;
  color: var(--gray-text);
  max-width: 480px;
  line-height: 1.7;
}

.hero__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.hero__pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--white);
  border: 1.5px solid rgba(108,63,197,0.18);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  box-shadow: var(--shadow-sm);
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--purple);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(108,63,197,0.35);
}
.btn-primary:hover { background: var(--purple-dark); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(108,63,197,0.40); text-decoration: none; }

.btn-secondary {
  background: var(--white);
  color: var(--purple);
  border: 2px solid var(--purple);
}
.btn-secondary:hover { background: var(--lavender); transform: translateY(-2px); text-decoration: none; }

/* ---------- Phone Previews ---------- */
.hero__right {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 520px;
}
.phone-stack {
  position: relative;
  width: 280px;
  height: 500px;
}
.phone-frame {
  position: absolute;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-phone);
  background: var(--text-dark);
  border: 3px solid rgba(255,255,255,0.7);
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.phone-frame--home {
  width: 210px;
  height: 440px;
  top: 0;
  left: 0;
  z-index: 2;
  transform: rotate(-3deg);
}
.phone-frame--game {
  width: 210px;
  height: 440px;
  bottom: 0;
  right: 0;
  z-index: 3;
  transform: rotate(3deg);
}

/* ============================================================
   FEATURES
   ============================================================ */
.features {
  padding: 56px 0 48px;
  background: var(--white);
}
.features__title {
  text-align: center;
  margin-bottom: 36px;
}
.features__title h2 span { color: var(--purple); }
.features__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-card {
  background: var(--gray-soft);
  border-radius: var(--radius-lg);
  padding: 28px 20px;
  text-align: center;
  border: 1.5px solid rgba(108,63,197,0.08);
  transition: transform var(--transition), box-shadow var(--transition);
  box-shadow: var(--shadow-sm);
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.feature-card__icon {
  font-size: 2.2rem;
  margin-bottom: 12px;
  display: block;
}
.feature-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 6px;
}
.feature-card__desc {
  font-size: 0.82rem;
  color: var(--gray-muted);
  line-height: 1.5;
}

/* ============================================================
   DOWNLOAD
   ============================================================ */
.download {
  padding: 56px 0;
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  text-align: center;
}
.download h2 { color: var(--white); margin-bottom: 12px; }
.download p  { color: rgba(255,255,255,0.80); font-size: 1.05rem; margin-bottom: 32px; }

.download__badges {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.badge-link {
  display: inline-block;
  transition: transform var(--transition), box-shadow var(--transition);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.badge-link:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,0.3); }
.badge-link img {
  height: 54px;
  width: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--text-dark);
  padding: 36px 0 28px;
  color: rgba(255,255,255,0.55);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.footer__logo img { height: 28px; width: auto; }
.footer__logo-name {
  font-size: 1rem;
  font-weight: 800;
  color: var(--white);
}
.footer__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 20px;
}
.footer__links a {
  color: rgba(255,255,255,0.60);
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer__links a:hover { color: var(--yellow); text-decoration: none; }
.footer__copy { font-size: 0.82rem; }

/* ============================================================
   INNER PAGES (terms, privacy, support)
   ============================================================ */
.page-hero {
  background: linear-gradient(135deg, var(--lavender) 0%, var(--white) 70%);
  padding: 56px 0 40px;
  text-align: center;
  border-bottom: 1px solid rgba(108,63,197,0.10);
}
.page-hero h1 { color: var(--purple); }
.page-hero p  { color: var(--gray-text); margin-top: 10px; font-size: 1rem; }

.page-content {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 72px;
}
.page-content h2 {
  font-size: 1.25rem;
  color: var(--purple-dark);
  margin: 36px 0 10px;
  padding-bottom: 6px;
  border-bottom: 2px solid var(--lavender);
}
.page-content h2:first-child { margin-top: 0; }
.page-content p { margin-bottom: 14px; font-size: 0.97rem; line-height: 1.75; }
.page-content ul, .page-content ol {
  margin: 0 0 16px 20px;
  color: var(--gray-text);
  font-size: 0.97rem;
  line-height: 1.75;
}
.page-content li { margin-bottom: 6px; }
.page-content a { color: var(--purple); font-weight: 600; }
.page-content strong { color: var(--text-dark); }

/* Support page */
.support-topics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin: 32px 0;
}
.support-card {
  background: var(--gray-soft);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  border: 1.5px solid rgba(108,63,197,0.10);
}
.support-card__icon { font-size: 1.8rem; margin-bottom: 10px; }
.support-card h3 { font-size: 1rem; margin-bottom: 6px; color: var(--text-dark); }
.support-card p  { font-size: 0.88rem; color: var(--gray-muted); }

.contact-box {
  background: linear-gradient(135deg, var(--purple-dark) 0%, var(--purple) 100%);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  text-align: center;
  margin-top: 40px;
}
.contact-box h2 { color: var(--white); border: none; margin: 0 0 10px; font-size: 1.4rem; }
.contact-box p  { color: rgba(255,255,255,0.80); margin-bottom: 24px; }
.contact-box .btn-primary {
  background: var(--yellow);
  color: var(--text-dark);
}
.contact-box .btn-primary:hover { background: var(--yellow-dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .features__grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .hero { padding: 40px 0 36px; }
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero__left { align-items: center; text-align: center; }
  .hero__sub  { text-align: center; }
  .hero__pills { justify-content: center; }
  .hero__actions { justify-content: center; }
  .hero__right {
    height: 360px;
    order: -1;
  }
  .phone-stack { width: 200px; height: 360px; }
  .phone-frame--home { width: 150px; height: 315px; }
  .phone-frame--game { width: 150px; height: 315px; }

  .features__grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .feature-card { padding: 22px 14px; }

  .navbar__logo-name { font-size: 1rem; }
  .navbar__cta { padding: 8px 16px; font-size: 0.85rem; }
}

@media (max-width: 480px) {
  .hero__actions .btn { width: 100%; }
  .features__grid { grid-template-columns: 1fr 1fr; }
  .download__badges { flex-direction: column; }
  .footer__links { gap: 8px 14px; }
}
