/* Responsive reading experience for the live organization release.
   The illustrated desktop rooms remain unchanged above 1024px. */
@media (max-width: 1024px) {
  :root { --gutter: clamp(16px, 3vw, 28px); }
  html { scroll-padding-top: 110px; }
  body { min-width: 0; overflow-x: hidden; }
  .site-header,
  body:has(main > .scene) .site-header,
  body:has(.page-thought-cloud) .site-header,
  body:has(.contact-thought-cloud) .site-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
    padding: 8px var(--gutter) 5px;
    min-height: 0;
    position: sticky;
    top: 0;
    z-index: 50;
    background: #f4f1fa;
  }
  .site-brand { font-size: clamp(1rem, 2.4vw, 1.2rem); }
  .site-nav {
    width: 100%;
    min-width: 0;
    display: flex;
    flex-wrap: nowrap;
    gap: 6px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    font-size: .875rem;
  }
  .site-nav a {
    flex: 0 0 auto;
    min-height: 44px;
    white-space: nowrap;
    padding: 8px 10px;
    scroll-snap-align: start;
  }
  .site-nav-cta { padding: 8px 13px !important; }
  body:has(main > .scene),
  body:has(.page-thought-cloud),
  body:has(.contact-thought-cloud) {
    display: block;
    height: auto;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
  }
  body:has(main > .scene) main,
  body:has(.page-thought-cloud) main,
  body:has(.contact-thought-cloud) main {
    position: relative;
    display: block;
    width: 100%;
    min-height: 0;
    overflow: visible;
  }
  body:has(main > .scene) main > .scene,
  main > .scene {
    position: relative;
    inset: auto;
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 0;
    overflow: visible;
    container-type: normal;
  }
  main > .scene .scene-plane {
    position: relative;
    inset: auto;
    top: auto;
    left: auto;
    transform: none;
    width: 100%;
    height: auto;
    aspect-ratio: var(--scene-w) / var(--scene-h);
    overflow: hidden;
  }
  main > .scene .scene-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    visibility: visible !important;
  }
  main > .scene :is(.scene-rive, .scene-hits, .scene-steward, .steward-scene-caption, .scene-ui, .it-environment, .scene-vector) {
    display: none !important;
  }
  .room-semantic-content { position: relative; z-index: 1; background: #f8f6fc; }
  .room-semantic-content > :is(h1, h2) { margin: 0; padding: 20px var(--gutter) 0; }
  .room-reading {
    position: relative !important;
    inset: auto !important;
    width: 100%;
    max-width: none;
    margin: 0;
  }
  .room-reading > summary {
    margin: 18px var(--gutter);
    min-height: 44px;
  }
  .room-reading[open] > summary { display: none; }
  .room-reading-body {
    position: relative !important;
    inset: auto !important;
    width: min(100%, 960px);
    max-height: none !important;
    overflow: visible;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: 0 auto;
    padding: clamp(22px, 5vw, 48px) var(--gutter) 48px;
  }
  .room-reading-body > .cloud-close { display: none; }
  .steward-background { display: none !important; }
  body:has(.page-thought-cloud) .site-footer,
  body:has(.contact-thought-cloud) .site-footer,
  body:has(main > .scene) .site-footer {
    display: block;
    position: relative;
    margin: 0;
  }
  .page-thought-cloud,
  body:has(.steward-background) .page-thought-cloud {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    left: auto;
    width: min(100% - 2 * var(--gutter), 900px);
    max-width: none;
    margin: 24px auto 48px;
    padding: clamp(24px, 5vw, 48px);
    border-radius: 20px;
    box-shadow: 0 8px 28px #25184912;
  }
  .page-thought-cloud .cloud-close,
  .page-thought-cloud .cloud-pages { display: none; }
  .page-thought-cloud .cloud-return { display: inline-flex; margin-bottom: 14px; }
  .page-cloud-body {
    width: 100%;
    max-height: none !important;
    overflow: visible;
    padding: 0;
  }
  .page-cloud-body > section[hidden] { display: block !important; }
  .page-cloud-body > section {
    padding: 20px 0;
    border-bottom: 1px solid var(--lavender);
  }
  .page-cloud-body > section:first-child { padding-top: 0; }
  .page-cloud-body > section:last-child { border-bottom: 0; }
  .page-cloud-body > section > h2 { font-size: clamp(1.2rem, 3vw, 1.6rem); }
  .page-cloud-body > section[id^="reading-"] > h2 { display: none; }
  body:has(.steward-background) .contact-thought-cloud,
  .contact-thought-cloud {
    position: relative;
    inset: auto;
    top: auto;
    right: auto;
    left: auto;
    width: min(100% - 2 * var(--gutter), 760px);
    max-width: none;
    margin: 24px auto 48px;
    padding: clamp(24px, 5vw, 48px);
    border-radius: 20px;
    box-shadow: 0 8px 28px #25184912;
  }
  .contact-thought-cloud .cloud-close { display: none; }
  .contact-cloud-content {
    width: 100%;
    max-height: none !important;
    padding: 0;
    overflow: visible;
  }
  .contact-layout { display: block; }
  .inquiry-form { width: 100%; max-width: none; }
  .field :is(input, select, textarea) { max-width: 100%; }
  .thought-cloud::before, .thought-cloud::after { display: none; }
  .mobile-paths {
    width: min(100% - 2 * var(--gutter), 1100px);
    margin: 0 auto;
    padding: 28px 0 48px;
  }
  .mobile-paths h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-bottom: 10px; }
  .mobile-paths > p { max-width: 64ch; color: var(--muted); }
  .mobile-path-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 24px 0; }
  .mobile-path-card {
    display: block;
    min-height: 160px;
    padding: 22px;
    color: var(--ink);
    text-decoration: none;
    background: #fff;
    border: 1px solid var(--lavender-deep);
    border-radius: 18px;
    box-shadow: 0 7px 22px #25184910;
  }
  .mobile-path-card strong { display: block; color: var(--purple-deep); font: 700 1.25rem/1.25 var(--font-body); margin-bottom: 10px; }
  .mobile-path-card span { display: block; line-height: 1.5; }
  .mobile-path-card::after { content: "Explore →"; display: block; color: var(--purple); font-weight: 700; margin-top: 16px; }
  .mobile-path-card:is(:hover, :focus-visible) { border-color: var(--purple); box-shadow: 0 10px 25px #25184924; }
  .mobile-path-links { display: flex; flex-wrap: wrap; gap: 14px 22px; }
  .mobile-path-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 700; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .site-nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 0 10px;
    overflow: visible;
  }
  .site-nav a { padding: 5px 8px; }
}
@media (max-width: 640px) {
  .mobile-path-grid { grid-template-columns: 1fr; }
  .mobile-path-card { min-height: 0; padding: 18px; }
  .page-thought-cloud, .contact-thought-cloud { margin-top: 16px; margin-bottom: 32px; }
}
