/* =========================================================================
   Social Stardom — Mobile fixes
   -----------------------------------------------------------------------
   Loaded AFTER patch.css. Only targets mobile/tablet viewports.
   Goals:
     1. Stop the floating topbar from clipping the next section heading.
     2. Reduce the noise-section pin/blank-state so it does not leave a
        giant black gap before the services section.
     3. Hero pin behavior: freeze on first view, scroll naturally on the
        way down, and do NOT re-pin on the way up.
     4. Compact spacing, fonts, paddings across the homepage and other
        pages on phones.
     5. Mobile slide-in services panel (driven by JS toggling
        body.svc-mobile-stage-open).
     6. Bottom-bar quick navigation for /services/ once the user has
        scrolled past the hub menu (driven by JS class
        body.svc-hub-bottombar-on).
   IMPORTANT: do NOT change desktop. Every rule lives inside a media
   query of at most 900px (or 760px / 540px) so desktop layout is
   preserved exactly as it was.
   ========================================================================= */

/* ---------- 1. Floating topbar should not clip section headings ---------- */
@media (max-width: 900px) {
  /* Anchor scroll-margins so any in-page jump never lands behind the bar. */
  #noise,
  #services,
  #method,
  #process,
  #manifesto,
  #contact,
  #all-services,
  #services-grid,
  #system,
  #brief {
    scroll-margin-top: 96px;
  }
}

/* ---------- 2. Kill the giant blank gap after the noise section --------- */
@media (max-width: 900px) {
  /* Force the noise section to flow naturally on mobile instead of pinning
     a 280vh tall section. The chip cloud + copy fit cleanly at viewport
     height so no pin is required to read it. */
  #noise {
    min-height: 0 !important;
    height: auto !important;
    padding: 64px 0 56px !important;
  }

  #noise .noise-sticky {
    position: relative !important;
    top: auto !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
  }

  #noise .noise-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  /* Tighten copy block so heading is fully visible on first read. */
  #noise .noise-copy-l .h1 {
    font-size: 32px !important;
    line-height: 1.05 !important;
    margin-top: 12px !important;
    max-width: 24ch;
  }

  #noise .noise-copy-l .lead,
  #noise .noise-copy-l p.lead {
    font-size: 15px !important;
    line-height: 1.55 !important;
    margin-top: 14px !important;
  }

  #noise .noise-stats {
    gap: 14px !important;
    margin-top: 22px !important;
  }

  #noise .noise-stats .h2 {
    font-size: 26px !important;
  }

  /* Chip cloud: keep visible but compact. The default desktop layout
     has chips floating in 3D space; on mobile we make it a
     simple wrap-row so all chips fit, smaller pills so the section
     does not eat half the viewport. */
  #noise .chip-cloud {
    position: relative !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    padding: 2px 0 !important;
    perspective: none !important;
    transform: none !important;
  }

  #noise .chip-cloud .s-chip {
    position: relative !important;
    transform: none !important;
    inset: auto !important;
    top: auto !important;
    left: auto !important;
    margin: 0 !important;
    padding: 6px 11px !important;
    font-size: 9.5px !important;
    line-height: 1 !important;
    letter-spacing: 0.08em !important;
    border-radius: 999px !important;
  }

  #noise .noise-callout {
    position: relative !important;
    inset: auto !important;
    bottom: auto !important;
    transform: none !important;
    margin-top: 18px !important;
    padding: 14px !important;
  }

  #noise .noise-callout .h3 {
    font-size: 18px !important;
    line-height: 1.25 !important;
  }
}

/* ---------- 3. Hero copy compactness on mobile ---------------------------
   The hero stays pinned (height: 620vh) on every viewport so the face
   frame scrub plays through to its last frame before the user is allowed
   to scroll past. We only adjust the overlay typography for phones; we
   do NOT touch the height or sticky positioning. */
@media (max-width: 900px) {
  #hero .hero-overlay {
    padding: 18px 18px 28px !important;
  }

  #hero .hero-overlay .h-display.hero-headline {
    font-size: 44px !important;
    line-height: 1 !important;
    letter-spacing: -0.035em !important;
  }

  #hero .hero-overlay .lead.hero-sub {
    font-size: 15px !important;
    line-height: 1.5 !important;
    max-width: 38ch;
  }

  #hero .hero-overlay .eyebrow {
    font-size: 10px !important;
    letter-spacing: 0.16em !important;
  }

  #hero .hero-ctas {
    gap: 8px !important;
    margin-top: 18px !important;
  }
}

/* ---------- 4. Compact homepage spacing on mobile ------------------------ */
@media (max-width: 900px) {
  /* Section paddings: bring everything tighter on a phone. */
  section,
  .svc-switch-section,
  #manifesto,
  #contact {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .container {
    padding-left: 18px !important;
    padding-right: 18px !important;
  }

  .svc-switch-section {
    padding: 48px 0 56px !important;
  }

  .svc-switch-section .svc-head .h1 {
    font-size: 32px !important;
    line-height: 1.05 !important;
    max-width: 22ch;
  }

  .svc-switch-section .svc-head .lead {
    font-size: 14px !important;
    margin-top: 10px !important;
  }

  /* Method section */
  #method {
    padding: 56px 0 !important;
  }

  #method .h1 {
    font-size: 30px !important;
    line-height: 1.05 !important;
    max-width: 22ch;
  }

  #method .method-toggle {
    flex-wrap: wrap;
    gap: 6px !important;
  }

  #method .method-metrics {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  #method .method-metrics .metric {
    padding: 14px !important;
  }

  #method .method-metrics .metric-v {
    font-size: 26px !important;
  }

  #method .method-modules {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  /* Process section */
  #process .proc-shell {
    padding: 24px 0 !important;
  }

  #process .h1 {
    font-size: 30px !important;
    line-height: 1.05 !important;
  }

  #process .proc-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  #process .proc-card {
    padding: 18px !important;
  }

  /* Manifesto */
  #manifesto {
    padding: 48px 0 !important;
  }

  #manifesto .manifesto-body.p-med {
    font-size: 22px !important;
    line-height: 1.25 !important;
  }

  /* Ready-to-grow mobile layout is now handled in /assets/rtg-mwg4.css. */

  /* Contact section */
  #contact {
    padding: 56px 0 64px !important;
  }

  #contact .contact-wrap {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  #contact .h-display {
    font-size: 36px !important;
    line-height: 1 !important;
  }

  #contact .lead {
    font-size: 15px !important;
  }

  #contact .contact-form {
    padding: 18px !important;
  }

  /* Footer */
  .footer .footer-inner {
    padding: 36px 18px 18px !important;
  }

  .footer .footer-top {
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .footer .footer-cols {
    grid-template-columns: 1fr 1fr !important;
    gap: 24px 18px !important;
  }

  .footer .footer-tag {
    font-size: 14px !important;
  }

  .footer .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 12px !important;
  }
}

/* ---------- 5. Mobile slide-in services switchboard ----------------------
   Pattern: show the list. On tap, fade-out list, fade-in detail card.
   On back, reverse. Uses display + opacity (not transform/absolute) so
   layout heights are always correct on mobile. */
@media (max-width: 900px) {
  .svc-switchboard {
    position: relative;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  /* Default: list visible, stage hidden. */
  body:not(.svc-mobile-stage-open) .svc-switchboard .svc-stage {
    display: none !important;
  }
  body:not(.svc-mobile-stage-open) .svc-switchboard .svc-index {
    display: grid !important;
    animation: ssSvcFade 0.25s ease;
  }

  /* Open: stage visible, list hidden. */
  body.svc-mobile-stage-open .svc-switchboard .svc-index {
    display: none !important;
  }
  body.svc-mobile-stage-open .svc-switchboard .svc-stage {
    display: block !important;
    animation: ssSvcSlide 0.3s ease;
  }

  @keyframes ssSvcFade {
    from { opacity: 0; transform: translateX(-12%); }
    to   { opacity: 1; transform: translateX(0); }
  }
  @keyframes ssSvcSlide {
    from { opacity: 0; transform: translateX(20%); }
    to   { opacity: 1; transform: translateX(0); }
  }

  /* Make sure non-active detail cards stay hidden, only the active one
     fills the stage on mobile. */
  .svc-detail-stack { position: relative; }
  .svc-detail-card {
    display: none !important;
  }
  .svc-detail-card.is-active {
    display: grid !important;
    position: relative !important;
    opacity: 1 !important;
    pointer-events: auto !important;
  }

  /* Back-to-list button (injected by JS as first child of .svc-stage).
     Now a small circular icon button with bigger top spacing. */
  .svc-mobile-back {
    display: none;
  }
  body.svc-mobile-stage-open .svc-mobile-back {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 8px 0 22px;
    padding: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(243, 240, 232, 0.18);
    border-radius: 50%;
    background: rgba(243, 240, 232, 0.04);
    color: var(--fg-0, #f3f0e8);
    cursor: pointer;
    line-height: 1;
  }
  .svc-mobile-back-arrow {
    font-size: 18px;
    line-height: 1;
    font-family: var(--sans, "Inter Tight", sans-serif);
  }
  .sr-only {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
  }

  /* Compact the service list rows. Replace right-side stat with an
     arrow chevron so the list reads as tappable. */
  .svc-switch-item {
    padding: 11px 14px !important;
    min-height: 0 !important;
    grid-template-columns: 32px minmax(0, 1fr) 22px !important;
    gap: 10px !important;
    align-items: center !important;
  }
  .svc-switch-num {
    font-size: 10px !important;
    letter-spacing: 0.14em !important;
  }
  .svc-switch-title {
    font-size: 14.5px !important;
    font-weight: 500 !important;
  }
  .svc-switch-stat {
    /* Hide the stat text and replace with a chevron arrow indicator. */
    font-size: 0 !important;
    color: transparent !important;
    width: 22px; height: 22px;
    position: relative;
  }
  .svc-switch-stat::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 8px; height: 8px;
    border-top: 1.5px solid currentColor;
    border-right: 1.5px solid currentColor;
    transform: rotate(45deg);
    color: var(--fg-1, #b9b6ae);
    opacity: 0.55;
  }
  .svc-switch-item.is-active .svc-switch-stat::before {
    opacity: 1;
    color: var(--lime, #ff6a00);
  }

  /* Detail card itself: tighter padding, clean minimal art block,
     full-width wrapping title, compact blurb. */
  .svc-detail-card {
    padding: 14px !important;
    grid-template-rows: auto auto !important;
    gap: 12px !important;
  }
  /* Hide the busy desktop SVG and replace the art block with a clean
     minimal motif: a centered glowing brand star on a card-color
     gradient. The motif is identical for all 9 services so the look
     stays consistent on mobile. */
  .svc-detail-art {
    position: relative !important;
    height: 90px !important;
    overflow: hidden !important;
    border-radius: 12px;
    background:
      radial-gradient(circle at 50% 50%, rgba(255, 106, 0, 0.18) 0%, rgba(255, 106, 0, 0) 60%),
      linear-gradient(140deg, rgba(243, 240, 232, 0.05), rgba(243, 240, 232, 0.0));
    border: 1px solid rgba(243, 240, 232, 0.08);
  }
  .svc-detail-art > svg {
    display: none !important;
  }
  .svc-detail-art::before {
    content: '';
    position: absolute;
    inset: 0;
    margin: auto;
    width: 38px;
    height: 38px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g transform='translate(50 50)'><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%23ff6a00'/><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%23ff6a00' transform='rotate(45)'/><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%23ff6a00' transform='rotate(90)'/><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%23ff6a00' transform='rotate(135)'/></g></svg>");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    filter: drop-shadow(0 0 14px rgba(255, 106, 0, 0.6));
    animation: ssArtPulse 4.5s ease-in-out infinite;
  }
  /* Light skin (bone) cards swap glow for a darker contrast halo. */
  .svc-bone .svc-detail-art {
    background:
      radial-gradient(circle at 50% 50%, rgba(14, 15, 16, 0.16) 0%, rgba(14, 15, 16, 0) 60%),
      linear-gradient(140deg, rgba(14, 15, 16, 0.05), rgba(14, 15, 16, 0));
    border-color: rgba(14, 15, 16, 0.12);
  }
  .svc-bone .svc-detail-art::before {
    filter: drop-shadow(0 0 12px rgba(14, 15, 16, 0.45));
  }
  /* Lime skin uses ink-on-lime for visibility. */
  .svc-lime .svc-detail-art::before {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><g transform='translate(50 50)'><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%230e0f10'/><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%230e0f10' transform='rotate(45)'/><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%230e0f10' transform='rotate(90)'/><rect x='-7' y='-48' width='14' height='96' rx='2' fill='%230e0f10' transform='rotate(135)'/></g></svg>");
    filter: drop-shadow(0 0 12px rgba(14, 15, 16, 0.4));
  }
  @keyframes ssArtPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.92; }
    50%      { transform: scale(1.12) rotate(45deg); opacity: 1; }
  }
  .svc-detail-top {
    margin-bottom: 4px !important;
  }
  .svc-detail-title {
    font-size: 22px !important;
    line-height: 1.05 !important;
    margin: 0 0 8px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: 100% !important;
    display: block !important;
    word-break: normal;
    hyphens: none;
  }
  .svc-detail-blurb {
    font-size: 13.5px !important;
    line-height: 1.4 !important;
    margin: 0 0 10px !important;
  }
  .svc-detail-points {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 6px 8px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .svc-detail-points li {
    font-size: 11.5px !important;
    line-height: 1.2 !important;
    padding: 8px 10px !important;
    border-radius: 999px !important;
    background: rgba(243, 240, 232, 0.05);
    border: 1px solid rgba(243, 240, 232, 0.1);
    text-align: center;
  }
  /* Hide the redundant single-stat block at the bottom of the detail
     card on mobile — it duplicates info already on the list. */
  .svc-detail-stat,
  .svc-detail-chip {
    display: none !important;
  }
  .svc-detail-bottom {
    display: block !important;
    flex-direction: column !important;
    margin-top: 4px !important;
  }

  .svc-stage-orbit,
  .svc-stage-scan {
    display: none !important;
  }

  /* Hide the duplicate fallback grid on mobile - the switchboard is
     the only services UI we want. */
  .svc-grid {
    display: none !important;
  }
}

/* ---------- 6. Services hub bottom-bar nav --------------------------------
   On /services/ the 9-card grid is too tall on a phone. After the user
   scrolls past it, JS toggles body.svc-hub-bottombar-on which reveals a
   bottom-bar with quick links to every service. The bar disappears when
   the user scrolls back up to the hero. */
.svc-hub-bottombar {
  display: none;
}

@media (max-width: 900px) {
  .services-shell .svc-hub-bottombar {
    display: flex;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 12px;
    z-index: 60;
    padding: 8px;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: rgba(14, 15, 16, 0.92);
    border: 1px solid rgba(243, 240, 232, 0.12);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    transform: translateY(calc(100% + 24px));
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s ease, opacity 0.25s ease;
  }

  .services-shell .svc-hub-bottombar::-webkit-scrollbar {
    display: none;
  }

  body.svc-hub-bottombar-on .services-shell .svc-hub-bottombar {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .svc-hub-bottombar a {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    padding: 9px 13px;
    border-radius: 999px;
    background: rgba(243, 240, 232, 0.06);
    border: 1px solid rgba(243, 240, 232, 0.1);
    color: var(--fg-0, #f3f0e8);
    font-family: var(--mono, "Geist Mono", monospace);
    font-size: 10px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
  }

  .svc-hub-bottombar a.is-current {
    background: var(--lime, #ff6a00);
    color: #0e0f10;
    border-color: var(--lime, #ff6a00);
  }

  /* Mobile compactness for the services hub bento grid */
  .service-bento-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .bento-card {
    padding: 18px !important;
    min-height: 220px !important;
  }

  .bento-stage {
    height: 130px !important;
  }

  .bento-card h3 {
    font-size: 22px !important;
    line-height: 1.1 !important;
  }

  .bento-card p {
    font-size: 13px !important;
  }

  .bento-foot span {
    font-size: 10px !important;
    padding: 5px 9px !important;
  }
}

/* ---------- 7. Services / company / start-a-project mobile compactness -- */
@media (max-width: 900px) {
  .page-hero,
  .start-hero,
  .company-hero {
    padding: 92px 0 36px !important;
  }

  .hero-grid,
  .company-grid,
  .service-detail-grid {
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .hero-title,
  .company-title,
  .start-title {
    font-size: 38px !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
  }

  .hero-lead,
  .company-lead,
  .start-lead {
    font-size: 15px !important;
    line-height: 1.55 !important;
  }

  .page-section {
    padding: 40px 0 !important;
  }

  .section-title {
    font-size: 26px !important;
    line-height: 1.1 !important;
  }

  .section-lead {
    font-size: 14px !important;
  }

  .section-grid.cols-2,
  .section-grid.cols-3 {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .detail-card {
    padding: 16px !important;
  }

  .detail-card h3 {
    font-size: 18px !important;
  }

  .detail-card p {
    font-size: 14px !important;
  }

  .timeline {
    gap: 12px !important;
  }

  .timeline-step {
    grid-template-columns: 36px 1fr !important;
    gap: 10px !important;
    padding: 14px !important;
  }

  /* Start-a-project form chip grid */
  .service-chip-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .service-pick {
    font-size: 12px !important;
    padding: 10px 12px !important;
    min-height: 44px !important;
  }

  .choice-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  .choice {
    font-size: 12px !important;
    padding: 10px 12px !important;
  }

  .brief-form {
    gap: 14px !important;
  }

  .brief-fieldset legend {
    font-size: 12px !important;
  }

  .brief-form .field input,
  .brief-form .field textarea,
  .brief-form .field select {
    font-size: 15px !important;
    padding: 12px 14px !important;
  }

  .submit-brief {
    font-size: 14px !important;
    padding: 16px !important;
  }
}

/* ---------- 8. Method page mobile -------------------------------------- */
@media (max-width: 900px) {
  .m-bar {
    padding: 10px 14px !important;
  }

  .m-nav {
    display: none !important;
  }

  .m-display {
    font-size: 44px !important;
    line-height: 1 !important;
  }

  .m-h1 {
    font-size: 28px !important;
    line-height: 1.1 !important;
  }

  .m-lead {
    font-size: 15px !important;
  }

  .m-stats {
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
  }

  .m-stats b {
    font-size: 22px !important;
  }

  .m-prin-row,
  .m-pillars,
  .m-week,
  .m-stand-grid,
  .m-ai-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .m-prin-card,
  .m-pillar,
  .m-day,
  .m-ai-col {
    padding: 16px !important;
  }

  .m-pillar h3 {
    font-size: 18px !important;
  }
}

/* ---------- 9. Topbar replaced by floating star orb on mobile ---------- */
@media (max-width: 900px) {
  /* Hide the existing fixed topbars across all routes on mobile. The
     floating star orb (.ss-orb) handles navigation instead. */
  .topbar,
  .cp-topbar,
  .m-bar {
    display: none !important;
  }
}

/* Floating star orb (mobile only). Sits top-right, glows lime, taps open
   the drawer mega menu. */
.ss-orb { display: none; }

@media (max-width: 900px) {
  .ss-orb {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 100;
    width: 56px;
    height: 56px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(14, 15, 16, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 106, 0, 0.5);
    box-shadow:
      0 0 0 1px rgba(255, 106, 0, 0.18),
      0 0 24px rgba(255, 106, 0, 0.4),
      0 8px 28px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    padding: 0;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: ssOrbPulse 3.4s ease-in-out infinite;
  }
  .ss-orb:active { transform: scale(0.92); }
  .ss-orb-star {
    width: 26px;
    height: 26px;
    display: block;
    transition: transform 0.4s ease, opacity 0.2s ease;
    filter: drop-shadow(0 0 10px rgba(255, 106, 0, 0.65));
  }
  .ss-orb-star svg { width: 100%; height: 100%; }
  .ss-orb-bars {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
  }
  .ss-orb-bars i {
    width: 18px; height: 2px;
    background: var(--lime, #ff6a00);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  body.ss-drawer-open .ss-orb {
    background: rgba(14, 15, 16, 0.96);
    animation: none;
  }
  body.ss-drawer-open .ss-orb-star {
    transform: rotate(135deg) scale(0.5);
    opacity: 0;
  }
  body.ss-drawer-open .ss-orb-bars {
    opacity: 1;
  }
  body.ss-drawer-open .ss-orb-bars i:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.ss-drawer-open .ss-orb-bars i:nth-child(2) {
    opacity: 0;
  }
  body.ss-drawer-open .ss-orb-bars i:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  @keyframes ssOrbPulse {
    0%, 100% {
      box-shadow:
        0 0 0 1px rgba(255, 106, 0, 0.18),
        0 0 24px rgba(255, 106, 0, 0.4),
        0 8px 28px rgba(0, 0, 0, 0.5);
    }
    50% {
      box-shadow:
        0 0 0 1px rgba(255, 106, 0, 0.32),
        0 0 38px rgba(255, 106, 0, 0.65),
        0 8px 28px rgba(0, 0, 0, 0.5);
    }
  }

  /* The drawer */
  .ss-drawer {
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(14, 15, 16, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    opacity: 0;
    transform: translateY(-12px);
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    padding: 88px 18px 36px;
  }
  body.ss-drawer-open .ss-drawer {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  body.ss-drawer-open {
    overflow: hidden !important;
  }
  .ss-drawer-inner {
    max-width: 720px;
    margin: 0 auto;
  }
  .ss-drawer-head {
    border-bottom: 1px solid rgba(243, 240, 232, 0.1);
    padding-bottom: 20px;
    margin-bottom: 22px;
  }
  .ss-drawer-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--fg-0, #f3f0e8);
    text-decoration: none;
    font-family: var(--sans, "Inter Tight", sans-serif);
    font-weight: 600;
    font-size: 18px;
  }
  .ss-drawer-star {
    width: 22px; height: 22px; display: inline-block;
    filter: drop-shadow(0 0 10px rgba(255,106,0,0.5));
  }
  .ss-drawer-star svg { width: 100%; height: 100%; }
  .ss-drawer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .ss-drawer-col-h {
    font-family: var(--mono, "Geist Mono", monospace);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--lime, #ff6a00);
    margin: 0 0 12px;
  }
  .ss-drawer-col a {
    display: block;
    padding: 11px 0;
    color: var(--fg-0, #f3f0e8);
    text-decoration: none;
    font-family: var(--sans, "Inter Tight", sans-serif);
    font-size: 17px;
    font-weight: 500;
    border-bottom: 1px solid rgba(243, 240, 232, 0.06);
  }
  .ss-drawer-col a:active {
    color: var(--lime, #ff6a00);
  }
  .ss-drawer-col a.ss-drawer-all {
    color: var(--lime, #ff6a00);
    margin-top: 6px;
  }
  .ss-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 28px 0 8px;
    padding: 18px 24px;
    background: var(--lime, #ff6a00);
    color: var(--ink-0, #0e0f10) !important;
    border-radius: 999px;
    font-family: var(--mono, "Geist Mono", monospace);
    font-size: 13px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    text-decoration: none;
    font-weight: 700;
  }
}

/* ---------- 10. Hide footer offices on small screens (already removed
                  globally by patch.css, but kept for safety) ------------- */
@media (max-width: 900px) {
  .footer-offices {
    display: none !important;
  }

  .footer-subscribe {
    margin-top: 8px;
  }
}

/* ---------- 11. Compact service page cards on mobile -------------------
   The service detail hero card, stats row, detail-cards, and the hub
   bento cards all have too much vertical spacing / oversized titles on
   small screens. This section tightens everything without touching
   desktop layout (all rules are inside ≤900px).
   ======================================================================== */
@media (max-width: 900px) {

  /* --- Hero card (the large card on each service detail page) --- */
  .services-shell .hero-card {
    min-height: 0 !important;
    padding: 14px !important;
  }

  .services-shell .hero-card .svc-art {
    height: 100px !important;
    margin: 8px 0 !important;
  }

  /* Smaller card title — it is inside a card, not a page heading */
  .services-shell .hero-card .svc-title {
    font-size: 20px !important;
    line-height: 1.1 !important;
    letter-spacing: -0.025em !important;
    margin-bottom: 6px !important;
  }

  .services-shell .hero-card .svc-blurb {
    font-size: 13px !important;
    line-height: 1.45 !important;
    margin-bottom: 10px !important;
  }

  /* --- Stat row: lay the 3 stats out side-by-side on one row --- */
  .services-shell .hero-stat-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    margin-top: 10px !important;
  }

  .services-shell .hero-stat {
    flex: 1 1 0 !important;
    padding: 8px 10px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    min-width: 0 !important;
  }

  .services-shell .hero-stat .value {
    font-size: 18px !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
  }

  .services-shell .hero-stat .label {
    font-size: 9px !important;
    letter-spacing: 0.12em !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
  }

  /* --- detail-cards (the "What changes / What we build / Why it works" cards) --- */
  .services-shell .detail-card {
    padding: 14px 16px !important;
    border-radius: 16px !important;
  }

  .services-shell .detail-card h3,
  .services-shell .detail-card h4 {
    font-size: 16px !important;
    line-height: 1.15 !important;
    margin-bottom: 6px !important;
  }

  .services-shell .detail-card p {
    font-size: 13px !important;
    line-height: 1.5 !important;
  }

  .services-shell .detail-card .tiny {
    margin-bottom: 6px !important;
    font-size: 9px !important;
  }

  /* --- section-grid: stack to single column but with tighter gap --- */
  .services-shell .section-grid.cols-3,
  .services-shell .section-grid.cols-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  /* Hub sequence (3 "first / then / then" cards) — stack on mobile */
  .services-shell .hub-sequence {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .services-shell .hub-sequence .detail-card {
    min-height: 0 !important;
  }

  /* --- Timeline steps: tighter --- */
  .services-shell .timeline-step {
    grid-template-columns: 40px minmax(0, 1fr) !important;
    gap: 10px !important;
    padding: 12px 0 !important;
  }

  .services-shell .timeline-step h4 {
    font-size: 15px !important;
    margin-bottom: 4px !important;
  }

  .services-shell .timeline-step p {
    font-size: 13px !important;
    line-height: 1.45 !important;
  }

  /* --- Service footer band (CTA block at bottom of each detail page) --- */
  .services-shell .service-footer-band {
    padding: 16px !important;
    border-radius: 18px !important;
    margin-top: 16px !important;
  }

  /* --- Page sections: reduce block padding on service pages --- */
  .services-shell .page-section {
    padding: 32px 0 !important;
  }

  .services-shell .section-head {
    margin-bottom: 16px !important;
    gap: 8px !important;
  }

  .services-shell .section-title {
    font-size: 22px !important;
    line-height: 1.1 !important;
  }

  .services-shell .section-lead {
    font-size: 13.5px !important;
    line-height: 1.5 !important;
  }

  /* Hero panel inner: less padding */
  .services-shell .hero-panel {
    min-height: 0 !important;
    border-radius: 20px !important;
  }

  .services-shell .hero-panel-inner {
    padding: 14px !important;
    gap: 12px !important;
  }

  /* svc-top row inside the hero card */
  .services-shell .svc-top {
    margin-bottom: 6px !important;
  }
}
