/* ============================================================
   byte4 technologies — Production CSS
   Responsive: mobile-first, tablet 768px+, desktop 1024px+
   ============================================================ */

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

/* ─── THEME TOKENS ─── */
:root {
  --ink: #0a0f1a;
  --page: #ffffff;
  --surface: #f2f4f8;
  --muted: #6b7485;
  --border: #dde0e8;
  --accent: #e8401c;
  --card: #ffffff;
  --card-border: #dde0e8;
  --nav-bg: #ffffff;
  --gf: #1a3a1a;
  --gl: #7fc94a;
  --gold: #f5e6a0;
  --yw: #d4e84a;
  --fd: 'Barlow Condensed', sans-serif;
  --fb: 'DM Sans', sans-serif;
}
[data-theme="dark"] {
  --ink: #f0f2f5;
  --page: #0c0f18;
  --surface: #141824;
  --muted: #8b94a8;
  --border: #222840;
  --card: #141824;
  --card-border: #222840;
  --nav-bg: #0c0f18;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  background: var(--page);
  overflow-x: hidden;
  transition: background 0.3s, color 0.3s;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { text-decoration: none; }

/* ─── NAV ─── */
nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--nav-bg);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background 0.3s, border-color 0.3s;
}
.logo-img { height: 36px; width: auto; }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 30px;
  padding: 3px;
  cursor: pointer;
  flex-shrink: 0;
}
.tt-opt {
  width: 30px;
  height: 26px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background 0.2s;
  user-select: none;
}
.tt-opt.active { background: var(--accent); color: white; }

/* ─── HERO ─── */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  min-height: auto;
}
@media (min-width: 900px) {
  .hero { grid-template-columns: 1fr 1fr; min-height: 580px; }
}
.hl {
  padding: 2.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (min-width: 768px) { .hl { padding: 3rem 2rem; } }
@media (min-width: 1024px) { .hl { padding: 4rem 3rem; } }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff3f0;
  border: 1px solid #ffc4b5;
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  width: fit-content;
}
[data-theme="dark"] .badge { background: rgba(232,64,28,0.12); border-color: rgba(232,64,28,0.3); }
.dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:0.3 } }

h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 52px;
  font-weight: 900;
  line-height: 0.88;
  text-transform: uppercase;
  letter-spacing: -1px;
  margin-bottom: 1.25rem;
  color: var(--ink);
}
@media (min-width: 480px) { h1 { font-size: 64px; } }
@media (min-width: 768px) { h1 { font-size: 72px; } }
@media (min-width: 1024px) { h1 { font-size: 76px; } }
h1 em { font-style: normal; color: var(--accent); display: block; }

.tagline {
  font-size: 13px;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 1rem;
  letter-spacing: 0.3px;
}
.tagline span { color: var(--accent); font-style: normal; font-weight: 600; }

.hsub {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  max-width: 400px;
  margin-bottom: 1.75rem;
}
@media (min-width: 768px) { .hsub { font-size: 15px; } }

.email-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--page);
  padding: 0.75rem 1.25rem;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  transition: opacity 0.2s;
  width: fit-content;
}
[data-theme="dark"] .email-btn { background: #f0f2f5; color: #0c0f18; }
.email-btn:hover { opacity: 0.85; }

.stats {
  display: flex;
  gap: 1.5rem;
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.sv { font-family: 'Barlow Condensed', sans-serif; font-size: 30px; font-weight: 900; color: var(--ink); }
@media (min-width: 768px) { .sv { font-size: 34px; } }
.sl { font-size: 11px; color: var(--muted); margin-top: 1px; }

/* ─── SCOREBOARD PANEL ─── */
.hr {
  background: var(--gf);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
}
@media (min-width: 768px) { .hr { padding: 2rem; } }
.tb { width: 100%; max-width: 420px; }
.tbh { text-align: center; margin-bottom: 1.25rem; }
.tbs { font-family: 'Barlow Condensed', sans-serif; font-size: 13px; font-weight: 600; color: #7aad5a; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 4px; }
.tbt { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600; color: rgba(255,255,255,0.35); letter-spacing: 3px; text-transform: uppercase; }
.live-pill { display: inline-flex; align-items: center; gap: 5px; background: var(--accent); color: white; font-size: 10px; font-weight: 700; padding: 3px 10px; border-radius: 4px; letter-spacing: 1.5px; margin-bottom: 1rem; }
.ld { width: 5px; height: 5px; background: white; border-radius: 50%; animation: pulse 1s ease-in-out infinite; }
.score-grid { border: 2px solid var(--gl); border-radius: 4px; overflow: hidden; }
.score-col-header { display: grid; grid-template-columns: 1fr 56px 56px 56px; background: rgba(255,255,255,0.05); border-bottom: 2px solid var(--gl); }
.scl { font-family: 'Barlow Condensed', sans-serif; font-size: 10px; font-weight: 700; color: rgba(255,255,255,0.4); letter-spacing: 2px; text-transform: uppercase; text-align: center; padding: 7px 2px; }
.scl.p { text-align: left; padding-left: 14px; }
.score-row { display: grid; grid-template-columns: 1fr 56px 56px 56px; border-bottom: 2px solid var(--gl); align-items: center; }
.score-row:last-child { border-bottom: none; }
.sri { padding: 12px 14px; }
.srn { font-family: 'Barlow Condensed', sans-serif; font-size: 20px; font-weight: 800; color: white; letter-spacing: 0.5px; text-transform: uppercase; line-height: 1; }
@media (min-width: 480px) { .srn { font-size: 24px; } }
.sru { font-family: 'Barlow Condensed', sans-serif; font-size: 11px; font-weight: 600; color: var(--gl); letter-spacing: 1px; text-transform: uppercase; margin-top: 4px; }
.score-row.winner .srn { color: var(--yw); }
.score-row.winner .cup { display: inline; margin-left: 6px; font-size: 16px; }
.cup { display: none; }
.ssc { text-align: center; padding: 12px 2px; border-left: 1px solid var(--gl); }
.ss { font-family: 'Barlow Condensed', sans-serif; font-size: 38px; font-weight: 900; color: var(--gold); line-height: 1; }
@media (min-width: 480px) { .ss { font-size: 44px; } }
.score-row.winner .ss { color: var(--yw); }
.score-footer { text-align: center; margin-top: 1rem; }
.srf { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; color: var(--gl); letter-spacing: 3px; text-transform: uppercase; }

/* ─── SECTION BASE ─── */
.section-wrap { padding: 3.5rem 1.25rem; max-width: 1200px; margin: 0 auto; }
@media (min-width: 768px) { .section-wrap { padding: 4rem 2rem; } }
@media (min-width: 1024px) { .section-wrap { padding: 4.5rem 2.5rem; } }

.stag { font-size: 11px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--accent); margin-bottom: 0.875rem; }
h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 38px; font-weight: 900; text-transform: uppercase; line-height: 0.95; letter-spacing: -0.5px; margin-bottom: 1.25rem; color: var(--ink); }
@media (min-width: 600px) { h2 { font-size: 46px; } }
@media (min-width: 1024px) { h2 { font-size: 52px; } }
h2 span { color: var(--accent); }
.ssub { font-size: 14px; color: var(--muted); max-width: 540px; line-height: 1.75; }
@media (min-width: 768px) { .ssub { font-size: 15px; } }

/* ─── MODULES ─── */
.modules-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}
@media (min-width: 600px) { .modules-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .modules-grid { grid-template-columns: 1fr 1fr 1fr; } }

.module-card {
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  background: var(--card);
  transition: border-color 0.2s, background 0.3s;
}
.module-card:hover { border-color: var(--accent); }
.mi { width: 42px; height: 42px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 18px; margin-bottom: 1rem; }
.hub { background: #fff0ed; color: var(--accent); }
.dash { background: #e8f2ff; color: #1c5ee8; }
.app { background: #eafaf2; color: #1ca870; }
[data-theme="dark"] .hub { background: rgba(232,64,28,0.15); }
[data-theme="dark"] .dash { background: rgba(28,94,232,0.15); }
[data-theme="dark"] .app { background: rgba(28,168,112,0.15); }
.mn { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 0.4rem; color: var(--ink); }
.md { font-size: 13px; color: var(--muted); line-height: 1.65; margin-bottom: 1rem; }
.mf { list-style: none; display: flex; flex-direction: column; gap: 5px; }
.mf li { font-size: 12px; color: var(--muted); display: flex; align-items: flex-start; gap: 7px; }
.mf li::before { content: '→'; color: var(--accent); font-weight: 700; font-size: 11px; flex-shrink: 0; margin-top: 1px; }
.mtag { display: inline-block; margin-top: 1rem; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 4px; letter-spacing: 0.5px; }
.tw { background: #fff0ed; color: #993c1d; }
.td { background: #e8f2ff; color: #185fa5; }
.ta { background: #eafaf2; color: #0f6e56; }
[data-theme="dark"] .tw { background: rgba(232,64,28,0.15); color: #ff7a5a; }
[data-theme="dark"] .td { background: rgba(28,94,232,0.15); color: #6699ff; }
[data-theme="dark"] .ta { background: rgba(28,168,112,0.15); color: #4ddba8; }

/* ─── TOURNAMENTS ─── */
.trn-wrap {
  background: var(--surface);
  border-radius: 16px;
  padding: 2.5rem 1.25rem;
  margin: 0 0.5rem;
  transition: background 0.3s;
}
@media (min-width: 768px) { .trn-wrap { padding: 3rem 2.5rem; margin: 0 1rem; border-radius: 20px; } }

.trn-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-top: 2rem;
}
@media (min-width: 480px) { .trn-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .trn-grid { grid-template-columns: repeat(3, 1fr); } }

.tc {
  background: var(--card);
  border-radius: 10px;
  padding: 0.875rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--card-border);
  transition: background 0.3s;
}
.ti { width: 38px; height: 38px; border-radius: 8px; background: var(--ink); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 15px; }
[data-theme="dark"] .ti { background: #222840; }
.tn { font-weight: 500; font-size: 12px; line-height: 1.4; color: var(--ink); }
@media (min-width: 480px) { .tn { font-size: 13px; } }
.tm { font-size: 11px; color: var(--muted); margin-top: 2px; }
.tb2 { font-size: 10px; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; padding: 3px 7px; border-radius: 4px; white-space: nowrap; margin-left: auto; flex-shrink: 0; }
.bk { background: #fff3f0; color: #993c1d; }
.bku { background: #e8f2ff; color: #185fa5; }
.bn { background: #f0faf5; color: #0f6e56; }
[data-theme="dark"] .bk { background: rgba(232,64,28,0.15); color: #ff7a5a; }
[data-theme="dark"] .bku { background: rgba(28,94,232,0.15); color: #6699ff; }
[data-theme="dark"] .bn { background: rgba(28,168,112,0.15); color: #4ddba8; }

/* ─── CAPABILITIES ─── */
.caps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.875rem;
  margin-top: 2rem;
}
@media (min-width: 600px) { .caps-grid { grid-template-columns: 1fr 1fr; } }

.cap-item {
  display: flex;
  gap: 1rem;
  padding: 1.125rem;
  border-radius: 10px;
  background: var(--surface);
  transition: background 0.3s;
}
.cap-num { font-family: 'Barlow Condensed', sans-serif; font-size: 24px; font-weight: 900; color: var(--border); line-height: 1; flex-shrink: 0; width: 32px; }
.cap-title { font-weight: 500; font-size: 14px; margin-bottom: 3px; color: var(--ink); }
.cap-desc { font-size: 12px; color: var(--muted); line-height: 1.65; }

/* ─── GALLERY ─── */
.gallery-section {
  background: var(--gf);
  padding: 3.5rem 0;
  transition: background 0.3s;
}
[data-theme="dark"] .gallery-section { background: #0a1a0a; }
@media (min-width: 768px) { .gallery-section { padding: 5rem 0; } }

.gallery-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.25rem; }
@media (min-width: 768px) { .gallery-inner { padding: 0 2rem; } }
@media (min-width: 1024px) { .gallery-inner { padding: 0 2.5rem; } }

.gallery-inner .stag { color: var(--gl); }
.gallery-inner h2 { color: white; }
.gallery-inner h2 span { color: var(--gl); }
.gallery-inner .ssub { color: rgba(255,255,255,0.45); }
.gg-label { font-family: 'Barlow Condensed', sans-serif; font-size: 12px; font-weight: 700; color: rgba(255,255,255,0.3); letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 0.875rem; margin-top: 2rem; }

/* Mobile: single column stacks */
.gallery-boards, .gallery-team {
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) {
  .gallery-boards { grid-template-columns: 1fr 1fr; }
  .gallery-team { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .gallery-boards {
    grid-template-columns: 2fr 3fr;
    grid-template-rows: 260px 220px;
  }
  .gallery-team {
    grid-template-columns: 1fr 1fr 1fr;
    grid-template-rows: 220px 220px;
  }
}

.pi {
  border-radius: 10px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  aspect-ratio: 4/3;
}
@media (min-width: 900px) {
  .pi { aspect-ratio: unset; }
  .pi.tall { grid-row: span 2; }
  .gallery-team .pi:nth-child(2) { grid-row: span 2; }
}
.pi img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.pi:hover img { transform: scale(1.05); }

/* ─── CTA BOX ─── */
.cta-wrap { max-width: 1200px; margin: 0 auto; padding: 2rem 0.75rem 3rem; }
@media (min-width: 768px) { .cta-wrap { padding: 3rem 1rem 4rem; } }

.cta-box {
  background: var(--ink);
  border-radius: 16px;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
@media (min-width: 768px) {
  .cta-box {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px;
    padding: 3.5rem 3rem;
    gap: 3rem;
  }
}
[data-theme="dark"] .cta-box { background: #141824; border: 1px solid var(--border); }
.cta-box h2 { color: white; margin-bottom: 0.75rem; }
.cta-box p { color: rgba(255,255,255,0.45); font-size: 14px; max-width: 380px; line-height: 1.75; }
@media (min-width: 768px) { .cta-box p { font-size: 15px; } }

.cta-right { flex-shrink: 0; }
.cta-label { font-size: 11px; color: rgba(255,255,255,0.4); letter-spacing: 1px; text-transform: uppercase; margin-bottom: 0.75rem; }
.cta-email {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: white;
  padding: 0.875rem 1.5rem;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: opacity 0.2s;
  word-break: break-all;
}
@media (min-width: 768px) { .cta-email { font-size: 15px; padding: 1rem 1.75rem; } }
.cta-email:hover { opacity: 0.88; }

/* ─── FOOTER ─── */
footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: flex-start;
  background: var(--page);
  transition: background 0.3s;
}
@media (min-width: 768px) {
  footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 2.5rem;
    gap: 1rem;
  }
}
.footer-logo img { height: 30px; width: auto; }
.footer-tagline { font-size: 13px; color: var(--muted); font-style: italic; }
.footer-tagline span { color: var(--accent); font-style: normal; font-weight: 600; }
.footer-copy { font-size: 11px; color: var(--muted); }
