/* Appily fortytwo — Harvest Atlas catalog (unique layout + dynamic UI) */

.page-catalog-atlas {
  --at-olive: var(--a42-olive);
  --at-olive-dark: var(--a42-olive-dark);
  --at-gold: var(--a42-gold);
  --at-rose: var(--a42-rose);
  --at-terra: #B85C38;
  --at-moss: #3D6B4F;
  --at-sage: var(--a42-sage-mid);
  --at-ink: var(--a42-ink);
  --at-muted: var(--a42-muted);
  --at-border: var(--a42-border);
  --at-cream: var(--a42-cream);
  --at-white: var(--a42-white);
  --at-display: 'Syne', system-ui, sans-serif;
  background:
    radial-gradient(ellipse 75% 45% at 100% 0%, rgba(201, 162, 39, 0.09), transparent 50%),
    radial-gradient(ellipse 55% 40% at 0% 100%, rgba(61, 107, 79, 0.08), transparent 45%),
    var(--at-cream);
}

.page-catalog-atlas .page-main { padding-top: 0; }

.a42-atlas-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--at-terra);
}

/* ── Hero ── */
.a42-atlas-hero {
  position: relative;
  padding: clamp(32px, 5vw, 48px) 0 clamp(24px, 3vw, 32px);
  overflow: hidden;
}

.a42-atlas-canvas { position: absolute; inset: 0; pointer-events: none; }

.a42-atlas-ring {
  position: absolute;
  border: 2px dashed rgba(31, 69, 41, 0.1);
  border-radius: 50%;
  animation: a42AtlasSpin 40s linear infinite;
}
.a42-atlas-ring--1 { width: 480px; height: 480px; top: -170px; right: -90px; }
.a42-atlas-ring--2 { width: 280px; height: 280px; bottom: -100px; left: -55px; animation-direction: reverse; }
@keyframes a42AtlasSpin { to { transform: rotate(360deg); } }

.a42-atlas-mesh {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(31, 69, 41, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 69, 41, 0.03) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, #000 25%, transparent 92%);
}

.a42-atlas-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(24px, 4vw, 40px);
  align-items: end;
}

.a42-atlas-crumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--at-muted);
}
.a42-atlas-crumb a {
  color: var(--at-muted);
  text-decoration: none;
  transition: color 0.2s;
}
.a42-atlas-crumb a:hover { color: var(--at-moss); }

.a42-atlas-hero-copy h1 {
  margin: 0 0 12px;
  font-family: var(--at-display);
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.06;
  letter-spacing: -0.03em;
  color: var(--at-ink);
}
.a42-atlas-hero-copy h1 em {
  font-style: normal;
  color: var(--at-moss);
  display: block;
}

.a42-atlas-lede {
  margin: 0 0 16px;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.65;
  color: var(--at-muted);
}

.a42-atlas-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.a42-atlas-stat {
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--at-border);
  border-radius: 14px;
  transition: transform 0.25s;
}
.a42-atlas-stat:hover { transform: translateY(-3px); }
.a42-atlas-stat strong {
  display: block;
  font-family: var(--at-display);
  font-size: 1.35rem;
  color: var(--at-moss);
  line-height: 1.1;
}
.a42-atlas-stat span {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--at-muted);
}

.a42-atlas-ticket {
  padding: 22px 24px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--at-border);
  border-radius: 22px;
  box-shadow: 0 20px 48px rgba(26, 46, 31, 0.1);
  transform: rotate(1deg);
  transition: transform 0.35s ease;
}
.a42-atlas-ticket:hover { transform: rotate(0deg); }
.a42-atlas-ticket-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--at-muted);
}
.a42-atlas-ticket-head strong {
  font-family: var(--at-display);
  font-size: 2rem;
  color: var(--at-moss);
  line-height: 1;
}
.a42-atlas-ticket-bar {
  height: 10px;
  background: rgba(31, 69, 41, 0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 8px;
}
.a42-atlas-ticket-fill {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--at-moss), var(--at-gold));
  border-radius: inherit;
  transition: width 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}
.a42-atlas-ticket-meta {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-muted);
}

/* Ticker */
.a42-atlas-ticker {
  overflow: hidden;
  margin-bottom: clamp(24px, 4vw, 32px);
  padding: 14px 0;
  background: linear-gradient(90deg, var(--at-moss), var(--at-olive-dark));
  color: #fff;
}
.a42-atlas-ticker-track {
  display: flex;
  gap: 48px;
  width: max-content;
  animation: a42AtlasTicker 30s linear infinite;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.a42-atlas-ticker-track span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
@keyframes a42AtlasTicker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ── Split deck: index left, crates right ── */
.a42-atlas-deck {
  display: grid;
  grid-template-columns: minmax(220px, 260px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 28px);
  align-items: start;
  padding-bottom: clamp(48px, 6vw, 64px);
}

.a42-atlas-index {
  position: sticky;
  top: calc(var(--a42-header-offset, 100px) + 12px);
  padding: 20px 16px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--at-border);
  border-radius: 24px;
  border-left: 4px solid var(--at-moss);
  box-shadow: 0 16px 40px rgba(26, 46, 31, 0.07);
}

.a42-atlas-index-head { margin-bottom: 14px; }
.a42-atlas-index-head h2 {
  margin: 0;
  font-family: var(--at-display);
  font-size: 1.1rem;
  letter-spacing: -0.02em;
}

.a42-atlas-index-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.a42-atlas-index-link {
  --index-tone: var(--at-moss);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  text-decoration: none;
  border: 2px solid transparent;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.a42-atlas-index-link.tone-olive { --index-tone: var(--at-olive); }
.a42-atlas-index-link.tone-moss { --index-tone: var(--at-moss); }
.a42-atlas-index-link.tone-gold { --index-tone: var(--at-gold); }
.a42-atlas-index-link.tone-terra { --index-tone: var(--at-terra); }
.a42-atlas-index-link:hover {
  background: rgba(61, 107, 79, 0.06);
  text-decoration: none;
}
.a42-atlas-index-link.is-active {
  border-color: var(--index-tone);
  background: rgba(61, 107, 79, 0.08);
  transform: translateX(4px);
}
.a42-atlas-index-link--all {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px dashed var(--at-border);
  border-radius: 0;
  border-left: 0;
  border-right: 0;
}
.a42-atlas-index-link--all.is-active { border-radius: 12px; }
.a42-atlas-index-num {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--at-gold);
}
.a42-atlas-index-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--at-ink);
}
.a42-atlas-index-count {
  font-size: 11px;
  font-weight: 800;
  color: var(--index-tone);
  background: rgba(61, 107, 79, 0.08);
  padding: 3px 8px;
  border-radius: 999px;
}

/* Main crates */
.a42-atlas-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.a42-atlas-section-head h2 {
  margin: 0;
  font-family: var(--at-display);
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
}
.a42-atlas-section-link {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--at-moss);
  text-decoration: none;
}
.a42-atlas-section-link:hover { text-decoration: underline; }

.a42-atlas-crates {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 24px;
}

.a42-atlas-crate {
  --crate-tone: var(--at-moss);
  display: grid;
  grid-template-columns: minmax(140px, 200px) minmax(0, 1fr);
  gap: 0;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--at-border);
  border-radius: 22px;
  overflow: hidden;
  scroll-margin-top: calc(var(--a42-header-offset, 100px) + 80px);
  animation: a42AtlasCrateIn 0.5s ease backwards;
  animation-delay: var(--crate-delay, 0ms);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}
.a42-atlas-crate.tone-olive { --crate-tone: var(--at-olive); }
.a42-atlas-crate.tone-moss { --crate-tone: var(--at-moss); }
.a42-atlas-crate.tone-gold { --crate-tone: var(--at-gold); }
.a42-atlas-crate.tone-terra { --crate-tone: var(--at-terra); }
@keyframes a42AtlasCrateIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
.a42-atlas-crate:hover {
  transform: translateY(-4px);
  border-color: var(--crate-tone);
  box-shadow: 0 18px 40px rgba(26, 46, 31, 0.1);
}

.a42-atlas-crate-cover {
  position: relative;
  display: block;
  min-height: 180px;
  background: linear-gradient(160deg, #fff, var(--at-cream));
}
.a42-atlas-crate-cover img {
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: contain;
  padding: 1rem;
  transition: transform 0.35s ease;
}
.a42-atlas-crate:hover .a42-atlas-crate-cover img { transform: scale(1.04); }
.a42-atlas-crate-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: var(--crate-tone);
}

.a42-atlas-crate-body {
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border-left: 1px dashed var(--at-border);
}

.a42-atlas-crate-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.a42-atlas-crate-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 1.3rem;
  border-radius: 12px;
  background: rgba(61, 107, 79, 0.08);
  border: 1px solid rgba(61, 107, 79, 0.15);
}
.a42-atlas-crate-count {
  display: block;
  margin-bottom: 2px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--crate-tone);
}
.a42-atlas-crate-head h3 {
  margin: 0;
  font-family: var(--at-display);
  font-size: 1.15rem;
  line-height: 1.2;
}
.a42-atlas-crate-head h3 a {
  color: var(--at-ink);
  text-decoration: none;
}
.a42-atlas-crate-head h3 a:hover { color: var(--crate-tone); }

.a42-atlas-crate-peeks {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
}
.a42-atlas-crate-peeks a {
  display: block;
  width: 56px;
  height: 56px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--at-border);
  background: var(--at-cream);
  transition: border-color 0.2s, transform 0.2s;
}
.a42-atlas-crate-peeks a:hover {
  border-color: var(--crate-tone);
  transform: scale(1.06);
}
.a42-atlas-crate-peeks img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.a42-atlas-crate-foot { margin-top: auto; }
.a42-atlas-crate-cta {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--crate-tone);
  text-decoration: none;
}
.a42-atlas-crate-cta:hover { text-decoration: underline; }

/* Filter bench */
.a42-atlas-bench {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  background: linear-gradient(145deg, rgba(61, 107, 79, 0.08), rgba(201, 162, 39, 0.06));
  border: 1px solid rgba(61, 107, 79, 0.2);
  border-radius: 20px;
}
.a42-atlas-bench-copy strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--at-display);
  font-size: 1rem;
}
.a42-atlas-bench-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--at-muted);
}

.a42-atlas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: 12px;
  font: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 0;
  transition: transform 0.2s, box-shadow 0.2s;
}
.a42-atlas-btn--primary {
  color: #fff !important;
  background: linear-gradient(135deg, var(--at-olive), var(--at-moss));
  box-shadow: 0 8px 22px rgba(31, 69, 41, 0.25);
}
.a42-atlas-btn--primary:hover {
  transform: translateY(-2px);
  text-decoration: none !important;
}

/* ── Responsive ── */
@media (max-width: 960px) {
  .a42-atlas-hero-grid { grid-template-columns: 1fr; }
  .a42-atlas-ticket { transform: none; }
  .a42-atlas-deck { grid-template-columns: 1fr; }
  .a42-atlas-index {
    position: static;
    border-left: 1px solid var(--at-border);
  }
  .a42-atlas-index-list {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .a42-atlas-index-link {
    flex: 1 1 calc(50% - 6px);
    min-width: 140px;
  }
  .a42-atlas-index-link--all {
    flex: 1 1 100%;
    margin-top: 0;
    padding-top: 10px;
  }
}

@media (max-width: 640px) {
  .a42-atlas-crate {
    grid-template-columns: 1fr;
  }
  .a42-atlas-crate-body {
    border-left: 0;
    border-top: 1px dashed var(--at-border);
  }
  .a42-atlas-crate-cover { min-height: 160px; }
  .a42-atlas-bench {
    flex-direction: column;
    align-items: stretch;
  }
  .a42-atlas-btn { width: 100%; text-align: center; }
  .a42-atlas-index-link { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .a42-atlas-ring,
  .a42-atlas-ticker-track,
  .a42-atlas-crate { animation: none; }
  .a42-atlas-crate:hover,
  .a42-atlas-stat:hover,
  .a42-atlas-index-link.is-active { transform: none; }
}
