/* Legacy Esports — main site styles */

:root {
  --bg-dark: #0a0a0f;
  --bg-card: #12121a;
  --bg-elevated: #18182a;
  --accent: #a855f7;
  --accent-dim: rgba(168, 85, 247, 0.15);
  --accent-glow: rgba(168, 85, 247, 0.4);
  --text: #e8e8f0;
  --text-muted: #8888a0;
  --border: rgba(255, 255, 255, 0.06);
  --font-display: 'Orbitron', sans-serif;
  --font-body: 'Rajdhani', sans-serif;
  --container: 1200px;
  --header-h: 72px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

/* Skip link for keyboard/screen reader users */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0.75rem;
  z-index: 10000;
  padding: 0.6rem 1rem;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
  transition: top 0.2s;
}

.skip-link:focus {
  top: 0.75rem;
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  font-weight: 500;
}

/* Noise overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Container */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ========== Header & Nav ========== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s, border-color 0.3s;
}

.header .nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
  line-height: 1.1;
  align-items: flex-start;
}

.logo-img {
  display: block;
  object-fit: contain;
}

.logo-img-header {
  max-height: 40px;
  width: auto;
}

.logo-img-footer {
  max-height: 32px;
  width: auto;
}

.logo [hidden],
.logo-text-wrap[hidden] {
  display: none !important;
}

.logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.35rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.logo-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text);
}

/* ========== Hero ========== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: calc(var(--header-h) + 2rem) 1.5rem 4rem;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 212, 170, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 170, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

.hero-glow {
  position: absolute;
  width: 80%;
  max-width: 600px;
  height: 400px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, var(--accent-dim) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  text-align: center;
  z-index: 1;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: 0.85rem;
  letter-spacing: 0.4em;
  color: var(--accent);
  margin-bottom: 0.75rem;
  text-transform: uppercase;
}

.hero-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 1.25rem;
}

.hero-title-main {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 12vw, 6rem);
  letter-spacing: 0.15em;
  line-height: 1;
  color: var(--text);
  text-shadow: 0 0 60px var(--accent-glow);
}

.hero-title-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1rem, 4vw, 1.75rem);
  letter-spacing: 0.5em;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.hero-desc {
  max-width: 480px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.9rem 1.75rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: transparent;
  color: var(--accent);
  box-shadow: 0 0 24px var(--accent-dim);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* ========== Sections ========== */
.section {
  padding: 5rem 0;
  border-top: 1px solid var(--border);
}

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 4vw, 2rem);
  letter-spacing: 0.15em;
  margin-bottom: 0.5rem;
}

.section-title span {
  color: var(--text);
}

.section-subtitle {
  color: var(--text-muted);
  margin-bottom: 2.5rem;
  font-size: 1.05rem;
}

/* ========== About ========== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 3rem;
  align-items: start;
}

.about-content p {
  margin-bottom: 1rem;
  color: var(--text-muted);
  max-width: 60ch;
}

.about-lead {
  color: var(--text) !important;
  font-size: 1.15rem;
  font-weight: 600;
}

.about-stats {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat {
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  text-align: center;
}

.stat-value {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* ========== Roster ========== */
.roster {
  background: var(--bg-card);
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.player-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.player-card:hover {
  border-color: var(--accent-dim);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.3);
}

.player-image {
  position: relative;
  aspect-ratio: 1;
  background: var(--bg-dark);
}

.player-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 4rem;
  color: var(--accent-dim);
}

.player-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, var(--bg-elevated) 0%, transparent 50%);
}

.player-info {
  padding: 1.25rem;
}

.player-role {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  color: var(--accent);
  margin-bottom: 0.35rem;
}

.player-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}

.player-game {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ========== Games ========== */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
}

.game-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.game-card:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 24px var(--accent-dim);
}

.game-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.5rem;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 6px;
  margin-bottom: 1rem;
}

.game-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.game-card p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* ========== Achievements ========== */
.achievements {
  background: var(--bg-card);
}

.timeline {
  max-width: 640px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  padding-bottom: 2rem;
  position: relative;
}

.timeline-item:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 39px;
  top: 28px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-date {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--accent);
}

.timeline-content h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.timeline-content p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* Announcements */
.announcements-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.announcement-card {
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  border-left: 3px solid var(--accent);
  transition: border-color 0.2s;
}

.announcement-card:hover {
  border-color: var(--accent-dim);
}

.announcement-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.announcement-message {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.announcement-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.announcement-link:hover {
  text-decoration: underline;
}

/* ========== Contact ========== */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.contact-card {
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  transition: border-color 0.2s;
}

.contact-card:hover {
  border-color: var(--accent-dim);
}

.contact-icon {
  font-size: 2rem;
  display: block;
  margin-bottom: 1rem;
}

.contact-card h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.contact-card a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  word-break: break-all;
}

.contact-card a:hover {
  text-decoration: underline;
}

.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.social-link {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: color 0.2s, border-color 0.2s;
}

.social-link:hover {
  color: var(--accent);
  border-color: var(--accent-dim);
}

/* Apply / tryout form */
.apply-form {
  max-width: 560px;
  margin: 0 auto 2rem;
}

.apply-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 600px) {
  .apply-form .form-row {
    grid-template-columns: 1fr;
  }
}

.apply-form .form-group {
  margin-bottom: 1.25rem;
}

.apply-form label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.apply-form .required {
  color: var(--accent);
}

.apply-form input,
.apply-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.2s;
}

.apply-form input::placeholder,
.apply-form textarea::placeholder {
  color: var(--text-muted);
}

.apply-form input:focus,
.apply-form textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.apply-form textarea {
  resize: vertical;
  min-height: 100px;
}

.apply-feedback {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 4px;
  font-weight: 500;
}

.apply-feedback--success {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
}

.apply-feedback--error {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
}

.apply-form .btn {
  margin-top: 0.5rem;
}

.apply-form .btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

/* ========== Footer ========== */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-brand {
  margin-bottom: 0.75rem;
}

.footer-brand .logo-text {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.footer-brand .logo-sub {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.6rem;
  letter-spacing: 0.35em;
  color: var(--text-muted);
}

.footer-copy {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer-copy a {
  color: var(--accent);
  text-decoration: none;
}

.footer-copy a:hover {
  text-decoration: underline;
}

.footer-admin {
  margin-top: 0.75rem;
  font-size: 0.85rem;
}

.footer-admin a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-admin a:hover {
  color: var(--accent);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
  .about-grid {
    grid-template-columns: 1fr;
  }

  .about-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
  }

  .stat {
    flex: 1;
    min-width: 140px;
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--bg-elevated);
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
    border-bottom: 1px solid var(--border);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s, opacity 0.3s, visibility 0.3s;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .roster-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .section {
    padding: 3rem 0;
  }

  .timeline-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .timeline-item:not(:last-child)::before {
    left: 0;
    top: 60px;
  }

  .timeline-date {
    order: -1;
  }
}
