/* ============================================
   CamCtrl Landing Page — styles.css
   BMD-style full-width storytelling layout
   ============================================ */

/* --- Custom Properties --- */
:root {
  --color-background: #0D0D0D;
  --color-surface: #141414;
  --color-control-surface: #1E1E1E;
  --color-accent: #4A90D9;
  --color-accent-dim: #2A5A8A;
  --color-text-primary: #D4D4D4;
  --color-text-secondary: #999999;
  --color-border: #2A2A2A;
  --color-rec-red: #E02020;
  --color-status-green: #2ECC40;
  --color-logo-orange: #E8913A;

  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Roboto Mono', 'Courier New', monospace;

  --bp-tablet: 600px;
  --bp-desktop: 800px;
  --bp-wide: 1000px;

  --max-width-text: 680px;
  --max-width-wide: 1200px;
  --section-padding: 100px;
  --section-padding-mobile: 64px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover {
  color: #6AADEA;
}

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

ul, ol {
  list-style: none;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Typography Classes --- */
.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.5px;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-lead {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--color-text-secondary);
  line-height: 1.7;
}

/* --- Placeholder Image System --- */
.placeholder {
  width: 100%;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03),
    0 20px 60px rgba(0, 0, 0, 0.3);
  position: relative;
  overflow: hidden;
}

.placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

.placeholder__label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
  opacity: 0.5;
  z-index: 1;
}

.placeholder--hero {
  aspect-ratio: 16 / 9;
}

.placeholder--feature {
  aspect-ratio: 4 / 3;
}

.placeholder--product {
  aspect-ratio: 1 / 1;
}

/* Scroll animation */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(20, 20, 20, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  height: 56px;
  display: flex;
  align-items: center;
}

.nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

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

.nav-brand img {
  width: 32px;
  height: 32px;
}

.nav-brand span {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--color-text-primary);
  text-transform: uppercase;
}

.nav-links {
  display: none;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--color-text-primary);
}

.nav-cta-mobile {
  display: inline-flex;
}

.nav-cta-mobile a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 6px 14px;
  background: var(--color-accent);
  color: #fff;
  border-radius: 3px;
  transition: background 0.2s;
}

.nav-cta-mobile a:hover {
  background: #5A9FE6;
  color: #fff;
}

@media (min-width: 600px) {
  .nav-links {
    display: flex;
  }

  .nav-cta-mobile {
    display: none;
  }
}

/* ============================================
   Buttons
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 28px;
  border-radius: 3px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: #5A9FE6;
  border-color: #5A9FE6;
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent-dim);
}

.btn-outline:hover {
  background: rgba(74, 144, 217, 0.1);
  border-color: var(--color-accent);
  color: #fff;
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 120px 24px 80px;
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, rgba(74, 144, 217, 0.06) 0%, transparent 70%),
    var(--color-background);
}

.hero-content {
  max-width: var(--max-width-text);
  margin-bottom: 48px;
}

.hero-content h1 {
  font-size: clamp(32px, 6vw, 56px);
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.5px;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: clamp(16px, 2vw, 20px);
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-bottom: 32px;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.hero-image {
  width: 100%;
  max-width: var(--max-width-wide);
}

/* ============================================
   Feature Sections
   ============================================ */
.feature-section {
  padding: var(--section-padding-mobile) 0;
}

.feature-section:nth-child(odd) {
  background: var(--color-background);
}

.feature-section:nth-child(even) {
  background: var(--color-surface);
}

.feature-section__inner {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.feature-section__image {
  flex: 1;
}

.feature-section__text {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

@media (min-width: 800px) {
  .feature-section {
    padding: var(--section-padding) 0;
  }

  .feature-section__inner {
    flex-direction: row;
    align-items: center;
    gap: 64px;
  }

  .feature-section__image {
    flex: 0 0 55%;
  }

  .feature-section__text {
    flex: 0 0 calc(45% - 64px);
  }

  .feature-section--img-right .feature-section__inner {
    flex-direction: row-reverse;
  }
}

@media (min-width: 1000px) {
  .feature-section__inner {
    gap: 80px;
  }

  .feature-section__text {
    flex: 0 0 calc(45% - 80px);
  }
}

/* ============================================
   How It Works Section
   ============================================ */
.how-it-works {
  padding: var(--section-padding-mobile) 0;
  background: var(--color-surface);
}

.how-it-works__header {
  text-align: center;
  margin-bottom: 56px;
}

.how-it-works__header .section-title {
  font-size: clamp(28px, 4vw, 44px);
}

.how-it-works__header .section-lead {
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.how-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.how-item {
  text-align: center;
  padding: 32px 20px;
}

.how-icon {
  font-size: 32px;
  margin-bottom: 16px;
  display: block;
}

.how-item h3 {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.how-item p {
  font-size: 14px;
  color: var(--color-text-secondary);
  line-height: 1.6;
  max-width: 280px;
  margin: 0 auto;
}

@media (min-width: 600px) {
  .how-it-works {
    padding: var(--section-padding) 0;
  }

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

/* ============================================
   Supported Cameras
   ============================================ */
.cameras {
  padding: var(--section-padding-mobile) 0;
  background: var(--color-background);
}

.cameras__header {
  text-align: center;
  margin-bottom: 48px;
}

.cameras__header .section-title {
  font-size: clamp(28px, 4vw, 44px);
}

.cameras__header .section-lead {
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.camera-list {
  max-width: 800px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--color-border);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  overflow: hidden;
}

.camera-list__item {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.5px;
  color: var(--color-text-primary);
  padding: 14px 20px;
  background: var(--color-surface);
  transition: background 0.2s;
}

.camera-list__item:hover {
  background: var(--color-control-surface);
}

.cameras-note {
  text-align: center;
  font-size: 13px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-top: 24px;
}

@media (min-width: 600px) {
  .cameras {
    padding: var(--section-padding) 0;
  }

  .camera-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================================
   Get CamCtrl — Product Grid
   ============================================ */
.get-app {
  padding: var(--section-padding-mobile) 0;
  background: var(--color-surface);
}

.get-app__header {
  text-align: center;
  margin-bottom: 56px;
}

.get-app__header .section-title {
  font-size: clamp(28px, 4vw, 44px);
}

.get-app__header .section-lead {
  max-width: var(--max-width-text);
  margin: 0 auto;
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 960px;
  margin: 0 auto;
}

.product-tile {
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.2s, transform 0.2s;
  text-decoration: none;
  color: inherit;
}

.product-tile:hover {
  border-color: var(--color-accent-dim);
  transform: translateY(-4px);
  color: inherit;
}

.product-tile__image {
  width: 100%;
  margin-bottom: 20px;
}

.product-tile__name {
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-text-primary);
  margin-bottom: 8px;
}

.product-tile__desc {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-bottom: 16px;
}

.product-tile__cta {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-top: auto;
}

.product-tile--coming-soon {
  opacity: 0.5;
  cursor: default;
}

.product-tile--coming-soon:hover {
  transform: none;
  border-color: var(--color-border);
}

.product-tile--coming-soon .product-tile__cta {
  color: var(--color-logo-orange);
}

@media (min-width: 600px) {
  .get-app {
    padding: var(--section-padding) 0;
  }

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

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

.footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

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

.footer-links a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 1px;
  color: var(--color-text-secondary);
  transition: color 0.2s;
}

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

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