/* =========================================================================
   MindShift CBT — Design system port for Hello Elementor
   "Calm science" — dark midnight base + aurora blue + warm coral.
   Ported 1:1 from the original React app's index.css token set.
   All classes are prefixed `ms-` to stay clear of Elementor/Hello classes.
   ========================================================================= */

:root {
  --ms-font-sans: 'Inter', ui-sans-serif, system-ui, sans-serif;
  --ms-font-heading: 'Hanken Grotesk', ui-sans-serif, system-ui, sans-serif;
  --ms-font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;

  --ms-radius-sm: 0.9rem;
  --ms-radius-md: 1.1rem;
  --ms-radius-lg: 1.6rem;
  --ms-radius-xl: 2rem;

  /* Brand palette */
  --ms-midnight: #0a1226;
  --ms-midnight-2: #0f1b38;
  --ms-midnight-3: #16294e;

  --ms-ink: #0c1a33;
  --ms-slate: #475569;
  --ms-slate-soft: #7c8aa0;

  --ms-teal: #2f80ed;
  --ms-teal-bright: #7cc0f7;
  --ms-teal-deep: #1e63c9;
  --ms-teal-tint: #e7f1fe;

  --ms-coral: #ff7a5c;
  --ms-coral-soft: #ffe7df;

  --ms-mist: #f5f9fc;
  --ms-cloud: #eaf2f8;
  --ms-line: #e3ecf4;
}

/* ---------- Base typography ---------- */
.ms-scope, .ms-scope * { box-sizing: border-box; }

.ms-scope {
  font-family: var(--ms-font-sans);
  color: var(--ms-slate);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.ms-scope h1, .ms-scope h2, .ms-scope h3, .ms-scope h4 {
  font-family: var(--ms-font-heading);
  color: var(--ms-ink);
  letter-spacing: -0.01em;
  margin: 0;
}

.ms-container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem; /* px-4 */
}
@media (min-width: 640px)  { .ms-container { max-width: 640px; } }
@media (min-width: 768px)  { .ms-container { max-width: 768px; padding: 0 1.5rem; } } /* md:px-6 */
@media (min-width: 1024px) { .ms-container { max-width: 1024px; } }
@media (min-width: 1280px) { .ms-container { max-width: 1280px; } }
@media (min-width: 1536px) { .ms-container { max-width: 1536px; } }

/* ---------- Backgrounds / surfaces ---------- */
.ms-bg-aurora {
  position: relative;
  background-color: var(--ms-midnight);
  background-image:
    radial-gradient(60rem 40rem at 78% -8%, rgba(124, 192, 247, 0.18), transparent 60%),
    radial-gradient(45rem 35rem at 8% 8%, rgba(47, 128, 237, 0.20), transparent 58%),
    radial-gradient(40rem 38rem at 60% 110%, rgba(30, 99, 201, 0.14), transparent 60%);
  color: #fff;
  overflow: hidden;
}
.ms-bg-grid::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background-image: radial-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.ms-bg-soft {
  background:
    radial-gradient(50rem 30rem at 100% 0%, #eaf3fe 0%, transparent 55%),
    radial-gradient(40rem 30rem at 0% 100%, #eef5fb 0%, transparent 55%),
    var(--ms-mist);
}
.ms-bg-white { background: #fff; }
.ms-bg-mist { background: var(--ms-mist); }

.ms-glow {
  position: absolute;
  border-radius: 999px;
  background: rgba(47, 128, 237, 0.15);
  filter: blur(120px);
  pointer-events: none;
}

/* ---------- Elevation ---------- */
.ms-shadow-soft { box-shadow: 0 1px 2px rgba(12, 26, 51, 0.04), 0 10px 30px -12px rgba(12, 26, 51, 0.12); }
.ms-shadow-card { box-shadow: 0 1px 2px rgba(12, 26, 51, 0.05), 0 18px 40px -18px rgba(12, 26, 51, 0.18); }
.ms-shadow-glow-teal { box-shadow: 0 20px 60px -20px rgba(20, 184, 166, 0.45); }

/* ---------- Eyebrow label ---------- */
.ms-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--ms-font-mono);
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ms-teal-deep);
}
.ms-eyebrow--dark { color: var(--ms-teal-bright); }
.ms-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex-shrink: 0;
}

/* ---------- Buttons ---------- */
.ms-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 1.75rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}
.ms-btn--primary {
  background: var(--ms-teal-deep);
  color: #fff;
  box-shadow: var(--ms-shadow-glow-teal, 0 20px 60px -20px rgba(20,184,166,.45));
}
.ms-btn--primary:hover { background: var(--ms-teal-deep); transform: translateY(-2px); color: #fff; }

/* ---------- Section headers ---------- */
.ms-section { padding: 6rem 0; }
.ms-section--tight { padding: 4rem 0; }
@media (max-width: 767px) {
  .ms-section { padding: 4rem 0; }
}
.ms-section-head {
  max-width: 46rem;
  margin: 0 auto 4rem;
  text-align: center;
}
.ms-section-head h2 {
  margin-top: 1.25rem;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
}
@media (min-width: 768px) {
  .ms-section-head h2 { font-size: 2.6rem; }
}

/* ---------- Hero (dark aurora page header) ---------- */
.ms-hero {
  padding: 9rem 0 5rem;
}
@media (min-width: 768px) {
  .ms-hero { padding: 10rem 0 6rem; }
}
.ms-hero-inner { position: relative; z-index: 1; max-width: 48rem; }
.ms-hero h1 {
  margin-top: 1.25rem;
  font-weight: 800;
  color: #fff !important;
  font-size: 2.6rem;
  line-height: 1.06;
}
@media (min-width: 1024px) {
  .ms-hero h1 { font-size: 3.6rem; }
}
.ms-hero p {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.7);
  max-width: 42rem;
}

/* Two-tone heading highlight — used inside any dark hero, e.g.
   <h1>A complete CBT toolkit, <span class="ms-heading-highlight">in your pocket.</span></h1> */
.ms-scope .ms-heading-highlight { font-weight: 300; color: var(--ms-teal-bright); }

/* ---------- Topic cards ---------- */
.ms-topics-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  max-width: 72rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .ms-topics-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .ms-topics-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.ms-scope button.ms-topic-card {
  display: block;
  width: 100%;
  height: 100%;
  text-align: left;
  border-radius: var(--ms-radius-lg) !important;
  padding: 1.75rem !important;
  border: 1px solid var(--ms-line) !important;
  background: var(--ms-mist) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  font: inherit;
  box-shadow: none !important;
  text-transform: none !important;
}
.ms-scope button.ms-topic-card:hover { transform: translateY(-4px); box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)) !important; background: var(--ms-mist) !important; }
.ms-scope button.ms-topic-card.is-active {
  background: #fff !important;
  border-color: var(--ms-teal) !important;
  box-shadow: 0 0 0 2px rgba(47, 128, 237, 0.3), 0 18px 40px -18px rgba(12, 26, 51, 0.18) !important;
}
.ms-topic-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.ms-topic-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--ms-shadow-soft, 0 10px 30px -12px rgba(12,26,51,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ms-teal);
}
.ms-topic-card__icon svg { width: 24px; height: 24px; }
.ms-topic-card__count {
  font-family: var(--ms-font-mono);
  font-size: 12px;
  color: var(--ms-slate-soft);
}
.ms-topic-card h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.ms-topic-card p { font-size: 15px; line-height: 1.6; margin: 0; }

/* ---------- Tab pills ---------- */
.ms-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 56rem;
  margin: 0 auto 3rem;
}
.ms-scope button.ms-tab {
  border-radius: 999px !important;
  padding: 0.5rem 1rem !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  background: #fff !important;
  color: var(--ms-slate) !important;
  border: 1px solid var(--ms-line) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: var(--ms-font-sans) !important;
  box-shadow: none !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.ms-scope button.ms-tab:hover { border-color: rgba(47, 128, 237, 0.4) !important; color: var(--ms-ink) !important; background: #fff !important; }
.ms-scope button.ms-tab.is-active {
  background: var(--ms-teal-deep) !important;
  color: #fff !important;
  border-color: var(--ms-teal-deep) !important;
  box-shadow: 0 1px 8px rgba(47, 128, 237, 0.25) !important;
}
.ms-scope .ms-tab__count { color: var(--ms-slate-soft) !important; }
.ms-scope button.ms-tab.is-active .ms-tab__count { color: rgba(255, 255, 255, 0.7) !important; }

/* ---------- Resource / download / crisis cards ---------- */
.ms-cards-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
  max-width: 72rem;
  margin: 0 auto;
}
@media (min-width: 640px) {
  .ms-cards-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .ms-cards-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.ms-cards-grid.ms-cards-grid--3col-md { grid-template-columns: 1fr; }
@media (min-width: 768px) {
  .ms-cards-grid.ms-cards-grid--3col-md { grid-template-columns: 1fr 1fr 1fr; }
}

.ms-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border-radius: var(--ms-radius-lg);
  padding: 1.75rem;
  border: 1px solid var(--ms-line);
  text-decoration: none;
  transition: all 0.2s ease;
  color: inherit;
}
.ms-card:hover { transform: translateY(-4px); box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); }
.ms-card--muted { background: var(--ms-mist); }

.ms-card__topic {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--ms-teal-deep);
}
.ms-card h3 { font-size: 1.125rem; font-weight: 700; margin-top: 0.5rem; }
.ms-card p { font-size: 15px; line-height: 1.6; margin-top: 0.5rem; flex: 1; color: var(--ms-slate); }
.ms-card__meta {
  margin-top: 1.25rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 14px;
  color: var(--ms-slate);
}
.ms-card__meta svg:last-child { margin-left: auto; color: var(--ms-teal); transition: transform 0.2s ease; }
.ms-card:hover .ms-card__meta svg:last-child { transform: translateX(4px); }
.ms-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: #fff;
  box-shadow: var(--ms-shadow-soft, 0 10px 30px -12px rgba(12,26,51,.12));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ms-teal);
  margin-bottom: 1.25rem;
}
.ms-card__icon svg { width: 24px; height: 24px; }

/* ---------- Grid fade transition (AJAX swap) ---------- */
.ms-grid-fade { transition: opacity 0.18s ease; }
.ms-grid-fade.is-loading { opacity: 0; }

/* ---------- CTA band ---------- */
.ms-cta {
  padding: 6rem 0;
  text-align: center;
}
.ms-cta h2 { font-size: 2rem; font-weight: 800; color: #fff !important; max-width: 40rem; margin: 0 auto; }
@media (min-width: 768px) { .ms-cta h2 { font-size: 3rem; } }
.ms-cta p { margin-top: 1.5rem; color: rgba(255,255,255,0.7); max-width: 32rem; margin-left: auto; margin-right: auto; }

/* ---------- Motion ---------- */
@keyframes ms-breathe { 0%, 100% { transform: scale(1); opacity: 0.5; } 50% { transform: scale(1.12); opacity: 0.8; } }
.ms-animate-breathe { animation: ms-breathe 8s ease-in-out infinite; }

@keyframes ms-reveal-up { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: translateY(0); } }
.ms-reveal {
  animation: ms-reveal-up 0.6s cubic-bezier(0.21, 0.47, 0.32, 0.98) both;
}

@media (prefers-reduced-motion: reduce) {
  .ms-animate-breathe { animation: none; }
  .ms-reveal { animation: none; opacity: 1; transform: none; }
}

/* ---------- Button variants (hero CTAs) ---------- */
.ms-btn--lg { height: 54px !important; }
.ms-btn--white {
  background: #fff;
  color: var(--ms-ink);
}
.ms-btn--white:hover { background: var(--ms-teal-tint); color: var(--ms-ink); transform: translateY(-2px); }
.ms-btn--outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: none;
}
.ms-btn--outline:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: translateY(-2px); }

/* ---------- Split hero (eyebrow + h1 + subtitle + 2 CTAs, image right) ---------- */
.ms-hero-split { padding: 9rem 0 5rem; }
@media (min-width: 768px) { .ms-hero-split { padding: 10rem 0 6rem; } }
.ms-hero-split-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 1024px) {
  .ms-hero-split-grid { grid-template-columns: 1fr 1fr; gap: 4rem; }
}
.ms-hero-split-copy { max-width: 42rem; }
.ms-hero-split-copy h1 {
  margin-top: 1.25rem;
  font-weight: 800;
  color: #fff !important;
  font-size: 2.4rem;
  line-height: 1.08;
}
@media (min-width: 1024px) { .ms-hero-split-copy h1 { font-size: 3.4rem; } }
.ms-hero-split-copy p {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.75);
  max-width: 42rem;
}
.ms-hero-split-actions { margin-top: 2.25rem; display: flex; flex-wrap: wrap; gap: 1rem; }
.ms-hero-split-image img, .ms-hero-split-image {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--ms-radius-lg);
  box-shadow: 0 25px 60px -20px rgba(0,0,0,0.5);
  outline: 1px solid rgba(255, 255, 255, 0.15);
  outline-offset: 0;
}

/* ---------- Header / primary nav ---------- */
.ms-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50; /* matches original's z-50 */
  width: 100%;
  transition: all 0.3s ease;
  background: transparent;
  border-bottom: 1px solid transparent;
}
.ms-header.is-solid {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(24px); /* matches original's backdrop-blur-xl (24px) */
  backdrop-filter: blur(24px);
  border-bottom-color: var(--ms-line);
  box-shadow: var(--ms-shadow-soft, 0 10px 30px -12px rgba(12,26,51,.12));
}
.ms-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  height: 74px;
  flex-wrap: nowrap;
}
.ms-header-logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; flex-shrink: 0; }
.ms-header-logo img { width: 36px !important; height: 36px !important; border-radius: 11px; box-shadow: 0 1px 2px rgba(12,26,51,0.1); object-fit: cover; }
.ms-header-logo span {
  font-family: var(--ms-font-sans);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: #fff;
  transition: color 0.3s ease;
}
.ms-header.is-solid .ms-header-logo span { color: var(--ms-ink); }

.ms-nav { display: none; }
@media (min-width: 1024px) {
  .ms-nav { display: flex; align-items: center; gap: 1.25rem; font-weight: 500; font-size: 14px; }
}
@media (min-width: 1280px) {
  .ms-nav { gap: 2rem; font-size: 15px; }
}
.ms-nav ul { display: flex; align-items: center; gap: 1.25rem; list-style: none; margin: 0; padding: 0; flex-wrap: nowrap; }
@media (min-width: 1280px) {
  .ms-nav ul { gap: 2rem; }
}
.ms-nav li { position: relative; }
.ms-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
  padding-bottom: 0.25rem;
}
.ms-header.is-solid .ms-nav > ul > li > a { color: var(--ms-slate); }
.ms-nav > ul > li > a:hover { color: #fff; }
.ms-header.is-solid .ms-nav > ul > li > a:hover { color: var(--ms-ink); }
.ms-nav li.current-menu-item > a,
.ms-nav li.current-menu-ancestor > a { color: #fff; }
.ms-header.is-solid .ms-nav li.current-menu-item > a,
.ms-header.is-solid .ms-nav li.current-menu-ancestor > a { color: var(--ms-ink); }

/* dropdown */
.ms-nav .sub-menu {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 4px);
  top: 100%;
  min-width: 16rem;
  background: #fff;
  border-radius: 1rem;
  border: 1px solid var(--ms-line);
  box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18));
  padding: 0.4rem;
  list-style: none;
  margin: 0.75rem 0 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s ease;
  z-index: 10;
}
.ms-nav li:hover > .sub-menu,
.ms-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
.ms-nav .sub-menu a {
  display: block;
  width: 100%;
  padding: 0.6rem 0.85rem;
  border-radius: 0.7rem;
  color: var(--ms-slate) !important;
  font-size: 14px;
  font-weight: 500;
}
.ms-nav .sub-menu a:hover { background: var(--ms-mist); color: var(--ms-ink) !important; }
.ms-nav-caret { width: 13px; height: 13px; transition: transform 0.2s ease; }
.ms-nav li:hover .ms-nav-caret { transform: rotate(180deg); }

.ms-header-actions { display: none; align-items: center; gap: 1rem; flex-shrink: 0; }
@media (min-width: 640px) { .ms-header-actions { display: flex; } }
.ms-header-contact {
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.8);
  transition: color 0.2s ease;
}
.ms-header.is-solid .ms-header-contact { color: var(--ms-slate); }
.ms-header-contact:hover { color: #fff; }
.ms-header.is-solid .ms-header-contact:hover { color: var(--ms-ink); }
/* ---------- TranslatePress language switcher ---------- */
.ms-lang-switcher { display: flex; align-items: center; }
.ms-lang-switcher .trp-language-switcher-container,
.ms-lang-switcher .trp-ls-shortcode-language {
  font-family: var(--ms-font-sans) !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: rgba(255, 255, 255, 0.8) !important;
}
.ms-header.is-solid .ms-lang-switcher .trp-language-switcher-container,
.ms-header.is-solid .ms-lang-switcher .trp-ls-shortcode-language {
  color: var(--ms-slate) !important;
}
.ms-lang-switcher select.trp-shortcode-language-switcher {
  background: transparent !important;
  border: none !important;
  color: inherit !important;
  font: inherit !important;
  cursor: pointer;
  padding-right: 4px !important;
}
.ms-lang-switcher img.trp-flag-image { display: none; } /* text-only, matches the original's "EN ▾" style */

.ms-header-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 1.5rem;
  border-radius: 999px;
  background: var(--ms-teal-deep);
  color: #fff !important;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  box-shadow: var(--ms-shadow-glow-teal, 0 20px 60px -20px rgba(20,184,166,.45));
  transition: all 0.2s ease;
}
.ms-header-cta:hover { transform: translateY(-2px); color: #fff !important; }

/* mobile toggle + panel */
.ms-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 0.7rem;
  border: none;
  background: transparent;
  color: #fff;
  cursor: pointer;
}
.ms-header.is-solid .ms-nav-toggle { color: var(--ms-ink); }
@media (min-width: 1024px) { .ms-nav-toggle { display: none; } }
.ms-nav-toggle .ms-icon-close { display: none; }
.ms-header.is-open .ms-nav-toggle .ms-icon-open { display: none; }
.ms-header.is-open .ms-nav-toggle .ms-icon-close { display: inline; }

.ms-mobile-panel {
  display: none;
  background: #fff;
  border-top: 1px solid var(--ms-line);
}
.ms-header.is-open .ms-mobile-panel { display: block; }
@media (min-width: 1024px) { .ms-mobile-panel { display: none !important; } }
.ms-mobile-panel ul { list-style: none; margin: 0; padding: 1rem; }
.ms-mobile-panel li { border-bottom: none; }
.ms-mobile-panel > ul > li > a,
.ms-mobile-panel a {
  display: block;
  padding: 0.85rem 0.75rem;
  border-radius: 0.85rem;
  color: var(--ms-slate);
  font-weight: 500;
  text-decoration: none;
}
.ms-mobile-panel a:hover { background: var(--ms-mist); color: var(--ms-ink); }
.ms-mobile-panel .sub-menu { padding-left: 1rem; }
.ms-mobile-cta {
  margin: 0.5rem 0.75rem 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: calc(100% - 1.5rem);
  height: 48px;
  border-radius: 999px;
  background: var(--ms-teal-deep) !important;
  color: #fff !important;
  font-weight: 600;
}

/* ---------- Footer ---------- */
.ms-footer { background: var(--ms-midnight); color: rgba(255, 255, 255, 0.7); }
.ms-footer-top { padding-top: 4rem; padding-bottom: 4rem; } /* longhand — must not clobber .ms-container's left/right padding on the same element */
.ms-footer-grid {
  display: grid;
  gap: 2.5rem;
  grid-template-columns: 1fr 1fr;
}
@media (min-width: 768px) { .ms-footer-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px) { .ms-footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.ms-footer-brand { grid-column: span 2 / span 2; }
@media (min-width: 1024px) { .ms-footer-brand { grid-column: span 1 / span 1; } }
.ms-footer-logo { display: inline-flex; align-items: center; gap: 0.75rem; text-decoration: none; margin-bottom: 1.25rem; }
.ms-footer-logo img { width: 36px !important; height: 36px !important; border-radius: 10px; object-fit: cover; }
.ms-footer-logo span { font-weight: 800; font-size: 1.25rem; color: #fff !important; letter-spacing: -0.01em; }
.ms-footer-brand p { max-width: 24rem; line-height: 1.7; margin-bottom: 1.5rem; }
.ms-footer-social { display: flex; gap: 0.75rem; }
.ms-footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: all 0.2s ease;
}
.ms-footer-social a:hover { background: var(--ms-teal); }
.ms-footer h4 { font-weight: 600; font-size: 1rem; color: #fff !important; margin-bottom: 1rem; }
.ms-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; font-size: 14px; }
.ms-footer a { color: rgba(255, 255, 255, 0.7); text-decoration: none; transition: color 0.2s ease; }
.ms-footer a:hover { color: var(--ms-teal-bright); }
.ms-footer-contact-item { display: flex; align-items: center; gap: 0.5rem; }
.ms-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 3.5rem; /* mt-14 */
  padding-top: 2rem;  /* pt-8 */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}
@media (min-width: 768px) { .ms-footer-bottom { flex-direction: row; text-align: left; } }
.ms-footer-bottom-links { display: flex; gap: 1.5rem; align-items: center; }

/* ---------- Single resource article ---------- */
.ms-article { max-width: 42rem; margin: 0 auto; }
.ms-article-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}
.ms-article-back {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--ms-teal-deep);
  font-weight: 600;
  text-decoration: none;
}
.ms-article-meta { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ms-slate); font-size: 14px; }
.ms-article h2 { font-size: 1.5rem; font-weight: 700; margin-top: 2.5rem; margin-bottom: 1rem; }
.ms-article p { font-size: 1.1rem; line-height: 1.75; margin-bottom: 1.25rem; color: var(--ms-slate); }
.ms-article-callout {
  margin-top: 3.5rem;
  border-radius: var(--ms-radius-lg);
  background: var(--ms-mist);
  border: 1px solid var(--ms-line);
  padding: 1.75rem 2rem;
}
.ms-article-callout p { margin-top: 0.75rem; }
.ms-related-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  margin-top: 1.25rem;
}
@media (min-width: 640px) {
  .ms-related-grid { grid-template-columns: 1fr 1fr 1fr; }
}
.ms-related-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--ms-mist);
  border-radius: 1rem;
  padding: 1.1rem;
  border: 1px solid var(--ms-line);
  text-decoration: none;
  transition: all 0.2s ease;
}
.ms-related-card:hover { transform: translateY(-3px); box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); }
.ms-related-card__topic { font-family: var(--ms-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ms-teal-deep); }
.ms-related-card__title { margin-top: 0.35rem; font-family: var(--ms-font-heading); font-weight: 700; color: var(--ms-ink); line-height: 1.35; }
.ms-related-card__cta { margin-top: 0.75rem; display: inline-flex; align-items: center; gap: 0.35rem; color: var(--ms-teal-deep); font-size: 13px; font-weight: 600; }

/* =========================================================================
   Homepage-specific components
   ========================================================================= */

/* ---------- Home hero ---------- */
.ms-home-hero { padding: 8rem 0 0; }
@media (min-width: 1024px) { .ms-home-hero { padding: 10rem 0 0; } }
.ms-home-hero-grid {
  position: relative; z-index: 1;
  display: grid; gap: 3.5rem; align-items: center;
  padding-bottom: 6rem;
}
@media (min-width: 1024px) { .ms-home-hero-grid { grid-template-columns: 1.02fr 0.98fr; gap: 3.5rem; padding-bottom: 8rem; } }
.ms-home-hero h1 { color: #fff !important; font-weight: 800; font-size: 2.8rem; line-height: 1.04; }
@media (min-width: 640px) { .ms-home-hero h1 { font-size: 3.4rem; } }
@media (min-width: 1024px) { .ms-home-hero h1 { font-size: 4.1rem; } }
.ms-home-hero h1 .ms-hero-light { font-weight: 300; color: var(--ms-teal-bright); }
.ms-home-hero p.ms-home-hero-sub { margin-top: 1.5rem; font-size: 1.1rem; line-height: 1.7; color: rgba(255,255,255,0.7); max-width: 36rem; }
@media (min-width: 640px) { .ms-home-hero p.ms-home-hero-sub { font-size: 1.25rem; } }
.ms-home-hero-meta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.25rem; font-size: 14px; color: rgba(255,255,255,0.6); }
.ms-home-hero-meta .divider { width: 1px; height: 16px; background: rgba(255,255,255,0.15); }
.ms-home-hero-stars { display: inline-flex; gap: 2px; color: var(--ms-teal-bright); }
.ms-home-hero-image img { width: 100%; max-width: 20rem; border-radius: 2.6rem; box-shadow: 0 25px 70px -20px rgba(0,0,0,0.55); display: block; margin: 0 auto; }

/* ---------- Stats band (glass) ---------- */
.ms-stats-band {
  position: relative; z-index: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  border-bottom: none;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-radius: 1.6rem 1.6rem 0 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 768px) { .ms-stats-band { grid-template-columns: repeat(4, 1fr); } }
.ms-stats-band > div { padding: 1.75rem 1.25rem; text-align: center; border-left: 1px solid rgba(255,255,255,0.08); }
.ms-stats-band > div:first-child { border-left: none; }
.ms-stats-band .stat-num { font-family: var(--ms-font-heading); font-size: 1.9rem; font-weight: 800; color: #fff !important; margin: 0; }
@media (min-width: 768px) { .ms-stats-band .stat-num { font-size: 2.3rem; } }
.ms-stats-band .stat-label { margin-top: 0.4rem; font-family: var(--ms-font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.5); }

/* ---------- Pill badge ---------- */
.ms-pill-badge {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border-radius: 999px; background: var(--ms-teal-tint); color: var(--ms-teal);
  padding: 0.4rem 1rem; font-size: 14px; font-weight: 700;
}

/* ---------- Check list ---------- */
.ms-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.75rem; }
.ms-check-list li { display: flex; align-items: flex-start; gap: 0.75rem; color: var(--ms-slate); }
.ms-check-list svg { flex-shrink: 0; margin-top: 0.15rem; color: var(--ms-teal); }

/* ---------- Bento grid (Why MindShift) ---------- */
.ms-bento-grid { display: grid; gap: 1.5rem; max-width: 72rem; margin: 0 auto; }
@media (min-width: 1024px) { .ms-bento-grid { grid-template-columns: repeat(3, 1fr); } }
.ms-bento-hero {
  border-radius: var(--ms-radius-lg);
  padding: 2.25rem;
  background: linear-gradient(135deg, #e7f1fe, #cfe3fb);
  border: 1px solid #cfe0f5;
  display: flex; flex-direction: column; height: 100%;
}
@media (min-width: 1024px) { .ms-bento-hero { grid-row: span 2 / span 2; } }
.ms-bento-hero .ms-icon-badge { margin-bottom: 1.5rem; }
.ms-bento-hero h3 { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.75rem; }
.ms-bento-hero p { color: var(--ms-slate); line-height: 1.7; margin-bottom: 2rem; }
.ms-bento-hero .ms-bento-tag { margin-top: auto; display: flex; align-items: center; gap: 0.5rem; color: var(--ms-teal-deep); font-weight: 600; font-size: 14px; }
.ms-bento-cell {
  background: #fff; border-radius: var(--ms-radius-lg); padding: 1.75rem;
  border: 1px solid var(--ms-line); transition: all 0.2s ease; height: 100%;
}
.ms-bento-cell:hover { transform: translateY(-4px); box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); }
.ms-bento-cell h3 { font-size: 1.125rem; font-weight: 700; margin-bottom: 0.5rem; }
.ms-bento-cell p { color: var(--ms-slate); font-size: 15px; line-height: 1.6; }
.ms-icon-badge {
  width: 56px; height: 56px; border-radius: 1rem; background: #fff;
  box-shadow: var(--ms-shadow-soft, 0 10px 30px -12px rgba(12,26,51,.12));
  display: flex; align-items: center; justify-content: center; color: var(--ms-teal);
}
.ms-icon-badge--sm { width: 48px; height: 48px; border-radius: 0.85rem; background: var(--ms-teal-tint); box-shadow: none; }
.ms-icon-badge svg { width: 28px; height: 28px; }
.ms-icon-badge--sm svg { width: 22px; height: 22px; }

/* ---------- Feature row (alternating image + text) ---------- */
.ms-feature-row { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) { .ms-feature-row { grid-template-columns: 1fr 1fr; gap: 4rem; } }
.ms-feature-row.is-reverse .ms-feature-row-media { order: 2; }
.ms-feature-row.is-reverse .ms-feature-row-copy { order: 1; }
.ms-feature-row-media { display: flex; justify-content: center; }
.ms-feature-row-media img { width: 100%; max-width: 15rem; border-radius: 2rem; box-shadow: 0 20px 50px -15px rgba(12,26,51,0.25); }
.ms-feature-row-copy h3 { margin-top: 1.25rem; font-size: 1.5rem; font-weight: 700; line-height: 1.35; }
@media (min-width: 768px) { .ms-feature-row-copy h3 { font-size: 1.85rem; } }
.ms-feature-row-copy p { margin-top: 1rem; color: var(--ms-slate); font-size: 1.05rem; line-height: 1.7; }
.ms-feature-row-copy .ms-check-list { margin-top: 1.5rem; }

/* ---------- Toolkit / mini cards with side icon ---------- */
.ms-mini-cards-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .ms-mini-cards-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .ms-mini-cards-grid { grid-template-columns: 1fr 1fr 1fr; } }
.ms-mini-card {
  display: flex; gap: 1rem; background: #fff; border-radius: 1rem; padding: 1.25rem;
  border: 1px solid var(--ms-line); transition: all 0.2s ease;
}
.ms-mini-card:hover { transform: translateY(-3px); box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); }
.ms-mini-card__icon { flex-shrink: 0; width: 44px; height: 44px; border-radius: 0.85rem; background: var(--ms-teal-tint); display: flex; align-items: center; justify-content: center; color: var(--ms-teal); }
.ms-mini-card h4 { font-weight: 700; margin-bottom: 0.25rem; }
.ms-mini-card p { font-size: 14px; color: var(--ms-slate); line-height: 1.55; margin: 0; }

/* ---------- Photo grid (community composition) ---------- */
.ms-photo-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.ms-photo-grid-2 img { width: 100%; object-fit: cover; }
.ms-photo-grid-2 .is-wide { grid-column: span 2 / span 2; aspect-ratio: 16/9; border-radius: 1.6rem; box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); }
.ms-photo-grid-2 .is-square { aspect-ratio: 1/1; border-radius: 1.4rem; box-shadow: var(--ms-shadow-soft, 0 10px 30px -12px rgba(12,26,51,.12)); }

/* ---------- Who-it's-for / photo cards ---------- */
.ms-photo-card { height: 100%; background: var(--ms-mist); border-radius: var(--ms-radius-lg); border: 1px solid var(--ms-line); overflow: hidden; display: flex; flex-direction: column; }
.ms-photo-card img { width: 100%; aspect-ratio: 4/3; object-fit: cover; display: block; }
.ms-photo-card-body { padding: 2rem; flex: 1; }
.ms-photo-card-body h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.ms-photo-card-body p { color: var(--ms-slate); line-height: 1.7; }

/* ---------- Library glass grid ---------- */
.ms-library-grid { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 768px) { .ms-library-grid { grid-template-columns: 1fr 1fr 1fr; } }
.ms-library-card { display: block; height: 100%; border-radius: 1rem; padding: 1.5rem; text-decoration: none; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); transition: all 0.2s ease; }
.ms-library-card:hover { background: rgba(255,255,255,0.1); }
.ms-library-card__topic { font-family: var(--ms-font-mono); font-size: 11px; text-transform: uppercase; letter-spacing: 0.02em; color: var(--ms-teal-bright); }
.ms-library-card__title { display: block; margin-top: 0.5rem; font-family: var(--ms-font-heading); font-weight: 700; color: #fff !important; line-height: 1.4; }
.ms-library-card__cta { margin-top: 1rem; display: inline-flex; align-items: center; gap: 0.4rem; color: var(--ms-teal-bright); font-size: 14px; font-weight: 600; }

/* ---------- Org callout card ---------- */
.ms-org-card { background: #fff; border-radius: var(--ms-radius-xl); border: 1px solid var(--ms-line); box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); padding: 2.25rem; }
@media (min-width: 768px) { .ms-org-card { padding: 3.5rem; } }
.ms-org-card-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 768px) { .ms-org-card-grid { grid-template-columns: 1.5fr 1fr; } }
.ms-org-card h2 { margin-top: 1.25rem; font-size: 1.5rem; font-weight: 700; line-height: 1.4; }
@media (min-width: 768px) { .ms-org-card h2 { font-size: 2rem; } }
.ms-org-card p { margin-top: 1rem; color: var(--ms-slate); font-size: 1.1rem; line-height: 1.7; }
.ms-org-card-action { text-align: left; }
@media (min-width: 768px) { .ms-org-card-action { text-align: right; } }

/* ---------- App store badges (simple) ---------- */
.ms-app-badges { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.ms-app-badge {
  display: inline-flex; align-items: center; gap: 0.75rem; height: 58px; padding: 0 1.25rem;
  border-radius: 1rem; background: #fff; color: var(--ms-ink); text-decoration: none;
  box-shadow: var(--ms-shadow-card, 0 18px 40px -18px rgba(12,26,51,.18)); transition: all 0.2s ease;
}
.ms-app-badge:hover { transform: translateY(-2px); }
.ms-app-badge .top { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.ms-app-badge .bottom { display: block; font-family: var(--ms-font-heading); font-weight: 700; font-size: 17px; margin-top: -2px; }

/* ---------- Bottom disclaimer text ---------- */
.ms-fineprint { margin-top: 3rem; text-align: center; font-size: 12px; color: rgba(255,255,255,0.55); max-width: 42rem; margin-left: auto; margin-right: auto; }
