/* Palette Girlies: the makeup reel of /makeup (tools/makeup_hub.py draws the markup, site/js/makeup-reel.js turns it). Beauty version, oct 2026.
   A beauty magazine you turn: one season per spread, its pigment still life as a plain photograph (cropped tall on a phone) on a dark stage that takes the deepest color of the
   season that is open. The spreads move by scrolling (native scroll-snap); the only thing script changes is the stage color (--deep) and which spread is open.
   Without JavaScript this is a row you swipe and every link works. Chips stay flat and exact: a hairline ring keeps a dark one visible on the dark stage. */

.reel { --pad: var(--gutter); --gap: 14px; --peek: 58px; position: relative; margin: 0; padding: 30px 0 26px; transition: background-color .9s ease; }

/* ---------- the track: the spreads in a row that snaps; the next one peeks at the edge ---------- */
.reel-track { position: relative; display: flex; gap: var(--gap); padding: 0 0 6px var(--pad); margin-bottom: -6px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-padding-left: var(--pad); overscroll-behavior-x: contain; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.reel-track::-webkit-scrollbar { display: none; }
.reel-track::after { content: ""; flex: 0 0 calc(var(--peek) - var(--gap)); }   /* room after the last spread, so that it can stop at the start like the others */
.reel-track.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
.reel-spread { position: relative; flex: 0 0 calc(100% - var(--peek)); min-width: 0; display: flex; flex-direction: column; scroll-snap-align: start; scroll-snap-stop: always; }

/* a spread that is not open is dimmed (JS only; the link inside it is out of the tab order with it). The edge of the page that is not open yet is a hairline and a shade,
   so the peek reads as the next page lying under this one */
html.js .reel-img, html.js .reel-text { transition: opacity .7s var(--ease); }
html.js .reel-spread:not(.is-active) .reel-img { opacity: .5; }
html.js .reel-spread:not(.is-active) .reel-text { opacity: .3; }
html.js .reel-spread::before { content: ""; position: absolute; z-index: 1; left: -1px; top: 0; bottom: 0; width: 22px; background: linear-gradient(90deg, rgba(0, 0, 0, .38), rgba(0, 0, 0, 0)); border-left: 1px solid rgba(247, 241, 232, .24); pointer-events: none; transition: opacity .6s var(--ease); }
html.js .reel-spread.is-active::before { opacity: 0; }

/* ---------- the photograph: tall on a phone, cut from the still life around its lips ---------- */
.reel-art { position: relative; margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: color-mix(in srgb, var(--deep) 45%, #0E090D); }
.reel-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: var(--ox, 50%) 50%; }

/* ---------- the text of a spread ---------- */
.reel-text { display: flex; flex-direction: column; align-items: flex-start; padding: 16px 2px 8px; }
.reel-kicker { display: flex; align-items: center; gap: 12px; align-self: stretch; min-height: 24px; font: 700 12.5px/1.3 var(--sans); letter-spacing: .16em; text-transform: uppercase; color: var(--blush); }
.reel-fam { color: var(--paper); }
.reel-yours { margin-left: auto; font: 600 21px/1 var(--hand); letter-spacing: 0; text-transform: none; color: var(--blush); transform: rotate(-3deg); }
.reel-name { margin-top: 2px; font: 400 clamp(38px, 11.2vw, 48px)/1 var(--slant); font-style: italic; letter-spacing: -.012em; color: var(--paper); text-wrap: balance; }
.reel-lips { margin-top: 10px; max-width: 30ch; font: 400 18px/1.4 var(--sans); color: var(--paper); }
.reel-lips span { white-space: nowrap; }

/* the chips: the season's own colors, flat and exact. Lips are bullets, the cheek is a round compact, the eye colors are round pans */
.reel-chips { list-style: none; margin: 16px 0 0; padding: 0; display: flex; align-items: flex-end; gap: 8px; }
.rc { flex: none; background: var(--c); box-shadow: 0 0 0 1px rgba(247, 241, 232, .42); }
.rc--lip { position: relative; width: 19px; height: 36px; background: none; box-shadow: none; }
.rc--lip::before, .rc--lip::after { content: ""; position: absolute; clip-path: polygon(0 22%, 100% 0, 100% 100%, 0 100%); border-radius: 8px 8px 2px 2px; }   /* a bullet with a hairline rim: its own color on top of a paper-colored one */
.rc--lip::before { inset: 0; background: rgba(247, 241, 232, .5); }
.rc--lip::after { inset: 1px; background: var(--c); }
.rc--cheek { width: 34px; height: 34px; border-radius: 50%; margin-left: 12px; }
.rc--eye { width: 26px; height: 26px; border-radius: 50%; }
.rc--eye:nth-child(5) { margin-left: 12px; }

.reel-link { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; margin-top: 14px; padding: 4px 4px 0; font: 700 18px/1.2 var(--sans); color: var(--paper); text-decoration: none;
  background: url(/img/collage/stroke-blush.webp) 0 78% / 100% 12px no-repeat; }
.reel-link::after { content: "\2192"; font-weight: 400; color: var(--blush); transition: transform .25s var(--ease); }
.reel-link:hover { color: var(--paper); }
.reel-link:hover::after { transform: translateX(4px); }
.reel :focus-visible { outline: 3px solid var(--paper); outline-offset: 3px; }

/* ---------- the pager: twelve lipsticks standing on a shelf, in each season's lip color; the open one stands taller ---------- */
.reel-controls, .reel-hint { display: none; }
html.js .reel-controls { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 14px; }
html.js .reel-hint { display: block; margin-top: 8px; text-align: center; font-size: 21px; line-height: 1.2; color: var(--blush); transform: rotate(-1.2deg); }
.reel-hint-mouse { display: none; }
@media (hover: hover) and (pointer: fine) { .reel-hint-touch { display: none; } .reel-hint-mouse { display: inline; } }
.reel-pager { position: relative; display: flex; align-items: flex-end; gap: 8px; min-width: 0; max-width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  background: linear-gradient(rgba(247, 241, 232, .5), rgba(247, 241, 232, .5)) 0 100% / 100% 2px no-repeat; background-attachment: local;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent, #000 22px, #000 calc(100% - 22px), transparent); }
.reel-pager::-webkit-scrollbar { display: none; }
.reel-pip { position: relative; flex: 0 0 44px; height: 58px; padding: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.reel-pip::before { content: ""; position: absolute; left: 50%; bottom: 4px; width: 12px; height: 24px; margin-left: -6px; background: var(--c); border-radius: 5px 5px 1px 1px;
  clip-path: polygon(0 24%, 100% 0, 100% 100%, 0 100%); transition: height .4s var(--ease), width .4s var(--ease), margin-left .4s var(--ease); }
.reel-pip[aria-current="true"]::before { width: 18px; height: 42px; margin-left: -9px; }
.reel-pip[data-yours]::after { content: ""; position: absolute; left: 50%; bottom: -3px; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--blush); }
.reel-pip:focus-visible { outline-offset: -4px; }
.reel-arrow { flex: none; display: none; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; color: var(--paper); background: transparent;
  border: 2px solid var(--paper); border-radius: 4px 14px 5px 12px / 12px 5px 14px 4px; cursor: pointer; transition: opacity .25s, transform .25s var(--ease); }
.reel-arrow[aria-disabled="true"] { opacity: .4; cursor: default; }
@media (hover: hover) { .reel-pip { transition: transform .25s var(--ease); } .reel-pip:hover { transform: translateY(-2px); } .reel-arrow:not([aria-disabled="true"]):hover { transform: translateY(-2px); } }

/* ---------- a wider screen: the photograph is wider than tall; from 960 the open spread is large, the photograph on one side and the text on the other, and they swap from one spread to the next ---------- */
@media (min-width: 700px) {
  .reel-art { aspect-ratio: 4 / 3; }
  html.js .reel-controls { gap: 22px; }
  .reel-arrow { display: inline-flex; margin-bottom: 2px; }
}
@media (min-width: 760px) { .reel-pager { -webkit-mask-image: none; mask-image: none; } }
@media (min-width: 960px) {
  .reel { --pad: 0px; --gap: 40px; --peek: 150px; padding: 56px 0 40px; }
  .reel-stage { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
  .reel-spread { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); column-gap: 34px; align-items: center; }
  .reel-spread[data-side="r"] { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
  .reel-spread[data-side="r"] .reel-art { order: 2; }
  .reel-text { padding: 0 6px; }
  .reel-kicker { font-size: 13.5px; }
  .reel-name { margin-top: 6px; font-size: clamp(56px, 5.8vw, 82px); line-height: .98; }
  .reel-lips { margin-top: 14px; font-size: 20px; }
  .reel-chips { margin-top: 22px; gap: 10px; }
  .rc--lip { width: 25px; height: 48px; }
  .rc--cheek { width: 44px; height: 44px; margin-left: 16px; }
  .rc--eye { width: 34px; height: 34px; }
  .rc--eye:nth-child(5) { margin-left: 16px; }
  .reel-link { margin-top: 22px; font-size: 19px; }
  html.js .reel-hint { margin-top: 10px; }
}

/* ---------- keys and screens that ask for less ---------- */
@media (prefers-reduced-motion: reduce) {
  .reel, html.js .reel-img, html.js .reel-text, html.js .reel-spread::before, .reel-pip::before, .reel-arrow, .reel-link::after { transition: none; }
  .reel-pip:hover, .reel-arrow:hover { transform: none; }
}
@media (forced-colors: active) { .reel-pip::before { background: ButtonText; } .rc { forced-color-adjust: none; } }
