/* ==========================================================================
   Aperture22 — Homepage Styles
   ========================================================================== */

/* ── General ──────────────────────────────────────────────────────────────── */

body {
  margin: 0;
  font-family: var(--font-primary);
  color: var(--color-text-primary);
  background: var(--color-bg-primary);
  line-height: 1.6;
}

/* ── Hero Section ─────────────────────────────────────────────────────────── */

.hero-section {
  min-height: 85vh;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  text-align: center;
}

.hero-content {
  max-width: 900px;
}

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

.hero-subheadline {
  font-size: 1.25rem;
  font-weight: 300;
  color: var(--color-text-secondary);
  max-width: 700px;
  margin: 0 auto 40px auto;
  line-height: 1.6;
}

.hero-cta {
  display: inline-block;
  background: var(--accent-fill);
  border: 1px solid var(--accent-fill);
  color: var(--accent-on);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.hero-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}

/* ── How It Works Section ─────────────────────────────────────────────────── */

.how-it-works-section {
  background: var(--bg-secondary);
  padding: var(--spacing-section) 24px;
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 60px 0;
}

.cards-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 32px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.card-icon {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-secondary);
  margin-bottom: 20px;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 12px 0;
}

.card-body {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* ── Showcase Sections ────────────────────────────────────────────────────── */

.showcase-section {
  padding: var(--spacing-section) 24px;
}

.showcase-section.alt-bg {
  background: var(--bg-secondary);
}

.showcase-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.showcase-container.reverse {
  direction: rtl;
}

.showcase-container.reverse > * {
  direction: ltr;
}

.showcase-text h2 {
  font-size: 2rem;
  font-weight: 600;
  color: var(--color-text-primary);
  margin: 0 0 20px 0;
}

.showcase-text p {
  font-size: 1rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0 0 24px 0;
}

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px 0;
}

.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
}

.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-text-primary);
}

.showcase-cta {
  display: inline-flex;
  align-items: center;
  color: var(--color-text-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  transition: gap 0.2s ease;
  gap: 8px;
}

.showcase-cta:hover {
  gap: 12px;
}

.showcase-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: 12px;
  border: 2px dashed var(--border);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

/* ── Philosophy Section ───────────────────────────────────────────────────── */

.philosophy-section {
  padding: var(--spacing-section) 24px;
  background: var(--color-bg-primary);
}

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

.philosophy-title {
  font-size: 1.75rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-text-primary);
  margin: 0 0 24px 0;
  line-height: 1.4;
}

.philosophy-body {
  font-size: 1.0625rem;
  color: var(--color-text-secondary);
  line-height: 1.8;
  margin: 0;
}

/* ── Beta CTA Section ─────────────────────────────────────────────────────── */

.beta-section {
  background: var(--bg-secondary);
  padding: var(--spacing-section) 24px;
  text-align: center;
}

.beta-content {
  max-width: 700px;
  margin: 0 auto;
}

.beta-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-text-primary);
  margin: 0 0 20px 0;
}

.beta-body {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin: 0 0 32px 0;
}

.beta-cta {
  display: inline-block;
  background: var(--accent-fill);
  border: 1px solid var(--accent-fill);
  color: var(--accent-on);
  font-size: 1rem;
  font-weight: 600;
  padding: 16px 40px;
  border-radius: 8px;
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.beta-cta:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-2px);
}
  text-decoration: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.beta-subtext {
  margin-top: 16px;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .showcase-container {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hero-headline {
    font-size: 2.5rem;
  }

  .hero-subheadline {
    font-size: 1.125rem;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .cards-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .showcase-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .showcase-container.reverse {
    direction: ltr;
  }

  .showcase-text h2 {
    font-size: 1.75rem;
  }

  .philosophy-title {
    font-size: 1.5rem;
  }

  .beta-title {
    font-size: 2rem;
  }

  :root {
    --spacing-section: 60px;
  }
}

/* ── Scroll Animations (Optional) ─────────────────────────────────────────── */

.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ── Dark Mode — hero gradient (light-specific, needs explicit override) ────── */
[data-theme="dark"] .hero-section {
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

/* ── Hero photo — full-bleed with scrim; text is light in both themes ──────── */

.hero-section {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 80% center;
  z-index: -2;
}

.hero-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.55) 0%, rgba(10, 10, 12, 0.7) 100%);
  z-index: -1;
}

.hero-section .hero-headline {
  color: #fff;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.45);
}

.hero-section .hero-subheadline {
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.45);
}

.hero-section .hero-secondary-link {
  color: rgba(255, 255, 255, 0.82);
}

.hero-section .hero-secondary-link:hover {
  color: #fff;
}

/* ── Hero secondary link ──────────────────────────────────────────────────── */

.hero-secondary-link {
  display: block;
  margin-top: 20px;
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.hero-secondary-link:hover {
  color: var(--color-text-primary);
}

/* ── Loop text (after how-it-works cards) ─────────────────────────────────── */

.loop-text {
  text-align: center;
  margin: 48px auto 0;
  font-size: 1rem;
  font-style: italic;
  color: var(--color-text-secondary);
  max-width: 400px;
}

/* ── Features Section ─────────────────────────────────────────────────────── */

.features-section {
  padding: var(--spacing-section) 24px;
  background: var(--color-bg-primary);
}

.features-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.feature-detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 32px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-detail-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.feature-detail-card h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0 0 12px 0;
  letter-spacing: -0.01em;
}

.feature-detail-card p {
  font-size: 0.9375rem;
  color: var(--color-text-secondary);
  line-height: 1.75;
  margin: 0;
}

/* ── Card icon size ───────────────────────────────────────────────────────── */

.card-icon {
  display: flex;
  height: 32px;
  line-height: 1;
  margin-bottom: 20px;
}

/* ── Responsive additions ─────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }

  .feature-detail-card {
    padding: 24px;
  }
}

[data-theme="dark"] .features-section {
  background: var(--bg-primary);
}

/* ── Screenshots Section ──────────────────────────────────────────────────── */

.screenshots-section {
  padding: var(--spacing-section) 24px;
  background: var(--bg-secondary);
}

[data-theme="dark"] .screenshots-section {
  background: var(--bg-secondary);
}

.screenshots-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

.screenshot-slot {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.homepage-screenshot-placeholder {
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

[data-theme="dark"] .homepage-screenshot-placeholder {
  background: var(--bg-elevated);
}

.screenshot-caption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  margin: 0;
  font-style: italic;
}

.section-subline {
  text-align: center;
  color: var(--color-text-secondary);
  max-width: 560px;
  margin: -40px auto 48px;
}

.overview-label {
  font-size: 0.5625rem;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--color-text-secondary);
}

.overview-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-primary);
}

.overview-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
  border-radius: 2px;
}

#basestation-overview {
  scroll-margin-top: 96px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media (max-width: 768px) {
  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ── Beta Interest Form ───────────────────────────────────────────────────── */

.beta-interest-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 520px;
  margin: 0 auto 20px;
}

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

.beta-interest-form input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: var(--font-primary);
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.beta-interest-form input:focus {
  outline: none;
  border-color: var(--accent-fill);
}

.beta-interest-form input::placeholder {
  color: var(--text-muted);
}

.beta-success {
  color: var(--color-success);
  font-size: 1rem;
  font-weight: 500;
  margin: 0 0 16px;
}

.beta-error {
  color: var(--color-error);
  font-size: 0.9rem;
  margin: 0 0 16px;
}

.beta-signin-link {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.beta-signin-link:hover {
  text-decoration: underline;
}

@media (max-width: 600px) {
  .beta-form-row {
    grid-template-columns: 1fr;
  }

  .beta-interest-form {
    max-width: 100%;
  }
}

/* ── Hero photo — narrow screens: show the whole wreck + photographer as a top band ── */
@media (max-width: 768px) {
  .hero-section {
    background: #0b0b0d;
    align-items: flex-start;
    padding-top: 270px;
  }

  .hero-image {
    bottom: auto;
    height: 320px;
    object-position: 62% center;
  }

  .hero-section::after {
    background: linear-gradient(180deg, rgba(11, 11, 13, 0.15) 0, rgba(11, 11, 13, 0.15) 190px, rgba(11, 11, 13, 1) 320px);
  }
}

/* ── Topographic tile below the hero (shared.css body.topo-bg) ────────────── */
/* Each section paints its own background over the page layer, so each carries
   the layer itself; the hero keeps its image clean. */
body.topo-bg :is(.how-it-works-section, .screenshots-section, .features-section, .beta-section) {
  position: relative;
  isolation: isolate;
}
body.topo-bg :is(.how-it-works-section, .screenshots-section, .features-section, .beta-section)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--topo-line);
  opacity: var(--topo-o);
  -webkit-mask: var(--topo-mask);
  -webkit-mask-composite: source-in;
  mask: var(--topo-mask);
  mask-composite: intersect;
}
@media print {
  body.topo-bg :is(.how-it-works-section, .screenshots-section, .features-section, .beta-section)::before { display: none; }
}
