/* ============================================
   Kingside Sports — styles.css
   The Chessboard Theme
   ============================================ */

/* --- CSS Variables --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-walnut: #1a1510;
  --bg-surface: #141414;
  --text-primary: #f5f5f5;
  --text-secondary: #a8a29e;
  --accent-tan: #c9a96e;
  --accent-brown: #8b6f47;
  --accent-amber: #92702a;
  --border-dark: #2a2520;
  --light-square: #e8dcc8;

  --font-headline: "Playfair Display", Georgia, serif;
  --font-body: "IBM Plex Sans", "Helvetica Neue", sans-serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Noise texture overlay — GPU-composited to avoid repaint overhead */
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  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)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 256px 256px;
  will-change: transform;
  transform: translateZ(0);
}

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

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Animations --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero elements animate on load */
.hero .animate-on-scroll {
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

/* Scroll-triggered elements */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Navigation --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  transition: background-color 0.3s ease;
  contain: layout style;
}

.navbar.scrolled {
  background-color: rgba(10, 10, 10, 0.97);
  border-bottom: 1px solid var(--border-dark);
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--text-primary);
  position: relative;
  transition: color 0.2s ease;
}

.nav-link:hover {
  color: var(--accent-tan);
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--accent-tan);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-cta {
  font-size: 13px;
  padding: 10px 24px;
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  border: none;
}

.btn-primary {
  background-color: var(--accent-tan);
  color: #0a0a0a;
  padding: 14px 32px;
}

.btn-primary:hover {
  box-shadow: 0 0 24px rgba(201, 169, 110, 0.3);
  background-color: #d4b77a;
}

.btn-outline {
  background: transparent;
  color: var(--accent-tan);
  padding: 14px 32px;
  border: 1px solid var(--accent-tan);
}

.btn-outline:hover {
  background-color: rgba(201, 169, 110, 0.1);
}

.btn-full {
  width: 100%;
  padding: 16px 32px;
  font-size: 16px;
}

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Mobile Drawer --- */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  height: 100vh;
  background-color: var(--bg-surface);
  z-index: 999;
  transition: right 0.3s ease;
  border-left: 1px solid var(--border-dark);
}

.mobile-drawer.open {
  right: 0;
}

.mobile-drawer-content {
  display: flex;
  flex-direction: column;
  padding: 100px 32px 32px;
  gap: 24px;
}

.mobile-link {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--text-primary);
  transition: color 0.2s ease;
}

.mobile-link:hover {
  color: var(--accent-tan);
}

.mobile-cta {
  margin-top: 16px;
  text-align: center;
}

/* Mobile overlay */
.mobile-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.mobile-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding-top: 72px;
}

.hero-grid-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(rgba(201, 169, 110, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 110, 0.07) 1px, transparent 1px);
  background-size: 80px 80px;
  animation: gridPulse 6s ease-in-out infinite;
  pointer-events: none;
  will-change: opacity;
  contain: strict;
}

@keyframes gridPulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
  padding: 0 24px;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-tan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.hero-headline {
  font-family: var(--font-headline);
  font-size: 72px;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  color: var(--text-primary);
}

.hero-subtitle {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 40px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* --- Social Proof --- */
.social-proof {
  background-color: var(--bg-walnut);
  padding: 32px 0;
  text-align: center;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
}

.social-proof-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-tan);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.badge-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.badge {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 6px 16px;
  border: 1px solid var(--border-dark);
  border-radius: 20px;
}

.badge-divider {
  color: var(--accent-brown);
  font-size: 8px;
}

/* --- Sections --- */
.section {
  padding: 120px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-tan);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
}

.section-headline {
  font-family: var(--font-headline);
  font-size: 44px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.section-description {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 300;
  color: var(--text-secondary);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* --- Feature Cards --- */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.feature-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-left: 3px solid var(--accent-brown);
  border-radius: 8px;
  padding: 32px;
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.feature-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
    rgba(201, 169, 110, 0.06),
    transparent 60%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.feature-card:hover::before {
  opacity: 1;
}

.feature-card:hover {
  border-color: var(--accent-brown);
}

.feature-icon {
  margin-bottom: 20px;
}

.feature-title {
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.feature-desc {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Stats Section --- */
.stats-section {
  padding: 80px 0;
  border-top: 1px solid var(--border-dark);
  border-bottom: 1px solid var(--border-dark);
  background-color: var(--bg-walnut);
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
  text-align: center;
}

.stat-number {
  display: block;
  font-family: var(--font-mono);
  font-size: 48px;
  font-weight: 500;
  color: var(--accent-tan);
  margin-bottom: 12px;
}

.stat-desc {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* --- Steps --- */
.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  margin-bottom: 80px;
}

.step {
  flex: 1;
  text-align: center;
  padding: 0 24px;
  max-width: 320px;
}

.step-connector {
  width: 60px;
  height: 2px;
  background-color: var(--accent-tan);
  margin-top: 32px;
  flex-shrink: 0;
  opacity: 0.4;
}

.step-number {
  display: block;
  font-family: var(--font-headline);
  font-size: 48px;
  font-weight: 700;
  color: var(--accent-tan);
  margin-bottom: 12px;
}

.step-name {
  font-family: var(--font-body);
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.step-desc {
  font-size: 15px;
  font-weight: 300;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* --- Product Mockup --- */
.mockup {
  background-color: var(--bg-surface);
  border: 1px solid var(--accent-brown);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4), 0 0 40px rgba(201, 169, 110, 0.05);
  max-width: 900px;
  margin: 3rem auto 0;
}

.mockup-chrome {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background-color: #1a1a1a;
  border-bottom: 1px solid var(--border-dark);
}

.chrome-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.dot-red { background-color: #ff5f57; }
.dot-yellow { background-color: #ffbd2e; }
.dot-green { background-color: #28c840; }

.chrome-title {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.mockup-body {
  display: flex;
  min-height: 320px;
}

.mockup-sidebar {
  width: 180px;
  padding: 16px 0;
  border-right: 1px solid var(--border-dark);
  flex-shrink: 0;
}

.mockup-nav-item {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-secondary);
  padding: 10px 20px;
  cursor: default;
}

.mockup-nav-item.active {
  color: var(--accent-tan);
  background-color: rgba(201, 169, 110, 0.08);
  border-left: 2px solid var(--accent-tan);
}

.mockup-main {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.mockup-panel {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 16px;
  flex: 1;
}

.mockup-panel-wide {
  flex: none;
}

.mockup-panel-header {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--accent-tan);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.mockup-bar-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mockup-bar {
  height: 8px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-brown), var(--accent-tan));
  opacity: 0.6;
}

.mockup-panel-row {
  display: flex;
  gap: 16px;
}

.mockup-text-line {
  height: 8px;
  background-color: rgba(168, 162, 158, 0.15);
  border-radius: 4px;
  margin-bottom: 8px;
  width: 100%;
}

.mockup-text-line.short { width: 60%; }
.mockup-text-line.medium { width: 80%; }

.mockup-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
  padding: 6px 12px;
  border: 1px solid var(--border-dark);
  border-radius: 4px;
  margin: 4px 4px 4px 0;
}

.mockup-chip.accent {
  color: var(--accent-tan);
  border-color: var(--accent-brown);
  background-color: rgba(201, 169, 110, 0.08);
}

/* --- Contact Section --- */
.contact-section {
  position: relative;
  overflow: hidden;
}

.contact-glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(201, 169, 110, 0.06), transparent 70%);
  pointer-events: none;
}

.contact-content {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}

.contact-content .section-headline {
  margin-bottom: 16px;
}

.contact-content .section-description {
  margin-bottom: 48px;
}

.contact-form {
  text-align: left;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group .optional {
  font-weight: 300;
  opacity: 0.6;
}

.form-group input,
.form-group textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--text-primary);
  background-color: var(--bg-surface);
  border: 1px solid var(--border-dark);
  border-radius: 6px;
  padding: 12px 16px;
  outline: none;
  transition: border-color 0.2s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(168, 162, 158, 0.4);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-tan);
}

.form-group textarea {
  resize: vertical;
}

.contact-alt {
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.contact-alt a {
  color: var(--accent-tan);
  transition: opacity 0.2s ease;
}

.contact-alt a:hover {
  opacity: 0.8;
}

/* --- Footer --- */
.footer {
  border-top: 1px solid var(--border-dark);
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 28px;
  width: auto;
  object-fit: contain;
}

.footer-tagline {
  font-family: var(--font-headline);
  font-size: 14px;
  font-style: italic;
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 13px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}

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

.footer-copy {
  font-size: 12px;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* ============================================
   Responsive
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
  .hero-headline {
    font-size: 56px;
  }

  .section-headline {
    font-size: 36px;
  }

  .feature-grid {
    gap: 16px;
  }

  .stats-row {
    gap: 32px;
  }

  .stat-number {
    font-size: 40px;
  }

  .mockup-sidebar {
    width: 140px;
  }

  .footer-inner {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .nav-container {
    justify-content: center;
    position: relative;
  }

  .nav-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }

  .nav-logo {
    height: 48px;
  }

  .hamburger {
    position: absolute;
    right: 24px;
  }

  .nav-links,
  .nav-cta {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero-headline {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 16px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .badge-row {
    gap: 8px;
  }

  .badge-divider {
    display: none;
  }

  .section {
    padding: 80px 0;
  }

  .section-headline {
    font-size: 32px;
  }

  .section-description {
    font-size: 15px;
  }

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

  .stats-row {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .stat-number {
    font-size: 36px;
  }

  .steps-row {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .step-connector {
    width: 2px;
    height: 40px;
    margin-top: 0;
  }

  .step {
    max-width: 100%;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .mockup-sidebar {
    display: none;
  }

  .mockup-panel-row {
    flex-direction: column;
  }

  .footer-inner {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  .footer-links {
    gap: 20px;
  }
}
