/* ============================================================
   Digital Mentors — Custom Design System
   Imported after Bootstrap in base.html
   ============================================================ */

/* --- CSS Variables ----------------------------------------- */
:root {
  --color-primary: #1e3a5f;
  --color-accent: #d97706;
  --color-accent-hover: #b45309;
  --color-bg-light: #faf9f7;
  --color-bg-alt: #f1ede8;
  --color-bg-dark: #2c3338;
  --color-text: #1a1a2e;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* --- Base --------------------------------------------------- */
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg-light);
}

h1, h2, h3, h4,
.display-1, .display-2, .display-3, .display-4, .display-5 {
  font-family: var(--font-display);
}

/* --- Typography helpers ------------------------------------ */
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1.15;
}

.lead-text {
  font-size: 1.1rem;
  line-height: 1.8;
  margin-bottom: 1.2rem;
}

/* --- Section spacing --------------------------------------- */
.py-lg-7 {
  padding-top: 5rem !important;
  padding-bottom: 5rem !important;
}

/* --- Section backgrounds ----------------------------------- */
.section-alt {
  background-color: var(--color-bg-alt);
}

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

/* --- Navbar ------------------------------------------------ */
.navbar {
  background-color: var(--color-bg-dark) !important;
}

.navbar-brand {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* --- Bootstrap button overrides ---------------------------- */
.btn-primary {
  background-color: var(--color-accent) !important;
  border-color: var(--color-accent) !important;
  color: #fff !important;
  font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: var(--color-accent-hover) !important;
  border-color: var(--color-accent-hover) !important;
}

/* --- Problem section --------------------------------------- */
#problem {
  background-color: var(--color-bg-alt);
}

#problem .lead-text:last-child {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.15rem;
}

/* --- Solution section -------------------------------------- */
#solution {
  background-color: var(--color-bg-light);
}

.pillar-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease;
}

.pillar-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.pillar-icon-wrapper {
  width: 64px;
  height: 64px;
  background: rgba(217, 119, 6, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Differentiator section -------------------------------- */
#differentiator {
  background-color: var(--color-bg-dark);
}

#differentiator .lead-text {
  color: rgba(255, 255, 255, 0.8);
}

.differentiator-closing {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  border-left: 3px solid var(--color-accent);
  padding-left: 1.25rem;
  margin-top: 2rem;
}

/* --- Segments section -------------------------------------- */
#segments {
  background-color: var(--color-bg-light);
}

.segment-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.segment-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1) !important;
}

.segment-label {
  background-color: rgba(217, 119, 6, 0.1);
  color: var(--color-accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.75rem;
  border-radius: 2rem;
}

.segment-benefit {
  color: var(--color-accent);
  font-weight: 600;
  font-size: 0.95rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* --- CTA / Early Adopters section -------------------------- */
#early-adopters {
  background-color: var(--color-primary);
  color: #fff;
}

#early-adopters .form-control,
#early-adopters .form-select {
  background-color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

#early-adopters .card {
  border-radius: 1rem;
  overflow: hidden;
}

/* --- Footer ------------------------------------------------ */
footer {
  background-color: var(--color-bg-dark) !important;
  color: rgba(255, 255, 255, 0.6);
}

.footer-tagline {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.01em;
}

/* --- Floating Creator Tab ---------------------------------- */
.creator-tab {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 1050;
}

.creator-tab__toggle {
  display: block;
  background: var(--color-accent);
  color: #fff;
  border: none;
  padding: 1.5rem 0.7rem;
  border-radius: 0.5rem 0 0 0.5rem;
  cursor: pointer;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  box-shadow: -3px 2px 12px rgba(0, 0, 0, 0.18);
  transition: background 0.2s ease;
  white-space: nowrap;
}

.creator-tab__toggle:hover {
  background: var(--color-accent-hover);
}

.creator-tab__panel {
  display: none;
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 270px;
  background: #fff;
  border-radius: 0.75rem 0 0 0.75rem;
  padding: 1.5rem;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(217, 119, 6, 0.15);
}

.creator-tab__panel.is-open {
  display: block;
}

.creator-tab__title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 0.6rem;
}

.creator-tab__body {
  font-size: 0.82rem;
  color: #64748b;
  line-height: 1.6;
  margin-bottom: 1.1rem;
}

.creator-tab__cta {
  display: block;
  background: var(--color-accent);
  color: #fff;
  text-align: center;
  padding: 0.55rem 1rem;
  border-radius: 0.4rem;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s ease;
}

.creator-tab__cta:hover {
  background: var(--color-accent-hover);
  color: #fff;
}

/* Mobile: fixed bottom bar */
@media (max-width: 991.98px) {
  .creator-tab {
    top: auto;
    right: 0;
    left: 0;
    bottom: 0;
    transform: none;
  }

  .creator-tab__toggle {
    writing-mode: horizontal-tb;
    border-radius: 0;
    width: 100%;
    padding: 0.85rem 1.5rem;
    text-align: left;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.12);
  }

  .creator-tab__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 52px;
    top: auto;
    transform: none;
    width: 100%;
    border-radius: 1rem 1rem 0 0;
    max-height: 55vh;
    overflow-y: auto;
  }
}

/* --- Responsive -------------------------------------------- */
@media (max-width: 767px) {
  .section-title {
    font-size: 1.75rem;
  }

  .lead-text {
    font-size: 1rem;
  }

  .py-lg-7 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
}
