/* ============================================================
   Catapulte — layout.css
   Structural layout — header, footer, hero, sections, grids
   ============================================================ */

/* ── Site Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 2rem;
  transition: background 0.4s;
}
/* ── Scroll Progress Bar (NAV-02) ──
   Fixed to viewport top, independent of header hide/reveal.
   z-index 999 = below header (1000) so header covers it when visible,
   but bar stays visible when header is animated off-screen.
   ──────────────────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left center;
  z-index: 999;
  pointer-events: none;
}

/* Header floating state (after scroll-up reveal, over content) */
.site-header.header-floating {
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

.site-header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.site-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.site-logo em {
  color: var(--accent);
  font-style: italic;
}
.site-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.site-nav a {
  padding: 8px 16px;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-decoration: none;
  border-radius: 100px;
  transition: color 0.2s, background 0.2s;
  letter-spacing: 0.01em;
}
.site-nav a:hover {
  color: var(--text);
  background: var(--accent-glow);
}
.site-nav a.active {
  color: var(--accent);
  background: var(--accent-glow);
  font-weight: 500;
}
.site-nav a.nav-playbook {
  font-size: 0.75rem;
  color: var(--text-dim);
  border: 1px solid var(--border);
  padding: 6px 14px;
  margin-left: 8px;
}
.site-nav a.nav-playbook:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Header theme toggle */
.header-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 12px;
  padding: 3px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
}
.header-theme-toggle .theme-btn {
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 4px 10px;
  border-radius: 100px;
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font-body);
  letter-spacing: 0.02em;
  transition: all 0.2s;
  white-space: nowrap;
}
.header-theme-toggle .theme-btn:hover { color: var(--text); }
.header-theme-toggle .theme-btn.active {
  color: var(--bg);
  background: var(--accent);
  font-weight: 600;
}

/* Burger menu */
.nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 10;
}
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.3s;
}
.nav-burger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-burger.open span:nth-child(2) { opacity: 0; }
.nav-burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── Site Hero (homepage) ── */
.site-hero {
  min-height: 90vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 6rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}
.site-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  background: var(--bg-card);
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}
.site-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  max-width: 900px;
}
.site-hero h1 em {
  color: var(--accent);
  font-style: italic;
}
.hero-tagline {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  line-height: 1.75;
  margin-bottom: 2.5rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--bg);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 100px;
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s;
}
.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text);
  border-radius: inherit;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}
.hero-cta:hover::before {
  clip-path: inset(0 0 0 0);
}
.hero-cta:hover {
  color: var(--accent);
  transform: none;
  box-shadow: none;
}
.hero-stats {
  display: flex;
  gap: 3.5rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 4rem;
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-family: var(--font-display);
  font-size: 2.6rem;
  color: var(--accent);
  line-height: 1;
  font-weight: 300;
}
.hero-stat .label {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}

/* ── Page Hero (inner pages) ── */
.page-hero {
  padding: 8rem 2rem 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
.page-hero h1 em {
  color: var(--accent);
  font-style: italic;
}
.page-hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto;
  line-height: 1.75;
}

/* Inner page hero badge (mirrors .hero-badge) */
.page-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  background: var(--bg-card);
}
.page-hero-badge .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
}

/* ── Sections ── */
.site-section {
  padding: 5rem 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 40%, transparent);
  position: relative;
  overflow: hidden;
}
.site-section:last-of-type { border-bottom: none; }
.section-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 650px;
  line-height: 1.75;
  margin-bottom: 3rem;
}

/* ── Cards Grid ── */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.cards-grid-2 {
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
}
.cards-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.cards-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* ── Site Footer ── */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 4rem 2rem 2rem;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
}
.footer-brand p {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-top: 0.75rem;
  max-width: 320px;
}
.footer-col h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.footer-col a {
  display: block;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  text-decoration: none;
  transition: color 0.2s;
}
.footer-col a:hover { color: var(--accent); }
.footer-contact {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.8;
}
.footer-contact a { display: inline; }
.footer-bottom {
  max-width: 1200px;
  margin: 3rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.footer-socials {
  display: flex;
  gap: 16px;
}
.footer-socials a {
  color: var(--text-dim);
  font-size: 0.82rem;
  transition: color 0.2s;
}
.footer-socials a:hover { color: var(--accent); }

/* ── Mission / Vision blocks ── */
.mission-vision {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}
.mv-block h2 {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: var(--accent);
}
.mv-block p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
}

/* ── Two-col service list ── */
.services-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
  gap: 20px;
}

/* ── Utility ── */
.text-center { text-align: center; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* ── No articles message ── */
.no-articles {
  text-align: center;
  padding: 3rem;
  color: var(--text-dim);
  font-size: 1rem;
  grid-column: 1 / -1;
}
