/* Appily Thirtyseven — Seed Atlas catalog
   Layout: hero + meter → strip → jump chips → stacked aisle docks
   (alternating media/body). Not book-spine volume cards. */

.page-catalog-atlas {
  --at-ink: #04261f;
  --at-deep: #0a3d32;
  --at-leaf: #0f8f72;
  --at-mint: #2ee6a8;
  --at-sky: #d6f3ea;
  --at-wash: #eef9f4;
  --at-paper: #f7fcfa;
  --at-coral: #ff6b4a;
  --at-gold: #e8c547;
  --at-muted: #4d6b62;
  --at-line: rgba(4, 38, 31, 0.12);
  --font-display: 'Fraunces', 'Georgia', serif;
  --font-body: 'Outfit', 'Segoe UI', sans-serif;
  --ease-spring: cubic-bezier(0.34, 1.45, 0.64, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

.page-catalog-atlas .page-main {
  padding-top: 0;
  font-family: var(--font-body);
  color: var(--at-ink);
  background:
    radial-gradient(ellipse 52% 34% at 88% 0%, rgba(46, 230, 168, 0.15), transparent 55%),
    radial-gradient(ellipse 40% 26% at 8% 10%, rgba(232, 197, 71, 0.1), transparent 50%),
    linear-gradient(180deg, var(--at-sky) 0%, var(--at-wash) 28%, var(--at-paper) 58%, #fff 100%);
}

.a37-atlas {
  --atlas-fill: 70;
  padding-bottom: 3.5rem;
  scroll-behavior: smooth;
}

.a37-atlas-kicker {
  margin: 0 0 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--at-leaf);
}

/* —— Hero —— */
.a37-atlas-hero {
  position: relative;
  padding: 2.2rem 0 1.6rem;
  overflow: hidden;
  isolation: isolate;
}

.a37-atlas-hero-mesh {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-linear-gradient(
      18deg,
      transparent,
      transparent 18px,
      rgba(15, 143, 114, 0.04) 18px,
      rgba(15, 143, 114, 0.04) 19px
    );
  mask-image: linear-gradient(180deg, #000 40%, transparent 100%);
  animation: a37AtlasMesh 30s linear infinite;
}

@keyframes a37AtlasMesh {
  to { transform: translateX(-24px); }
}

.a37-atlas-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) auto;
  gap: 1.75rem 2rem;
  align-items: center;
  max-width: 900px;
}

.a37-atlas-crumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.65rem;
  font-size: 0.78rem;
  color: var(--at-muted);
}

.a37-atlas-crumb a {
  color: var(--at-leaf);
  text-decoration: none !important;
  font-weight: 650;
}

.a37-atlas-crumb a:hover {
  color: var(--at-ink);
}

.a37-atlas-intro h1 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.05;
  color: var(--at-ink);
}

.a37-atlas-intro h1 span {
  background: linear-gradient(120deg, var(--at-leaf), var(--at-mint));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: italic;
}

.a37-atlas-lede {
  margin: 0;
  max-width: 46ch;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--at-muted);
}

.a37-atlas-meter {
  position: relative;
  width: 148px;
  height: 148px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.a37-atlas-meter svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.a37-atlas-meter-track {
  fill: none;
  stroke: rgba(4, 38, 31, 0.1);
  stroke-width: 8;
}

.a37-atlas-meter-fill {
  fill: none;
  stroke: var(--at-mint);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: var(--atlas-fill) 100;
  filter: drop-shadow(0 0 8px rgba(46, 230, 168, 0.5));
}

.a37-atlas-meter-core {
  position: relative;
  z-index: 1;
  width: 98px;
  height: 98px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 32px rgba(4, 38, 31, 0.1);
  backdrop-filter: blur(12px);
  text-align: center;
}

.a37-atlas-meter-core strong {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  color: var(--at-leaf);
  letter-spacing: -0.03em;
}

.a37-atlas-meter-core span {
  margin-top: 0.25rem;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-muted);
}

/* —— Stage —— */
.a37-atlas-stage {
  max-width: 920px;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.a37-atlas-strip {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem 1.4rem;
  align-items: center;
  padding: 1.1rem 1.3rem;
  border-radius: 1.4rem;
  background: linear-gradient(145deg, var(--at-deep), var(--at-ink));
  color: #fff;
  border: 1px solid rgba(46, 230, 168, 0.28);
  box-shadow: 0 22px 48px rgba(4, 38, 31, 0.22);
  animation: a37AtlasIn 0.45s var(--ease-out);
}

.a37-atlas-strip-label {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--at-mint);
}

.a37-atlas-strip strong {
  font-size: 0.92rem;
  font-weight: 650;
}

@keyframes a37AtlasIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* —— Jump chips —— */
.a37-atlas-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  animation: a37AtlasIn 0.45s var(--ease-out) 0.05s both;
}

.a37-atlas-jump-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--at-line);
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--at-ink);
  text-decoration: none !important;
  transition: transform 0.2s, background 0.2s, border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.a37-atlas-jump-chip.tone-mint { --j-accent: var(--at-mint); }
.a37-atlas-jump-chip.tone-gold { --j-accent: var(--at-gold); }
.a37-atlas-jump-chip.tone-teal { --j-accent: #1db88a; }
.a37-atlas-jump-chip.tone-coral { --j-accent: var(--at-coral); }

.a37-atlas-jump-chip span {
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  color: var(--at-leaf);
}

.a37-atlas-jump-chip:hover {
  transform: translateY(-2px);
  background: var(--at-ink);
  border-color: var(--at-ink);
  color: var(--at-mint);
  box-shadow: 0 10px 22px rgba(4, 38, 31, 0.15);
}

.a37-atlas-jump-chip:hover span {
  color: var(--j-accent);
}

/* —— Aisle docks —— */
.a37-atlas-aisles {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.a37-atlas-aisle {
  display: grid;
  grid-template-columns: minmax(140px, 0.85fr) 1.35fr;
  gap: 0;
  border-radius: 1.5rem;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--at-line);
  box-shadow: 0 14px 32px rgba(4, 38, 31, 0.06);
  overflow: hidden;
  scroll-margin-top: 5.5rem;
  animation: a37AtlasIn 0.45s var(--ease-out) both;
  transition: transform 0.3s var(--ease-spring), box-shadow 0.3s;
}

.a37-atlas-aisle:nth-child(1) { animation-delay: 0.06s; }
.a37-atlas-aisle:nth-child(2) { animation-delay: 0.09s; }
.a37-atlas-aisle:nth-child(3) { animation-delay: 0.12s; }
.a37-atlas-aisle:nth-child(4) { animation-delay: 0.15s; }
.a37-atlas-aisle:nth-child(5) { animation-delay: 0.18s; }
.a37-atlas-aisle:nth-child(6) { animation-delay: 0.21s; }
.a37-atlas-aisle:nth-child(7) { animation-delay: 0.24s; }

.a37-atlas-aisle.tone-mint { --a-accent: var(--at-mint); }
.a37-atlas-aisle.tone-gold { --a-accent: var(--at-gold); }
.a37-atlas-aisle.tone-teal { --a-accent: #1db88a; }
.a37-atlas-aisle.tone-coral { --a-accent: var(--at-coral); }

.a37-atlas-aisle.is-flip {
  grid-template-columns: 1.35fr minmax(140px, 0.85fr);
}

.a37-atlas-aisle.is-flip .a37-atlas-aisle-media {
  order: 2;
}

.a37-atlas-aisle.is-flip .a37-atlas-aisle-body {
  order: 1;
}

.a37-atlas-aisle:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(4, 38, 31, 0.1);
}

.a37-atlas-aisle-media {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 200px;
  padding: 1.25rem;
  background:
    linear-gradient(165deg, color-mix(in srgb, var(--a-accent) 18%, #fff), var(--at-sky));
  text-decoration: none !important;
}

.a37-atlas-aisle-media img {
  max-width: 72%;
  max-height: 160px;
  object-fit: contain;
  filter: drop-shadow(0 12px 20px rgba(4, 38, 31, 0.16));
  transition: transform 0.45s var(--ease-spring);
}

.a37-atlas-aisle:hover .a37-atlas-aisle-media img {
  transform: scale(1.06) translateY(-4px);
}

.a37-atlas-aisle-badge {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.a37-atlas-aisle-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.25rem 1.35rem;
  border-left: 4px solid var(--a-accent);
}

.a37-atlas-aisle.is-flip .a37-atlas-aisle-body {
  border-left: 0;
  border-right: 4px solid var(--a-accent);
}

.a37-atlas-aisle-num {
  display: block;
  margin-bottom: 0.3rem;
  font-size: 0.62rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--at-leaf);
}

.a37-atlas-aisle-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.a37-atlas-aisle-head h2 a {
  color: inherit;
  text-decoration: none !important;
}

.a37-atlas-aisle-head h2 a:hover {
  color: var(--at-leaf);
}

.a37-atlas-packets {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.a37-atlas-packets a {
  display: inline-block;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: var(--at-wash);
  border: 1px solid var(--at-line);
  font-size: 0.76rem;
  font-weight: 650;
  color: var(--at-ink);
  text-decoration: none !important;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.a37-atlas-packets a:hover {
  background: var(--at-ink);
  border-color: var(--at-ink);
  color: var(--at-mint);
}

/* —— Buttons / foot —— */
.a37-atlas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 0.75rem 1.25rem;
  border-radius: 999px;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s;
}

.a37-atlas-btn--sm {
  padding: 0.55rem 1rem;
  font-size: 0.68rem;
}

.a37-atlas-btn--primary {
  color: var(--at-ink);
  background: linear-gradient(135deg, var(--at-mint), #7ef0c4);
  box-shadow: 0 12px 28px rgba(46, 230, 168, 0.35);
}

.a37-atlas-btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(46, 230, 168, 0.45);
}

.a37-atlas-btn--soft {
  color: var(--at-ink);
  background: rgba(46, 230, 168, 0.15);
  border: 1px solid rgba(46, 230, 168, 0.3);
}

.a37-atlas-btn--soft:hover {
  background: var(--at-ink);
  color: var(--at-mint);
}

.a37-atlas-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.2rem 1.3rem;
  border-radius: 1.4rem;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid var(--at-line);
}

.a37-atlas-foot strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}

.a37-atlas-foot p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--at-muted);
  line-height: 1.5;
}

/* —— Responsive —— */
@media (max-width: 780px) {
  .a37-atlas-hero-inner {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .a37-atlas-crumb,
  .a37-atlas-lede {
    justify-content: center;
    margin-inline: auto;
  }

  .a37-atlas-strip {
    grid-template-columns: 1fr;
  }

  .a37-atlas-aisle,
  .a37-atlas-aisle.is-flip {
    grid-template-columns: 1fr;
  }

  .a37-atlas-aisle.is-flip .a37-atlas-aisle-media,
  .a37-atlas-aisle.is-flip .a37-atlas-aisle-body {
    order: unset;
  }

  .a37-atlas-aisle-body,
  .a37-atlas-aisle.is-flip .a37-atlas-aisle-body {
    border-left: 0;
    border-right: 0;
    border-top: 4px solid var(--a-accent);
  }

  .a37-atlas-foot {
    flex-direction: column;
    align-items: flex-start;
  }

  .a37-atlas-foot .a37-atlas-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .a37-atlas-hero-mesh,
  .a37-atlas-strip,
  .a37-atlas-jump,
  .a37-atlas-aisle {
    animation: none !important;
  }

  .a37-atlas-aisle:hover .a37-atlas-aisle-media img {
    transform: none;
  }
}
