/* ============================================
   ATLAS — page theme for maps.html
   The plates' own system on the web: Haust palette (iceland-palette skill),
   serif for names, condensed sans for labels, numbered notes, neatlines.
   Loaded after editorial.css; scoped to body.atlas so the rest of the site
   (nav, footer, buttons) stays the portfolio's.
   ============================================ */
.atlas {
  --paper: #F6F8FA;        /* Haust frost — the plates' paper, so prints sit flush */
  --mist: #E8EDF2;
  --fissure: #1F1D18;
  --basalt: #3E3B34;
  --lichen: #6B6156;
  --rowan: #B95A1F;
  --silfra: #405664;
  --overcast: #AEC0D1;
  --whitewater: #CCDBE1;
  --birch: #CC9C2E;
  --bruarfoss: #4DA3AC;
  --deep-moss: #3C4A1C;
  --atlas-serif: 'EB Garamond', 'Hoefler Text', Garamond, Georgia, serif;
  --atlas-cond: 'Roboto Condensed', 'Avenir Next Condensed', 'Arial Narrow', sans-serif;
  background: var(--paper);
  color: var(--fissure);
}
.atlas ::selection { background: var(--rowan); color: var(--paper); }
.atlas .nav.scrolled { background: rgba(246, 248, 250, 0.88); }
/* over the dark folio, before the nav picks up its paper background */
.atlas .nav:not(.scrolled) .nav-logo { color: var(--paper); }
.atlas .nav:not(.scrolled) .nav-mobile-toggle span { background: var(--paper); }
@media (min-width: 769px) {
  .atlas .nav:not(.scrolled) .nav-links a:not(.btn) { color: rgba(246, 248, 250, 0.7); }
  .atlas .nav:not(.scrolled) .nav-links a:not(.btn):hover,
  .atlas .nav:not(.scrolled) .nav-links a.active { color: var(--paper); }
}

/* ---------- shared atoms ---------- */
.atlas .cond {
  font-family: var(--atlas-cond);
  font-weight: 600;
  letter-spacing: 0.04em;
}
.atlas .running-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: var(--space-sm);
  padding-bottom: 0.7rem;
  border-bottom: 1px solid currentColor;
  font-family: var(--atlas-serif);
  opacity: 0.85;
}
.atlas .rh-left { font-style: italic; font-size: 1rem; }
.atlas .rh-right {
  text-transform: uppercase; letter-spacing: 0.22em; font-size: 0.8rem;
}
.atlas .atlas-label {
  font-family: var(--atlas-cond); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.16em; font-size: 0.78rem;
  color: var(--rowan);
  margin-bottom: var(--space-sm);
}
.atlas .atlas-heading {
  font-family: var(--atlas-serif); font-weight: 400;
  font-size: clamp(2rem, 4vw, 3.1rem); line-height: 1.08;
  letter-spacing: -0.005em;
  margin-bottom: var(--space-sm);
}
.atlas .atlas-heading em { font-style: italic; }
.atlas .atlas-rule {
  height: 0; border: 0;
  border-top: 1px solid var(--rowan);
  box-shadow: 0 4px 0 -2px var(--silfra);   /* hairline over band, like the neatline */
  width: 4.5rem; margin: 0 0 var(--space-md);
}
.atlas .atlas-body {
  font-family: var(--atlas-serif); font-size: 1.18rem; line-height: 1.55;
  color: var(--basalt); max-width: 40rem;
}

/* the black numbered dot from the plates' notes */
.atlas .note-dot {
  flex: none;
  width: 1.65rem; height: 1.65rem; border-radius: 50%;
  background: var(--fissure); color: var(--paper);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--atlas-cond); font-weight: 700; font-size: 0.85rem;
}

/* a printed sheet lying on the table */
.atlas .sheet {
  background: var(--paper);
  box-shadow: 0 1px 2px rgba(31, 29, 24, 0.18), 0 18px 50px -12px rgba(31, 29, 24, 0.35);
}
.atlas .sheet img { width: 100%; height: auto; display: block; }

/* ---------- 1. folio (hero) ---------- */
.atlas .folio {
  position: relative; overflow: hidden;
  background: var(--fissure); color: var(--paper);
  padding: calc(var(--space-xl) + 1.5rem) 0 var(--space-xl);
}
.atlas .graticule {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: 0.55;
}
.atlas .folio .container { position: relative; }
.atlas .folio .running-head { color: var(--overcast); border-color: rgba(174, 192, 209, 0.35); }
.atlas .folio-grid {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: var(--space-lg); align-items: end;
  margin: var(--space-lg) 0 var(--space-lg);
}
.atlas .folio .atlas-label { color: var(--birch); }
.atlas .atlas-title {
  font-family: var(--atlas-serif); font-weight: 400;
  font-size: clamp(2.8rem, 6.4vw, 5.4rem); line-height: 0.98;
  letter-spacing: -0.01em;
}
.atlas .atlas-title em { font-style: italic; color: var(--whitewater); }
.atlas .folio-lede {
  font-family: var(--atlas-serif); font-size: 1.22rem; line-height: 1.55;
  color: rgba(246, 248, 250, 0.82);
  margin-bottom: var(--space-md);
}
/* the tag row, set like a legend */
.atlas .legend-row {
  list-style: none; display: grid; grid-template-columns: repeat(2, auto);
  gap: 0.45rem 1.6rem; justify-content: start;
  margin-bottom: var(--space-md);
  font-family: var(--atlas-cond); font-size: 0.92rem; letter-spacing: 0.03em;
  color: rgba(246, 248, 250, 0.78);
}
.atlas .legend-row li { display: flex; align-items: center; gap: 0.6rem; }
.atlas .legend-row li::before {
  content: ''; width: 1.4rem; height: 0; border-top: 3px solid var(--rowan);
}
.atlas .legend-row li:nth-child(2)::before { border-color: var(--bruarfoss); }
.atlas .legend-row li:nth-child(3)::before { border-color: var(--birch); }
.atlas .legend-row li:nth-child(4)::before { border-top-style: dashed; border-color: var(--overcast); }
.atlas .folio .cta-buttons { justify-content: flex-start; }
.atlas .folio .btn-secondary { border-color: rgba(174, 192, 209, 0.45); color: var(--paper); }
.atlas .folio .btn-secondary:hover { border-color: var(--birch); color: var(--birch); }

.atlas .folio-plate { margin: 0; }
.atlas .folio-plate a { display: block; }
.atlas .folio-plate .sheet {
  box-shadow: 0 2px 4px rgba(0,0,0,0.4), 0 40px 90px -20px rgba(0,0,0,0.75);
  transition: transform 0.8s var(--transition);
}
.atlas .folio-plate a:hover .sheet { transform: translateY(-4px); }
.atlas .plate-foot {
  display: flex; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap;
  margin-top: 0.9rem;
  font-family: var(--atlas-cond); font-size: 0.84rem; letter-spacing: 0.03em;
}
.atlas .folio .plate-foot { color: rgba(174, 192, 209, 0.8); }
.atlas .plate-foot strong { font-weight: 700; color: inherit; }

.atlas .folio-head { display: flex; flex-direction: column; }
.atlas .compass { width: 4.6rem; height: auto; margin-bottom: var(--space-md); opacity: 0.8; }

/* ---------- 2. contents ---------- */
.atlas .contents { padding: var(--space-xl) 0; }
.atlas .contents-grid {
  display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: var(--space-lg); align-items: start;
}
.atlas .viewer { position: relative; }
.atlas .viewer-stage {
  position: relative; display: grid; place-items: center;
  background: var(--mist);
  padding: clamp(1rem, 3vw, 2.2rem);
  transition: height 0.5s var(--transition);
}
.atlas .viewer-plate { margin: 0; width: 100%; display: none; justify-content: center; }
.atlas .viewer-plate.is-active { display: flex; animation: plate-in 0.5s ease both; }
@keyframes plate-in { from { opacity: 0; } to { opacity: 1; } }
.atlas .viewer-plate a { display: block; }
.atlas .viewer-plate img { max-height: 72vh; width: auto; max-width: 100%; }
.atlas .viewer-caption {
  margin-top: 1rem;
  font-family: var(--atlas-serif); font-size: 1.08rem; line-height: 1.5; color: var(--basalt);
}
.atlas .viewer-caption a {
  font-family: var(--atlas-cond); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.03em;
  color: var(--rowan); border-bottom: 1px solid currentColor; margin-left: 0.3rem;
  white-space: nowrap;
}

.atlas .toc { list-style: none; border-top: 1px solid var(--basalt); }
.atlas .toc-row {
  width: 100%; text-align: left;
  display: grid; grid-template-columns: 1fr; align-items: baseline;
  column-gap: 0.4rem; row-gap: 0.2rem; padding: 1.1rem 0;
  border-bottom: 1px solid var(--whitewater);
  color: var(--fissure);
  transition: color 0.25s ease;
}
.atlas .toc-num {
  grid-row: span 2;
  font-family: var(--atlas-serif); font-size: 1.05rem; letter-spacing: 0.08em; color: var(--lichen);
}
.atlas .toc-title { font-family: var(--atlas-serif); font-size: 1.3rem; line-height: 1.2; }
.atlas .toc-line { display: flex; align-items: baseline; gap: 0.5rem; }
.atlas .toc-leader { flex: 1; min-width: 1rem; border-bottom: 2px dotted var(--overcast); transform: translateY(-0.25rem); }
.atlas .toc-meta {
  font-family: var(--atlas-cond); font-size: 0.86rem; letter-spacing: 0.03em; color: var(--lichen);
  white-space: nowrap;
}
.atlas .toc-row:hover .toc-title,
.atlas .toc-row.is-active .toc-title { color: var(--rowan); }
.atlas .toc-row.is-active .toc-num { color: var(--rowan); }
.atlas .toc-row.is-active .toc-leader { border-color: var(--rowan); }
.atlas .toc-row:focus-visible { outline: 2px solid var(--rowan); outline-offset: 3px; }
.atlas .toc-note {
  margin-top: var(--space-md);
  font-family: var(--atlas-cond); font-size: 0.88rem; letter-spacing: 0.02em; color: var(--lichen);
  line-height: 1.55;
}
.atlas .toc-all { margin-top: var(--space-sm); }

/* ---------- 3. partners: framed note boxes ---------- */
.atlas .partners { padding: var(--space-xl) 0; background: var(--mist); }
.atlas .note-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md);
}
.atlas .note-box {
  background: var(--paper); border: 1px solid var(--basalt);
  outline: 1px solid var(--basalt); outline-offset: 4px;   /* double rule, like the text box */
  padding: 1.6rem 1.7rem 1.7rem;
  margin: 5px;
}
.atlas .note-head { display: flex; align-items: center; gap: 0.8rem; margin-bottom: 0.7rem; }
.atlas .note-title {
  font-family: var(--atlas-cond); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.02em;
}
.atlas .note-box p {
  font-family: var(--atlas-serif); font-size: 1.1rem; line-height: 1.5; color: var(--basalt);
}
.atlas .also {
  margin-top: var(--space-md);
  font-family: var(--atlas-serif); font-style: italic; font-size: 1.12rem; color: var(--lichen);
}

/* ---------- 4. the standard, set as a legend ---------- */
.atlas .standard {
  padding: var(--space-xl) 0; background: var(--fissure); color: var(--paper);
}
.atlas .standard .atlas-label { color: var(--birch); }
.atlas .standard .atlas-body { color: rgba(246, 248, 250, 0.78); }
.atlas .legend-panel {
  margin-top: var(--space-md);
  border: 1px solid rgba(174, 192, 209, 0.35);
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
}
.atlas .legend-item {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: 1.2rem; align-items: start;
  padding: 1.6rem 1.7rem;
  border-bottom: 1px solid rgba(174, 192, 209, 0.18);
}
.atlas .legend-item:nth-child(odd) { border-right: 1px solid rgba(174, 192, 209, 0.18); }
.atlas .legend-item:nth-last-child(-n+2) { border-bottom: 0; }
.atlas .legend-glyph { width: 4.2rem; height: 2.6rem; }
.atlas .legend-item h3 {
  font-family: var(--atlas-cond); font-weight: 700; font-size: 1.05rem; letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}
.atlas .legend-item p {
  font-family: var(--atlas-serif); font-size: 1.05rem; line-height: 1.5; color: rgba(246, 248, 250, 0.72);
}
.atlas .type-sample { display: flex; flex-direction: column; justify-content: center; line-height: 1.05; height: auto; }
.atlas .type-sample .s { font-family: var(--atlas-serif); font-style: italic; letter-spacing: 0.1em; font-size: 1.3rem; }
.atlas .type-sample .c { font-family: var(--atlas-cond); font-weight: 700; font-size: 0.9rem; color: var(--birch); letter-spacing: 0.04em; }


/* ---------- 5. how it works ---------- */
.atlas .how { padding: var(--space-xl) 0; }
.atlas .steps {
  list-style: none; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-md); margin-top: var(--space-md);
  counter-reset: step;
}
.atlas .steps li { border-top: 1px solid var(--basalt); padding-top: 1.1rem; }
.atlas .steps .note-head { margin-bottom: 0.6rem; }
.atlas .steps p { font-family: var(--atlas-serif); font-size: 1.06rem; line-height: 1.5; color: var(--basalt); }
.atlas .aside-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-md);
  margin-top: var(--space-lg);
}
.atlas .aside {
  border-left: 3px solid var(--rowan); padding: 0.2rem 0 0.2rem 1.4rem;
}
.atlas .aside:nth-child(2) { border-color: var(--silfra); }
.atlas .aside h3 {
  font-family: var(--atlas-cond); font-weight: 700; font-size: 0.82rem;
  text-transform: uppercase; letter-spacing: 0.16em; color: var(--lichen); margin-bottom: 0.5rem;
}
.atlas .aside p { font-family: var(--atlas-serif); font-size: 1.12rem; line-height: 1.55; color: var(--basalt); }
.atlas .aside a { color: var(--rowan); border-bottom: 1px solid currentColor; }

/* ---------- 6. closing ---------- */
.atlas .closing { padding: var(--space-xl) 0 var(--space-lg); background: var(--mist); text-align: center; }
.atlas .closing .atlas-heading { margin-left: auto; margin-right: auto; }
.atlas .closing .atlas-body { margin: 0 auto var(--space-md); }
.atlas .closing .cta-buttons { justify-content: center; }
.atlas .imprint {
  margin-top: var(--space-lg); padding-top: 0.8rem;
  border-top: 1px solid var(--overcast);
  display: flex; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap;
  font-family: var(--atlas-cond); font-size: 0.8rem; letter-spacing: 0.03em; color: var(--lichen);
}
.atlas .imprint .folio-no { font-family: var(--atlas-serif); font-size: 0.95rem; }

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .atlas .contents-grid { grid-template-columns: 1fr; }
  .atlas .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .atlas .folio { padding-top: calc(var(--space-lg) + 2rem); }
  .atlas .folio-grid { grid-template-columns: 1fr; gap: var(--space-md); margin: var(--space-md) 0; }
  .atlas .compass { display: none; }
  .atlas .rh-right { display: none; }
  .atlas .legend-row { grid-template-columns: 1fr; }
  .atlas .note-grid, .atlas .legend-panel, .atlas .aside-grid { grid-template-columns: 1fr; }
  .atlas .legend-item:nth-child(odd) { border-right: 0; }
  .atlas .legend-item:nth-last-child(2) { border-bottom: 1px solid rgba(174, 192, 209, 0.18); }
  .atlas .viewer-plate img { max-height: 60vh; }
}
@media (max-width: 480px) {
  .atlas .container { padding: 0 1rem; }
  .atlas .steps { grid-template-columns: 1fr; }
  .atlas .note-box { padding: 1.3rem 1.2rem; }
  .atlas .legend-item { grid-template-columns: 3.2rem 1fr; padding: 1.3rem 1.1rem; gap: 0.9rem; }
  .atlas .legend-glyph { width: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .atlas .viewer-plate.is-active { animation: none; }
  .atlas .folio-plate .sheet, .atlas .viewer-stage { transition: none; }
}
