/* Product and tool pages opt in. The homepage keeps its own experience.
   Light is still and all content is visible until atmosphere.js can enhance it. */
@media screen {
  body.site-atmosphere {
    --ink: #050709;
    --surface: #101820;
    --line: #293744;
    --text: #f0f3f5;
    --body: #c1ccd7;
    --muted: #a0afbd;
    --cyan: #62d9f3;
    background: var(--ink);
  }
  .site-atmosphere.editorial .hero.inner h1 { font-weight: 600; letter-spacing: -.06em; }
  .site-atmosphere.editorial section.moment h2 { font-weight: 600; }
  .site-atmosphere.editorial .art {
    border-color: #526b7d80;
    box-shadow: inset 0 1px #c2e5ff0b, 0 1.75rem 4.5rem #0005;
  }
  .site-atmosphere.editorial .close { background: #091017; }
  /* The Rooms photograph is retained beneath the new light. */
  .site-atmosphere.page-bands .hero {
    background: linear-gradient(90deg, #050709f5 15%, #050709a6 62%, #05070955),
      linear-gradient(0deg, #050709, transparent 70%), url('assets/campaign-studio.webp') center / cover;
  }
  .site-atmosphere .reveal { opacity: 1; transform: none; }
  /* One quiet, reachable control lives with the footer's other utilities. */
  .site-fog-page .atmosphere-controls {
    position: relative;
    display: flex;
    margin: 0;
    min-width: 0;
    max-width: 100%;
  }
  .site-fog-page .atmosphere-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    padding: .5rem .15rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--muted);
    font: inherit;
    text-align: left;
    cursor: pointer;
  }
  .site-fog-page .atmosphere-toggle:hover {
    color: var(--text);
    text-decoration: underline;
    text-underline-offset: .2em;
  }
  .site-fog-page .atmosphere-toggle:focus-visible { outline: 2px solid var(--cyan); outline-offset: 4px; }
  .site-fog-page .atmosphere-toggle [data-atmosphere-label] { min-width: 0; overflow-wrap: anywhere; }
  .site-fog-page .atmosphere-controls[hidden] { display: none !important; }
  .record-polish { --surface: #101820; --line: #293744; --text: #f0f3f5; --body: #c1ccd7; --muted: #a0afbd; --cyan: #62d9f3; }
  .record-polish .page { overflow-wrap: anywhere; }
  .record-polish .page h1 { font-weight: 600; letter-spacing: -.045em; color: var(--text); }
  .record-polish .eyebrow { color: var(--cyan); }
  .record-polish .cta {
    padding: .8rem 1.1rem;
    min-height: 44px;
    border: 1px solid transparent;
    border-radius: .5rem;
    background: #e9f1f6;
    color: #08121c;
  }
  .record-polish .cta.quiet { background: #ffffff04; border-color: #ffffff27; color: var(--text); }
  .record-polish .cta:hover { background: var(--cyan); color: #05131b; }
  .record-polish a:focus-visible { outline-color: var(--cyan); }
  .record-polish .facts li { flex-wrap: wrap; gap: .35rem 1rem; }
  .record-polish .facts :is(span, b) { min-width: 0; max-width: 100%; }
  .record-polish .facts span { flex-basis: min(8.5rem, 100%); }
  /* Enlarged reading text wraps within the existing static shells. */
  .legal-polish .page, .record-polish { overflow-wrap: anywhere; }
  .legal-polish .row > * { min-width: 0; }
  .record-polish :is(header.top, footer) > * { min-width: 0; max-width: 100%; }
  .record-polish .cta { white-space: normal; }
  .legal-polish .work > * { min-width: 0; max-width: 100%; }
  .legal-polish .work :is(input, select, button) { min-width: 0; max-width: 100%; }
  .legal-polish .work button.quiet { margin-left: 0; }
  .legal-polish .work .sheet { width: 100%; padding-inline: min(2rem, 8%); }
  .legal-polish .work .qr > * { min-width: 0; max-width: 100%; }
  .legal-polish .work .qr :is(img, canvas) { max-width: 100%; height: auto; }
  @media (max-width: 46rem) {
    .legal-polish .work { grid-template-columns: minmax(0, 1fr); }
  }
  @media (max-width: 34rem) {
    .legal-polish .row { grid-template-columns: minmax(0, 1fr); }
  }
  body.legal-polish, body.record-polish { background: #050709; }
}

/* A single viewport of air follows the reader through the whole site. The
   original login texture is composited over dark surfaces, with a quiet middle
   for reading. Two bounded bitmaps advect in the same direction, taking turns fading
   through the invisible reset instead of reversing; no frame loop. */
@media screen {
  .site-fog-page { isolation: isolate; }
  .site-fog-page > .wrap { z-index: auto; }
  .site-fog {
    position: fixed;
    inset: 0;
    z-index: 2;
    overflow: hidden;
    contain: strict;
    pointer-events: none;
    user-select: none;
    opacity: .50;
    mix-blend-mode: screen;
  }
  .site-fog::before, .site-fog::after {
    content: '';
    position: absolute;
    inset: -9% -8%;
    pointer-events: none;
    background: url('assets/site-fog.jpg') center / 100% 100% no-repeat;
    mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
    opacity: .8;
    transform: translate3d(-12%, 3%, 0) scale(1.02);
    animation: site-fog-flow 40s linear -9s infinite;
    animation-play-state: paused;
  }
  .site-fog::after {
    opacity: .6;
    transform: translate3d(-12%, -4%, 0) scale(1.04) rotate(180deg);
    animation: site-fog-counterflow 40s linear -29s infinite;
    animation-play-state: paused;
  }
  .fog-motion .site-fog::before, .fog-motion .site-fog::after { animation-play-state: running; }
  @keyframes site-fog-flow {
    0% { opacity: 0; transform: translate3d(-12%, 3%, 0) scale(1.02); }
    20%, 80% { opacity: .8; }
    100% { opacity: 0; transform: translate3d(12%, -3%, 0) scale(1.02); }
  }
  @keyframes site-fog-counterflow {
    0% { opacity: 0; transform: translate3d(-12%, -4%, 0) scale(1.04) rotate(180deg); }
    20%, 80% { opacity: .6; }
    100% { opacity: 0; transform: translate3d(12%, 4%, 0) scale(1.04) rotate(180deg); }
  }
  /* Forms and authored art are intact above the decorative air. */
  .site-fog-page :is(.tool, .native-capture, .art, .ex-workspace, .ex-social-scene, .ex-app-capture, .work) {
    position: relative;
    z-index: 3;
  }
  .site-fog-page :is(.atmosphere-controls, .ex-motion-toggle) { position: relative; z-index: 3; }
  .site-fog-page :is(.atmosphere-controls, .ex-motion-toggle)[hidden] { display: none !important; }
  .site-fog-page:is(.legal-polish, .record-polish) .site-fog { opacity: .20; }
}
@media (prefers-reduced-motion: reduce) {
  .site-fog::before, .site-fog::after { animation: none !important; }
  .site-fog-page :is(.atmosphere-controls, .ex-motion-toggle) { display: none !important; }
}
@media print {
  .site-fog, .site-fog-page :is(.atmosphere-controls, .ex-motion-toggle) { display: none !important; }
  .site-fog-page, .site-fog-page * { animation: none !important; transition: none !important; }
}
