/* ========================================
   100xGood Design System — Section Templates
   Updated: April 2026

   NOTE: Gemstone icon CSS now lives in components.css.
   This file handles section layouts, hero variants, grids, and CTAs.
   ======================================== */

/* ===================
   SECTION BASE
   =================== */

.section { padding: var(--section-padding) 0; }
.section-sm { padding: var(--section-padding-sm) 0; }

.section-open { background: transparent; }

.section-panel {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-subtle { background: var(--bg-subtle); }

.section-dark {
  background: var(--obsidian);
  color: var(--white);
}

.section-dark h1,
.section-dark h2,
.section-dark h3,
.section-dark h4 {
  color: var(--white);
}

.section-dark .text-muted { color: var(--rose-quartz); }
.section-dark .section-label { color: var(--cement); }
.section-dark .section-label::before { background: var(--rose-quartz); }

/* ===================
   HERO VARIANTS
   =================== */

.hero-centered {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  padding: var(--section-padding) 0;
}

.hero-centered .hero-content {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.hero-page {
  padding: var(--section-padding) 0 var(--section-padding-sm);
  text-align: center;
}

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

.hero-page h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: var(--space-4);
}

.hero-page .hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  line-height: 1.6;
}

.hero-split { padding: var(--section-padding) 0; }

.hero-split .hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
}

@media (max-width: 768px) {
  .hero-split .hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
}

.hero-split h1 { font-size: clamp(2rem, 4vw, 3rem); }

.hero-split .hero-subtitle {
  font-size: var(--text-lg);
  color: var(--text-muted);
  margin: var(--space-4) 0 var(--space-6);
}

.hero-split .cta-buttons { justify-content: flex-start; }

/* ===================
   SECTION WITH BRACKETS
   =================== */

.section-bracketed {
  position: relative;
  padding: var(--space-12) 0;
}

.section-bracketed::before,
.section-bracketed::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--amethyst);
  border-style: solid;
  opacity: 0.6;
}

.section-bracketed::before { top: 0; left: 0; border-width: 2px 0 0 2px; }
.section-bracketed::after { top: 0; right: 0; border-width: 2px 2px 0 0; }

.section-bracketed .bracket-bottom::before,
.section-bracketed .bracket-bottom::after {
  content: '';
  position: absolute;
  width: 32px;
  height: 32px;
  border-color: var(--amethyst);
  border-style: solid;
  opacity: 0.6;
}

.section-bracketed .bracket-bottom::before { bottom: 0; left: 0; border-width: 0 0 2px 2px; }
.section-bracketed .bracket-bottom::after { bottom: 0; right: 0; border-width: 0 2px 2px 0; }

/* ===================
   CONTENT GRIDS
   =================== */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-8);
}

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

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

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

.grid-5 {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-6);
}

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

/* ===================
   SECTION HEADER
   =================== */

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-12);
}

.section-header h2 { margin-top: var(--space-4); }

.section-header h2 em {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-weight: 300;
}

.section-header p {
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-lg);
}

.section-header-left {
  text-align: left;
  max-width: none;
  margin-bottom: var(--space-8);
}

/* ===================
   STATS SECTION
   =================== */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  text-align: center;
}

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

.stat-item { padding: var(--space-4); }

.stat-number {
  font-family: var(--font-display-sans);
  font-weight: 800;
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

/* ===================
   CTA SECTIONS
   =================== */

.cta-banner {
  background: var(--obsidian);
  padding: var(--section-padding) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* Optional radial glow overlay — adds Violet Topaz glow to dark CTA */
.cta-banner.with-glow::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, rgba(95,80,157,0.2) 0%, transparent 60%);
  pointer-events: none;
}

.cta-banner > * {
  position: relative;
  z-index: 1;
}

.cta-banner h2 {
  color: var(--white);
  margin: var(--space-4) 0 var(--space-6);
}

.cta-banner h2 em {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-weight: 300;
}

.cta-banner p {
  color: var(--rose-quartz);
  max-width: 600px;
  margin: 0 auto var(--space-8);
  font-size: var(--text-lg);
}

.cta-banner .section-label { color: var(--cement); }
.cta-banner .section-label::before { background: var(--rose-quartz); }

.cta-banner .btn-primary {
  background: var(--white);
  color: var(--obsidian);
  border-color: var(--white);
}

.cta-banner .btn-primary:hover {
  background: var(--rose-quartz);
  border-color: var(--rose-quartz);
  color: var(--obsidian);
}

.cta-banner .btn-outline {
  color: var(--white);
  border-color: var(--rose-quartz);
}

.cta-banner .btn-outline::after { border-color: var(--rose-quartz); }

.cta-banner .btn-outline:hover {
  background: var(--white);
  color: var(--obsidian);
  border-color: var(--white);
}

/* Corner brackets on dark CTA banner — Rose Quartz variant */
.cta-banner.corner-brackets::before,
.cta-banner.corner-brackets::after {
  border-color: var(--rose-quartz);
  opacity: 0.35;
}

.cta-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.cta-inline {
  background: var(--bg-subtle);
  padding: var(--space-12);
  border-radius: var(--radius-md);
  text-align: center;
}

.cta-inline h3 { margin-bottom: var(--space-3); }

.cta-inline p {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

/* ===================
   FEATURE ROWS (alternating)
   =================== */

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-16);
  align-items: center;
  padding: var(--space-12) 0;
}

.feature-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.feature-row:nth-child(even) { direction: rtl; }
.feature-row:nth-child(even) > * { direction: ltr; }

@media (max-width: 768px) {
  .feature-row {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .feature-row:nth-child(even) { direction: ltr; }
}

.feature-row h3 { margin-bottom: var(--space-4); }

.feature-row h3 em {
  font-family: var(--font-display-serif);
  font-style: italic;
  font-weight: 300;
}

.feature-row p {
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.feature-visual {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-visual .feature-visual.corner-brackets::before,
.hero-visual .feature-visual.corner-brackets::after {
  width: 24px;
  height: 24px;
  border-color: var(--amethyst);
  opacity: 0.5;
}

/* ===================
   LOGO BAR
   =================== */

.logo-bar {
  padding: var(--section-padding-sm) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.logo-bar-label {
  text-align: center;
  margin-bottom: var(--space-8);
}

.logo-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-12);
  flex-wrap: wrap;
  mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.logo-strip-item { cursor: pointer; }

.logo-img {
  height: 28px;
  width: auto;
  opacity: 0.5;
  filter: grayscale(1);
  transition: opacity var(--transition-base), filter var(--transition-base);
}

.logo-strip-item:hover .logo-img {
  opacity: 1;
  filter: grayscale(0);
}

/* ===================
   FAQ SECTION
   =================== */

.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0;
}

.faq-question {
  font-family: var(--font-display-sans);
  font-weight: 600;
  font-size: var(--text-lg);
  color: var(--text-heading);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--amethyst);
  transition: transform var(--transition-fast);
}

.faq-item.open .faq-question::after { transform: rotate(45deg); }

.faq-answer {
  color: var(--text-muted);
  margin-top: var(--space-4);
  display: none;
}

.faq-item.open .faq-answer { display: block; }
