/* =================================
   Recognition Physics Site Template
   Based on Constants Page Design
   
   This extracts reusable patterns while allowing
   page-specific customization
   ================================= */

/* =================================
   1. CSS VARIABLES
   ================================= */
:root {
  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Type Scale - Reduced sizes */
  --text-hero: 2.25rem;
  --text-title: 1.875rem;
  --text-lead: 1.125rem;
  --text-intro: 1.05rem;
  --text-body: 0.95rem;
  
  /* Spacing - Tight like constants page */
  --space-section: 0.75rem;
  --space-component: 1rem;
  --space-content: 1.5rem;
  
  /* Colors */
  --color-primary: #002855;  /* Darker blue */
  --color-primary-light: #003d82;
  --color-accent: #ff006e;  /* Pink accent */
  --color-accent-light: #ff4090;
  --color-text: #000;
  --color-text-body: #1e293b;
  --color-text-muted: #475569;
  --color-bg-subtle: #fafbfc;
  --color-bg-card: #f8f9fa;
  --color-bg-warm: linear-gradient(135deg, #fffbf0 0%, #fff7e6 100%);  /* Yellow/orange gradient */
  --color-border-light: rgba(0,0,0,0.08);
  --color-border-medium: rgba(0,0,0,0.2);
  --color-border-warm: rgba(255, 193, 7, 0.3);
  
  /* Layout */
  --width-content: 900px;
  --padding-horizontal: 2rem;
}

/* =================================
   2. REUSABLE COMPONENTS
   ================================= */

/* Hero Pattern */
.template-hero {
  background: #ffffff;
  padding: var(--space-section) 0;
  position: relative;
  overflow: hidden;
}

.template-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 var(--padding-horizontal);
  text-align: center;
}

/* Hero with border frame (like constants) */
.template-hero-framed .template-hero-content {
  background: #ffffff;
  border: 1px solid var(--color-border-medium);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
}

.template-hero-title {
  font-size: var(--text-hero);
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: var(--color-text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.template-hero-lead {
  font-size: var(--text-lead);
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.template-hero-lead:last-of-type {
  margin-bottom: 1rem;
}

/* Section Pattern */
.template-section {
  padding: var(--space-section) 0;
  position: relative;
}

/* No dividers between sections (from constants design) */
.template-section + .template-section {
  padding-top: 0;
}

/* Container */
.template-container {
  max-width: var(--width-content);
  margin: 0 auto;
  padding: 0 var(--padding-horizontal);
}

/* Section Title */
.template-section-title {
  font-size: var(--text-title);
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 1rem;
  text-align: center;
  position: relative;
  letter-spacing: -0.02em;
}

/* Title underline accent */
.template-section-title::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light));
  border-radius: 3px;
}

/* Reading Card Pattern */
.template-reading {
  background: var(--color-bg-subtle);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 1.5rem;
  margin: 0.75rem 0;
}

/* Warm variant for special sections */
.template-reading-warm {
  background: var(--color-bg-warm);
  border: 1px solid var(--color-border-warm);
  box-shadow: 0 4px 20px rgba(255, 193, 7, 0.08);
}

/* First paragraph emphasis */
.template-reading p:first-of-type {
  font-size: var(--text-intro);
  line-height: 1.7;
  color: var(--color-text-body);
  font-weight: 500;
  margin-bottom: 1.5rem;
}

/* Button Patterns */
.template-btn {
  padding: 1rem 2rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-block;
  cursor: pointer;
  border: 2px solid transparent;
}

.template-btn-primary {
  background: var(--color-primary);
  color: white;
}

.template-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 61, 130, 0.3);
}

.template-btn-secondary {
  background: white;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.template-btn-secondary:hover {
  background: var(--color-primary);
  color: white;
}

/* =================================
   3. TYPOGRAPHY HELPERS
   ================================= */
.template-text-center { text-align: center; }
.template-text-muted { color: var(--color-text-muted); }
.template-font-mono { font-family: var(--font-mono); }

/* Pink accent elements */
.template-accent-bar {
  height: 3px;
  background: var(--color-accent);
  margin-bottom: 1.5rem;
  width: 60px;
}

.template-accent-text {
  color: var(--color-accent);
  font-weight: 600;
}

.template-accent-border {
  border-left: 3px solid var(--color-accent);
  padding-left: 1rem;
}

.template-hero-badge.accent {
  background: var(--color-accent);
  color: white;
}

.template-section-title.accent::after {
  content: '';
  display: block;
  width: 40px;
  height: 3px;
  background: var(--color-accent);
  margin-top: 1rem;
}

/* =================================
   4. OVERRIDE HELPERS
   ================================= */

/* Apply to body for consistent spacing */
body.template-page {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.7;
  color: var(--color-text-body);
}

/* Override any global section padding */
body.template-page section {
  padding-top: var(--space-section) !important;
  padding-bottom: var(--space-section) !important;
}

/* =================================
   5. RESPONSIVE
   ================================= */
@media (max-width: 768px) {
  :root {
    --text-hero: 1.875rem;
    --text-title: 1.5rem;
    --text-lead: 1rem;
    --padding-horizontal: 1.5rem;
  }
}
