/* ==========================================================================
   brainRattle — Custom Styles
   Brand overrides layered on top of Bootstrap 5.
   ========================================================================== */

/* ---------- Brand Design Tokens ---------- */
:root {
  --ig-purple: #3d348b;
  --ig-indigo: #7678ed;
  --ig-gold:   #f7b801;
  --ig-orange: #f18701;
  --ig-flame:  #f35b04;

  --ig-font-head: 'Poppins', system-ui, sans-serif;
  --ig-font-body: 'Inter', system-ui, sans-serif;

  --ig-surface: #ffffff;
  --ig-surface-alt: #f6f6fb;
  --ig-text: #1b1b2f;
  --ig-muted: #5c5c74;
  --ig-border: rgba(61, 52, 139, 0.10);
  --ig-nav-bg: rgba(255, 255, 255, 0.82);
  --ig-shadow: 0 10px 30px rgba(61, 52, 139, 0.08);
  --ig-shadow-hover: 0 20px 45px rgba(61, 52, 139, 0.18);
  --ig-gradient: linear-gradient(120deg, var(--ig-purple), var(--ig-indigo));
  --ig-gradient-flame: linear-gradient(120deg, var(--ig-orange), var(--ig-flame));
}

/* ---------- Dark Theme Tokens ---------- */
[data-bs-theme="dark"] {
  --ig-surface: #12111f;
  --ig-surface-alt: #1a1930;
  --ig-text: #eceafd;
  --ig-muted: #a6a4c4;
  --ig-border: rgba(118, 120, 237, 0.22);
  --ig-nav-bg: rgba(18, 17, 31, 0.80);
  --ig-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  --ig-shadow-hover: 0 20px 45px rgba(0, 0, 0, 0.6);
  --bs-body-bg: #0d0c17;
  --bs-body-color: var(--ig-text);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; } /* guard against decorative/floating element overflow */
body {
  font-family: var(--ig-font-body);
  color: var(--ig-text);
  background-color: var(--ig-surface);
  letter-spacing: 0.1px;
  transition: background-color .35s ease, color .35s ease;
}
h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4, .navbar-brand {
  font-family: var(--ig-font-head);
  letter-spacing: -0.02em;
}
section { scroll-margin-top: 84px; }

/* ---------- Accent Utility Classes ---------- */
.text-brand   { color: var(--ig-purple) !important; }
.text-flame   { color: var(--ig-flame) !important; }
.bg-surface-alt { background-color: var(--ig-surface-alt); }
.text-gradient {
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-eyebrow {
  font-family: var(--ig-font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ig-orange);
}

/* ---------- Buttons ---------- */
.btn-flame {
  background: var(--ig-gradient-flame);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(243, 91, 4, 0.28);
  transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}
.btn-flame:hover, .btn-flame:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(243, 91, 4, 0.42);
  filter: brightness(1.03);
}
.btn-brand {
  background: var(--ig-gradient);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 8px 20px rgba(61, 52, 139, 0.28);
  transition: transform .25s ease, box-shadow .25s ease;
}
.btn-brand:hover, .btn-brand:focus {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(61, 52, 139, 0.42);
}
.btn-outline-brand {
  border: 2px solid var(--ig-purple);
  color: var(--ig-purple);
  font-weight: 600;
  background: transparent;
  transition: all .25s ease;
}
[data-bs-theme="dark"] .btn-outline-brand { border-color: var(--ig-indigo); color: var(--ig-indigo); }
.btn-outline-brand:hover, .btn-outline-brand:focus {
  background: var(--ig-purple);
  color: #fff;
}

/* ---------- Navbar ---------- */
.navbar {
  background: var(--ig-nav-bg);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s ease, border-color .3s ease, padding .3s ease;
  padding-top: 1rem;
  padding-bottom: 1rem;
}
.navbar.scrolled {
  box-shadow: var(--ig-shadow);
  border-bottom-color: var(--ig-border);
  padding-top: .55rem;
  padding-bottom: .55rem;
}
.navbar-brand { font-weight: 800; font-size: 1.4rem; }
.navbar-brand .brand-flame { color: var(--ig-flame); }
.navbar .nav-link {
  font-weight: 500;
  color: var(--ig-text);
  position: relative;
  margin: 0 .35rem;
}
.navbar .nav-link::after {
  content: "";
  position: absolute;
  left: .5rem; right: .5rem; bottom: .2rem;
  height: 2px;
  background: var(--ig-gradient-flame);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after { transform: scaleX(1); }

/* ---------- Theme Toggle ---------- */
.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--ig-border);
  background: var(--ig-surface-alt);
  color: var(--ig-text);
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: transform .3s ease, background .3s ease;
}
.theme-toggle:hover { transform: rotate(-15deg) scale(1.05); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-top: 9rem;
  padding-bottom: 5rem;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  top: -20%; right: -10%;
  width: 55vw; height: 55vw;
  max-width: 720px; max-height: 720px;
  background: radial-gradient(circle at center, rgba(118,120,237,.28), transparent 62%);
  filter: blur(10px);
  z-index: 0;
}
.hero::after {
  content: "";
  position: absolute;
  bottom: -25%; left: -12%;
  width: 45vw; height: 45vw;
  max-width: 560px; max-height: 560px;
  background: radial-gradient(circle at center, rgba(247,184,1,.22), transparent 62%);
  z-index: 0;
}
.hero .container { position: relative; z-index: 1; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  background: var(--ig-surface-alt);
  border: 1px solid var(--ig-border);
  color: var(--ig-purple);
  font-weight: 600;
  font-size: .82rem;
  padding: .5rem 1rem;
  border-radius: 50rem;
}
[data-bs-theme="dark"] .hero-badge { color: var(--ig-indigo); }
.hero h1 { font-weight: 800; line-height: 1.08; font-size: clamp(2.3rem, 5vw, 3.6rem); }
.hero .lead { color: var(--ig-muted); max-width: 34rem; }

/* ---------- Hero Illustration Card ---------- */
.hero-visual {
  position: relative;
  border-radius: 28px;
  padding: 2.2rem;
  background: var(--ig-gradient);
  box-shadow: var(--ig-shadow-hover);
  overflow: hidden;
}
.hero-visual .portrait-frame {
  position: relative;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 20px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  color: #fff;
  text-align: center;
}
.hero-visual .portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;         /* keep the face in frame on any crop */
  display: block;
}
.hero-visual .portrait-frame figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 3.5rem 1rem 1.1rem;      /* room for the scrim to fade in */
  background: linear-gradient(to top, rgba(0,0,0,.72) 0%, rgba(0,0,0,.45) 45%, transparent 100%);
}
.float-chip {
  position: absolute;
  background: var(--ig-surface);
  color: var(--ig-text);
  border-radius: 16px;
  padding: .7rem 1rem;
  box-shadow: var(--ig-shadow);
  font-weight: 600;
  font-size: .85rem;
  white-space: nowrap;              /* never wrap the chip label */
  display: flex;
  align-items: center;
  gap: .5rem;
  animation: floaty 4s ease-in-out infinite;
  z-index: 100;
}
.float-chip i { font-size: 1.2rem; }
.float-chip.chip-1 { top: 1.4rem; left: .8rem; }
.float-chip.chip-2 { bottom: 1rem; right: .8rem; animation-delay: 1.5s; }
/* On smaller screens, keep chips tucked inside the card so they never
   spill off-screen or overlap the portrait caption. */
@media (max-width: 991.98px) {
  .float-chip { font-size: .78rem; padding: .55rem .8rem; }
  .float-chip.chip-1 { top: .8rem; left: .8rem; }
  .float-chip.chip-2 { top: .8rem; right: .8rem; bottom: auto; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Trust Pillar Cards ---------- */
.pillar-card {
  background: var(--ig-surface);
  border: 1px solid var(--ig-border);
  border-radius: 20px;
  padding: 2rem 1.5rem;
  height: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
}
.pillar-card:hover { transform: translateY(-6px); box-shadow: var(--ig-shadow-hover); }
.pillar-icon {
  width: 60px; height: 60px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center; justify-content: center;
  font-size: 1.7rem;
  color: #fff;
  margin-bottom: 1.1rem;
  background: var(--ig-gradient);
}
.pillar-card:nth-child(2n) .pillar-icon { background: var(--ig-gradient-flame); }

/* ---------- Blockquote ---------- */
.mission-quote {
  border-left: 5px solid var(--ig-orange);
  background: var(--ig-surface-alt);
  border-radius: 0 18px 18px 0;
  padding: 1.8rem 2rem;
  font-family: var(--ig-font-head);
  font-weight: 500;
  font-size: 1.15rem;
  line-height: 1.6;
  position: relative;
}
.mission-quote i.bi-quote {
  font-size: 2.6rem;
  color: var(--ig-gold);
  position: absolute;
  top: .4rem; right: 1rem;
  opacity: .5;
}

/* ---------- About Visual ---------- */
.about-visual {
  border-radius: 24px;
  background: var(--ig-gradient);
  color: #fff;
  padding: 2.5rem;
  box-shadow: var(--ig-shadow);
  height: 100%;
}
.stat-pod { text-align: center; }
.stat-pod .num { font-family: var(--ig-font-head); font-weight: 800; font-size: 2.2rem; line-height: 1; }
.stat-pod .lbl { font-size: .8rem; opacity: .85; }

/* ---------- Course Cards ---------- */
.course-card {
  border-radius: 20px;
  transition: transform .3s ease, box-shadow .3s ease;
  background: var(--ig-surface);
}
.course-card:hover { transform: translateY(-8px); box-shadow: var(--ig-shadow-hover); }
.course-card .card-topbar {
  height: 6px;
  border-radius: 20px 20px 0 0;
  background: var(--ig-gradient);
}
.course-card:nth-child(2n) .card-topbar { background: var(--ig-gradient-flame); }
.course-icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  background: var(--ig-surface-alt);
  color: var(--ig-purple);
}
[data-bs-theme="dark"] .course-icon { color: var(--ig-indigo); }
.course-features li {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  margin-bottom: .45rem;
  color: var(--ig-muted);
  font-size: .92rem;
}
.course-features li i { color: var(--ig-orange); margin-top: .15rem; }

/* ---------- Process Timeline ---------- */
.process-track { position: relative; }
.process-step {
  background: var(--ig-surface);
  border: 1px solid var(--ig-border);
  border-radius: 18px;
  padding: 1.6rem 1.4rem;
  height: 100%;
  transition: transform .3s ease, box-shadow .3s ease;
  position: relative;
  overflow: hidden;
}
.process-step:hover { transform: translateY(-5px); box-shadow: var(--ig-shadow-hover); }
.process-step .step-num {
  font-family: var(--ig-font-head);
  font-weight: 800;
  font-size: 2.6rem;
  line-height: 1;
  background: var(--ig-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: .9;
}
.process-step .step-arrow {
  position: absolute;
  right: 15px; top: 50%;
  transform: translateY(-50%);
  color: var(--ig-orange);
  font-size: 1.4rem;
  display: none;
}
@media (min-width: 992px) {
  .process-step .step-arrow.show-lg { display: block; }
}

/* ---------- Features Grid ---------- */
.feature-item {
  display: flex;
  align-items: center;
  gap: .9rem;
  background: var(--ig-surface);
  border: 1px solid var(--ig-border);
  border-radius: 14px;
  padding: 1rem 1.15rem;
  height: 100%;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature-item:hover { transform: translateY(-4px); box-shadow: var(--ig-shadow); border-color: var(--ig-orange); }
.feature-item .check {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--ig-gradient-flame);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.feature-item span { font-weight: 500; font-size: .95rem; }

/* ---------- Contact ---------- */
.contact-card {
  background: var(--ig-surface);
  border: 1px solid var(--ig-border);
  border-radius: 24px;
  padding: 2.5rem;
  box-shadow: var(--ig-shadow);
}
.form-control, .form-select {
  background: var(--ig-surface-alt);
  border: 1px solid var(--ig-border);
  color: var(--ig-text);
  padding: .75rem 1rem;
}
.form-control:focus, .form-select:focus {
  background: var(--ig-surface);
  border-color: var(--ig-indigo);
  box-shadow: 0 0 0 .2rem rgba(118,120,237,.2);
  color: var(--ig-text);
}
.form-control::placeholder { color: var(--ig-muted); }
.info-panel {
  background: var(--ig-gradient);
  color: #fff;
  border-radius: 24px;
  padding: 2.5rem;
  height: 100%;
}
.enroll-window {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 16px;
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
}
.seats-pulse {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ig-gold);
  box-shadow: 0 0 0 rgba(247,184,1,.7);
  animation: pulse 1.8s infinite;
  margin-right: .5rem;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(247,184,1,.7); }
  70%  { box-shadow: 0 0 0 12px rgba(247,184,1,0); }
  100% { box-shadow: 0 0 0 0 rgba(247,184,1,0); }
}

/* ---------- WhatsApp Floating Button ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 1050;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 10px 26px rgba(37,211,102,.45);
  transition: transform .25s ease;
  animation: floaty 3.5s ease-in-out infinite;
}
.whatsapp-float:hover { transform: scale(1.08); color: #fff; }

/* ---------- Footer ---------- */
footer { background: var(--ig-surface-alt); border-top: 1px solid var(--ig-border); }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .float-chip, .whatsapp-float, .seats-pulse { animation: none; }
}

/* ---------- Contact details (map + address panel) ---------- */
.contact-details a:hover { color: var(--ig-purple) !important; }
.contact-ico {
  flex: 0 0 auto;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  background: var(--ig-surface-alt);
  color: var(--ig-purple);
}
[data-bs-theme="dark"] .contact-ico { color: var(--ig-indigo); }
