/* Amethyst — page-specific framing within the shared dress-story system.
   Adjust framing with --media-position-x / --media-position-y on each image- class. */
.dress-story-page--amethyst {
  --story-accent: #c4a8e8;
  --story-glow: rgba(150, 102, 210, .12);
  --story-deep: #060408;
}

.dress-story-page--amethyst .masthead--inner {
  background: linear-gradient(180deg, rgba(4, 3, 6, .9), rgba(4, 3, 6, .2) 72%, transparent);
}

/* Hero */
.amethyst-hero { --hero-section-size: 94svh; }
.image-amethyst-hero { --media-position-x: 55%; --media-position-y: 50%; }
.amethyst-hero .ds-hero__veil {
  background:
    linear-gradient(90deg, rgba(4, 3, 6, .94), rgba(4, 3, 6, .6) 50%, rgba(4, 3, 6, .12) 82%),
    linear-gradient(0deg, rgba(4, 3, 6, .9), transparent 66%);
}
.amethyst-hero .ds-hero__copy { max-width: 960px; }
.amethyst-hero .ds-hero__body { max-width: 820px; }
.amethyst-hero__virtues {
  color: var(--story-accent);
  display: inline-block;
  font-style: italic;
  margin-bottom: 10px;
}

/* Shared headings */
.amethyst-copy h2,
.amethyst-accessories h2 {
  color: var(--ivory);
  font: 500 clamp(44px, 5vw, 84px)/.94 "Playfair Display", Georgia, serif;
  letter-spacing: -.05em;
  margin: 0 0 clamp(28px, 4vh, 46px);
}
.amethyst-copy .ds-story-text + .ds-story-text { margin-top: 24px; }
.amethyst-label { color: var(--story-accent); margin-bottom: 18px; }

/* Portrait pairs */
.amethyst-pair .ds-media {
  aspect-ratio: 3 / 4;
  height: auto;
  min-height: 0;
}

/* Progression */
.amethyst-progression__copy { margin: 0 auto; max-width: 980px; text-align: center; }
.amethyst-progression__copy .ds-story-text { margin-left: auto; margin-right: auto; }
.amethyst-progression__line {
  align-items: baseline;
  color: var(--ivory);
  display: flex;
  flex-wrap: wrap;
  font: 500 clamp(30px, 3.6vw, 60px)/1.15 "Playfair Display", Georgia, serif;
  gap: .25em .45em;
  justify-content: center;
  letter-spacing: -.03em;
  margin: clamp(22px, 3vh, 34px) 0 clamp(34px, 5vh, 56px) !important;
}
.amethyst-progression__line span[aria-hidden] { color: var(--story-accent); font-size: .7em; }

/* Gemstone cover with text */
.amethyst-gemstone-cover { background: var(--story-deep); padding: 0; }
.amethyst-gemstone-cover__media {
  height: clamp(580px, 82svh, 920px);
  isolation: isolate;
  min-height: 0;
  width: 100%;
}
.image-amethyst-stones { --media-position-x: 50%; --media-position-y: 50%; position: absolute; inset: 0; z-index: 0; }
.amethyst-cover__veil {
  background:
    linear-gradient(90deg, rgba(4, 3, 6, .84) 0%, rgba(4, 3, 6, .5) 50%, rgba(4, 3, 6, .08) 100%),
    linear-gradient(0deg, rgba(4, 3, 6, .6), transparent 55%);
  inset: 0;
  pointer-events: none;
  position: absolute;
  z-index: 1;
}
.amethyst-gemstone-cover__copy {
  bottom: clamp(48px, 9vh, 110px);
  left: clamp(28px, 6vw, 104px);
  margin: 0;
  max-width: 760px;
  position: absolute;
  right: clamp(28px, 8vw, 130px);
  z-index: 2;
}
.amethyst-gemstone-cover__copy .ds-story-text { color: #f3f0e9; text-shadow: 0 2px 24px rgba(0, 0, 0, .7); }

/* Image + text splits */
.amethyst-split {
  align-items: center;
  display: grid;
  gap: clamp(44px, 7vw, 100px);
  grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr);
}
.amethyst-split--reverse { grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); }
.amethyst-split__copy { margin: 0; }
.amethyst-split__copy .ds-story-text { max-width: 640px; }
.amethyst-split__portrait {
  aspect-ratio: 3 / 4;
  min-height: 0;
  width: 100%;
}
.image-amethyst-stones-own,
.image-amethyst-morse-03,
.image-amethyst-process-02,
.image-amethyst-identity { --media-position-x: 50%; --media-position-y: 50%; }

/* Morse code details */
.amethyst-morse-pair {
  display: grid;
  gap: var(--story-gap);
  grid-template-columns: minmax(0, 1.59fr) minmax(0, 1.33fr);
}
.amethyst-morse-pair__wide { aspect-ratio: 2400 / 1511; min-height: 0; }
.amethyst-morse-pair__landscape { aspect-ratio: 4 / 3; min-height: 0; }
.amethyst-morse-note { margin-top: clamp(56px, 8vh, 100px); }
.amethyst-quote { font-style: italic; }

/* Texture: photo + vertical video + photo, all at equal height */
.amethyst-texture__media {
  align-items: start;
  display: grid;
  gap: var(--story-gap);
  grid-template-columns: minmax(0, .75fr) minmax(0, .5625fr) minmax(0, .75fr);
  margin: 0 auto;
}
.amethyst-texture__photo { aspect-ratio: 3 / 4; min-height: 0; }
.amethyst-texture__video { aspect-ratio: 9 / 16; min-height: 0; }
.amethyst-texture__video video { --media-fit: cover; --media-position-x: 50%; --media-position-y: 50%; }

/* Final dress */
.amethyst-final .amethyst-final__principal {
  aspect-ratio: 9 / 16;
  height: auto;
  margin: 0 auto var(--story-gap);
  max-height: 86vh;
  max-width: 560px;
  min-height: 0;
  width: min(560px, 100%);
}
.amethyst-final__principal video { --media-fit: contain; }
.amethyst-final__gallery {
  display: grid;
  gap: var(--story-gap);
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.amethyst-final__gallery figure { aspect-ratio: 3 / 4; min-height: 0; }
.amethyst-final__gallery figure:nth-child(-n + 2) { grid-column: span 3; }
.amethyst-final__gallery figure:nth-child(n + 3) { grid-column: span 2; }

/* Accessories */
.amethyst-accessories__header { margin-bottom: clamp(42px, 6vh, 72px); }
.amethyst-accessories__image {
  aspect-ratio: 4 / 3;
  margin: 0 auto;
  min-height: 0;
  width: min(100%, 900px);
}

@media (max-width: 980px) {
  .amethyst-split { gap: clamp(30px, 5vw, 56px); grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr); }
  .amethyst-split--reverse { grid-template-columns: minmax(0, 1.1fr) minmax(280px, .9fr); }
  .amethyst-gemstone-cover__media { height: min(70svh, 760px); min-height: 520px; }
}

@media (max-width: 780px) {
  .amethyst-hero { --hero-section-size: 96svh; }
  .image-amethyst-hero { --media-position-x: 60%; }
  .amethyst-hero .ds-hero__veil {
    background:
      linear-gradient(0deg, rgba(4, 3, 6, .99), rgba(4, 3, 6, .74) 66%, rgba(4, 3, 6, .26)),
      linear-gradient(90deg, rgba(4, 3, 6, .5), transparent);
  }
  .amethyst-hero .ds-hero__copy { bottom: 38px; }
  .amethyst-hero .ds-hero__body { font-size: 14px; line-height: 1.5; }
  .amethyst-split,
  .amethyst-split--reverse,
  .amethyst-morse-pair { grid-template-columns: 1fr; }
  /* On phones, text always comes before its photo in reversed splits too */
  .amethyst-split__copy { padding-top: 8px; }
  .amethyst-symbolism .amethyst-split__portrait,
  .amethyst-natural .amethyst-split__portrait { order: 2; }
  .amethyst-texture__media { grid-template-columns: 1fr; max-width: 460px; }
  .amethyst-gemstone-cover__media { height: clamp(520px, 78svh, 680px); }
  .amethyst-gemstone-cover__copy { bottom: 36px; left: 24px; right: 24px; }
  .amethyst-cover__veil { background: linear-gradient(0deg, rgba(4, 3, 6, .95), rgba(4, 3, 6, .55) 60%, rgba(4, 3, 6, .2)); }
  .amethyst-final__gallery { gap: 14px; grid-template-columns: 1fr 1fr; }
  .amethyst-final__gallery figure:nth-child(n) { grid-column: auto; }
  .amethyst-final__gallery figure:first-child { grid-column: 1 / -1; }
}

@media (max-width: 480px) {
  .amethyst-hero { min-height: 820px; }
  .amethyst-copy h2,
  .amethyst-accessories h2 { font-size: clamp(40px, 12vw, 58px); }
  .amethyst-progression__line { font-size: clamp(26px, 8vw, 36px); }
}
