/* ==========================================================================
   Mythmend page — layered on ../styles.css (same ink, copper and serif frame).
   The Aegean colour comes from the renders; accents here stay small.
   ========================================================================== */

.mm-page {
  --mm-whitewash: #f4f0e6;
  --mm-sand: #e6d2a3;
  --mm-terracotta: #cf8a5c;
  --mm-terracotta-dark: #9a4f2e;
  --mm-lapis: #27479c;
  --mm-sea: #44b3c2;
  --mm-ink: #2a2320;
  --relic-red: #e23b2e;
  --relic-blue: #2f86e8;
  --relic-gold: #f5b82e;
  --relic-green: #36b04c;
  --relic-purple: #8e3fb8;
  --relic-white: #f3efe6;
}

nav a[aria-current="page"] {
  color: var(--paper);
}

nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.mm-caption {
  margin: 0.9rem 0 0;
  color: rgba(238, 231, 218, 0.46);
  font-size: 0.66rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mm-lede {
  max-width: 560px;
  color: var(--paper-dim);
  font-size: 1.02rem;
}

.mm-page h2 {
  text-wrap: balance;
}

/* ---------- hero ---------- */

.mm-hero-art {
  object-position: 66% center;
}

.mm-hero-shade {
  position: absolute;
  inset: 0;
  z-index: -3;
  background:
    linear-gradient(90deg, rgba(8, 7, 6, 0.94) 0%, rgba(8, 7, 6, 0.78) 26%, rgba(8, 7, 6, 0.3) 48%, rgba(8, 7, 6, 0) 62%),
    linear-gradient(0deg, var(--ink) 0%, rgba(10, 9, 8, 0.4) 16%, transparent 34%),
    linear-gradient(180deg, rgba(8, 7, 6, 0.55) 0%, transparent 18%);
}

.mm-hero-content {
  width: min(640px, 48vw);
}

.mm-hero h1 {
  margin-bottom: 0.9rem;
}

.mm-tagline {
  margin-bottom: 1.4rem;
  color: var(--copper-bright);
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-style: italic;
  line-height: 1.25;
}

.mm-hero .hero-lede {
  max-width: 520px;
  color: rgba(238, 231, 218, 0.82);
}

/* ---------- how it plays ---------- */

.mm-play {
  display: grid;
  grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  padding-block: clamp(6rem, 10vw, 10rem);
  border-bottom: 1px solid rgba(238, 231, 218, 0.08);
}

.mm-phone {
  margin: 0;
}

.mm-phone-frame {
  padding: 10px;
  border: 1px solid rgba(238, 231, 218, 0.16);
  border-radius: 34px;
  background: linear-gradient(160deg, #1d1915, #0e0d0b);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(0, 0, 0, 0.6) inset;
}

.mm-phone-frame img {
  width: 100%;
  height: auto;
  border-radius: 25px;
}

.mm-phone .mm-caption {
  text-align: center;
}

.mm-play-copy h2,
.mm-daily-copy h2,
.mm-section-head h2,
.mm-teaser-head h2,
.mm-status h2 {
  margin-bottom: 1.4rem;
  font-size: clamp(2.5rem, 4.6vw, 4.8rem);
  letter-spacing: -0.05em;
}

.mm-steps {
  margin: 2.4rem 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.mm-steps li {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0.75rem;
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.mm-step-number {
  padding-top: 0.2rem;
  color: var(--copper);
  font-family: var(--serif);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
}

.mm-steps h3 {
  margin-bottom: 0.4rem;
  font-size: 1.55rem;
  letter-spacing: -0.02em;
}

.mm-steps p {
  margin: 0;
  color: var(--paper-dim);
  font-size: 0.95rem;
}

/* ---------- shared section head ---------- */

.mm-section-head,
.mm-teaser-head {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(1.5rem, 5vw, 5rem);
  align-items: end;
  margin-bottom: 3rem;
}

.mm-section-head > p,
.mm-teaser-head > p {
  margin-bottom: 1.6rem;
  color: var(--paper-dim);
}

/* ---------- teaser stage ---------- */

.mm-teaser {
  position: relative;
  padding-block: clamp(6rem, 10vw, 9rem);
  border-bottom: 1px solid rgba(238, 231, 218, 0.08);
  background: radial-gradient(ellipse at 50% 70%, rgba(68, 179, 194, 0.07), transparent 60%);
}

.mm-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 82vh;
  max-height: 82svh;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 218, 0.12);
  background: #1a1f24;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35);
}

.mm-stage-poster,
.mm-stage-host {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.mm-stage-poster {
  object-fit: cover;
  object-position: 62% center;
  transition: opacity 400ms ease, filter 400ms ease;
}

.mm-stage::after {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(20deg, rgba(8, 7, 6, 0.78), rgba(8, 7, 6, 0.1) 45%, transparent 60%),
    linear-gradient(0deg, rgba(8, 7, 6, 0.35), transparent 40%);
  content: "";
  pointer-events: none;
  transition: opacity 400ms ease;
}

.mm-stage.is-running::after,
.mm-stage.is-running .mm-stage-poster {
  opacity: 0;
}

.mm-stage-host canvas {
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
  touch-action: pan-y;
  outline: none;
}

.mm-stage-host canvas.is-dragging {
  cursor: grabbing;
}

.mm-stage-host canvas:focus-visible {
  box-shadow: inset 0 0 0 2px var(--copper-bright);
}

.mm-stage-cta {
  position: absolute;
  inset: auto auto 0 0;
  z-index: 2;
  display: grid;
  justify-items: start;
  gap: 0.2rem;
  max-width: 420px;
  padding: clamp(1.25rem, 3.5vw, 2.6rem);
  text-align: left;
}

.mm-stage-cta .button {
  font-family: inherit;
  cursor: pointer;
}

.mm-stage-cta .button:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.mm-stage-cta[hidden] {
  display: none;
}

.mm-stage-note {
  margin: 0.7rem 0 0;
  color: rgba(238, 231, 218, 0.72);
  font-size: 0.78rem;
}

.mm-stage.is-loading .button {
  opacity: 0.7;
  pointer-events: none;
}

.mm-stage-hud {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.mm-stage-hud[hidden] {
  display: none;
}

.mm-stage-count,
.mm-stage-hint {
  position: absolute;
  margin: 0;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--mm-ink);
  background: rgba(244, 240, 230, 0.9);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mm-stage-count {
  top: 1rem;
  left: 1rem;
}

.mm-stage-hint {
  top: 1rem;
  right: 1rem;
  color: rgba(244, 240, 230, 0.95);
  background: rgba(10, 9, 8, 0.55);
  backdrop-filter: blur(6px);
  transition: opacity 600ms ease;
}

.mm-stage-hint.is-faded {
  opacity: 0;
}

.mm-stage-controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
  pointer-events: auto;
}

.mm-stage-controls button {
  min-width: 44px;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid rgba(238, 231, 218, 0.28);
  border-radius: 999px;
  color: var(--paper);
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.mm-stage-controls button:hover,
.mm-stage-controls button:focus-visible {
  border-color: var(--copper-bright);
  background: rgba(10, 9, 8, 0.85);
}

.mm-stage-controls button:focus-visible {
  outline: 2px solid var(--copper-bright);
  outline-offset: 2px;
}

.mm-stage-controls [data-teaser-spin] {
  padding-inline: 0.5rem;
  font-size: 1rem;
}

.mm-stage-status {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 3;
  max-width: min(420px, calc(100% - 2rem));
  margin: 0;
  color: var(--paper);
  font-family: var(--serif);
  font-size: 1.05rem;
  font-style: italic;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.75);
  pointer-events: none;
}

.mm-stage.is-fallback .mm-stage-status {
  position: absolute;
  inset: auto 0 0;
  max-width: none;
  padding: 1.25rem;
  font-size: 0.95rem;
  text-align: center;
  background: rgba(8, 7, 6, 0.72);
}

/* ---------- daily myth ---------- */

.mm-daily {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: clamp(2.5rem, 7vw, 7rem);
  align-items: center;
  padding-block: clamp(6rem, 10vw, 10rem);
  border-bottom: 1px solid rgba(238, 231, 218, 0.08);
}

.mm-features {
  max-width: 520px;
  margin-bottom: 0;
}

.mm-share {
  margin: 0;
  justify-self: center;
  width: min(100%, 360px);
}

.mm-share-card {
  padding: 1.6rem 1.5rem 1.4rem;
  border: 2px solid var(--mm-sand);
  border-radius: 18px;
  color: var(--mm-ink);
  background: var(--mm-whitewash);
  box-shadow: 0 3px 0 var(--mm-terracotta-dark), 0 30px 70px rgba(0, 0, 0, 0.4);
  transform: rotate(-2deg);
}

.mm-share-kicker {
  margin: 0 0 0.2rem;
  color: var(--mm-terracotta-dark);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.mm-share-title {
  margin: 0 0 1.1rem;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.1;
}

.mm-share-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 7px;
  padding: 0.9rem;
  border-radius: 12px;
  background: #e9e2d2;
}

.mm-share-grid i,
.mm-families i {
  display: block;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.mm-page .r { background: var(--relic-red); }
.mm-page .b { background: var(--relic-blue); }
.mm-page .y { background: var(--relic-gold); }
.mm-page .g { background: var(--relic-green); }
.mm-page .p { background: var(--relic-purple); }
.mm-page .w { background: var(--relic-white); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.14), 0 0 0 1px #d8cfbd; }

.mm-share-result {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  margin: 1rem 0 0;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mm-share-result span:first-child {
  color: var(--mm-terracotta-dark);
}

.mm-share .mm-caption {
  margin-top: 1.4rem;
  text-align: center;
}

/* ---------- isle: before / after ---------- */

.mm-isle {
  padding-block: clamp(6rem, 10vw, 10rem);
  border-bottom: 1px solid rgba(238, 231, 218, 0.08);
}

.mm-compare {
  margin-block: 0;
}

.mm-compare-frame {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.mm-compare-pane {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 218, 0.1);
}

.mm-compare-pane img {
  width: 100%;
  height: auto;
}

.mm-compare-tag {
  position: absolute;
  top: 1rem;
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
  color: var(--paper);
  background: rgba(10, 9, 8, 0.62);
  backdrop-filter: blur(6px);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mm-compare-before .mm-compare-tag {
  right: 1rem;
}

.mm-compare-after .mm-compare-tag {
  left: 1rem;
}

.mm-compare-handle {
  display: none;
}

/* enhanced (script): one frame, the restored image revealed from the left up to --pos */
.mm-compare.is-ready .mm-compare-frame {
  display: block;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 218, 0.12);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.35);
}

.mm-compare.is-ready .mm-compare-pane {
  border: 0;
}

.mm-compare.is-ready .mm-compare-after {
  position: absolute;
  inset: 0;
  clip-path: inset(0 calc(100% - var(--pos)) 0 0);
}

.mm-compare.is-ready .mm-compare-after img {
  height: 100%;
  object-fit: cover;
}

.mm-compare-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}

.mm-compare.is-ready .mm-compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  display: block;
  width: 2px;
  margin-left: -1px;
  background: var(--mm-whitewash);
  box-shadow: 0 0 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.mm-compare.is-ready .mm-compare-handle::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 46px;
  height: 46px;
  border: 2px solid var(--mm-whitewash);
  border-radius: 50%;
  background: rgba(10, 9, 8, 0.58);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
  content: "";
  transform: translate(-50%, -50%);
}

.mm-compare.is-ready .mm-compare-handle::before {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  color: var(--mm-whitewash);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  content: "\2039\2009\203A";
  transform: translate(-50%, -56%);
  white-space: nowrap;
}

.mm-compare-range:focus-visible + .mm-compare-handle::after {
  outline: 3px solid var(--copper-bright);
  outline-offset: 3px;
}

/* ---------- characters ---------- */

.mm-cast {
  padding-block: clamp(6rem, 10vw, 10rem);
  border-bottom: 1px solid rgba(238, 231, 218, 0.08);
}

.mm-cast .mm-section-head {
  grid-template-columns: minmax(0, 1fr);
}

.mm-cast-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.25rem, 3vw, 2.5rem);
}

.mm-character {
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 218, 0.11);
  background: var(--ink-raised);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.25);
}

.mm-character img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
}

.mm-character-copy {
  padding: clamp(1.5rem, 3vw, 2.4rem);
}

.mm-role {
  margin-bottom: 0.4rem;
  color: var(--copper-bright);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.mm-character h3 {
  margin-bottom: 0.8rem;
  font-size: clamp(2.2rem, 3.4vw, 3.2rem);
  letter-spacing: -0.04em;
}

.mm-character-copy > p:last-child {
  margin: 0;
  color: var(--paper-dim);
}

/* ---------- relic families ---------- */

.mm-relics {
  padding-block: clamp(6rem, 10vw, 10rem) clamp(5rem, 8vw, 8rem);
}

.mm-relics-figure {
  width: min(calc(100% - 2.5rem), 1440px);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(238, 231, 218, 0.1);
}

.mm-relics-figure img {
  width: 100%;
  height: auto;
}

.mm-families {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 2rem;
  margin-bottom: 0;
  padding: 0;
  list-style: none;
}

.mm-families li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 0;
  border-top: 1px solid var(--line);
  color: rgba(238, 231, 218, 0.82);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.mm-families i {
  flex: 0 0 14px;
  width: 14px;
}

/* ---------- fair by design / status ---------- */

.mm-fair {
  border-top: 1px solid rgba(238, 231, 218, 0.08);
}

.mm-status {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: end;
  padding-block: clamp(5rem, 9vw, 8rem);
  border-top: 1px solid rgba(238, 231, 218, 0.08);
}

.mm-status h2 {
  margin-bottom: 0;
}

.mm-status-detail > p {
  margin: 0;
  color: var(--paper-dim);
}

.mm-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0 0 1.4rem;
  padding: 0;
  list-style: none;
}

.mm-platforms li {
  padding: 0.55rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.mm-contact-icon {
  border-radius: 28px;
  box-shadow: 0 0 0 1px rgba(238, 231, 218, 0.12), 0 20px 60px rgba(39, 71, 156, 0.35);
}

/* ---------- responsive ---------- */

/* laptop widths: a narrower copy column keeps the lamp clear of the text */
@media (min-width: 1200px) and (max-width: 1399px) {
  .mm-hero-art {
    object-position: 63% center;
  }

  .mm-hero-content {
    width: min(480px, 36vw);
  }

  .mm-hero .hero-lede {
    max-width: 440px;
  }
}

/* up to small laptops: the art sits on top, the copy below it on ink */
@media (max-width: 1199px) {
  .mm-hero {
    --art-h: min(600px, 128vw, 64vh);
    --art-h: min(600px, 128vw, 64svh);
    align-items: end;
    min-height: 0;
    padding: calc(var(--art-h) - 56px) clamp(1.25rem, 5vw, 3rem) 6.5rem;
  }

  .mm-hero-art {
    inset: 0 0 auto;
    height: var(--art-h);
    object-position: 88% center;
  }

  .mm-hero-shade {
    background:
      linear-gradient(180deg, rgba(8, 7, 6, 0.55) 0%, transparent 18%),
      linear-gradient(0deg, var(--ink) 0%, var(--ink) calc(100% - var(--art-h)), rgba(10, 9, 8, 0.2) calc(100% - var(--art-h) + 150px), transparent 100%);
  }

  .mm-hero-content {
    width: 100%;
    max-width: 640px;
  }
}

@media (max-width: 980px) {
  .mm-play,
  .mm-daily,
  .mm-status {
    grid-template-columns: 1fr;
  }

  .mm-phone {
    width: min(360px, 100%);
    margin-inline: auto;
  }

  .mm-play-copy {
    order: -1;
  }

  .mm-section-head,
  .mm-teaser-head {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .mm-families {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .mm-hero {
    --art-h: min(128vw, 520px);
    padding: calc(var(--art-h) - 44px) 1.25rem 6.5rem;
  }

  .mm-hero .hero-status {
    left: 1.25rem;
  }

  .mm-hero-art {
    object-position: 76% center;
  }

  .mm-hero .hero-lede {
    font-size: 1rem;
  }

  .mm-stage {
    aspect-ratio: 4 / 5;
  }

  .mm-stage-poster {
    object-position: 70% center;
  }

  .mm-stage-hint {
    top: auto;
    right: auto;
    bottom: 4.4rem;
    left: 1rem;
  }

  .mm-stage-controls {
    right: 0.75rem;
    bottom: 0.75rem;
    left: 0.75rem;
    justify-content: flex-start;
  }

  .mm-stage-controls [data-teaser-free] {
    margin-left: auto;
  }

  .mm-stage-controls button {
    padding-inline: 0.7rem;
  }

  .mm-stage-status {
    top: 3.6rem;
    bottom: auto;
    font-size: 0.95rem;
  }

  .mm-stage .button {
    width: auto;
  }

  .mm-stage-cta {
    right: 0;
    max-width: none;
    justify-items: center;
    text-align: center;
  }

  .mm-stage::after {
    background: linear-gradient(0deg, rgba(8, 7, 6, 0.8), rgba(8, 7, 6, 0.1) 50%, transparent 70%);
  }

  .mm-cast-grid {
    grid-template-columns: 1fr;
  }

  .mm-relics-figure {
    width: 100%;
    border-inline: 0;
  }

  .mm-families {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 1rem;
  }

  .mm-compare-frame {
    grid-template-columns: 1fr;
  }

  .mm-compare.is-ready .mm-compare-frame {
    aspect-ratio: 4 / 3;
  }

  .mm-compare.is-ready .mm-compare-pane,
  .mm-compare.is-ready .mm-compare-before img {
    height: 100%;
  }

  .mm-compare.is-ready .mm-compare-pane img {
    object-fit: cover;
    object-position: 50% 55%;
  }

  .mm-compare-tag {
    top: 0.75rem;
  }

  .mm-compare-before .mm-compare-tag {
    right: 0.75rem;
  }

  .mm-compare-after .mm-compare-tag {
    left: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mm-share-card {
    transform: none;
  }
}
