/* JudoScoreBoard landing page. External: the CSP forbids inline <style> and style= attributes. */

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

:root {
  --bg: #0a1628;
  --surface: #111e35;
  --card: #162040;
  --border: #1e2f50;
  --primary: #10b981;
  --primary-dark: #059669;
  --text: #e2e8f0;
  --muted: #94a3b8;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* NAV */
nav {
  position: sticky;
  top: 0;
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  text-decoration: none;
}
.nav-brand:hover { text-decoration: none; }
.nav-brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { color: var(--muted); font-size: 0.9rem; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); text-decoration: none; }

/* LANGUAGE SWITCHER */
.lang-switcher { position: relative; }
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.65rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s;
  font-family: inherit;
  white-space: nowrap;
}
.lang-trigger:hover { border-color: var(--primary); }
.lang-trigger svg.chevron { width: 12px; height: 12px; stroke: var(--muted); transition: transform 0.2s; }
.lang-trigger.open svg.chevron { transform: rotate(180deg); }
.lang-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #1a2740;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-width: 140px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  z-index: 200;
}
.lang-dropdown.open { display: block; }
.lang-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 1rem;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: background 0.15s, color 0.15s;
}
.lang-option:hover { background: var(--card); color: var(--text); }
.lang-option.active { color: var(--primary); font-weight: 700; }

/* HERO */
.hero {
  background: linear-gradient(135deg, #0d1f3c 0%, #0a1628 50%, #061220 100%);
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(16,185,129,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.hero-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 40px rgba(16,185,129,0.3);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  margin-bottom: 1rem;
  color: #fff;
}
.hero h1 .accent { color: var(--primary); }
.hero p {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 560px;
  margin: 0 auto 2rem;
}
.badge-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2.5rem;
}
.badge {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.8rem;
  color: var(--muted);
}
.btn-secondary {
  display: inline-block;
  border: 2px solid var(--border);
  color: var(--muted);
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: border-color 0.2s, color 0.2s;
}
.btn-secondary:hover { border-color: var(--primary); color: var(--text); text-decoration: none; }

/* SECTIONS */
.section { padding: 4rem 1.5rem; }
.section-inner { max-width: 1100px; margin: 0 auto; }
.section-title {
  text-align: center;
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.section-sub {
  text-align: center;
  color: var(--muted);
  margin-bottom: 3rem;
}

/* SCREENSHOTS */
.screenshots-section { background: var(--surface); }

/* Portrait: centered flex row, each frame fixed width */
.portrait-row {
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.phone-frame {
  flex: 0 0 160px;
  background: #0d1420;
  border: 2px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
  transition: transform 0.2s, box-shadow 0.2s;
}
.phone-frame:hover { transform: translateY(-6px); box-shadow: 0 16px 40px rgba(0,0,0,0.6); }
.phone-notch {
  height: 10px;
  background: #0a0f1a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.phone-notch::after {
  content: '';
  width: 36px;
  height: 3px;
  background: #1e2f50;
  border-radius: 2px;
}
.phone-frame img {
  width: 100%;
  display: block;
  flex: 1;
}
.phone-label {
  text-align: center;
  font-size: 0.7rem;
  color: var(--muted);
  padding: 0.45rem 0.25rem;
  background: #0a0f1a;
  flex-shrink: 0;
}

/* Landscape: one shot, centred at readable width */
.landscape-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  max-width: 620px;
  margin: 0 auto;
}
.landscape-item {
  background: #0d1420;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: transform 0.2s, box-shadow 0.2s;
}
.landscape-item:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(0,0,0,0.4); }
.landscape-item img { width: 100%; display: block; }
.landscape-item span {
  display: block;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.45rem;
  background: #0a0f1a;
}

/* FEATURES */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem;
}
.feature-icon { font-size: 1.75rem; margin-bottom: 0.75rem; }
.feature-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.4rem; }
.feature-card p { font-size: 0.875rem; color: var(--muted); }

/* INTEGRATION */
.integration-section { background: var(--surface); }
.integration-box {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.integration-box h2 { font-size: 1.5rem; font-weight: 700; margin-bottom: 1rem; }
.integration-box p { color: var(--muted); margin-bottom: 1.25rem; font-size: 0.95rem; }
.integration-steps { list-style: none; }
.integration-steps li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
  font-size: 0.9rem;
  color: var(--muted);
}
.step-num {
  flex-shrink: 0;
  width: 24px; height: 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}
.integration-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
.app-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.75rem 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  width: 100%;
  text-align: center;
}
.arrow { color: var(--primary); font-size: 1.25rem; }

/* TECH */
.tech-pills { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; }
.tech-pill {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 0.4rem 1rem;
  border-radius: 999px;
  font-size: 0.85rem;
  color: var(--muted);
}

/* CTA */
.btn-primary {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  padding: 0.8rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  transition: background 0.2s;
}
.btn-primary:hover { background: var(--primary-dark); text-decoration: none; }

/* FOOTER */
footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--text); }

@media (max-width: 700px) {
  .integration-box { grid-template-columns: 1fr; gap: 2rem; }
  .nav-links { display: none; }
  .landscape-row { grid-template-columns: 1fr; }
}

/* LIGHTBOX */
.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-img {
  max-width: 90vw;
  max-height: 88vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.7);
  object-fit: contain;
  user-select: none;
}
.lightbox-close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
.lightbox-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 1001;
}
.lightbox-arrow:hover { background: rgba(255,255,255,0.25); }
.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }
.lightbox-arrow:disabled { opacity: 0.2; cursor: default; }
.lightbox-counter {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  font-family: inherit;
}
.phone-frame img, .landscape-item img { cursor: zoom-in; }

/* Language flags (were style= attributes) */
.flag { width: 20px; height: 15px; border-radius: 2px; flex-shrink: 0; }
.flag-current { display: inline-block; vertical-align: middle; }

/* Body scroll lock while the lightbox is open (was body.style.overflow) */
body.lightbox-lock { overflow: hidden; }
