/* Moon calendar pages: the Lumina app's Moon event screen on the web.
   Tokens from home.css (design/foundation.json); warm eyebrow = artwork.moonMid. */
.ev {
  --warm: #f1dfc2;
  --card-border: rgba(65, 54, 82, 0.85);
}
.wrap-ev {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* hero: the Moon event screen's top half */
.hero-ev {
  position: relative;
  overflow-x: clip;
  padding: 40px 0 8px;
  min-height: 560px;
}
.hero-moon {
  position: absolute;
  z-index: 0;
  width: 500px;
  height: auto;
  top: 36px;
  left: calc(50% + 190px);
  pointer-events: none;
  user-select: none;
  will-change: transform, opacity;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.kicker {
  font: 600 0.8125rem/1.2 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tx3);
}
.eyebrow-warm {
  margin-top: 36px;
  font: 600 0.9375rem/1.3 var(--sans);
  letter-spacing: 0.08em;
  color: var(--warm);
}
.big-time {
  margin-top: 6px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font: 600 clamp(5rem, 3.6rem + 6vw, 8.5rem)/0.95 var(--serif);
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums tabular-nums;
}
.big-time .ampm {
  font: 600 clamp(1.5rem, 1.2rem + 1vw, 2.25rem)/1 var(--sans);
  letter-spacing: 0;
  color: var(--tx2);
}
.in {
  margin-top: 14px;
  font-size: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  color: var(--tx2);
}
.in b {
  font-weight: 600;
  color: var(--lav);
  font-variant-numeric: tabular-nums;
}
.headline {
  max-width: 10em; /* wraps before it reaches the art */
  margin-top: 40px;
  font: 600 clamp(2.25rem, 1.6rem + 2.4vw, 3.25rem)/1.08 var(--serif);
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.body {
  margin-top: 14px;
  max-width: 30em;
  font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  line-height: 1.6;
  color: var(--tx2);
  text-wrap: pretty;
}

/* sections and cards, as in the app */
.sec {
  margin-top: 48px;
}
.label {
  margin: 0 0 12px 8px;
  font: 600 0.8125rem/1.2 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tx3);
}
.card {
  margin: 0;
  padding: 20px;
  border-radius: 24px;
  background: var(--surface);
  border: 1px solid var(--card-border);
}

/* Lock Screen preview, like the app's */
.lock-preview {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid var(--card-border);
}
/* The Lock Screen card's Moon for every kind of event (LunarDisc in
   targets/LuminaWidgets/MoonEventLiveActivity.swift): the Moon texture with a
   vignette centred at (0.38, 0.35), radius 0.68 of the disc, moonVignette
   #080812 at 0 / 0.08 / 0.55. */
.disc {
  flex: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(
      circle 25.84px at 38% 35%,
      rgba(8, 8, 18, 0) 25%,
      rgba(8, 8, 18, 0.08) 70%,
      rgba(8, 8, 18, 0.55) 100%
    ),
    url("/assets/moon/lunar-disc.webp") center / cover no-repeat;
}
.lp-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.lp-kind {
  font: 600 0.75rem/1.3 var(--sans);
  letter-spacing: 0.09em;
  color: var(--lav);
}
.lp-title {
  font: 600 1.125rem/1.3 var(--serif);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-count {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.lp-clock {
  font: 600 1.625rem/1.1 var(--sans);
  color: var(--lav);
  font-variant-numeric: tabular-nums;
}
.lp-from {
  font-size: 0.8125rem;
  color: var(--tx3);
}
.lock-line {
  display: flex;
  gap: 12px;
  margin: 18px 4px 20px;
  color: var(--tx2);
}
.lock-icon svg {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  fill: none;
  stroke: var(--lav);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.lock-card .badge {
  margin-left: 4px;
}

/* timeline: the app's "In order" card */
.tl {
  list-style: none;
  position: relative;
  padding: 8px 20px 8px 20px;
}
.tl-row {
  position: relative;
  padding: 18px 0 18px 36px;
}
.tl-row + .tl-row {
  border-top: 1px solid rgba(65, 54, 82, 0.45);
}
/* the line through the dots */
.tl-row::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(196, 163, 255, 0.28);
  transform-origin: top;
}
.tl-row:first-child::before {
  top: 26px;
}
.tl-row:last-child::before {
  bottom: calc(100% - 26px);
}
.tl-dot {
  position: absolute;
  left: 0;
  top: 18px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--warm);
  box-shadow: 0 0 0 4px var(--surface);
}
.tl-row.is-next .tl-dot,
.tl-row.is-now .tl-dot {
  background: var(--lav);
}
.tl-day {
  font: 600 0.8125rem/1.2 var(--sans);
  letter-spacing: 0.08em;
  color: var(--tx3);
}
.tl-main {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-top: 8px;
}
.tl-text {
  min-width: 0;
}
.tl-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}
.tl-text h3 {
  font: 600 1.125rem/1.3 var(--sans);
}
.tl-row.is-next h3 {
  color: var(--lav);
}
.tl-text p {
  margin-top: 3px;
  color: var(--tx2);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}
.utc {
  color: var(--tx3);
  white-space: nowrap;
}
.tl-time {
  flex: none;
  font: 600 1.125rem/1.3 var(--sans);
  font-variant-numeric: tabular-nums;
}
.tl-note {
  margin-top: 8px;
  color: var(--tx3);
  font-size: 0.9375rem;
  text-wrap: pretty;
}
.chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 99px;
  background: var(--sel);
  color: var(--tx);
  font: 600 0.75rem/1.4 var(--sans);
  letter-spacing: 0.02em;
}

.faq h3 {
  font: 600 1.0625rem/1.4 var(--sans);
}
.faq h3 + p {
  margin-top: 6px;
  color: var(--tx2);
}
.faq p + h3 {
  margin-top: 22px;
}
.zone-line {
  margin-top: 14px;
  font-size: 0.875rem;
  color: var(--tx3);
}
.foot-note {
  margin: 20px 8px 56px;
  font-size: 0.9375rem;
  color: var(--tx3);
}

/* motion: the app's Rise (a few points, ease-out, once) and the Moon arriving */
.js .rise {
  opacity: 0;
  transform: translateY(10px);
  animation: ev-rise 0.6s var(--ease) forwards;
  animation-delay: calc(0.12s + var(--i) * 0.06s);
}
.js .hero-moon {
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.97);
  animation: ev-moon 1.1s var(--ease) 0.05s forwards;
}
@keyframes ev-rise {
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes ev-moon {
  to {
    opacity: 1;
    transform: translate3d(0, var(--py, 0px), 0) scale(1);
  }
}
.js .reveal,
.js .tl-row {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.5s var(--ease),
    transform 0.5s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .tl-row::before {
  transform: scaleY(0);
  transition: transform 0.6s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in-view,
.js .tl-row.in-view {
  opacity: 1;
  transform: none;
}
.js .tl-row.in-view::before {
  transform: scaleY(1);
}
@media (prefers-reduced-motion: reduce) {
  .js .rise,
  .js .hero-moon {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .js .reveal,
  .js .tl-row,
  .js .tl-row::before {
    transition: opacity 0.2s ease;
    transform: none;
  }
}

/* tablet widths: the art moves in and shrinks so it stays whole beside the text */
@media (min-width: 701px) and (max-width: 1100px) {
  .hero-moon {
    width: 36vw;
    top: 24px;
    left: auto;
    right: -4vw;
  }
}

/* phone */
@media (max-width: 700px) {
  .hero-ev {
    padding-top: 28px;
  }
  .hero-ev {
    min-height: 0;
  }
  /* smaller and higher than on wide screens, so no text runs over the art */
  .hero-moon {
    width: 46vw;
    top: 14px;
    left: auto;
    right: -12vw;
  }
  .eyebrow-warm {
    margin-top: 28px;
    font-size: 0.8125rem;
    max-width: 56vw;
  }
  .headline {
    margin-top: 32px;
  }
  .card {
    padding: 16px;
  }
  .tl {
    padding: 4px 16px;
  }
  .tl-row {
    padding-left: 32px;
  }
  .lock-preview {
    padding: 12px 14px;
    gap: 12px;
  }
  .lp-title {
    font-size: 1rem;
    white-space: normal;
  }
  .lp-clock {
    font-size: 1.375rem;
  }
}
.js .hero-moon.landed {
  animation: none;
  opacity: 1;
  transform: translate3d(0, var(--py, 0px), 0);
}

/* Cosmic Weather's Retrograde panel, as the app draws it (WeatherPanels.tsx) */
.cw-panel {
  padding: 10px 14px 14px;
  border-radius: 18px;
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.cw-head {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font: 600 0.75rem/1.3 var(--sans);
  letter-spacing: 0.09em;
  color: var(--tx2);
}
.cw-head svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cw-planets {
  font: 600 1.1875rem/1.25 var(--sans);
  letter-spacing: -0.01em;
}
.cw-count {
  margin-top: 2px;
  font-size: 0.875rem;
  color: var(--tx2);
}
.cw-tip {
  margin-top: 8px;
  font: 500 0.875rem/1.4 var(--sans);
  color: #34d399; /* colors.positive */
}
.cw-tip:empty {
  display: none;
}
.cw-line-icon .i {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  color: #7dd3fc;
  stroke: currentColor;
  stroke-width: 1.8;
}

/* retrograde now (retrograde planets hero) */
.now-label {
  margin-top: 26px;
  font: 600 0.8125rem/1.2 var(--sans);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--tx3);
}
.now-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 34em;
}
.now-list li {
  padding: 7px 14px;
  border-radius: 99px;
  background: var(--sel);
  color: var(--tx2);
  font-size: 0.9375rem;
}
.now-list b {
  font-weight: 600;
  color: var(--tx);
}

/* rows that have passed while the page is open */
.tl-row.is-past h3,
.tl-row.is-past .tl-time {
  color: var(--tx3);
}
.tl-row.is-past .tl-dot {
  background: #766e8e; /* 3.6:1 on the card */
}

/* Moon calendar: links to the other pages */
.cal {
  list-style: none;
  padding: 4px 0;
}
.cal li + li {
  border-top: 1px solid rgba(65, 54, 82, 0.45);
}
.cal a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 12px 20px;
  color: var(--tx);
  text-decoration: none;
  transition: background-color 0.1s ease-out;
}
.cal a:active {
  background: var(--raised);
}
.cal a > span > span {
  display: block;
  margin-top: 2px;
  font-size: 0.9375rem;
  color: var(--tx3);
}
.cal b {
  display: block;
  font: 600 1.0625rem/1.3 var(--sans);
}
.cal a:hover b {
  color: var(--lav);
}
.chev {
  flex: none;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--tx3);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cal li:first-child a {
  border-radius: 24px 24px 0 0;
}
.cal li:last-child a {
  border-radius: 0 0 24px 24px;
}

/* the next event, when one passes while the page is open: a quiet cross-fade */
.js .hero-ev.swapped .rise {
  opacity: 0;
  transform: none;
  animation: ev-fade 0.5s var(--ease) forwards;
  animation-delay: 0s;
}
.js .hero-ev.swapped .hero-moon {
  opacity: 0;
  transform: translate3d(0, var(--py, 0px), 0);
  animation: ev-fade-moon 0.6s var(--ease) forwards;
}
.js .hero-ev.settled .rise {
  opacity: 1;
  transform: none;
  animation: none;
}
.js .hero-ev.settled .hero-moon {
  opacity: 1;
  transform: translate3d(0, var(--py, 0px), 0);
  animation: none;
}
@keyframes ev-fade {
  to {
    opacity: 1;
  }
}
@keyframes ev-fade-moon {
  to {
    opacity: 1;
    transform: translate3d(0, var(--py, 0px), 0);
  }
}
@media (max-width: 700px) {
  .cal a {
    padding: 12px 16px;
  }
}
