/* 02-home-heritage.css — Scoped styles for the Interactive Concentric Heritage Astrolabe (prefix: sn15).
   Transparent, borderless placement directly over bg-sna-soft (#E8F5ED). */

.sn15-root {
  --sn15-dark: #0A2E1A;
  --sn15-forest: #0F3B22;
  --sn15-deep: #066632;
  --sn15-green: #0B9444;
  --sn15-sage: #4FB878;
  --sn15-gold: #E8A423;
  --sn15-gold-ink: #7A4B00;
  --sn15-soft: #E8F5ED;
  --sn15-white: #FFFFFF;
  --sn15-pulse-dur: 3.6s;

  position: relative;
  width: 100%;
  max-width: 404px;
  margin: 0 auto;
  padding: 6px 8px 8px;
  box-sizing: border-box;
  overflow: hidden;
  background: transparent;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.sn15-root *,
.sn15-root *::before,
.sn15-root *::after {
  box-sizing: border-box;
}

/* Era-driven harmonic pulse cadence */
.sn15-root[data-sn15-era="2011"] { --sn15-pulse-dur: 5.8s; }
.sn15-root[data-sn15-era="2016"] { --sn15-pulse-dur: 4.5s; }
.sn15-root[data-sn15-era="now"]  { --sn15-pulse-dur: 3.4s; }

/* Pause button slot: cleanly anchored top-right with zero overlap over the circular dial */
.sn15-pause-slot {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 8;
  min-width: 44px;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main circular timepiece stage */
.sn15-stage {
  position: relative;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  line-height: 0;
}

.sn15-svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  overflow: visible;
  user-select: none;
  -webkit-user-select: none;
}

/* Typography inside SVG */
.sn15-medallion,
.sn15-medallion *,
.sn15-needle,
.sn15-needle * {
  pointer-events: none;
}

.sn15-years-num {
  font-family: 'Lexend', system-ui, -apple-system, sans-serif;
  font-size: 58px;
  font-weight: 700;
  letter-spacing: -0.025em;
  fill: var(--sn15-white);
  font-variant-numeric: tabular-nums;
}

.sn15-years-cap {
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 9.2px;
  font-weight: 700;
  letter-spacing: 0.14em;
  fill: var(--sn15-gold);
}

.sn15-bezel-label {
  font-family: 'Lexend', system-ui, -apple-system, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  fill: var(--sn15-dark);
  opacity: 0.68;
  transition: fill 0.32s ease, opacity 0.32s ease;
  pointer-events: none;
}

.sn15-root[data-sn15-era="2011"] .sn15-bezel-label[data-sn15-label="2011"],
.sn15-root[data-sn15-era="2016"] .sn15-bezel-label[data-sn15-label="2016"],
.sn15-root[data-sn15-era="now"]  .sn15-bezel-label[data-sn15-label="now"] {
  fill: var(--sn15-deep);
  opacity: 1;
}

/* Harmonic concentric breathing rings */
.sn15-pulse {
  transform-box: view-box;
  transform-origin: 220px 220px;
}

.sn15-pulse-a {
  animation: sn15-breathe-a var(--sn15-pulse-dur) ease-in-out infinite;
}

.sn15-pulse-b {
  animation: sn15-breathe-b calc(var(--sn15-pulse-dur) * 1.28) ease-in-out infinite;
}

@keyframes sn15-breathe-a {
  0%, 100% {
    transform: scale(0.985);
    stroke-opacity: 0.16;
  }
  50% {
    transform: scale(1.028);
    stroke-opacity: 0.36;
  }
}

@keyframes sn15-breathe-b {
  0%, 100% {
    transform: scale(1.012);
    stroke-opacity: 0.16;
  }
  50% {
    transform: scale(0.978);
    stroke-opacity: 0.38;
  }
}

/* Era transition radial gold wave */
.sn15-wave {
  transform-box: view-box;
  transform-origin: 220px 220px;
  pointer-events: none;
}

.sn15-wave.sn15-wave-ping {
  animation: sn15-wave-burst 0.95s cubic-bezier(0.22, 0.85, 0.35, 1) forwards;
}

@keyframes sn15-wave-burst {
  0% {
    transform: scale(1);
    stroke-opacity: 0.78;
    stroke-width: 2.2;
  }
  100% {
    transform: scale(1.98);
    stroke-opacity: 0;
    stroke-width: 0.6;
  }
}

/* 15 Brushed-Gold Milestone Ticks */
.sn15-tick {
  opacity: 0.62;
  transition: opacity 0.38s ease;
}

.sn15-tick .sn15-era-beacon {
  opacity: 0;
  transition: opacity 0.38s ease;
}

.sn15-root[data-sn15-era="2011"] .sn15-tick[data-sn15-tick-era="2011"],
.sn15-root[data-sn15-era="2016"] .sn15-tick[data-sn15-tick-era="2016"],
.sn15-root[data-sn15-era="now"]  .sn15-tick[data-sn15-tick-era="now"] {
  opacity: 1;
}

.sn15-root[data-sn15-era="2011"] .sn15-tick-major[data-sn15-tick-era="2011"] .sn15-era-beacon,
.sn15-root[data-sn15-era="2016"] .sn15-tick-major[data-sn15-tick-era="2016"] .sn15-era-beacon,
.sn15-root[data-sn15-era="now"]  .sn15-tick-major[data-sn15-tick-era="now"] .sn15-era-beacon {
  opacity: 0.92;
  animation: sn15-beacon-pulse var(--sn15-pulse-dur) ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

@keyframes sn15-beacon-pulse {
  0%, 100% { transform: scale(0.92); stroke-opacity: 0.45; }
  50%      { transform: scale(1.22); stroke-opacity: 1; }
}

/* Botanical Laurel Clusters */
.sn15-laurel-cluster {
  transition: opacity 0.42s ease;
}

.sn15-laurel-stem {
  stroke: var(--sn15-deep);
  stroke-opacity: 0.34;
  transition: stroke 0.42s ease, stroke-opacity 0.42s ease, stroke-width 0.42s ease;
}

.sn15-leaf {
  fill: var(--sn15-deep);
  fill-opacity: 0.28;
  stroke: var(--sn15-dark);
  stroke-width: 0.45;
  stroke-opacity: 0.34;
  transition: fill 0.42s ease, fill-opacity 0.42s ease, stroke 0.42s ease, stroke-opacity 0.42s ease;
}

.sn15-berry {
  fill: var(--sn15-gold);
  fill-opacity: 0.48;
  transition: fill-opacity 0.42s ease;
}

.sn15-root[data-sn15-era="2011"] .sn15-laurel-cluster[data-sn15-laurel="2011"] .sn15-laurel-stem,
.sn15-root[data-sn15-era="2016"] .sn15-laurel-cluster[data-sn15-laurel="2016"] .sn15-laurel-stem,
.sn15-root[data-sn15-era="now"]  .sn15-laurel-cluster[data-sn15-laurel="now"]  .sn15-laurel-stem {
  stroke: var(--sn15-gold);
  stroke-opacity: 0.95;
  stroke-width: 1.55;
}

.sn15-root[data-sn15-era="2011"] .sn15-laurel-cluster[data-sn15-laurel="2011"] .sn15-leaf,
.sn15-root[data-sn15-era="2016"] .sn15-laurel-cluster[data-sn15-laurel="2016"] .sn15-leaf,
.sn15-root[data-sn15-era="now"]  .sn15-laurel-cluster[data-sn15-laurel="now"]  .sn15-leaf {
  fill: var(--sn15-green);
  fill-opacity: 0.92;
  stroke: var(--sn15-gold);
  stroke-width: 0.75;
  stroke-opacity: 0.92;
}

.sn15-root[data-sn15-era="2011"] .sn15-laurel-cluster[data-sn15-laurel="2011"] .sn15-berry,
.sn15-root[data-sn15-era="2016"] .sn15-laurel-cluster[data-sn15-laurel="2016"] .sn15-berry,
.sn15-root[data-sn15-era="now"]  .sn15-laurel-cluster[data-sn15-laurel="now"]  .sn15-berry {
  fill-opacity: 1;
}

/* Interactive clickable orbital ring */
.sn15-dial-hit {
  cursor: pointer;
  outline: none;
}

.sn15-dial-hit:focus-visible .sn15-dial-ring-focus {
  stroke: var(--sn15-deep);
  stroke-width: 3;
  stroke-dasharray: 7 5;
}

/* Tactile Minimal Circular Era Pills along the Bottom Arc */
.sn15-era-arc {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: -6px;
  padding: 6px 4px 4px;
  position: relative;
  z-index: 4;
  max-width: 100%;
}

.sn15-pill {
  appearance: none;
  -webkit-appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  min-height: 52px;
  padding: 0 10px;
  border-radius: 9999px;
  border: 1.75px solid var(--sn15-deep);
  background: rgba(255, 255, 255, 0.92);
  color: var(--sn15-dark);
  font-family: 'Lexend', system-ui, -apple-system, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 4px 12px -6px rgba(10, 46, 26, 0.24);
  transition: background-color 0.24s ease, color 0.24s ease, border-color 0.24s ease, transform 0.24s ease, box-shadow 0.24s ease;
}

.sn15-pill-wing {
  transform: translateY(-6px);
}

.sn15-pill-center {
  transform: translateY(4px);
}

.sn15-pill:hover {
  background: var(--sn15-white);
  border-color: var(--sn15-dark);
  box-shadow: 0 6px 16px -6px rgba(10, 46, 26, 0.34);
}

.sn15-pill-wing:hover  { transform: translateY(-8px); }
.sn15-pill-center:hover { transform: translateY(2px); }

.sn15-pill:active {
  transform: scale(0.95);
}

.sn15-pill[aria-pressed="true"] {
  background: var(--sn15-dark);
  border-color: var(--sn15-gold);
  border-width: 2px;
  color: var(--sn15-white);
  box-shadow: 0 0 0 3px rgba(232, 164, 35, 0.26), 0 8px 18px -8px rgba(10, 46, 26, 0.45);
}

.sn15-pill[aria-pressed="true"]:hover {
  background: var(--sn15-forest);
  border-color: var(--sn15-gold);
  color: var(--sn15-white);
}

.sn15-pill:focus {
  outline: none;
}

.sn15-pill:focus-visible {
  outline: 3px solid var(--sn15-deep);
  outline-offset: 3px;
}

/* Mobile responsiveness down to 320px */
@media (max-width: 390px) {
  .sn15-root {
    padding: 4px 2px 6px;
  }
  .sn15-era-arc {
    gap: 10px;
    margin-top: -2px;
  }
  .sn15-pill {
    min-width: 48px;
    min-height: 48px;
    font-size: 0.78rem;
  }
}

/* Global Pause Contract (WCAG 2.2.2) */
html.snam-paused .sn15-root *,
html.snam-paused .sn15-root *::before,
html.snam-paused .sn15-root *::after {
  animation-play-state: paused !important;
}

/* Reduced Motion Contract: disable all looping animations while keeping full opacity */
@media (prefers-reduced-motion: reduce) {
  .sn15-root *,
  .sn15-root *::before,
  .sn15-root *::after {
    animation: none !important;
    transition: none !important;
  }
  .sn15-pulse,
  .sn15-tick,
  .sn15-laurel-cluster,
  .sn15-medallion,
  .sn15-pill {
    opacity: 1 !important;
  }
  .sn15-wave {
    display: none;
  }
}

/* High-contrast / Forced-colors mode support */
@media (forced-colors: active) {
  .sn15-pill {
    border-color: ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
  .sn15-pill[aria-pressed="true"] {
    background: Highlight;
    color: HighlightText;
    border-color: Highlight;
  }
  .sn15-pill:focus-visible {
    outline-color: Highlight;
  }
}
