/* ===== Sophia Mobile Responsive ===== */

/* ---------- Hamburger Menu ---------- */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
  z-index: 60;
}
.mobile-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #31332c;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.mobile-menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(49, 51, 44, 0.3);
  z-index: 48;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.mobile-nav-overlay.visible {
  display: block;
  opacity: 1;
}

.mobile-nav-links {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 300px;
  max-width: 85vw;
  height: 100dvh;
  background: rgba(251, 249, 244, 0.98);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  z-index: 49;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0;
  padding: 100px 32px 32px;
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 4px 0 24px rgba(49, 51, 44, 0.08);
  overflow-y: auto;
}
.mobile-nav-links.open {
  transform: translateX(0);
}
.mobile-nav-links a {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #31332c;
  text-decoration: none;
  letter-spacing: -0.02em;
  padding: 14px 0;
  width: 100%;
  border-bottom: 1px solid rgba(177, 179, 169, 0.2);
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.mobile-nav-links a:hover {
  color: #5f5e5e;
  padding-left: 8px;
}
.mobile-nav-links a.active-link {
  color: #31332c;
}

@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: flex;
  }

  nav .hidden.md\:flex {
    display: none !important;
  }

  * {
    max-width: 100%;
    box-sizing: border-box;
  }
  body {
    overflow-x: hidden;
  }
  p, h1, h2, h3, h4, li, span, a, blockquote {
    overflow-wrap: break-word;
    word-break: break-word;
  }

  h1.display {
    font-size: 32px !important;
    line-height: 1.08;
  }
  h2.display {
    font-size: 28px !important;
    line-height: 1.1;
  }
  h3.display {
    font-size: 22px !important;
  }
  h4.display {
    font-size: 20px !important;
  }

  .step-num {
    font-size: 64px !important;
  }

  .pull-quote {
    font-size: 22px !important;
    line-height: 1.3 !important;
  }
  .pull-quote::before {
    font-size: 3rem;
  }

  .marquee-track ul {
    font-size: 20px !important;
    gap: 8px !important;
  }

  section.py-32 {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .grid.grid-cols-12 {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .grid.grid-cols-12 > [class*="col-span"] {
    width: 100%;
    max-width: 100%;
  }

  .grid.grid-cols-1.md\:grid-cols-3 {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }
  .grid.grid-cols-1.md\:grid-cols-3 > div {
    min-height: auto !important;
  }

  .grid.grid-cols-2.gap-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .grid.grid-cols-2.gap-4 > .bg-surface-container-lowest {
    padding: 16px !important;
  }
  .grid.grid-cols-2.gap-4 > .bg-surface-container-lowest .display {
    font-size: 18px !important;
  }

  .transcript-line {
    font-size: 16px !important;
  }
  .transcript-line .label {
    font-size: 10px !important;
  }

  .p-12.md\:p-20 {
    padding: 28px 20px !important;
  }

  .aspect-square.max-w-\[320px\] {
    max-width: 200px;
    margin: 0 auto;
  }

  #uptime-grid span {
    height: 5px !important;
  }

  .absolute.-left-4 {
    position: relative;
    left: 0;
    bottom: 0;
    margin-top: 20px;
    width: 100%;
  }

  nav a.px-5 {
    padding: 8px 12px;
    font-size: 11px;
  }

  footer .grid.grid-cols-12 {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  footer .col-span-6 {
    width: 50%;
  }

  .md\:col-span-2.bg-surface-container {
    padding: 20px !important;
  }

  .w-\[320px\].h-\[320px\] {
    width: 200px !important;
    height: 200px !important;
  }

  .md\:col-span-2.bg-surface-container h3.display {
    font-size: 28px !important;
  }
  .md\:col-span-2.bg-surface-container p {
    font-size: 15px !important;
  }

  .w-\[150px\].h-\[150px\] {
    width: 100px !important;
    height: 100px !important;
  }
  .w-\[220px\].h-\[220px\] {
    width: 140px !important;
    height: 140px !important;
  }
}

@media (max-width: 380px) {
  .max-w-\[1320px\] {
    padding-left: 16px;
    padding-right: 16px;
  }
  h1.display {
    font-size: 28px !important;
  }
  h2.display {
    font-size: 24px !important;
  }
  h3.display {
    font-size: 20px !important;
  }
  .step-num {
    font-size: 48px !important;
  }
  .pull-quote {
    font-size: 18px !important;
  }
  .marquee-track ul {
    font-size: 18px !important;
  }
  .transcript-line {
    font-size: 15px !important;
  }
}
