/* Home page — index.html */

body { background: var(--bg); }

/* ── Hero ─────────────────────────────────────────────── */

.hero {
  background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
  color: #fff;
  padding: 64px 20px 76px;
  text-align: center;
}

.hero-inner {
  max-width: 720px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 20px;
  padding: 6px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.25;
}

.hero-sub {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 auto 28px;
  max-width: 560px;
  line-height: 1.6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}

.hero-actions .btn { font-size: 0.95rem; padding: 12px 22px; }

.hero-ghost.btn.ghost {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.7);
}

.hero-ghost.btn.ghost:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

/* ── Layout ───────────────────────────────────────────── */

.home-wrap {
  max-width: 1100px;
  margin: -40px auto 0;
  padding: 0 16px 40px;
}

.home-section {
  margin-top: 48px;
}

.home-section-head {
  text-align: center;
  margin-bottom: 24px;
}

.home-section-head h2 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 6px;
}

.home-section-head .note { margin: 0; }

/* ── Competitions grid ────────────────────────────────── */

.competitions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.comp-card-home {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

.comp-card-home-banner-wrap {
  position: relative;
  width: calc(100% + 36px);
  margin: -18px -18px 0;
  height: 180px;
  overflow: hidden;
  background: var(--bg);
}

.comp-card-home-banner-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(20px) brightness(0.75) saturate(1.1);
  transform: scale(1.15);
}

.comp-card-home-banner {
  position: relative;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@media (max-width: 480px) {
  .comp-card-home-banner-wrap { height: 150px; }
}

.comp-card-home-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.comp-card-home-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-open { background: #e7f7ed; color: #166534; }
.status-closed { background: #fde8ea; color: #8a1c21; }

.comp-card-home-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.85rem;
  color: var(--muted);
}

.comp-card-home-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.comp-card-home-actions .btn {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  padding: 9px 10px;
}

.empty-home {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px dashed var(--border);
}

.empty-home .icon { font-size: 3rem; margin-bottom: 12px; }

/* ── Features ─────────────────────────────────────────── */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
  text-align: center;
}

.feature-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
}

.feature-card h3 {
  margin: 0 0 8px;
  font-size: 1.02rem;
  color: var(--accent);
}

.feature-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ── CTA ──────────────────────────────────────────────── */

.cta-section { margin-bottom: 12px; }

.cta-box {
  background: linear-gradient(135deg, var(--primary-light) 0%, #ffffff 100%);
  border: 1px solid rgba(102, 126, 234, 0.25);
  border-radius: var(--radius);
  padding: 36px 24px;
  text-align: center;
}

.cta-box h2 {
  margin: 0 0 10px;
  font-size: 1.4rem;
  color: var(--accent);
}

.cta-box p {
  margin: 0 auto 20px;
  max-width: 480px;
  color: var(--muted);
}

/* ── Footer ───────────────────────────────────────────── */

.site-footer {
  max-width: 1100px;
  margin: 0 auto;
  padding: 30px 16px 50px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.site-footer .note { margin: 0; font-size: 0.82rem; }

/* ── Mobile ───────────────────────────────────────────── */

@media (max-width: 768px) {
  .hero { padding: 44px 16px 60px; }

  .hero h1 { font-size: 1.7rem; }

  .hero-sub { font-size: 0.95rem; }

  .hero-actions { flex-direction: column; align-items: stretch; }

  .hero-actions .btn { width: 100%; min-height: 46px; }

  .home-wrap { margin-top: -30px; padding: 0 12px 30px; }

  .home-section { margin-top: 34px; }

  .home-section-head h2 { font-size: 1.25rem; }

  .competitions-grid { grid-template-columns: 1fr; }

  .comp-card-home-actions { flex-direction: column; }

  .features-grid { grid-template-columns: 1fr 1fr; }

  .cta-box { padding: 28px 18px; }

  .cta-box .btn { width: 100%; min-height: 46px; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
}
