/**
 * TicTacArena — Homepage Styles (Dashboard Soft & Light Theme, High-Performance, Accessible)
 */
:root {
  --bg-deep: #EFF6FF;
  --bg-canvas: #EFF6FF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #FFFFFF;
  --border-card: #DCE4EF;
  --border-card-light: #E9EFF8;
  --border-highlight: #93C5FD;
  --text-white: #102A43;
  --text-primary: #1C2433;
  --text-muted: #5C6C87;
  --text-dim: #8993A1;
  --primary-blue: #2563EB;
  --primary-blue-hover: #1D4ED8;
  --royal: #4169E1;
  --royal-dark: #2F4FC4;
  --gold: #D97706;
  --gold-glow: rgba(217, 119, 6, 0.16);
  --emerald: #10A574;
  --card-shadow: 0 1px 2px rgba(37, 66, 140, 0.04), 0 8px 24px rgba(37, 66, 140, 0.06);
  --card-shadow-hover: 0 16px 36px rgba(37, 66, 140, 0.12);
}

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

body.home-page {
  min-height: 100vh;
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(1100px 620px at 8% -8%, rgba(65, 105, 225, 0.13), transparent 62%),
    radial-gradient(900px 520px at 96% 2%, rgba(22, 159, 154, 0.11), transparent 60%),
    radial-gradient(760px 520px at 50% 108%, rgba(134, 87, 217, 0.09), transparent 62%),
    radial-gradient(circle at 1px 1px, rgba(65, 105, 225, 0.07) 1px, transparent 0);
  background-size: auto, auto, auto, 26px 26px;
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

body.home-page::before {
  content: '';
  position: fixed;
  inset: 0 0 auto;
  height: 320px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(65, 105, 225, 0.07), transparent);
  z-index: 0;
}

/* Container */
.tta-container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header & Nav — Consistent Light Sky-Blue Navigation */
.home-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(235, 243, 251, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid #C6DCF1;
  box-shadow: 0 4px 20px rgba(30, 70, 130, 0.06);
}
.home-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.home-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #102A43;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.home-brand img {
  width: 34px;
  height: 34px;
  filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.25));
}
.home-brand .home-brand-name > span,
.home-brand span {
  color: #D97706;
}

.home-nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  list-style: none;
}
.home-nav-links a {
  color: #2D4560;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: color 0.18s ease;
}
.home-nav-links a:hover {
  color: #1D4ED8;
}

.home-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn-nav-login {
  color: #1D4ED8;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid #C6DCF1;
  background: #FFFFFF;
  transition: all 0.18s ease;
}
.btn-nav-login:hover {
  background: #F0F6FC;
  border-color: #93C5FD;
}
.btn-nav-play {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #ffffff;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 750;
  padding: 9px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
  transition: all 0.18s ease;
  white-space: nowrap;
}
.btn-nav-play:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

/* Hero Section */
.home-hero {
  position: relative;
  z-index: 1;
  padding: 72px 0 54px;
  text-align: center;
}
.home-hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border-radius: 999px;
  background: #DCE8FF;
  border: 1px solid #C9DAF9;
  font-size: 0.78rem;
  font-weight: 800;
  color: #1D4ED8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 22px;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}
.home-hero-kicker [data-icon] {
  color: #1D4ED8;
}
.home-hero h1 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.03em;
  max-width: 860px;
  margin: 0 auto 20px;
  color: #102A43;
}
.home-hero h1 span {
  background: linear-gradient(135deg, #1D4ED8 0%, #2563EB 50%, #4169E1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.home-hero p {
  font-size: clamp(1rem, 2vw, 1.18rem);
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 34px;
  line-height: 1.65;
}

.home-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.tta-hero-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  font-size: 0.95rem;
  font-weight: 750;
  border-radius: 13px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.tta-hero-btn.primary,
.btn-hero-primary {
  background: linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  color: #ffffff;
  border: 1px solid rgba(29, 78, 216, 0.35);
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.28);
}
.tta-hero-btn.primary:hover,
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.38);
  filter: brightness(1.03);
}
.tta-hero-btn.secondary,
.btn-hero-secondary {
  background: #FFFFFF;
  color: #1C2433;
  border: 1px solid #DCE4EF;
  box-shadow: 0 2px 8px rgba(37, 66, 140, 0.06);
}
.tta-hero-btn.secondary:hover,
.btn-hero-secondary:hover {
  background: #F8FAFD;
  border-color: #BBD1F2;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 66, 140, 0.1);
  color: #1D4ED8;
}

.home-hero-pills {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.home-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #DCE4EF;
  font-size: 0.8rem;
  font-weight: 650;
  color: #2D4560;
  box-shadow: 0 2px 8px rgba(37, 66, 140, 0.04);
  transition: all 0.18s ease;
}
.home-hero-pill:hover {
  transform: translateY(-1px);
  border-color: #C9DAF6;
  box-shadow: 0 4px 12px rgba(37, 66, 140, 0.08);
}
.home-hero-pill [data-icon] {
  color: #2563EB;
}

/* Sections */
.home-section {
  position: relative;
  z-index: 1;
  padding: 64px 0;
}
.section-head,
.home-section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 44px;
}
.section-kicker,
.home-section-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #D97706;
  background: #FDF3E0;
  border: 1px solid #F0DFB9;
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.section-head h2,
.home-section-header h2 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 850;
  letter-spacing: -0.025em;
  color: #102A43;
  margin-bottom: 14px;
}
.section-head p,
.home-section-header p {
  font-size: 1.02rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Feature & Game Mode Cards */
.home-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
}
.home-card {
  background: linear-gradient(165deg, #FFFFFF 0%, #F8FAFD 100%);
  border: 1px solid var(--border-card);
  border-radius: 20px;
  padding: 28px 24px;
  box-shadow: var(--card-shadow);
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1), border-color 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}
.home-card:hover {
  transform: translateY(-4px);
  border-color: #C9DAF6;
  box-shadow: var(--card-shadow-hover);
  background: #FFFFFF;
}
.home-card-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  background: #EAF2FF;
  border: 1px solid #CFDFF7;
  color: #2563EB;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
}
.home-card h3 {
  font-size: 1.15rem;
  font-weight: 750;
  color: #102A43;
  margin-bottom: 10px;
  letter-spacing: -0.015em;
}
.home-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 18px;
  flex-grow: 1;
}
.home-card-link {
  font-size: 0.86rem;
  font-weight: 700;
  color: #2563EB;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: all 0.18s ease;
}
.home-card-link:hover {
  gap: 8px;
  color: #1D4ED8;
}

/* Ranks Bar */
.ranks-showcase {
  background: linear-gradient(165deg, #FFFFFF 0%, #F8FAFD 100%);
  border: 1px solid var(--border-card);
  border-radius: 22px;
  padding: 32px 28px;
  margin-top: 24px;
  box-shadow: var(--card-shadow);
}
.ranks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.rank-pill {
  padding: 16px 12px;
  border-radius: 14px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  text-align: center;
  box-shadow: 0 2px 6px rgba(37, 66, 140, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.rank-pill:hover {
  transform: translateY(-2px);
  border-color: #CBDCF4;
  box-shadow: 0 6px 16px rgba(37, 66, 140, 0.08);
}
.rank-pill strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #1C2433;
  margin-bottom: 4px;
}
.rank-pill span {
  font-size: 0.74rem;
  color: #8993A1;
  font-weight: 600;
}

/* FAQ Grid */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}
.faq-card {
  background: #FFFFFF;
  border: 1px solid var(--border-card);
  border-radius: 18px;
  padding: 26px;
  box-shadow: 0 1px 2px rgba(37, 66, 140, 0.03), 0 6px 18px rgba(37, 66, 140, 0.05);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.faq-card:hover {
  transform: translateY(-2px);
  border-color: #CBDCF4;
  box-shadow: 0 12px 26px rgba(37, 66, 140, 0.09);
}
.faq-card h3 {
  font-size: 1.05rem;
  font-weight: 750;
  color: #102A43;
  margin-bottom: 10px;
}
.faq-card p {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* CTA Banner */
.home-cta-banner {
  position: relative;
  overflow: hidden;
  background: radial-gradient(720px 300px at 90% -10%, rgba(22, 159, 154, 0.16), transparent 62%),
              radial-gradient(520px 260px at 4% 112%, rgba(134, 87, 217, 0.12), transparent 62%),
              linear-gradient(135deg, #E2ECFF 0%, #F5F9FF 50%, #E6F8F2 100%);
  border: 1px solid #C6DCF1;
  border-radius: 28px;
  padding: 52px 32px;
  text-align: center;
  box-shadow: 0 18px 44px rgba(37, 66, 140, 0.1);
  margin: 20px 0;
}
.home-cta-banner h2 {
  font-family: 'Sora', 'Inter', sans-serif;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 850;
  color: #102A43;
  margin-bottom: 12px;
}
.home-cta-banner p {
  font-size: 1.05rem;
  color: #475569;
  max-width: 600px;
  margin: 0 auto 28px;
  line-height: 1.6;
}

/* Footer */
.home-footer {
  border-top: 1px solid var(--border-card);
  padding: 56px 0 32px;
  background: #FFFFFF;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 40px;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 14px;
  max-width: 320px;
  line-height: 1.6;
}
.footer-col h4 {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #102A43;
  margin-bottom: 16px;
}
.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: color 0.18s ease;
}
.footer-col a:hover {
  color: #1D4ED8;
}
.footer-bottom {
  border-top: 1px solid #E9EFF8;
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .home-nav {
    height: auto;
    min-height: 60px;
    flex-wrap: wrap;
    row-gap: 0;
    padding-top: 10px;
  }
  .home-brand-name { font-size: 1.05rem; }
  .home-nav-actions { gap: 8px; }
  .btn-nav-login,
  .btn-nav-play {
    padding: 8px 12px;
    font-size: 0.78rem;
    border-radius: 8px;
    white-space: nowrap;
  }
  .home-nav-links {
    order: 3;
    display: flex;
    width: calc(100% + 40px);
    margin: 6px -20px 0;
    padding: 4px 20px 10px;
    gap: 18px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .home-nav-links::-webkit-scrollbar { display: none; }
  .home-nav-links a { white-space: nowrap; font-size: 0.8rem; }
  .home-hero { padding: 40px 0 44px; }
  .faq-grid { grid-template-columns: 1fr; }
  .home-cta-banner { padding: 34px 22px; }
  .home-cta-banner h2 { font-size: 1.45rem; }
  .home-hero-kicker { font-size: 0.68rem; padding: 5px 12px; margin-bottom: 18px; }
  .home-hero-actions { gap: 10px; margin-bottom: 24px; }
  .tta-hero-btn { width: 100%; max-width: 300px; padding: 12px 22px; font-size: 0.9rem; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .footer-brand {
    grid-column: 1 / -1;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}
