/* MatchFighterX — Homepage */

:root {
  --red: #e30613;
  --red-hover: #c10510;
  --black: #000000;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #555555;
  --border: #e8e8e8;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
  --header-h: 72px;
  --container: 1200px;
  --home-content-width: min(76%, 940px);
  --home-stats-width: min(62%, 560px);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Montserrat", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.5;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

/* ——— Header ——— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--black);
  height: var(--header-h);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  flex-shrink: 0;
  display: inline-flex;
  align-items: baseline;
  font-style: italic;
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
}

.logo-match {
  color: var(--white);
}

.logo-fighter {
  color: var(--red);
}

.logo-x {
  color: var(--red);
  font-size: 1.65rem;
  line-height: 0.85;
  margin-left: 0.02em;
}

.main-nav {
  display: flex;
  align-items: center;
  flex: 1;
  gap: 1.5rem;
  min-width: 0;
}

.main-nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  flex: 1;
}

.nav-link {
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0;
  position: relative;
  transition: color 0.2s;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transition: transform 0.2s;
}

.nav-link:hover::after,
.nav-link--active::after {
  transform: scaleX(1);
}

.nav-link--active {
  font-weight: 700;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.65rem 1.35rem;
  border-radius: 2px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.btn-ghost-header {
  color: var(--white);
  border-color: var(--white);
  background: transparent;
  padding: 0.55rem 1.25rem;
}

.btn-ghost-header:hover {
  background: rgba(255, 255, 255, 0.1);
}

.btn-register-header {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  padding: 0.55rem 1.35rem;
}

.btn-register-header:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
}

/* ——— Hero (full bleed background, stacked content on image) ——— */
.hero {
  position: relative;
  padding-top: var(--header-h);
  overflow: hidden;
  min-height: clamp(620px, 54vw, 820px);
  background: #0c0c0c;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("../assets/images/hero-bg.png");
  background-repeat: no-repeat;
  background-position: center top;
  background-size: 100% auto;
  z-index: 0;
  opacity: 1;
}

@media (max-aspect-ratio: 4/5) {
  .hero-bg {
    background-position: center center;
    background-size: auto 100%;
  }
}

.hero-overlay {
  display: none;
}

.hero-stack {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1.5rem 1rem;
}

.hero-content {
  text-align: center;
  max-width: 760px;
  padding: 1.15rem 0 0;
  width: 100%;
}

.hero-eyebrow {
  font-size: clamp(0.75rem, 1.5vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.hero-title {
  font-weight: 900;
  font-style: italic;
  text-transform: uppercase;
  line-height: 1.05;
  margin-bottom: 0.85rem;
}

.hero-title-line {
  display: block;
  font-size: clamp(1.75rem, 4.5vw, 3.25rem);
  color: var(--text);
  letter-spacing: -0.01em;
}

.hero-title-line--accent {
  color: var(--red);
}

.hero-subtext {
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  color: var(--text-muted);
  font-weight: 500;
  max-width: 620px;
  margin: 0 auto 1rem;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.home-center {
  width: 100%;
  max-width: var(--home-content-width);
  margin: 0 auto;
}

.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  padding: 0.85rem 1.75rem;
  font-size: 0.85rem;
}

.btn-primary:hover {
  background: var(--red-hover);
  border-color: var(--red-hover);
}

.btn-secondary {
  background: var(--white);
  color: var(--text);
  border-color: var(--text);
  padding: 0.85rem 1.75rem;
  font-size: 0.85rem;
}

.btn-secondary:hover {
  background: #f5f5f5;
}

.btn-icon {
  flex-shrink: 0;
}

/* ——— Stats bar (on hero image) ——— */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  width: 100%;
  max-width: var(--home-stats-width);
  margin: 0 auto;
  padding: 0.65rem 0.35rem;
  background: var(--white);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
  position: relative;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.15rem;
  padding: 0 0.2rem;
  min-width: 0;
}

.stat-item:not(:last-child) {
  border-right: 1px solid var(--border);
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0;
  line-height: 0;
}

.stat-icon svg {
  width: 20px;
  height: 20px;
}

.stat-value {
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
}

.stat-label {
  font-size: 0.62rem;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.25;
}

/* ——— Why section (on hero image, mockup layout) ——— */
.why-section {
  width: 100%;
  margin: 0.35rem auto 0;
  padding: 0 0 0.5rem;
  background: transparent;
}

.why-section .container {
  max-width: 100%;
  margin: 0;
  padding: 0;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
}

.section-title {
  text-align: center;
  font-weight: 900;
  font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
  color: var(--text);
}

.why-section .section-title {
  font-size: clamp(1.05rem, 2.1vw, 1.55rem);
  margin-bottom: 0.7rem;
}

.section-title-accent {
  color: var(--red);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.65rem;
  max-width: min(100%, 760px);
  margin: 0 auto;
}

.feature-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 0.75rem 0.45rem 0.65rem;
  text-align: center;
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.055);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 0;
}

.feature-card:hover {
  box-shadow: 0 7px 20px rgba(0, 0, 0, 0.075);
  transform: translateY(-2px);
}

.feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.45rem;
}

.feature-icon svg {
  width: 28px;
  height: 28px;
}

.feature-title {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.045em;
  text-transform: uppercase;
  margin-bottom: 0.32rem;
  color: var(--text);
  line-height: 1.28;
}

.feature-text {
  font-size: 0.62rem;
  color: var(--text-muted);
  line-height: 1.4;
  font-weight: 500;
  max-width: 10.5rem;
  margin: 0 auto;
}

/* ——— Footer ——— */
.site-footer {
  position: relative;
  background: linear-gradient(180deg, #0a0a0a 0%, #000 100%);
  color: rgba(255, 255, 255, 0.85);
  margin-top: 0;
  border-top: 3px solid var(--red);
}

.footer-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 3rem 1.5rem 2.25rem;
  display: grid;
  grid-template-columns: 1.35fr repeat(3, 1fr);
  gap: 2rem;
}

.logo--footer {
  display: inline-block;
  margin-bottom: 1rem;
}

.footer-tagline {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.62);
  max-width: 300px;
  margin: 0 0 1.15rem;
}

.footer-lang {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

.footer-lang-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}

.footer-heading {
  color: var(--white);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.footer-links a {
  font-size: 0.88rem;
  color: rgba(255, 255, 255, 0.68);
  text-decoration: none;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
  color: var(--red);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  max-width: var(--container);
  margin: 0 auto;
  padding: 1.15rem 1.5rem 1.65rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.45);
}

.footer-legal {
  display: flex;
  gap: 1.25rem;
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-legal a:hover {
  color: var(--white);
}

.header-user {
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 600;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .main-nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.72rem;
  }
}

@media (max-width: 1024px) {
  :root {
    --home-content-width: min(84%, 900px);
    --home-stats-width: min(74%, 500px);
  }

  .feature-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .feature-card {
    min-height: 0;
  }
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    position: relative;
    z-index: 1001;
  }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    flex: none;
    gap: 0;
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
    background: var(--black);
    padding: 0;
    transform: translateY(-110%);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 0.28s ease, opacity 0.28s ease, visibility 0.28s;
    z-index: 1000;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .main-nav-links {
    flex-direction: column;
    width: 100%;
    padding: 0.75rem 1.5rem 0;
    gap: 0;
  }

  .nav-link {
    width: 100%;
    padding: 0.85rem 0;
    text-align: center;
  }

  .header-actions {
    display: flex;
    position: static;
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.65rem;
    padding: 0.85rem 1.5rem 1.15rem;
    margin: 0;
    border-top: 1px solid #222;
    background: var(--black);
  }

  .stats-bar {
    grid-template-columns: repeat(2, 1fr);
    padding: 0.75rem 0.5rem;
    gap: 0.5rem 0;
  }

  .stat-item {
    border-right: none !important;
    padding: 0.25rem 0;
  }

  .stat-item:nth-child(odd) {
    border-right: 1px solid var(--border);
  }

  .feature-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.85rem;
  }

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

@media (max-width: 560px) {
  .header-inner {
    padding: 0 1rem;
  }

  .logo {
    font-size: 1.1rem;
  }

  .logo-x {
    font-size: 1.35rem;
  }

  .hero-content {
    padding-top: 3rem;
  }

  .stats-bar {
    padding: 0.6rem 0.4rem;
    --home-stats-width: min(88%, 420px);
  }

  .stat-item:nth-child(odd) {
    border-right: none;
  }

  .hero-stack {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero {
    min-height: auto;
    padding-bottom: 1rem;
  }

  .why-section {
    margin-top: 0.75rem;
  }

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

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .feature-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin: 0 auto;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta .btn {
    width: 100%;
  }
}

/* ── Language switcher ───────────────────────────────────────────── */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.lang-switch-globe {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: 0 2px 0 6px;
}

.lang-switch-opt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}

.lang-switch-opt:hover {
  color: var(--text);
}

.lang-switch-opt.is-active {
  background: var(--red);
  color: #fff;
  box-shadow: 0 2px 6px rgba(227, 6, 19, 0.35);
}

/* Dark variant for the dashboard topbar */
.lang-switch--dark {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.lang-switch--dark .lang-switch-globe {
  color: rgba(255, 255, 255, 0.6);
}

.lang-switch--dark .lang-switch-opt {
  color: rgba(255, 255, 255, 0.7);
}

.lang-switch--dark .lang-switch-opt:hover {
  color: #fff;
}

.lang-switch--dark .lang-switch-opt.is-active {
  background: var(--red);
  color: #fff;
}

.lang-switch--footer {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.lang-switch--footer .lang-switch-globe {
  color: rgba(255, 255, 255, 0.55);
}

.lang-switch--footer .lang-switch-opt {
  color: rgba(255, 255, 255, 0.65);
}

.lang-switch--footer .lang-switch-opt:hover {
  color: #fff;
}

.lang-switch--footer .lang-switch-opt.is-active {
  background: var(--red);
  color: #fff;
}

@media (max-width: 600px) {
  .lang-switch-globe {
    display: none;
  }
  .lang-switch-opt {
    min-width: 26px;
    padding: 4px 7px;
  }
}
