/* The Atlas story uses the same registered artwork, native pinned origins, and
   day-to-night palette as its website. Every value is local to this dialog. */
.modal-dialog.project-story-dialog.state-park-atlas-dialog {
  --atlas-dusk: 0%;
  --atlas-day-half: min(100%, calc(var(--atlas-dusk) * 2));
  --atlas-night-half: max(0%, calc(var(--atlas-dusk) * 2 - 100%));
  --atlas-middle: #73776d;
  --atlas-middle-ink: black;
  --atlas-paper: color-mix(in srgb, color-mix(in srgb, #faf7ed, var(--atlas-middle) var(--atlas-day-half)), #152923 var(--atlas-night-half));
  --atlas-card: color-mix(in srgb, color-mix(in srgb, #fffdf5, var(--atlas-middle) var(--atlas-day-half)), #243c32 var(--atlas-night-half));
  --atlas-gold: color-mix(in srgb, color-mix(in srgb, #ffe2a0, var(--atlas-middle) var(--atlas-day-half)), #294a37 var(--atlas-night-half));
  --atlas-rule: color-mix(in srgb, #c7ccb8, #405849 var(--atlas-dusk));
  --mission-ink: color-mix(in srgb, color-mix(in srgb, #1d392f, var(--atlas-middle-ink) var(--atlas-day-half)), #f3f2df var(--atlas-night-half));
  --mission-muted: color-mix(in srgb, color-mix(in srgb, #526356, var(--atlas-middle-ink) var(--atlas-day-half)), #c0cbbd var(--atlas-night-half));
  --mission-accent: color-mix(in srgb, color-mix(in srgb, #336747, var(--atlas-middle-ink) var(--atlas-day-half)), #b7dca5 var(--atlas-night-half));
  color: var(--mission-ink);
  background: var(--atlas-paper);
  border-color: var(--atlas-rule);
}
.modal-dialog.project-story-dialog.state-park-atlas-dialog[data-atlas-theme='dark'] { --atlas-middle-ink: white; }
.state-park-atlas-dialog.project-story-dialog .mission-heading { background: transparent; }
.state-park-atlas-dialog.project-story-dialog .mission-heading::before { opacity: .16; }
.state-park-atlas-dialog.project-story-dialog .mission-brief > div,
.state-park-atlas-dialog.project-story-dialog .demo-section-note {
  color: var(--mission-ink);
  border-color: var(--atlas-rule);
  background: var(--atlas-card);
}
.state-park-atlas-dialog.project-story-dialog :is(.mission-kicker span, .state-park-atlas-actions > span, figcaption, .state-park-atlas-source-note p) { color: var(--mission-muted); }
.state-park-atlas-dialog.project-story-dialog :is(.state-park-atlas-source-note small, .state-park-atlas-source-note a, figcaption a) { color: var(--mission-accent); }
.state-park-atlas-dialog.project-story-dialog .mission-launch {
  color: var(--mission-ink);
  background: var(--atlas-gold);
  border: 1px solid var(--atlas-rule);
  box-shadow: 0 8px 28px #102a2314;
}
.state-park-atlas-dialog.project-story-dialog .mission-launch:hover { background: var(--atlas-card); }
.state-park-atlas-dialog.project-story-dialog .state-park-atlas-preview-link { border-color: var(--atlas-rule); }
.state-park-atlas-dialog.project-story-dialog .state-park-atlas-preview-label {
  background: var(--atlas-card);
  color: var(--mission-ink);
}
.state-park-atlas-dialog.project-story-dialog .state-park-atlas-preview-label > span { color: var(--mission-accent); }
.state-park-atlas-dialog.project-story-dialog .state-park-atlas-preview-link:hover .state-park-atlas-preview-label { background: var(--atlas-gold); }
.state-park-atlas-dialog.project-story-dialog a:focus-visible { outline-color: var(--mission-accent); }
.state-park-atlas-dialog.project-story-dialog::-webkit-scrollbar-thumb { background: var(--mission-accent); }

.atlas-modal-hero {
  --atlas-scroll: 0px;
  --atlas-sunset: 0;
  --atlas-amber: 0;
  --atlas-twilight: 0;
  --atlas-width: 80vw;
  --atlas-height: clamp(420px, calc(80svh - 2px), 860px);
  --atlas-overlook-rise: calc(var(--atlas-scroll) * -.92);
  --atlas-cream: color-mix(in srgb, #fff8e5, #f1f4eb var(--atlas-dusk));
  --atlas-highlight: color-mix(in srgb, #ffe3a1, #c3dfb5 var(--atlas-dusk));
  position: relative;
  height: var(--atlas-height);
  margin: 0;
  container: atlas-hero / size;
  background: #183a36;
}
.atlas-modal-frame {
  position: relative;
  height: var(--atlas-height);
  overflow: clip;
  isolation: isolate;
  color: var(--atlas-cream);
}
/* The browser pins the origin to the modal scrollport. The frame scrolls past
   and clips it; individual layers then travel at the source site's depths. */
.atlas-modal-origin { position: sticky; top: 0; height: 0; }
.atlas-modal-scene,
.atlas-modal-shade { position: absolute; inset: 0; pointer-events: none; }
.atlas-modal-scene {
  height: var(--atlas-height);
  overflow: hidden;
  isolation: isolate;
  background: #f1cd81;
}
.atlas-modal-plane { position: absolute; display: block; max-width: none; user-select: none; }
.atlas-modal-landscape {
  left: 0;
  top: 0;
  width: 100%;
  height: 107%;
  object-fit: cover;
  object-position: 83% 8%;
}
.atlas-modal-sun {
  transform: translateY(calc(max(var(--atlas-width) * .66667, var(--atlas-height) * 1.07) * .18 * var(--atlas-sunset)));
  filter: brightness(calc(1 + var(--atlas-amber) * .62)) saturate(calc(1 - var(--atlas-amber) * .18));
}
.atlas-modal-terrain,
.atlas-modal-pine { transform: translateY(calc(var(--atlas-scroll) * var(--atlas-travel))); }
.atlas-modal-range { --atlas-travel: -.07; }
.atlas-modal-foothills { --atlas-travel: -.09; }
.atlas-modal-lake,
.atlas-modal-forest { --atlas-travel: -.10; }
.atlas-modal-shore { --atlas-travel: -.45; }
.atlas-modal-light { position: absolute; inset: 0; pointer-events: none; }
.atlas-modal-sunset-sky {
  background: linear-gradient(180deg, #dc773f 0%, #ff9e47 21%, #ffd385 43%, #f3b68a 72%);
  mix-blend-mode: multiply;
  opacity: calc(var(--atlas-amber) * .86);
}
.atlas-modal-dusk-sky {
  background: linear-gradient(180deg, #383854 1%, #72516a 15%, #cf795b 27%, #ffb16f 36%, #80627c 66%);
  opacity: calc(var(--atlas-twilight) * .91);
}
.atlas-modal-golden-light {
  background: linear-gradient(158deg, #cb805e, #f2964d 42%, #ffc270 66%, #b77854);
  mix-blend-mode: multiply;
  opacity: calc(var(--atlas-amber) * .67);
}
.atlas-modal-evening-light {
  background: linear-gradient(180deg, #232e508c, #5039505c 27%, #ac735d42 40%, #35496866 65%, #212c496b);
  opacity: var(--atlas-twilight);
}
.atlas-modal-long-shadows {
  background: linear-gradient(180deg, #e7e0f3, #c9bccb 33%, #a1a3b8 60%, #626b86);
  mix-blend-mode: multiply;
  opacity: var(--atlas-twilight);
}
.atlas-modal-overlook {
  --atlas-ledge-inset: calc(var(--atlas-width) * .045);
  transform: translateY(var(--atlas-overlook-rise));
  left: 4.5%;
  bottom: -10%;
  width: max(115%, calc(var(--atlas-height) * 1.28));
  height: auto;
}
.atlas-modal-overlook-core { display: block; position: relative; width: 100%; height: auto; max-width: none; }
.atlas-modal-overlook-west {
  position: absolute;
  top: 0;
  right: calc(100% - 100% * 2 / 1440);
  height: 100%;
  width: auto;
  max-width: none;
  min-width: calc(var(--atlas-ledge-inset) + 3px);
}
.atlas-modal-pine {
  --atlas-travel: -.76;
  --atlas-pine-width: clamp(150px, calc(var(--atlas-width) * .26), 450px);
  left: 0;
  top: 0;
  width: var(--atlas-pine-width);
  height: max(100%, calc(3 * var(--atlas-pine-width)));
  display: flex;
  flex-direction: column;
}
.atlas-modal-pine img { display: block; width: 100%; max-width: none; }
.atlas-modal-pine-crown { flex: none; aspect-ratio: 436 / 300; overflow: hidden; }
.atlas-modal-pine-trunk { flex: 1; min-height: 0; }
.atlas-modal-shade {
  background: linear-gradient(90deg, #0c251ff2 0%, #0c251fd4 17%, #0c251f9e 31%, #0c251f39 48%, transparent 64%);
}
.atlas-modal-copy {
  position: absolute;
  inset: 0 0 auto;
  height: var(--atlas-height);
  display: flex;
  align-items: center;
  padding: calc(var(--atlas-height) * .04) clamp(24px, calc(var(--atlas-width) * .05), 64px) 0;
  pointer-events: none;
  transform: translateY(var(--atlas-overlook-rise));
}
.atlas-modal-intro { position: relative; max-width: min(480px, 41%); }
.atlas-modal-intro .atlas-modal-kicker {
  margin: 0;
  color: var(--atlas-highlight);
  font: 700 10px/1.4 Arial, sans-serif;
  letter-spacing: .21em;
  text-transform: uppercase;
}
.atlas-modal-intro .atlas-modal-title {
  margin: clamp(16px, calc(var(--atlas-height) * .023), 30px) 0;
  color: var(--atlas-cream);
  font: 500 clamp(48px, calc(var(--atlas-width) * .0575), 100px)/.94 Georgia, 'Times New Roman', serif;
  letter-spacing: -.063em;
  text-shadow: 0 2px 18px #102c2338;
}
.atlas-modal-title em { color: var(--atlas-highlight); font-weight: 400; }
.atlas-modal-intro .atlas-modal-deck {
  max-width: 32ch;
  margin: 0;
  color: var(--atlas-cream);
  font: 400 clamp(14px, calc(var(--atlas-width) * .012), 18px)/1.55 Arial, sans-serif;
  text-wrap: pretty;
}

@container atlas-hero (min-aspect-ratio: 21/9) {
  .atlas-modal-overlook {
    --atlas-ledge-inset: calc(var(--atlas-width) * 1.01 - min(var(--atlas-width) * 1.09, var(--atlas-height) * 2.05));
    left: auto;
    right: -1%;
    width: min(109%, calc(var(--atlas-height) * 2.05));
  }
}
@container atlas-hero (max-aspect-ratio: 1/1) {
  .atlas-modal-landscape { object-position: 83% top; }
  .atlas-modal-overlook {
    --atlas-ledge-inset: 0px;
    left: 50%;
    bottom: -4%;
    width: max(153%, calc(var(--atlas-height) * .91));
    translate: -49% 0;
  }
  .atlas-modal-pine { left: -4%; --atlas-pine-width: clamp(165px, calc(var(--atlas-width) * .36), 280px); }
  .atlas-modal-copy { align-items: flex-start; padding-top: max(calc(var(--atlas-height) * .13), 70px); }
  .atlas-modal-intro { max-width: min(520px, 92%); }
  .atlas-modal-intro .atlas-modal-title { font-size: clamp(48px, calc(var(--atlas-width) * .087), 86px); }
  .atlas-modal-shade { background: linear-gradient(145deg, #0c251fe8 2%, #0c251fb8 22%, #0c251f5c 40%, transparent 63%); }
}
@container atlas-hero (max-width: 600px) and (max-aspect-ratio: 1/1) {
  .atlas-modal-copy { padding-top: clamp(54px, calc(var(--atlas-height) * .15), 76px); }
  .atlas-modal-intro { max-width: 100%; }
  .atlas-modal-overlook {
    left: 57%;
    bottom: -5%;
    width: min(calc(var(--atlas-width) * 1.19), calc(var(--atlas-height) * 1.04));
    translate: -50% 0;
  }
  .atlas-modal-pine { --atlas-pine-width: clamp(110px, calc(var(--atlas-width) * .28), 165px); }
  .atlas-modal-shade { background: radial-gradient(ellipse 405px 265px at 5% 29%, #10281fd9 15%, #10281fb8 52%, #10281f80 73%, transparent 100%); }
  .atlas-modal-intro .atlas-modal-kicker { font-size: 9px; }
  .atlas-modal-intro .atlas-modal-title { margin: 10px 0 8px; font-size: clamp(42px, calc(var(--atlas-width) * .106), 60px); }
  .atlas-modal-intro .atlas-modal-deck { max-width: 36ch; font-size: 14px; line-height: 1.4; }
}
@container atlas-hero (max-height: 420px) and (min-aspect-ratio: 1/1) {
  .atlas-modal-landscape { object-position: center top; }
  .atlas-modal-overlook {
    --atlas-ledge-inset: calc(var(--atlas-width) * 1.03 - min(var(--atlas-width) * .96, var(--atlas-height) * 1.94));
    left: auto;
    right: -3%;
    width: min(96%, calc(var(--atlas-height) * 1.94));
  }
  .atlas-modal-copy { padding-top: 20px; }
  .atlas-modal-intro { max-width: min(400px, 50%); }
  .atlas-modal-intro .atlas-modal-title { margin: 8px 0; font-size: clamp(34px, calc(var(--atlas-width) * .05), 53px); }
  .atlas-modal-intro .atlas-modal-deck { font-size: 13px; line-height: 1.35; }
}
@media (max-width: 640px) {
  .atlas-modal-hero { --atlas-width: calc(100vw - 18px); --atlas-height: clamp(375px, 61svh, 510px); }
}
@media (max-height: 520px) and (min-aspect-ratio: 1/1) {
  .atlas-modal-hero { --atlas-height: clamp(250px, 77svh, 380px); }
}
@media (prefers-reduced-motion: reduce) {
  .atlas-modal-origin { position: relative; }
  .atlas-modal-hero { --atlas-scroll: 0px !important; --atlas-sunset: 0 !important; --atlas-amber: 0 !important; --atlas-twilight: 0 !important; }
}
