/* ═══════════════════════════════════════
   MEGDESK — CRITICAL UI FIXES
   Scoped fixes — does NOT break dark sections
   ═══════════════════════════════════════ */

/* ── Fixed header (nav only) ── */
:root {
  --chrome: 88px;
}

html {
  scroll-padding-top: var(--chrome) !important;
}

.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 500 !important;
  height: auto !important;
  min-height: var(--chrome) !important;
  padding: 10px 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
}

.header .nav {
  pointer-events: auto !important;
  position: relative;
  z-index: 1;
  width: min(1280px, 96vw) !important;
  height: 72px !important;
  margin: 0 auto !important;
}

.header .nav::before {
  display: none !important;
}

.lux-bar {
  display: none !important;
}

.header.scrolled,
.header:not(.scrolled) {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* ── Section headings: no blur fade ── */
.section-head.reveal,
.section-head.reveal.visible {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

/* ── Solid light-section backgrounds ── */
body {
  background: #fffbf7 !important;
}

/* stats-strip colors — see premium-touch.css */

.values-band,
.bento-showcase,
.testimonials,
.services-section,
.industries-band,
.about,
.credentials,
.faq-section,
.contact,
.leadership,
#expertise {
  background: #ffffff !important;
}

.values-band {
  background: linear-gradient(180deg, #fff9f0 0%, #ffffff 100%) !important;
}

.leadership {
  background: linear-gradient(180deg, #fffdf9 0%, #ffffff 100%) !important;
}

/* ══ LIGHT SECTIONS: dark readable text ══ */
.values-band .overline,
.bento-showcase .overline,
#expertise .overline,
#solutions .overline,
.leadership .overline,
.about .overline,
.testimonials .overline,
.credentials .overline,
.faq-section .overline,
.contact .overline,
.services-section .overline {
  color: #c45f0a !important;
  -webkit-text-fill-color: #c45f0a !important;
  background: none !important;
  font-weight: 700 !important;
}

.values-band .section-head h2,
.bento-showcase .section-head h2,
#expertise .section-head h2,
#solutions .section-head h2,
.leadership .section-head h2,
.about .section-head h2,
.testimonials .section-head h2,
.credentials .section-head h2,
.services-section .section-head h2,
.methodology .section-head h2,
.about-copy h2,
.contact-copy h2,
.faq-intro h2 {
  color: #1a0a2e !important;
  font-weight: 600 !important;
}

.values-band .accent-italic,
.bento-showcase .accent-italic,
#expertise .accent-italic,
.leadership .accent-italic,
.about .accent-italic,
.testimonials .accent-italic,
.credentials .accent-italic,
.services-section .accent-italic,
.faq-intro .accent-italic,
.about-copy .accent-italic,
.contact-copy .accent-italic {
  color: #e8751a !important;
  -webkit-text-fill-color: #e8751a !important;
}

.values-band .section-head p,
.bento-showcase .section-head p,
#expertise .section-head p,
.leadership .section-head p,
.about .section-head p,
.services-section .section-head p {
  color: #3d2a55 !important;
  font-weight: 400 !important;
}

/* Orange-gradient sections: see gradient-sections.css */

/* ── Card body copy ── */
.value-card p,
.pillar p,
.bento-title p,
.cred-card p,
.team-card p,
.faq-a p,
.about-copy p,
.highlight-item span {
  color: #3d2a55 !important;
  font-weight: 400 !important;
}

.value-card h4,
.pillar h3,
.bento-title h4,
.cred-card h4,
.team-card h3 {
  color: #1a0a2e !important;
  font-weight: 600 !important;
}

.bento-label {
  color: #a8892e !important;
}

/* ── Leadership cards ── */
.team-card {
  background: #ffffff !important;
  overflow: visible !important;
}

.team-card p {
  font-size: 0.92rem !important;
  line-height: 1.85 !important;
}

/* ── Team photos ── */
.team-avatar {
  width: 160px !important;
  height: 160px !important;
  border-radius: 50%;
  overflow: hidden;
  background: #f0ebe3;
}

.team-avatar img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block !important;
}

.team-avatar--founder img {
  object-position: center 12% !important;
  transform: scale(1.35) !important;
}

.team-avatar--cto img {
  object-position: center 28% !important;
  transform: scale(1.08) !important;
}

.team-avatar--cmo img {
  object-position: center 22% !important;
  transform: scale(1.15) !important;
}

.team-card:hover .team-avatar--founder img {
  transform: scale(1.38) !important;
}

.team-card:hover .team-avatar--cto img {
  transform: scale(1.1) !important;
}

.team-card:hover .team-avatar--cmo img {
  transform: scale(1.18) !important;
}

/* ── Bento card clipping ── */
.bento--hero { min-height: 360px !important; }
.bento--tall { min-height: 420px !important; }
.bento--wide { min-height: 260px !important; }
.bento--mid  { min-height: 260px !important; }
.bento--sm   { min-height: 260px !important; }

.bento-ui {
  inset: 2.75rem 1.25rem 5.5rem !important;
}

.bento--tall .bento-ui.bento-ml-net {
  inset: 2.5rem 1.25rem 8.75rem !important;
}

.bento--tall .bento-title {
  background: #ffffff !important;
  border-top: 1px solid rgba(42, 22, 84, 0.07);
}

.bento-title {
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  padding: 1.25rem 1.5rem 1.5rem !important;
  background: linear-gradient(180deg, transparent 0%, rgba(255,255,255,0.97) 35%, #fff 100%) !important;
  z-index: 3 !important;
}

.bento-title h4 { font-size: 1.2rem !important; }
.bento-title p  { font-size: 0.84rem !important; line-height: 1.55 !important; }

.bento-cloud-grid { height: 100%; align-content: center; }
.bento-phone { width: 80px !important; height: 140px !important; }
.bento-lock  { transform: scale(0.85); }

.value-card,
.pillar {
  background: #ffffff !important;
}

/* ── Scroll progress sits below chrome ── */
.scroll-progress {
  top: var(--chrome) !important;
  z-index: 499 !important;
}

/* ── Anchor sections: no huge empty gap ── */
#leadership,
#about,
#contact,
#methodology,
#expertise,
#solutions,
#services {
  scroll-margin-top: var(--chrome);
}

.section.leadership {
  padding: 4rem 0 5rem !important;
}

/* ── Bento text must not escape cards ── */
.bento-cell {
  overflow: hidden !important;
  isolation: isolate;
}

.bento-title p {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .team-avatar {
    width: 140px !important;
    height: 140px !important;
  }
  .team-avatar--cto img {
    object-position: center 28% !important;
    transform: scale(1.08) !important;
  }
  .team-avatar--cmo img {
    object-position: center 22% !important;
    transform: scale(1.15) !important;
  }
}

/* ── Footer legal links spacing ── */
.footer-legal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: center;
  align-items: center;
}

.footer-legal-bar a {
  white-space: nowrap;
}

/* ── Contact form toast notifications ── */
.contact-toast-stack {
  position: fixed;
  top: calc(var(--chrome, 88px) + 1rem);
  right: 1.25rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: min(420px, calc(100vw - 2rem));
  pointer-events: none;
}

.contact-toast {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(26, 10, 46, 0.1);
  box-shadow: 0 16px 40px rgba(26, 10, 46, 0.18);
  pointer-events: auto;
  animation: contactToastIn 0.35s ease;
}

.contact-toast--success {
  border-left: 4px solid #16a34a;
}

.contact-toast--error {
  border-left: 4px solid #ef4444;
}

.contact-toast--info {
  border-left: 4px solid #2563eb;
}

.contact-toast strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.92rem;
  color: #1a0a2e;
}

.contact-toast p {
  margin: 0;
  font-size: 0.86rem;
  color: #5c5470;
  line-height: 1.45;
}

@keyframes contactToastIn {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* ── Contact form validation UI ── */
.field-req {
  color: #dc2626;
  font-weight: 700;
}

.field-error {
  display: none;
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: #dc2626;
}

.form-field.is-invalid .field-error {
  display: block;
}

.form-field.is-invalid input,
.form-field.is-invalid textarea {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}
