/* ============================================================
   PHILOSOPHY SECTION STYLES
   Incline Agency — Our Philosophy
   ============================================================ */

/* ---- Philosophy Section ---- */
.philosophy-section {
  background: var(--bg);
  padding: clamp(72px, 10vw, 120px) 0 clamp(48px, 6vw, 72px);
  position: relative;
  overflow: hidden;
}

/* Subtle dot-grid matching hero */
.philosophy-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
  z-index: 0;
}

.philosophy-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 64px);
  position: relative;
  z-index: 1;
}

/* ---- Section eyebrow ---- */
.section-eyebrow {
  font-family: var(--font-main);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 20px 0;
}

.philosophy-section .section-eyebrow {
  text-align: left;
}

/* ---- Hub chip row ---- */
.philo-hub-row {
  margin-bottom: 24px;
  text-align: left;
}

.philo-hub-chip {
  display: inline-flex;
  align-items: center;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 6px 12px;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
  transition: all 0.2s;
}

.philo-hub-chip:hover,
.philo-hub-chip:focus-visible {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.93);
  outline: none;
}

.philo-hub-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.hub-fs {
  color: rgba(100, 180, 255, 0.92);
  font-weight: 600;
}

.hub-bs {
  color: rgba(39, 201, 63, 0.7);
  font-weight: 600;
}

/* ---- Headline keyword highlights ---- */
.philo-hl-green {
  color: rgba(39, 201, 63, 0.92);
}

.philo-hl-blue {
  color: rgba(100, 180, 255, 0.92);
}

/* ---- Headline ---- */
.philosophy-headline {
  font-family: var(--font-main);
  font-weight: 800;
  font-size: clamp(2.1rem, 4.2vw, 3.2rem);
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
  margin: 0 0 22px;
  max-width: 820px;
  text-align: left;
}

/* ---- Intro paragraph ---- */
.philosophy-intro {
  font-family: var(--font-main);
  font-size: clamp(1rem, 1.3vw, 1.08rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: 720px;
  margin: 0 0 44px;
  text-align: left;
}

/* ---- Measured signals row ---- */
.philo-signals-row {
  margin-bottom: 48px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
}

.philo-signals-header {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
}

.philo-signals-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.8);
}

.philo-signals-more-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 4px 12px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font-main);
}

.philo-signals-more-btn:hover,
.philo-signals-more-btn:focus-visible {
  border-color: rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.88);
  outline: none;
}

.philo-signals-more-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.philo-signals-lead {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.88);
  line-height: 1.65;
  margin: 0 auto 16px;
  max-width: 680px;
  text-align: center;
}

.philo-signals-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  justify-content: center;
}

.philo-signal-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 0.78rem;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  font-family: inherit;
  text-align: left;
}

.philo-signal-chip:hover,
.philo-signal-chip:focus-visible {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  outline: none;
}

.philo-signal-chip:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.signal-label {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.signal-vals {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.signal-val {
  color: rgba(255, 255, 255, 0.93);
  font-weight: 700;
  font-family: var(--font-main);
}

.signal-sub {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.72rem;
}

.signal-sep {
  width: 1px;
  height: 12px;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.philo-signals-note {
  font-size: 0.73rem;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  font-style: italic;
  text-align: center;
}

/* ---- Two-column split ---- */
.philosophy-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  align-items: stretch;
  margin-bottom: clamp(56px, 8vw, 96px);
}

/* ---- Frontstage: contained design panel ---- */
.philosophy-frontstage {
  background: rgba(100, 180, 255, 0.03);
  border: 1px solid rgba(100, 180, 255, 0.10);
  border-radius: 14px;
  padding: clamp(20px, 3vw, 32px);
}

/* ---- Backstage: bordered container matching frontstage ---- */
.philosophy-backstage {
  background: rgba(39, 201, 63, 0.03);
  border: 1px solid rgba(39, 201, 63, 0.10);
  border-radius: 14px;
  padding: clamp(20px, 3vw, 32px);
}

/* ---- Stage label row ---- */
.stage-label {
  margin-bottom: 0;
  padding-bottom: 14px;
  border-bottom: none;
  text-align: center;
}

.stage-label h3 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
  margin: 0;
  letter-spacing: -0.02em;
}

/* ---- Stage sub-heading ---- */
.stage-sub {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.78);
  margin: 6px 0 16px 0;
  font-family: var(--font-main);
  line-height: 1.5;
  text-align: center;
}

/* ---- Frontstage 2×N tile grid ---- */
.frontstage-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  flex: 1;
}

.frontstage-tile {
  position: relative;
  background: rgba(100, 180, 255, 0.04);
  border: 1px solid rgba(100, 180, 255, 0.12);
  border-radius: 10px;
  padding: 14px 12px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.frontstage-tile::before {
  display: none;
}

.frontstage-tile:hover {
  background: rgba(100, 180, 255, 0.07);
  border-color: rgba(100, 180, 255, 0.22);
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
}

.fs-tile-icon {
  font-size: 0.9rem;
  color: rgba(100, 180, 255, 0.70);
  display: flex;
  align-items: center;
  height: 20px;
  margin-bottom: 2px;
}

.fs-tile-label {
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.3;
  display: block;
  padding-right: 0;
}

.fs-tile-reason {
  display: block;
  font-family: var(--font-main);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.50);
  line-height: 1.4;
  margin-top: 2px;
}

/* ---- Backstage 3×N tile grid ---- */
.backstage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

/* ---- Individual backstage tile ---- */
.philo-tile {
  background: rgba(39, 201, 63, 0.025);
  border: 1px solid rgba(39, 201, 63, 0.09);
  border-radius: 10px;
  padding: 14px 12px 12px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  min-height: auto;
  cursor: default;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

/* Inner glass edge highlight */
.philo-tile::before {
  display: none;
}

.philo-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
  border-color: rgba(39, 201, 63, 0.18);
  background: rgba(39, 201, 63, 0.04);
}

/* ---- Backstage tile icon ---- */
.bs-tile-icon {
  color: rgba(39, 201, 63, 0.55);
  display: flex;
  align-items: center;
  height: 20px;
  margin-bottom: 2px;
}

/* ---- Tile label ---- */
.tile-label {
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.90);
  line-height: 1.35;
  padding-right: 0;
}

/* ---- Tile reason line ---- */
.tile-reason {
  display: block;
  font-family: var(--font-main);
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.50);
  line-height: 1.4;
  margin-top: 2px;
}

/* ---- Tile stat value (kept for any existing tiles) ---- */
.tile-stat-val {
  font-family: var(--font-main);
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-top: 4px;
}

.tile-stat-sub {
  font-family: var(--font-main);
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 1;
}

/* ---- Tile info (i) button ---- */
.tile-info-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid transparent;
  color: rgba(255, 255, 255, 0.38);
  font-size: 0.68rem;
  font-weight: 700;
  font-style: italic;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
  font-family: Georgia, 'Times New Roman', serif;
  opacity: 0;
}

.frontstage-tile:hover .tile-info-btn,
.philo-tile:hover .tile-info-btn,
.tile-info-btn:focus-visible {
  opacity: 1;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

.tile-info-btn:hover {
  background: rgba(255, 255, 255, 0.1) !important;
  color: var(--text) !important;
}

.tile-info-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Column CTA ---- */
.stage-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  font-family: var(--font-main);
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.68);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 7px;
  padding: 7px 14px;
  cursor: pointer;
  transition: color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
  text-decoration: none;
}

.stage-cta:hover,
.stage-cta:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  outline: none;
}

.stage-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.stage-cta-wrap {
  text-align: center;
  margin-top: 4px;
}

/* hide no-js details fallback */
.no-js-philo {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .philo-tile,
  .philo-tile:hover,
  .frontstage-tile,
  .frontstage-tile:hover,
  .tile-info-btn,
  .philo-hub-chip,
  .philo-overlay,
  .philo-overlay-backdrop,
  .philo-signal-chip {
    transition: none !important;
    transform: none !important;
    animation: none !important;
  }
}

/* ---- Good vs Bad practice panel ---- */
.philo-practice-panel {
  margin-top: 48px;
  padding: 28px;
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 14px;
}

.philo-practice-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.76);
  margin: 0 0 20px;
}

.practice-grid {
  display: flex;
  gap: 0;
  align-items: stretch;
}

.practice-col {
  flex: 1;
  padding: 0 24px;
}

.practice-col:first-child {
  padding-left: 0;
}

.practice-col:last-child {
  padding-right: 0;
}

.practice-col-header {
  margin-bottom: 14px;
}

.practice-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}

.good-badge {
  background: rgba(39, 201, 63, 0.1);
  color: #27c93f;
  border: 1px solid rgba(39, 201, 63, 0.2);
}

.bad-badge {
  background: rgba(255, 95, 86, 0.08);
  color: rgba(255, 95, 86, 0.7);
  border: 1px solid rgba(255, 95, 86, 0.15);
}

.practice-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.practice-list li {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.4;
}

.practice-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
  margin: 0 8px;
}

@media (max-width: 600px) {
  .practice-grid {
    flex-direction: column;
  }

  .practice-divider {
    width: 100%;
    height: 1px;
    margin: 16px 0;
  }

  .practice-col {
    padding: 0;
  }
}

/* ---- Overlay backdrop ---- */
.philo-overlay-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.philo-overlay-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Overlay panel (desktop: anchored float) ---- */
.philo-overlay {
  position: fixed;
  background: #1a1e24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 24px;
  max-width: 320px;
  width: calc(100vw - 48px);
  z-index: 300;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
  pointer-events: none;
}

.philo-overlay--wide {
  max-width: 520px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* Wide overlay is always viewport-centered — override the translateY open state */
.philo-overlay--wide.is-open {
  transform: translate(-50%, -50%);
}

.philo-overlay.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Mobile: full-screen modal */
@media (max-width: 699px) {
  .philo-overlay {
    position: fixed;
    inset: 0;
    max-width: none;
    width: 100%;
    border-radius: 0;
    padding: 64px 24px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transform: translateY(12px);
  }

  .philo-overlay.is-open {
    transform: translateY(0);
  }

  .overlay-close {
    width: 44px;
    height: 44px;
    top: 14px;
    right: 14px;
    font-size: 1rem;
    background: rgba(255,255,255,0.10);
    border-color: rgba(255,255,255,0.20);
    color: rgba(255,255,255,0.90);
  }
}

.philo-overlay h4 {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  margin: 0 0 12px 0;
  padding-right: 28px;
}

.philo-overlay p {
  font-family: var(--font-main);
  font-size: 0.9rem;
  line-height: 1.65;
  color: var(--muted);
  margin: 0 0 12px 0;
}

.overlay-example {
  font-family: 'Courier New', Courier, monospace !important;
  font-size: 0.78rem !important;
  color: rgba(255, 255, 255, 0.82) !important;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  padding: 8px 12px;
  margin-bottom: 20px !important;
  display: block;
}

.overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
  font-size: 0.72rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.overlay-close:hover,
.overlay-close:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  outline: none;
}

.overlay-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.overlay-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
  background: #ffffff;
  color: #0B1A20;
  border: none;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  font-family: var(--font-main);
  align-self: flex-start;
}

.overlay-cta:hover,
.overlay-cta:focus-visible {
  background: rgba(255, 255, 255, 0.88);
  transform: translateY(-1px);
  outline: none;
}

.overlay-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ---- Signals modal list ---- */
.overlay-signals-list {
  margin: 12px 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overlay-signals-list li {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.5;
}

.overlay-signals-list li strong {
  color: var(--text);
}

/* ---- Philosophy close / CTAs ---- */
.philosophy-close {
  text-align: center;
  padding-top: 0;
  margin-top: 32px;
}

.philosophy-close-line {
  font-family: var(--font-main);
  font-weight: 700;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text);
  letter-spacing: -0.01em;
  margin: 0 0 28px 0;
}

.philosophy-cta-group {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

/* ---- Tour tooltip ---- */
.philo-tour-tooltip {
  position: fixed;
  background: #1a1e24;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 18px 20px 16px;
  max-width: 280px;
  width: calc(100vw - 32px);
  z-index: 600;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
  font-family: var(--font-main);
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
  pointer-events: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.philo-tour-tooltip.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (prefers-reduced-motion: reduce) {
  .philo-tour-tooltip {
    transition: opacity 0.1s ease !important;
    transform: none !important;
  }
}

.philo-tour-tooltip strong {
  display: block;
  color: var(--text);
  font-weight: 700;
  margin-bottom: 6px;
  font-size: 0.9rem;
}

.tour-highlighted {
  outline: 2px solid rgba(255, 255, 255, 0.3);
  outline-offset: 3px;
  border-radius: var(--card-radius);
}

.tour-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  gap: 8px;
}

.tour-nav-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  color: var(--muted);
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  pointer-events: auto;
}

.tour-nav-btn:hover,
.tour-nav-btn:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  outline: none;
}

.tour-nav-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.tour-nav-btn.primary {
  background: #ffffff;
  color: #0B1A20;
  border-color: transparent;
}

.tour-nav-btn.primary:hover {
  background: rgba(255, 255, 255, 0.88);
}

.tour-step-count {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ---- No-JS fallback ---- */
.no-js-philo {
  display: none;
}

/* Hide no-js details when JS is available (JS adds a class to enable them if needed) */
/* They remain visible in no-JS contexts as native <details> elements */

/* ---- Mindmap diagram ---- */
.philo-mindmap-wrap {
  margin: 0 0 52px;
  text-align: left;
}

.philo-mindmap-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: rgba(255, 255, 255, 0.7);
  margin: 0 0 18px;
}

.philo-mindmap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 880px;
  margin: 0 auto;
}

.mindmap-svg {
  display: block;
  width: 100%;
  min-width: 580px;
  max-width: 880px;
  height: auto;
}

/* connector line draw-in */
.mm-line {
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  animation: mm-draw 0.75s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.mm-line-l { animation-delay: 0.05s; }
.mm-line-r { animation-delay: 0.22s; }

/* sub-connectors fade in */
.mm-subline {
  opacity: 0;
  animation: mm-fadein 0.35s ease forwards;
}

.mm-subline-l { animation-delay: 0.58s; }
.mm-subline-r { animation-delay: 0.7s; }

/* junction dots */
.mm-dot {
  opacity: 0;
  animation: mm-fadein 0.3s ease forwards;
}

.mm-dot-center { animation-delay: 0.38s; }
.mm-dot-l      { animation-delay: 0.48s; }
.mm-dot-r      { animation-delay: 0.62s; }

/* nodes */
.mm-node {
  opacity: 0;
  animation: mm-fadein 0.5s ease forwards;
}

.mm-node-root { animation-delay: 0s; }
.mm-node-fs   { animation-delay: 0.42s; }
.mm-node-bs   { animation-delay: 0.58s; }

/* pill groups */
.mm-pills {
  opacity: 0;
  animation: mm-fadein 0.4s ease forwards;
}

.mm-pills-fs { animation-delay: 0.72s; }
.mm-pills-bs { animation-delay: 0.88s; }

@keyframes mm-draw {
  from { stroke-dashoffset: 300; }
  to   { stroke-dashoffset: 0;   }
}

@keyframes mm-fadein {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .mm-line,
  .mm-subline,
  .mm-dot,
  .mm-node,
  .mm-pills {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
  /* Mindmap: keep its natural 580px width (so text stays readable),
     scroll horizontally within the container. */
  .philo-mindmap {
    padding-bottom: 6px; /* room for scroll thumb */
  }

  .philo-signals-row {
    padding: 16px;
  }

  .philo-practice-panel {
    padding: 20px 16px;
  }
}

@media (max-width: 1099px) {
  .philosophy-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .frontstage-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .backstage-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 699px) {
  .frontstage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .backstage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .philo-tile {
    min-height: auto;
    padding: 14px 10px 12px;
  }

  .frontstage-tile {
    padding: 14px 10px 12px;
  }

  .philosophy-cta-group {
    flex-direction: column;
    align-items: stretch;
  }

  .philosophy-cta-group .btn {
    text-align: center;
    width: 100%;
    justify-content: center;
  }

  .philosophy-close {
    text-align: left;
  }

  .philosophy-cta-group {
    align-items: flex-start;
  }
}

@media (max-width: 420px) {
  .frontstage-grid,
  .backstage-grid {
    grid-template-columns: 1fr;
  }

  /* The philosophy-inner already provides 24px horizontal padding via clamp().
     Adding more on the outer section results in double-padding (40px total) on
     375px phones. Set the inner to a flat 16px instead and leave section at 0. */
  .philosophy-inner {
    padding-left: 16px;
    padding-right: 16px;
  }
}
