/* Quiet Atlas — one continuous artwork, with native text and navigation. */
@media (max-width: 800px) {
  html[data-world="home"],
  body[data-world="home"] {
    background: #29283d;
  }

  #home-view {
    --atlas-width: min(100vw, 520px);
    --atlas-inset: 6.5%;
    width: 100%;
    max-width: 520px;
    height: 100svh;
    min-height: max(640px, calc(var(--atlas-width) * 1.68));
    margin: 0 auto;
    padding: 0;
    display: block;
    position: relative;
    isolation: isolate;
    overflow: visible;
    background: #29283d;
  }

  #home-view::before,
  #home-view::after,
  #home-view .home-intro::before,
  #home-view .home-intro::after {
    display: none;
    content: none;
  }

  #home-view .mobile-atlas-art {
    display: block;
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
    z-index: 0;
    pointer-events: none;
    user-select: none;
  }

  #home-view .mobile-atlas-art img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: fill;
  }

  #home-view .header-rule,
  #home-view .atlas-mark,
  #home-view .home-book,
  #home-view .atlas-illustration,
  #home-view .home-eyebrow,
  #home-view .mobile-index,
  #home-view .mobile-contact-art,
  #home-view .mobile-reading,
  #home-view .home-art {
    display: none;
  }

  #home-view .home-header {
    position: absolute;
    top: max(2.4%, env(safe-area-inset-top));
    left: var(--atlas-inset);
    right: 5%;
    min-height: 44px;
    height: auto;
    width: auto;
    margin: 0;
    padding: 0;
    gap: 12px;
    z-index: 3;
  }

  #home-view .wordmark {
    font: 500 clamp(27px, calc(var(--atlas-width) * .069), 36px)/1 var(--serif);
    letter-spacing: 3px;
    color: #f1edf0;
  }

  #home-view .menu-button {
    display: inline-flex;
    width: 44px;
    height: 44px;
    margin: 0 -5px 0 auto;
    color: #e4e0e9;
  }

  #home-view .menu-button svg {
    width: 29px;
    height: 25px;
  }

  #home-view .home-stage {
    position: absolute;
    inset: 0;
    display: block;
    width: auto;
    min-height: 0;
    padding: 0;
    margin: 0;
    pointer-events: none;
    z-index: 1;
  }

  #home-view .home-intro {
    position: absolute;
    top: 11.7%;
    left: var(--atlas-inset);
    width: 49%;
    min-height: 0;
    margin: 0;
    padding: 0;
  }

  #home-view h1 {
    position: static;
    width: 100%;
    max-width: none;
    margin: 0;
    text-align: left;
    text-indent: 0;
    font: 500 clamp(36px, calc(var(--atlas-width) * .112), 59px)/.92 var(--serif);
    letter-spacing: -1.1px;
    color: #f1eef1;
    text-shadow: 0 2px 12px #16142430;
  }

  #home-view h1 br { display: initial; }

  #home-view h1 .becoming {
    background: none;
    color: inherit;
    white-space: nowrap;
  }

  #home-view .home-description {
    position: static;
    width: 94%;
    max-width: none;
    margin: clamp(14px, 2.2svh, 22px) 0 0;
    font: 400 clamp(11.5px, calc(var(--atlas-width) * .0275), 14px)/1.55 var(--atlas-copy);
    letter-spacing: .05px;
    color: #c6c4d2;
    text-align: left;
    text-shadow: none;
    white-space: normal;
  }

  #home-view .home-description-desktop,
  #home-view .caption-desktop { display: none; }

  #home-view .home-description-mobile,
  #home-view .caption-mobile { display: inline; }

  #home-view .home-worlds {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    z-index: 2;
    pointer-events: none;
  }

  #home-view .home-world {
    position: absolute;
    left: var(--atlas-inset);
    width: 39%;
    min-width: 0;
    min-height: 78px;
    height: auto;
    margin: 0;
    padding: 0 0 5px;
    display: block;
    isolation: auto;
    overflow: visible;
    border: 0;
    border-radius: 3px;
    box-shadow: none;
    background: none;
    color: var(--world);
    text-decoration: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: #e4e0ee18;
  }

  #home-view .world-blog { top: 37%; --mobile-title: #e45d78; }
  #home-view .world-astro { top: 53%; --mobile-title: #438adc; }
  #home-view .world-still { top: 68%; --mobile-title: #bdd5bf; }
  #home-view .world-contact { top: 82%; --mobile-title: #dfd65d; }

  #home-view .home-world + .home-world { margin: 0; }

  #home-view .home-world::before,
  #home-view .home-world::after,
  #home-view .home-world + .home-world::before,
  #home-view .home-world + .home-world::after {
    display: none;
    content: none;
  }

  #home-view .home-world-label {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    font: 500 clamp(25px, calc(var(--atlas-width) * .065), 34px)/1.05 var(--serif);
    letter-spacing: 1px;
    color: var(--mobile-title);
    text-shadow: none;
  }

  #home-view .home-world-label::after {
    content: "";
    flex: 1;
    min-width: 9px;
    height: 1px;
    opacity: .55;
    background: linear-gradient(90deg, var(--world), #d8d4df55);
  }

  #home-view .home-world-caption {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    margin: 8px 0 0;
    font: 400 clamp(11px, calc(var(--atlas-width) * .027), 14px)/1.45 var(--atlas-copy);
    letter-spacing: .05px;
    color: #c6c4d2;
    white-space: normal;
    text-shadow: none;
  }

  #home-view .world-blog .home-world-caption { max-width: 10.5ch; }

  #home-view .world-arrow {
    position: static;
    display: block;
    width: 28px;
    height: 21px;
    margin: 11px 0 0;
    color: var(--world);
    opacity: .95;
    transform: none;
    transition: transform .2s ease;
  }

  #home-view .home-world:hover .world-arrow,
  #home-view .home-world:focus-visible .world-arrow {
    transform: translateX(3px);
  }

  #home-view .home-world:active { opacity: .8; }

  #home-view .home-world:focus-visible {
    outline: 2px solid #eee9ef;
    outline-offset: 7px;
  }
}

/* A short or zoomed viewport can scroll the composition instead of hiding links. */
@media (max-width: 359px) {
  #home-view { min-height: 650px; }
  #home-view .home-intro { width: 51%; }
  #home-view .home-world { width: 40%; }
  #home-view .home-world-label { gap: 9px; letter-spacing: .5px; }
  #home-view .home-description { width: 100%; font-size: 11.5px; }
}

/* At extreme zoom, keep the reading order and let text dictate the height. */
@media (max-width: 300px) {
  #home-view { height: auto; min-height: 100svh; padding: 16px; }
  #home-view .mobile-atlas-art { opacity: .16; }
  #home-view .home-header { position: relative; top: auto; left: auto; right: auto; gap: 8px; }
  #home-view .wordmark { font-size: 23px; letter-spacing: 1px; }
  #home-view .home-stage { position: relative; inset: auto; }
  #home-view .home-intro { position: relative; inset: auto; width: 100%; margin: 30px 0; }
  #home-view h1 { font-size: 36px; }
  #home-view .home-description { font-size: 12px; }
  #home-view .home-worlds { position: relative; inset: auto; height: auto; display: grid; gap: 22px; }
  #home-view .home-world { position: static; width: 100%; }
  #home-view .home-world-caption { font-size: 12px; }
}

@media (max-width: 800px) and (prefers-reduced-motion: reduce) {
  #home-view .world-arrow { transition: none; }
  #home-view .home-world:hover .world-arrow,
  #home-view .home-world:focus-visible .world-arrow { transform: none; }
}
