/**
 * CloudAxis homepage — mobile-only layout (max-width: 768px).
 *
 * Desktop is unchanged. This file is linked from index.html with
 * media="(max-width: 768px)" and the rules are wrapped in the same query
 * so a missing media attribute cannot leak onto desktop.
 *
 * Design intent: the product is a persistent AI cloud computer. On a phone
 * you command it and collect results — you do not sit inside a 1024px OS.
 * So the mobile home is a command surface: short pitch, live-machine preview,
 * proof video, then a tight story. Landscape desktop chrome stays for ≥769px.
 */
@media (max-width: 768px) {
  body.ca-home {
    --ca-home-gutter: 1.15rem;
    --ca-home-section: 2.35rem;
  }

  body.ca-home main {
    display: flex;
    flex-direction: column;
    padding-top: 4.6rem;
    padding-bottom: 1rem;
  }

  body.ca-home .wrap {
    padding-left: var(--ca-home-gutter);
    padding-right: var(--ca-home-gutter);
  }

  /* Story order: pitch → proof video → how it runs → price */
  body.ca-home main > * { order: 20; }
  body.ca-home .hero { order: 0; }
  body.ca-home #product-story { order: 1; }
  body.ca-home #workspace { order: 2; }
  body.ca-home #how-it-works { order: 3; }
  body.ca-home #pricing-teaser { order: 4; }
  body.ca-home #use-cases { order: 5; }
  body.ca-home #who-for { order: 6; }
  body.ca-home #cloud-browser { order: 7; }
  body.ca-home #team-board { order: 8; }
  body.ca-home #apps { order: 9; }
  body.ca-home .home-trust { order: 10; }
  body.ca-home .home-hub { order: 11; }
  body.ca-home #ask-your-ai { order: 12; }
  body.ca-home #faq { order: 13; }
  body.ca-home .home-testimonials { order: 14; }
  body.ca-home .final-cta { order: 15; }

  /* Desktop-first chrome that reads as a 2018 long-scroll on a phone */
  body.ca-home .page-jump-nav,
  body.ca-home .apps-strip-section,
  body.ca-home .cta-band,
  body.ca-home #desktop,
  body.ca-home .home-hosted,
  body.ca-home .hero-guide-link,
  body.ca-home .hero-note,
  body.ca-home .hero-proof-line,
  body.ca-home .hero-visual .shot-frame--hero {
    display: none !important;
  }

  /* ── Hero: command surface ─────────────────────────────── */
  body.ca-home .hero--cinematic {
    padding: 0.15rem 0 1.5rem;
    border-bottom: none;
  }

  body.ca-home .hero-layout {
    gap: 1.35rem;
  }

  body.ca-home .hero--cinematic .hero-copy {
    max-width: none;
  }

  body.ca-home .hero-kicker {
    margin-bottom: 0.7rem;
    padding: 0.28rem 0.7rem 0.28rem 0.55rem;
    font-size: 0.64rem;
    letter-spacing: 0.08em;
  }

  body.ca-home .hero--cinematic h1,
  body.ca-home .hero h1.hero-title-reveal {
    font-size: clamp(1.72rem, 7.4vw, 2.15rem);
    line-height: 1.12;
    letter-spacing: -0.038em;
    max-width: none;
    margin: 0 0 0.7rem;
  }

  body.ca-home .hero--cinematic .lead,
  body.ca-home .hero .lead {
    display: none;
  }

  body.ca-home .home-mobile-lead {
    display: block;
    margin: 0 0 1.05rem;
    font-size: 1.02rem;
    line-height: 1.5;
    color: var(--ca-text-muted);
    max-width: none;
  }

  body.ca-home .hero-ctas {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
    animation: none;
  }

  body.ca-home .hero-ctas .btn {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    font-size: 1rem;
  }

  body.ca-home .home-mobile-chips {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.4rem;
    margin: 0.85rem 0 0;
  }

  body.ca-home .home-mobile-chips span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.28rem 0.62rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--ca-accent-2);
    background: rgba(20, 184, 166, 0.1);
    border: 1px solid rgba(20, 184, 166, 0.22);
  }

  body.ca-home .hero-visual {
    perspective: none;
    overflow: visible;
  }

  body.ca-home .hero-visual::before {
    display: none;
  }

  body.ca-home .home-phone {
    display: block;
    width: min(100%, 22.5rem);
    margin: 0.15rem auto 0;
  }

  body.ca-home .home-phone__device {
    position: relative;
    border-radius: 2rem;
    padding: 0.55rem 0.5rem 0.7rem;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03) 38%, rgba(0, 0, 0, 0.35)),
      #0b0f16;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
      0 24px 60px rgba(0, 0, 0, 0.55),
      0 0 0 1px rgba(20, 184, 166, 0.12),
      inset 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  body.ca-home .home-phone__notch {
    position: absolute;
    top: 0.7rem;
    left: 50%;
    width: 5.4rem;
    height: 0.72rem;
    transform: translateX(-50%);
    border-radius: 999px;
    background: #05070c;
    z-index: 2;
  }

  body.ca-home .home-phone__screen {
    position: relative;
    overflow: hidden;
    border-radius: 1.45rem;
    min-height: 17.75rem;
    padding: 1.2rem 0.9rem 0.75rem;
    background:
      radial-gradient(ellipse 90% 50% at 20% 0%, rgba(20, 184, 166, 0.2), transparent 55%),
      radial-gradient(ellipse 70% 40% at 90% 10%, rgba(79, 70, 229, 0.16), transparent 50%),
      linear-gradient(180deg, #0a1018 0%, #070b12 100%);
  }

  body.ca-home .home-phone__status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    color: rgba(244, 246, 250, 0.72);
  }

  body.ca-home .home-phone__brand {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
  }

  body.ca-home .home-phone__brand img {
    width: 11px;
    height: 11px;
  }

  body.ca-home .home-phone__greeting {
    margin: 0 0 0.2rem;
    font-size: 1.28rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--ca-text);
    line-height: 1.15;
  }

  body.ca-home .home-phone__sub {
    margin: 0 0 0.85rem;
    font-size: 0.82rem;
    color: var(--ca-text-muted);
    line-height: 1.4;
  }

  body.ca-home .home-phone__live {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.95rem;
    padding: 0.28rem 0.65rem 0.28rem 0.45rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--ca-accent-2);
    background: rgba(20, 184, 166, 0.12);
    border: 1px solid rgba(20, 184, 166, 0.28);
  }

  body.ca-home .home-phone__dot {
    width: 0.42rem;
    height: 0.42rem;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55);
    animation: home-phone-pulse 2.2s ease-out infinite;
  }

  body.ca-home .home-phone__command {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.72rem 0.8rem;
    border-radius: 14px;
    background: rgba(8, 12, 20, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    color: var(--ca-text);
    font-size: 0.82rem;
    font-weight: 500;
  }

  body.ca-home .home-phone__command svg {
    flex-shrink: 0;
    color: var(--ca-accent-2);
  }

  body.ca-home .home-phone__agents {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.45rem;
    margin-bottom: 1rem;
  }

  body.ca-home .home-phone__agent {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.28rem;
    padding: 0.55rem 0.2rem 0.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--ca-text-muted);
  }

  body.ca-home .home-phone__avatar {
    width: 1.85rem;
    height: 1.85rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(20, 184, 166, 0.14);
    font-size: 0.95rem;
  }

  body.ca-home .home-phone__dock {
    display: flex;
    justify-content: space-between;
    padding: 0.45rem 0.7rem;
    border-radius: 16px;
    background: rgba(8, 12, 20, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.ca-home .home-phone__dock span {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
  }

  body.ca-home .home-phone__dock span:first-child {
    background: rgba(20, 184, 166, 0.28);
    border-color: rgba(20, 184, 166, 0.4);
  }

  /* ── Sections ──────────────────────────────────────────── */
  body.ca-home .section,
  body.ca-home .chapter-scroll,
  body.ca-home .pricing-teaser {
    padding: var(--ca-home-section) 0;
  }

  body.ca-home .section::after {
    display: none;
  }

  body.ca-home .section-title,
  body.ca-home .chapter-scroll__intro .section-title,
  body.ca-home .hero--cinematic .section-title {
    font-size: 1.42rem;
    line-height: 1.2;
    letter-spacing: -0.03em;
    max-width: none;
  }

  body.ca-home .section-lede,
  body.ca-home .section-lede--pretty,
  body.ca-home .section-lede--desktop,
  body.ca-home .section-lede--emph {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-top: 0.55rem;
  }

  body.ca-home .eyebrow {
    font-size: 0.68rem;
  }

  /* Workspace: swipeable beats instead of a stacked bento dump */
  body.ca-home .workspace-bento,
  body.ca-home .bento {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.1rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--ca-home-gutter);
    padding-bottom: 0.35rem;
    -webkit-overflow-scrolling: touch;
  }

  body.ca-home .bento-tile,
  body.ca-home .bento-tile.span-6,
  body.ca-home .bento-tile.span-8,
  body.ca-home .bento-tile.span-12 {
    flex: 0 0 min(78%, 16.5rem);
    grid-column: auto;
    scroll-snap-align: start;
    padding: 1.1rem 1rem;
    opacity: 1;
    transform: none;
  }

  body.ca-home .bento-tile:hover {
    transform: none;
  }

  body.ca-home #apps .capability-grid,
  body.ca-home #apps .section-foot-cta,
  body.ca-home #apps p[style] {
    display: none;
  }

  body.ca-home #team-board .shot-frame,
  body.ca-home #team-board .benefit-list {
    display: none;
  }

  body.ca-home #team-board .section-lede {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.ca-home #cloud-browser > .wrap > h3,
  body.ca-home #cloud-browser .table-scroll,
  body.ca-home #cloud-browser .app-grid,
  body.ca-home #cloud-browser .browser-feature-legal,
  body.ca-home #cloud-browser > .wrap > p[style] {
    display: none;
  }

  body.ca-home .home-mobile-compare {
    display: block;
    margin-top: 1.15rem;
  }

  body.ca-home .home-mobile-compare__kicker {
    margin: 0 0 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ca-accent-2);
  }

  body.ca-home .home-mobile-compare__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.65rem;
  }

  body.ca-home .home-mobile-compare__list li {
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--ca-border);
    background: rgba(255, 255, 255, 0.03);
  }

  body.ca-home .home-mobile-compare__list li.is-ca {
    border-color: rgba(20, 184, 166, 0.35);
    background: rgba(20, 184, 166, 0.08);
  }

  body.ca-home .home-mobile-compare__list strong {
    display: block;
    margin-bottom: 0.2rem;
    font-size: 0.92rem;
  }

  body.ca-home .home-mobile-compare__list span {
    font-size: 0.86rem;
    color: var(--ca-text-muted);
    line-height: 1.45;
  }

  /* Video / toolkit */
  body.ca-home .chapter-scroll__intro {
    margin-bottom: 1.15rem;
  }

  body.ca-home .launch-teaser {
    margin-bottom: 1.5rem;
  }

  body.ca-home .chapter-step__visual {
    display: none;
  }

  body.ca-home .chapter-step {
    padding: 1.15rem 0;
  }

  body.ca-home .chapter-step p {
    max-width: none;
    font-size: 0.95rem;
  }

  body.ca-home .toolkit-flow {
    margin-top: 1.25rem !important;
  }

  body.ca-home .flow-steps {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  /* How it works: tighter timeline */
  body.ca-home .how-steps-grid {
    gap: 0.7rem;
    margin-top: 1.1rem;
  }

  body.ca-home .how-steps-card {
    padding: 1rem 1rem 0.95rem;
  }

  body.ca-home .how-steps-card__num {
    font-size: 2.4rem;
  }

  /* Pricing: featured first, swipe the rest */
  body.ca-home .pricing-teaser__grid {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.25rem;
  }

  body.ca-home .pricing-teaser__card {
    flex: 0 0 min(78%, 16.5rem);
    scroll-snap-align: start;
  }

  body.ca-home .pricing-teaser__card--featured {
    order: -1;
  }

  body.ca-home .pricing-teaser__actions {
    flex-direction: column;
    align-items: stretch;
  }

  body.ca-home .pricing-teaser__actions .btn {
    width: 100%;
    min-height: 48px;
  }

  /* Hub: keep the useful six, hide the legal dump */
  body.ca-home .home-hub__card:nth-child(n + 7) {
    display: none;
  }

  body.ca-home .home-hub__grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
  }

  body.ca-home .home-hub__card {
    padding: 0.85rem 0.8rem;
  }

  body.ca-home .ask-ai-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
  }

  body.ca-home .ask-ai-btn {
    width: 100%;
    justify-content: center;
    min-height: 44px;
    font-size: 0.88rem;
    padding: 0.55rem 0.6rem;
  }

  body.ca-home .home-testimonials__grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75rem;
    -webkit-overflow-scrolling: touch;
  }

  body.ca-home .home-testimonial {
    flex: 0 0 min(86%, 18rem);
    scroll-snap-align: start;
  }

  body.ca-home .final-cta {
    margin: 0 0.85rem 1.25rem;
    padding: 1.75rem 1rem 1.85rem;
  }

  body.ca-home .final-cta .hero-ctas {
    width: 100%;
  }

  body.ca-home .diff-grid {
    display: grid;
    gap: 0.75rem;
  }

  body.ca-home .faq-list .faq-question {
    min-height: 48px;
    text-align: left;
  }

  /* Sticky bar becomes one fat thumb target */
  body.ca-home .sticky-cta {
    padding: 0.7rem var(--ca-home-gutter) calc(0.7rem + env(safe-area-inset-bottom, 0px));
  }

  body.ca-home .sticky-cta__text {
    display: none;
  }

  body.ca-home .sticky-cta__inner {
    display: block;
  }

  body.ca-home .sticky-cta .btn {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
  }

  html.has-sticky-cta body.ca-home {
    padding-bottom: 5.1rem;
  }

  body.ca-home .nav-island-wrap {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
  }
}

@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  body.ca-home .home-phone__dot {
    animation: none;
  }
}

@keyframes home-phone-pulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5); }
  70% { box-shadow: 0 0 0 0.45rem rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}
