/*
 * ========================================================================
 * ANALYTIC ENDEAVORS - GUIDE PAGE LAYOUT
 * Shared structural styles for all guide pages
 * Copyright (c) 2024-2025 Analytic Endeavors Inc. All Rights Reserved.
 * ========================================================================
 *
 * Provides: body typography, container, section, section-header,
 *           section-underline, step/step-label, light-mode overrides,
 *           print styles, and Squarespace background fix.
 *
 * Load order: After guide-hero.css, before guide-components.css
 */

/* ===== BODY TYPOGRAPHY ===== */
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  line-height: 1.6;
}

/* ===== CONTAINER ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

/* ===== SECTIONS ===== */
section {
  padding: 5rem 0;
  background: transparent;
  position: relative;
  z-index: 1;
  border: none;
  box-shadow: none;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.section-underline {
  width: 60px;
  height: 3px;
  margin: 0.75rem auto 0;
  background: linear-gradient(90deg, var(--teal), var(--blue));
  border-radius: 2px;
}

/* ===== STEP LAYOUT ===== */
.step {
  margin-bottom: 3rem;
}

/* Inside grid containers, gap handles row spacing -- zero out step margin */
[class*="-grid"] > .step {
  margin-bottom: 0;
}

.step-label {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  background: rgba(0, 184, 184, 0.1);
  border: 1px solid rgba(0, 184, 184, 0.3);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--teal-light);
  margin-bottom: 1.25rem;
  font-weight: 600;
}

[data-theme="light"] .step-label {
  background: rgba(0, 153, 153, 0.08);
  border-color: rgba(0, 153, 153, 0.25);
  color: var(--teal);
}

/* ===== LIGHT MODE OVERRIDES ===== */
/* Transparent backgrounds for Squarespace embedding */
[data-theme="light"] .hero { background: transparent; }
[data-theme="light"] section { background: transparent; box-shadow: none; border: none; }
[data-theme="light"] .container { box-shadow: none; border: none; background: transparent; }
[data-theme="light"] .sticky-nav { background: rgba(255, 255, 255, 0.95); border-bottom: 1px solid var(--border); }

/* ===== PRINT PROTECTION ===== */
@media print {
  body > *:not(#ae-print-notice) {
    display: none !important;
    visibility: hidden !important;
  }
  #ae-print-notice {
    display: flex !important;
    visibility: visible !important;
    position: fixed !important;
    top: 0; left: 0; right: 0; bottom: 0;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    background: white !important;
    color: #1a1a2e !important;
    font-family: 'Segoe UI', system-ui, sans-serif;
    text-align: center;
    padding: 2rem;
    z-index: 999999;
  }
  #ae-print-notice .ae-print-title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; color: #009999; }
  #ae-print-notice .ae-print-message { font-size: 1.1rem; color: #333; }
  #ae-print-notice .ae-print-url { font-size: 1rem; color: #009999; margin-top: 0.25rem; }
}

/* ===== CONTENT PROTECTION ===== */
img, svg { user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none; }
/* Re-enable pointer events on interactive SVG contexts */
a > svg, button svg, .theme-toggle svg, .slide-dot svg, .share-btn svg, .nav-logo,
svg a, svg [role="button"], svg [onclick] { pointer-events: auto; }

/* ===== SQUARESPACE BACKGROUND FIX ===== */
/* CRITICAL: Must be last in cascade for Squarespace header compatibility */
html { background: #0d0d1a; background: var(--bg-dark); }
body { background: #0d0d1a; background: var(--bg-dark); }
