/*
 * Mobile layout overrides for Active Logos Ministries.
 * Desktop styles remain in the homepage source.
 */
.hold-charge,
.compass-burst,
.hold-hint {
  display: none;
}

@property --charge-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@media (max-width: 560px) {
  html,
  body {
    overflow-x: clip;
  }

  .container {
    width: calc(100% - 2rem);
  }

  .nav-shell {
    min-height: 68px;
    gap: 1rem;
  }

  .brand img {
    width: 102px;
  }

  .mobile-nav summary {
    position: relative;
    width: 44px;
    height: 44px;
    border-color: var(--line);
    background: var(--surface-raised);
    font-size: 0;
  }

  .mobile-nav summary::before,
  .mobile-nav summary::after {
    position: absolute;
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    content: "";
    transition: box-shadow 180ms ease, transform 180ms ease;
  }

  .mobile-nav summary::before {
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
  }

  .mobile-nav summary::after {
    opacity: 0;
  }

  .mobile-nav[open] summary::before {
    box-shadow: none;
    transform: rotate(45deg);
  }

  .mobile-nav[open] summary::after {
    opacity: 1;
    transform: rotate(-45deg);
  }

  .mobile-nav-panel {
    position: fixed;
    top: 76px;
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    gap: 0.35rem;
    border-radius: 1.25rem;
    padding: 0.75rem;
    box-shadow: 0 24px 70px rgba(37, 41, 43, 0.24);
  }

  .mobile-nav-panel a,
  .mobile-nav-panel .theme-toggle {
    min-height: 50px;
    align-items: center;
    padding: 0.8rem 1rem;
    font-size: 0.88rem;
  }

  h1 {
    max-width: 100%;
    font-size: clamp(2.35rem, 10.5vw, 3rem);
    line-height: 0.98;
    letter-spacing: -0.03em;
    overflow-wrap: normal;
    word-break: normal;
  }

  .hero-grid {
    gap: 2.5rem;
    padding-block: 2.75rem 3.75rem;
  }

  .hero-grid > div:first-child {
    display: flex;
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .hero-grid .eyebrow {
    justify-content: center;
  }

  .hero-copy {
    max-width: 34rem;
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 0.7rem;
  }

  .hero-actions .button {
    width: 100%;
    min-height: 52px;
    padding-inline: 0.9rem;
    font-size: 0.82rem;
  }

  .hero-mark {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    cursor: pointer;
    outline: none;
    touch-action: manipulation;
    user-select: none;
    width: min(68vw, 280px);
  }

  .hero-mark > img {
    -webkit-touch-callout: none;
    -webkit-user-drag: none;
    -webkit-user-select: none;
    pointer-events: none;
    user-select: none;
  }

  .hero-mark:focus-visible {
    border-radius: 28%;
    outline: 2px solid rgba(209, 177, 92, 0.9);
    outline-offset: 20px;
  }

  .orbit-system {
    width: 126%;
  }

  .hero-mark::before {
    width: 116%;
    filter: blur(30px);
  }

  .hold-hint {
    position: absolute;
    top: calc(100% + 1.4rem);
    left: 50%;
    z-index: 6;
    display: block;
    width: max-content;
    border: 1px solid rgba(246, 244, 242, 0.22);
    border-radius: 999px;
    padding: 0.55rem 0.8rem;
    background: rgba(37, 41, 43, 0.68);
    color: rgba(246, 244, 242, 0.78);
    font-family: var(--display);
    font-size: 0.62rem;
    letter-spacing: 0.12em;
    pointer-events: none;
    text-transform: uppercase;
    transform: translateX(-50%);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .hero-mark.is-charging .hold-hint,
  .hero-mark.is-bursting .hold-hint,
  .hero-mark.has-burst .hold-hint {
    opacity: 0;
    transform: translate(-50%, 6px);
  }

  .hold-charge {
    --charge-angle: 0deg;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 5;
    display: block;
    width: 88%;
    aspect-ratio: 1;
    border-radius: 50%;
    background:
      conic-gradient(
        from -90deg,
        rgba(209, 177, 92, 1) 0deg,
        rgba(139, 188, 214, 1) var(--charge-angle),
        rgba(246, 244, 242, 0.08) var(--charge-angle)
      );
    filter:
      drop-shadow(0 0 9px rgba(139, 188, 214, 0.65))
      drop-shadow(0 0 14px rgba(209, 177, 92, 0.38));
    mask: radial-gradient(circle, transparent 63%, #000 65%);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -50%) scale(0.86);
  }

  .hero-mark.is-charging .hold-charge {
    animation: compass-charge 760ms linear forwards;
    opacity: 1;
  }

  .hero-mark.is-charging::before {
    opacity: 0.9;
    transform:
      translate3d(
        calc(-50% + var(--halo-shift-x)),
        calc(-50% + var(--halo-shift-y)),
        0
      )
      scale(1.34);
  }

  .hero-mark.is-charging .orbit-inner {
    animation-duration: 3s !important;
  }

  .hero-mark.is-charging .orbit-outer {
    animation-duration: 4.6s !important;
  }

  .hero-mark.is-charging .orbit-dot {
    transform: scale(2);
  }

  .hero-mark.is-charging > img {
    animation: compass-load 380ms ease-in-out infinite alternate;
    filter:
      drop-shadow(0 0 22px rgba(139, 188, 214, 0.7))
      drop-shadow(0 0 34px rgba(209, 177, 92, 0.42));
  }

  .compass-burst {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 4;
    display: block;
    width: 155%;
    aspect-ratio: 1;
    overflow: visible;
    pointer-events: none;
    transform: translate(-50%, -50%);
  }

  .burst-cloud,
  .burst-shockwave,
  .burst-particle {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    opacity: 0;
    pointer-events: none;
  }

  .burst-cloud {
    width: 74%;
    aspect-ratio: 1;
    filter: blur(14px);
    mix-blend-mode: screen;
    transform: translate(-50%, -50%) scale(0.16);
  }

  .burst-cloud-blue {
    background:
      radial-gradient(circle at 28% 40%, rgba(151, 206, 235, 0.96) 0 15%, transparent 38%),
      radial-gradient(circle at 65% 28%, rgba(103, 162, 196, 0.92) 0 17%, transparent 42%),
      radial-gradient(circle at 58% 70%, rgba(139, 188, 214, 0.9) 0 18%, transparent 46%),
      radial-gradient(circle, rgba(93, 164, 201, 0.8), transparent 72%);
  }

  .burst-cloud-gold {
    width: 76%;
    background:
      radial-gradient(circle at 32% 67%, rgba(236, 207, 120, 0.95) 0 16%, transparent 41%),
      radial-gradient(circle at 73% 58%, rgba(209, 177, 92, 0.92) 0 19%, transparent 45%),
      radial-gradient(circle at 52% 32%, rgba(255, 225, 139, 0.82) 0 13%, transparent 38%),
      radial-gradient(circle, rgba(209, 177, 92, 0.86), transparent 70%);
    box-shadow: 0 0 58px rgba(209, 177, 92, 0.58);
    filter: blur(12px);
    mix-blend-mode: normal;
  }

  .burst-cloud-light {
    width: 48%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.96), rgba(184, 218, 235, 0.58) 30%, transparent 69%);
    filter: blur(10px);
  }

  .burst-shockwave {
    width: 46%;
    aspect-ratio: 1;
    border: 3px solid rgba(246, 244, 242, 0.92);
    box-shadow:
      0 0 16px rgba(139, 188, 214, 0.9),
      0 0 28px rgba(209, 177, 92, 0.7),
      inset 0 0 18px rgba(246, 244, 242, 0.4);
    transform: translate(-50%, -50%) scale(0.4);
  }

  .burst-particles {
    position: absolute;
    inset: 0;
  }

  .burst-particle {
    --distance: 150px;
    --particle-color: #d1b15c;
    width: var(--particle-size, 7px);
    aspect-ratio: 1;
    background: var(--particle-color);
    box-shadow: 0 0 10px var(--particle-color);
    transform: translate(-50%, -50%) rotate(var(--particle-angle)) translateX(0);
  }

  .hero-mark.is-bursting .burst-cloud-blue {
    animation: cloud-burst-blue 1.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-mark.is-bursting .burst-cloud-gold {
    animation: cloud-burst-gold 1.4s 50ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-mark.is-bursting .burst-cloud-light {
    animation: cloud-burst-light 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-mark.is-bursting .burst-shockwave {
    animation: burst-shockwave 1.05s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-mark.is-bursting .burst-particle {
    animation: burst-particle 1.1s var(--particle-delay, 0ms) cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .hero-mark.is-bursting > img {
    animation: compass-release 820ms cubic-bezier(0.16, 1, 0.3, 1);
  }

  @keyframes compass-charge {
    0% {
      --charge-angle: 0deg;
      transform: translate(-50%, -50%) scale(0.86) rotate(0deg);
    }
    100% {
      --charge-angle: 360deg;
      transform: translate(-50%, -50%) scale(1.08) rotate(18deg);
    }
  }

  @keyframes compass-load {
    from {
      transform: scale(0.97) rotate(-0.6deg);
    }
    to {
      transform: scale(1.035) rotate(0.6deg);
    }
  }

  @keyframes compass-release {
    0% {
      transform: scale(1.08);
    }
    18% {
      transform: scale(0.9);
    }
    52% {
      transform: scale(1.12);
    }
    100% {
      transform: scale(1);
    }
  }

  @keyframes cloud-burst-blue {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.14) rotate(-12deg);
    }
    18% {
      opacity: 1;
    }
    52% {
      opacity: 0.86;
    }
    100% {
      opacity: 0;
      transform: translate(-63%, -57%) scale(2.45) rotate(16deg);
    }
  }

  @keyframes cloud-burst-gold {
    0% {
      opacity: 0;
      transform: translate(-40%, -43%) scale(0.12) rotate(12deg);
    }
    20% {
      opacity: 1;
      transform: translate(-36%, -41%) scale(0.9) rotate(4deg);
    }
    56% {
      opacity: 0.9;
    }
    100% {
      opacity: 0;
      transform: translate(-37%, -43%) scale(2.75) rotate(-18deg);
    }
  }

  @keyframes cloud-burst-light {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.1);
    }
    16% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(2.1);
    }
  }

  @keyframes burst-shockwave {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.35);
    }
    15% {
      opacity: 1;
    }
    100% {
      border-width: 1px;
      opacity: 0;
      transform: translate(-50%, -50%) scale(3.1);
    }
  }

  @keyframes burst-particle {
    0% {
      opacity: 0;
      transform: translate(-50%, -50%) rotate(var(--particle-angle)) translateX(8px) scale(0.3);
    }
    20% {
      opacity: 1;
    }
    100% {
      opacity: 0;
      transform:
        translate(-50%, -50%)
        rotate(var(--particle-angle))
        translateX(var(--distance))
        scale(0);
    }
  }

  .tagline-strip p {
    padding-block: 0.9rem;
    font-size: 0.72rem;
    letter-spacing: 0.11em;
  }

  .section {
    padding-block: 4.25rem;
  }

  .section-heading {
    margin-bottom: 2.25rem;
  }

  .section-heading h2,
  .split-copy h2,
  .cta h2 {
    margin-bottom: 1rem;
    font-size: clamp(2.25rem, 10vw, 3rem);
    line-height: 1;
  }

  .section-heading p,
  .split-copy > p {
    font-size: 1rem;
  }

  .about-grid {
    gap: 2rem;
  }

  .about-emblem {
    border-radius: 1.5rem;
    padding: 1.5rem;
  }

  .about-emblem img {
    width: min(52vw, 190px);
  }

  .about-copy {
    padding-top: 0;
  }

  .about-copy .lead {
    font-size: 1.28rem;
    line-height: 1.42;
  }

  .about-copy p {
    font-size: 1rem;
  }

  .value-grid,
  .initiative-grid {
    gap: 0.9rem;
  }

  .value-card,
  .initiative-card {
    min-height: 0;
    border-radius: 1.25rem;
    padding: 1.5rem;
  }

  .value-number {
    margin-bottom: 2rem;
  }

  .value-card h3,
  .initiative-card h3 {
    font-size: 1.55rem;
  }

  .initiative-card {
    gap: 2.5rem;
  }

  .tool-grid {
    gap: 2.25rem;
  }

  .feature-list {
    margin-block: 1.75rem 2rem;
  }

  .feature-list li {
    align-items: start;
    gap: 0.8rem;
    padding-block: 0.9rem;
  }

  .tool-visual {
    min-height: 280px;
  }

  .tool-orbit {
    width: min(82vw, 300px);
  }

  .tool-visual img {
    width: min(46vw, 175px);
  }

  .study-intro {
    gap: 1.25rem;
    margin-bottom: 2rem;
  }

  .preview-badge {
    align-self: flex-start;
    white-space: normal;
  }

  .study-experience {
    gap: 1rem;
  }

  .passage-card {
    min-height: 0;
    border-radius: 1.25rem;
    padding: 1.65rem;
  }

  .passage-card blockquote {
    margin-block: 2rem;
    font-size: 1.48rem;
    line-height: 1.4;
  }

  .study-interface {
    overflow: hidden;
    border-radius: 1.25rem;
  }

  .study-interface-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1rem;
  }

  .study-interface-title {
    font-size: 0.76rem;
  }

  .study-interface-note {
    display: none;
  }

  .study-tabs {
    gap: 0.35rem;
    padding: 0.55rem;
    scroll-padding-inline: 0.55rem;
    scroll-snap-type: x proximity;
  }

  .study-tab {
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 0.72rem 0.85rem;
    scroll-snap-align: start;
  }

  .study-tab::after {
    display: none;
  }

  .study-tab[aria-selected="true"] {
    border-color: var(--line-strong);
    background: var(--surface-raised);
  }

  .study-panel {
    min-height: 0;
    padding: 1.35rem;
  }

  .study-panel h3 {
    font-size: 1.6rem;
    line-height: 1.1;
  }

  .insight-list {
    margin-top: 1.35rem;
  }

  .insight-list li {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 0.65rem;
  }

  .historic-quote {
    padding-left: 1rem;
  }

  .practice-prompt {
    margin-top: 1.15rem;
    padding: 1rem;
  }

  .cross-reference-grid {
    grid-template-columns: 1fr;
  }

  .cta-wrap {
    padding-block: 3.25rem;
  }

  .cta {
    border-radius: 1.5rem;
    padding: 2rem 1.5rem;
  }

  .cta p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
  }

  .cta .button {
    width: 100%;
  }

  .footer-main {
    gap: 2.5rem;
    padding-block: 3rem 2.5rem;
  }

  .footer-brand img {
    width: 150px;
    margin-bottom: 1rem;
  }

  .footer-brand p {
    font-size: 0.95rem;
  }

  .footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
  }

  .footer-links a {
    font-size: 0.78rem;
  }

  .footer-bottom {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.35rem;
    padding-block: 1.1rem 1.5rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 560px) and (prefers-reduced-motion: reduce) {
  .hero-mark.is-charging .hold-charge {
    animation-duration: 1ms;
  }

  .hero-mark.is-charging > img {
    animation: none;
  }

  .hero-mark.is-bursting .burst-cloud,
  .hero-mark.is-bursting .burst-particle {
    animation: none;
  }

  .hero-mark.is-bursting .burst-shockwave {
    animation: reduced-burst 420ms ease-out both;
  }

  @keyframes reduced-burst {
    0% {
      opacity: 0.8;
      transform: translate(-50%, -50%) scale(0.7);
    }
    100% {
      opacity: 0;
      transform: translate(-50%, -50%) scale(1.5);
    }
  }
}
