/* =========================================================
   MALAYSIAN CHESS FESTIVAL 2025
   PREMIUM "LUXURY CHESS CHAMPIONSHIP" STYLE SYSTEM
   ========================================================= */

/* =========================
   COLOR SYSTEM
   ========================= */

:root {

  /* Core */
  --bg-primary: #0B1220;
  --bg-secondary: #111827;
  --bg-tertiary: #172033;

  /* Gold */
  --gold-primary: #D4A017;
  --gold-light: #F5D36A;
  --gold-dark: #8B6914;

  /* Typography */
  --text-primary: #F8F5EE;
  --text-secondary: #B8C0CC;
  --text-muted: #7B8596;

  /* Borders */
  --border-soft: rgba(255,255,255,0.08);
  --border-gold: rgba(212,160,23,0.4);

  /* Shadows */
  --shadow-premium:
    0 10px 40px rgba(0,0,0,0.45);

  --shadow-gold:
    0 0 40px rgba(212,160,23,0.15);

  /* Gradients */
  --gradient-gold:
    linear-gradient(
      135deg,
      #D4A017 0%,
      #F5D36A 100%
    );

  --gradient-dark:
    linear-gradient(
      180deg,
      #0B1220 0%,
      #111827 100%
    );

  --gradient-hero:
    radial-gradient(
      circle at top left,
      rgba(212,160,23,0.18),
      transparent 40%
    ),
    linear-gradient(
      180deg,
      #0B1220 0%,
      #111827 100%
    );
}


/* =========================
   GLOBAL RESET
   ========================= */

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

body {
  background: var(--bg-primary);
  color: var(--text-primary);

  font-family: 'Inter', sans-serif;
  line-height: 1.6;

  overflow-x: hidden;
}


/* =========================
   TYPOGRAPHY
   ========================= */

h1,
h2,
h3,
h4 {
  font-family: 'Playfair Display', serif;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;

  color: var(--text-primary);
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
}


/* =========================
   HERO SECTION
   ========================= */

.hero {
  position: relative;

  min-height: 90vh;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 120px 8%;

  background: url('images/bg.png') no-repeat center center;
  background-size: cover;

  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: brightness(1.2);
}

/* Dark overlay to ensure text readability over video/image */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(11, 18, 32, 0.4) 0%,
    rgba(17, 24, 39, 0.6) 100%
  );
  z-index: 1;
}

/* Chess texture overlay */

.hero::before {
  content: "";

  position: absolute;
  inset: 0;
  z-index: 2;

  background-image:
    linear-gradient(
      rgba(255,255,255,0.02) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,0.02) 1px,
      transparent 1px
    );

  background-size: 60px 60px;

  opacity: 0.25;
}


/* Giant king watermark */

.hero::after {
  content: "♔";

  position: absolute;
  right: 5%;
  top: 50%;

  transform: translateY(-50%);

  font-size: 35rem;
  color: rgba(255,255,255,0.03);

  pointer-events: none;
  z-index: 2;
}


/* Hero content */

.hero-content {
  position: relative;
  z-index: 10;

  max-width: 700px;
}

.hero-badge {
  display: inline-block;

  padding: 10px 18px;

  margin-bottom: 24px;

  border: 1px solid var(--border-gold);

  color: var(--gold-light);

  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;

  backdrop-filter: blur(12px);
}

.hero-title {
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 800;

  margin-bottom: 24px;

  line-height: 0.95;
}

.hero-title span {
  color: var(--gold-primary);
}

.hero-description {
  max-width: 580px;

  color: var(--text-secondary);

  font-size: 1.2rem;

  margin-bottom: 40px;
}


/* =========================
   PREMIUM BUTTONS
   ========================= */

.btn-premium {
  display: inline-flex;
  align-items: center;
  gap: 12px;

  padding: 16px 32px;

  background: var(--gradient-gold);
  color: #111;

  font-weight: 700;
  text-decoration: none;

  border-radius: 4px;

  transition: all 0.3s ease;

  box-shadow: var(--shadow-gold);
}

.btn-premium:hover {
  transform: translateY(-3px);

  box-shadow:
    0 10px 40px rgba(212,160,23,0.35);
}


/* =========================
   CHAMPION SECTION
   ========================= */

.champion-section {
  padding: 120px 8%;

  background:
    linear-gradient(
      180deg,
      #111827 0%,
      #0B1220 100%
    );
}

.champion-grid {
  display: grid;
  grid-template-columns: 420px 1fr;
  gap: 80px;
  align-items: center;
}


/* Champion Card */

.champion-card {
  position: relative;

  background: var(--bg-secondary);

  border: 1px solid var(--border-gold);

  overflow: hidden;

  box-shadow: var(--shadow-premium);
}

.champion-image {
  aspect-ratio: 4 / 5;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.02),
      rgba(255,255,255,0)
    );

  display: flex;
  align-items: center;
  justify-content: center;
}

.champion-info {
  padding: 28px;

  background:
    linear-gradient(
      180deg,
      #172033 0%,
      #0B1220 100%
    );
}

.champion-label {
  color: var(--gold-primary);

  text-transform: uppercase;
  letter-spacing: 0.2em;

  font-size: 0.8rem;

  margin-bottom: 8px;
}

.champion-name {
  font-size: 2rem;
  font-family: 'Playfair Display', serif;
}


/* =========================
   STATISTICS
   ========================= */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;

  margin-top: 40px;
}

.stat-card {
  background: rgba(255,255,255,0.03);

  border: 1px solid var(--border-soft);

  padding: 28px;

  transition: 0.3s ease;
}

.stat-card:hover {
  border-color: var(--border-gold);

  transform: translateY(-4px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 800;

  color: var(--gold-primary);
}

.stat-label {
  color: var(--text-secondary);
}


/* =========================
   TOURNAMENT GRID
   ========================= */

.events-section {
  padding: 120px 8%;
}

.events-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(320px, 1fr));

  gap: 28px;
}


/* Event Card */

.event-card {
  position: relative;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.03),
      rgba(255,255,255,0.01)
    );

  border: 1px solid var(--border-soft);

  padding: 32px;

  transition: all 0.35s ease;

  overflow: hidden;

  backdrop-filter: blur(12px);
}

.event-card::before {
  content: "";

  position: absolute;
  top: 0;
  left: 0;

  width: 100%;
  height: 3px;

  background: var(--gradient-gold);

  transform: scaleX(0);

  transition: 0.35s ease;
}

.event-card:hover::before {
  transform: scaleX(1);
}

.event-card:hover {
  transform: translateY(-6px);

  border-color: var(--border-gold);

  box-shadow: var(--shadow-gold);
}

.event-category {
  color: var(--gold-primary);

  font-size: 0.75rem; letter-spacing: 0.18em;
  text-transform: uppercase;

  margin-bottom: 16px;
}

.event-title {
  font-size: 1.4rem;
  font-weight: 700;

  margin-bottom: 20px;
}

.event-meta {
  color: var(--text-secondary);

  margin-bottom: 28px;
}


/* Featured Main Event */

.event-card.featured {
  background:
    linear-gradient(
      135deg,
      rgba(212,160,23,0.12),
      rgba(255,255,255,0.03)
    );

  border: 1px solid rgba(212,160,23,0.4);

  transform: scale(1.02);
}


/* =========================
   NEWSLETTER SECTION
   ========================= */

.newsletter {
  padding: 100px 8%;

  background:
    linear-gradient(
      135deg,
      #D4A017,
      #F5D36A
    );

  color: #111;
}

.newsletter-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
}

.newsletter h2 {
  font-size: 2.5rem;
}

.newsletter-form {
  display: flex;
  gap: 12px;
}

.newsletter input {
  width: 320px;

  padding: 16px 20px;

  border: none;
  outline: none;

  font-size: 1rem;
}

.newsletter button {
  padding: 16px 24px;

  background: #111827;
  color: white;

  border: none;

  font-weight: 700;
  cursor: pointer;
}


/* =========================
   FOOTER
   ========================= */

.footer {
  padding: 100px 8% 60px;

  background: #050A14;

  border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-title {
  font-size: 2rem;
  margin-bottom: 20px;
}

.footer p {
  color: var(--text-secondary);
}


/* =========================
   ANIMATIONS
   ========================= */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}


/* =========================
   RESPONSIVE
   ========================= */

@media (max-width: 980px) {

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

  .newsletter-box {
    flex-direction: column;
    align-items: flex-start;
  }

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

  .hero-title {
    font-size: 4rem;
  }

  .hero::after {
    font-size: 18rem;
  }
}

@media (max-width: 640px) {

  .hero {
    padding: 100px 24px;
  }

  .champion-section,
  .events-section,
  .newsletter,
  .footer {
    padding-left: 24px;
    padding-right: 24px;
  }

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

  .newsletter-form {
    width: 100%;
    flex-direction: column;
  }

  .newsletter input {
    width: 100%;
  }

  .hero-title {
    font-size: 3rem;
  }
}
