/* Amantyle look c "Shop to screen": this look's own styles, loaded only when it is the shown look (the page's e2Styles). The shared base is
   e2-amantyle.css (her palette as --bx-*, .bx-sec bands). Markup: src/_includes/e2/amantyle/{hero-c,sig-c}.njk; behaviour: e2-amantyle-c.js.
   Prefix am-c-. Two parts:
   1. the hero: the old shopfront still/loop with her old logo painted on the signboard, and a flap that carries her new wordmark over it;
   2. the journey: a pinned stage where five applications enter at screen scale (`.is-live`, set by the JS), then a then/now wipe.
   Without JS, with reduced motion, or on a short or narrow screen nothing pins: the five steps stack, each with its own pattern backdrop. */

.am-c-hero, .am-c-journey { --am-spring: cubic-bezier(.34, 1.56, .64, 1); --am-ease: cubic-bezier(.2, .8, .2, 1); --am-head: calc(var(--header-h, 68px) + 8px); }

/* ---------- The old shop, with her old logo on its board (hero and wipe share this) ---------- */
/* The shop keeps the still's aspect (2400 x 1357): the board's rectangle is measured in the still, so the stage that holds it must not stretch.
   Container-type gives the shop its own stacking context, which is what lets the logo's multiply blend into the photo beneath it. */
.am-c-shop { position: absolute; inset: 0; overflow: hidden; container-type: inline-size; background: var(--bx-charcoal); }
.am-c-shop__img, .am-c-shop__video { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.am-c-shop__video { opacity: 0; transition: opacity .5s ease; }
.am-c-shop__video.is-playing { opacity: 1; }
.am-c-old { position: absolute; left: var(--bx); top: var(--by); width: var(--bw); height: var(--bh); display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; mix-blend-mode: multiply; opacity: .92; pointer-events: none; }
.am-c-old img { display: block; height: var(--logo-h); width: auto; max-width: none; }

/* ---------- Hero ---------- */
.bx-hero--c { min-height: 0; padding: 0; justify-items: center; background: var(--bx-charcoal); }
.am-c-view {
  position: relative; overflow: hidden; isolation: isolate; width: min(100%, calc((100svh - 24px) * 2400 / 1357)); aspect-ratio: 2400 / 1357;
  background: var(--bx-charcoal); color: var(--bx-cream);
}

/* The flap carries her new wordmark, slate on cream, built from her three parts (Aman, tye, l) stacked on the logo's own canvas.
   It hangs from the board's top edge: rotateX(90deg) is folded out towards the viewer (edge-on, so invisible); 0 is flat on the board.
   Falling in overshoots a little, swinging up is quick; the tilted l, her tile, lands last. */
.am-c-flapwrap { position: absolute; left: var(--bx); top: var(--by); width: var(--bw); height: var(--bh); perspective: 18cqw; perspective-origin: 50% 0; pointer-events: none; }
.am-c-flap {
  position: absolute; inset: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; background: var(--bx-cream); transform-origin: 50% 0; transform: rotateX(92deg); visibility: hidden;
  box-shadow: 0 .8cqw 1.6cqw -.3cqw rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(51, 70, 70, .12);
  transition: transform .36s cubic-bezier(.55, 0, .9, .45), visibility 0s .36s;
}
.am-c-flap::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, rgba(30, 42, 42, .05), rgba(30, 42, 42, .6)); opacity: 1; transition: opacity .36s ease; }
.am-c-view[data-state="now"] .am-c-flap { transform: rotateX(0deg); visibility: visible; transition: transform .85s cubic-bezier(.3, 1.45, .5, 1), visibility 0s; }
.am-c-view[data-state="now"] .am-c-flap::after { opacity: 0; transition: opacity .7s ease .12s; }
.am-c-wm { position: relative; display: block; height: 74%; aspect-ratio: 670 / 146; }
.am-c-wm i { position: absolute; inset: 0; background: var(--bx-slate); -webkit-mask: var(--m) center / 100% 100% no-repeat; mask: var(--m) center / 100% 100% no-repeat; }
.am-c-wm__l { transform-origin: 85.2% 79.5%; transform: translateY(-40%) rotate(-34deg); opacity: 0; transition: transform .2s ease, opacity .2s ease; }
.am-c-view[data-state="now"] .am-c-wm__l { transform: none; opacity: 1; transition: transform .6s var(--am-spring) .64s, opacity .1s linear .62s; }

/* A calm dark scrim at the bottom, so the caption and the control read over any frame of the loop. */
.am-c-scrim {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: space-between; gap: 14px 24px;
  padding: clamp(72px, 10vw, 150px) var(--pad) clamp(16px, 2.4vw, 30px);
  background: linear-gradient(to top, rgba(33, 40, 40, .95) 0%, rgba(33, 40, 40, .78) 36%, rgba(33, 40, 40, 0) 100%);
}
.am-c-cap { margin: 0; max-width: 60ch; display: flex; align-items: baseline; gap: 14px; font: 500 clamp(15px, 1.5vw, 20px)/1.4 var(--bx-font); color: var(--bx-cream); text-wrap: pretty; }
.am-c-cap__k { flex: none; padding: 3px 11px; border: 1px solid rgba(242, 235, 219, .55); border-radius: 999px; font: 500 12px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.am-c-cap.is-swap { animation: am-c-cap .3s var(--am-ease); }
@keyframes am-c-cap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Then / Now: a two-option segmented control (chips, never a filled primary button). The pressed segment takes a cream outline that glides across. */
.am-c-seg {
  position: relative; flex: none; display: inline-grid; grid-template-columns: 1fr 1fr; padding: 3px; border-radius: 999px;
  border: 1px solid rgba(242, 235, 219, .4); background: rgba(33, 40, 40, .6); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.am-c-seg::before {
  content: ""; position: absolute; top: 3px; bottom: 3px; left: 3px; width: calc(50% - 3px); border-radius: 999px;
  background: rgba(242, 235, 219, .2); box-shadow: inset 0 0 0 1.5px var(--bx-cream); transition: transform .4s var(--am-spring);
}
.am-c-view[data-state="now"] .am-c-seg::before { transform: translateX(100%); }
.am-c-seg__b {
  position: relative; min-width: 96px; min-height: 44px; padding: 0 22px; border: 0; border-radius: 999px; background: none; cursor: pointer;
  font: 600 15px/1 var(--bx-font); color: rgba(242, 235, 219, .8); transition: color .2s ease;
}
.am-c-seg__b:hover { color: var(--bx-cream); }
.am-c-seg__b[aria-pressed="true"] { color: var(--bx-cream); }
.am-c-seg__b:focus-visible { outline: 2px solid var(--bx-cream); outline-offset: 3px; }

/* Phones: the shop is wider than the screen, so the view crops to the middle of it (the board and its centred logo) at the shop's own aspect. */
@media (max-width: 700px) {
  .am-c-view { width: 100%; aspect-ratio: 390 / 450; }
  .am-c-view .am-c-shop, .am-c-wipe__stage .am-c-shop { inset: 0 auto 0 50%; width: auto; height: 100%; aspect-ratio: 2400 / 1357; translate: -50% 0; }
  .am-c-scrim { flex-direction: column; align-items: flex-start; padding-top: 96px; }
  .am-c-cap { max-width: none; }
  .am-c-seg { align-self: stretch; }
  .am-c-seg__b { min-width: 0; }
}

/* ---------- The journey: five applications at screen scale ---------- */
.bx-sig--c { padding: 0; background: var(--bx-slate); }
.am-c-title { margin: 0; color: var(--bx-cream); font: 600 clamp(26px, 3vw, 40px)/1.1 var(--bx-font); letter-spacing: -.025em; text-wrap: balance; }

/* Stacked (the default): intro, a chip row of the five steps, then each step's copy over its application on a patterned panel. */
.am-c-stage { position: relative; width: 100%; max-width: var(--max); margin-inline: auto; padding: clamp(48px, 9vw, 80px) var(--pad) 8px; display: grid; gap: 28px; align-content: start; }
.am-c-intro { display: grid; justify-items: start; gap: 14px; }
.am-c-rail { position: sticky; top: var(--am-head); z-index: 4; margin-inline: calc(var(--pad) * -1); padding: 6px var(--pad); background: var(--bx-slate); }
.am-c-rail__list { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.am-c-rail__list li { flex: 1; min-width: 0; }
.am-c-rail__line { display: none; }
.am-c-dot { width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 4px 2px; border: 0; border-radius: 12px; background: none; cursor: pointer; color: rgba(242, 235, 219, .74); font: 500 12px/1.1 var(--bx-font); }
.am-c-dot__pt { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(242, 235, 219, .6); transition: transform .25s var(--am-spring), box-shadow .2s ease, background-color .2s ease; }
.am-c-dot.is-done .am-c-dot__pt { background: rgba(242, 235, 219, .75); box-shadow: none; }
.am-c-dot.is-on { color: var(--bx-cream); font-weight: 600; }
.am-c-dot.is-on .am-c-dot__pt { background: var(--bx-cream); box-shadow: 0 0 0 4px rgba(65, 126, 125, .85); transform: scale(1.1); }
.am-c-dot:hover { color: var(--bx-cream); }
.am-c-dot:focus-visible { outline: 2px solid var(--bx-cream); outline-offset: 2px; }
.am-c-panel { display: none; }

.am-c-step { display: grid; gap: 16px; padding-top: 16px; scroll-margin-top: calc(var(--am-head) + 64px); }
.am-c-copy { display: grid; gap: 8px; align-content: start; }
.am-c-copy__n { margin: 0; font: 500 12px/1.2 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: rgba(242, 235, 219, .74); }
.am-c-copy__n span { font: 600 clamp(40px, 6vw, 72px)/1 var(--bx-font); letter-spacing: -.04em; color: var(--bx-cream); text-transform: none; margin-right: .15em; }
.am-c-copy__t { margin: 0; color: var(--bx-cream); font: 600 clamp(22px, 2.2vw, 32px)/1.15 var(--bx-font); letter-spacing: -.02em; }
.am-c-copy__c { margin: 0; max-width: 42ch; color: rgba(242, 235, 219, .88); font: 400 16px/1.55 var(--bx-font); }

.am-c-item {
  position: relative; margin: 0; display: grid; place-items: center; padding: clamp(18px, 6vw, 40px); border-radius: 24px; container-type: inline-size;
  background: var(--bx-charcoal) url(/assets/img/case/amantyle/board/pattern-dark-sm.webp) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(242, 235, 219, .08);
}
.am-c-card { position: relative; width: min(100%, calc(560px * var(--ar) / 1.45), 560px); max-width: 100%; aspect-ratio: var(--ar); }
.am-c-card__in { position: absolute; inset: 0; overflow: hidden; border-radius: var(--rd); box-shadow: 0 26px 50px -18px rgba(0, 0, 0, .65); background: var(--bx-charcoal); }
/* Her boards carry a ~6px white edge from their rounded frames; the image is cut a hair past it so no white sliver shows against the slate. */
.am-c-card__in img { position: absolute; left: calc(var(--cx) * -1); top: calc(var(--cy) * -1); width: calc(100% + var(--cx) * 2); height: calc(100% + var(--cy) * 2); max-width: none; display: block; transform: scale(calc(1 + var(--lp, 0) * .035)); }

/* The phone: HTML and CSS. Its header carries only her name and house mark. Every size is in the phone's own container width (cqw). */
.am-c-phone { position: relative; width: min(250px, 100%); aspect-ratio: 9 / 19; container-type: inline-size; }
.am-c-phone__bezel { position: absolute; inset: 0; padding: 3.4cqw; border-radius: 15% / 7.1%; background: #141919; box-shadow: 0 0 0 2px #3a4747, 0 34px 60px -20px rgba(0, 0, 0, .7); }
.am-c-phone__screen { height: 100%; display: flex; flex-direction: column; overflow: hidden; border-radius: 12% / 5.8%; background: var(--bx-cream); }
.am-c-phone__notch { position: absolute; top: 5.4cqw; left: 50%; width: 25cqw; height: 6.2cqw; translate: -50% 0; border-radius: 999px; background: #070909; }
.am-c-phone__bar { flex: none; display: flex; align-items: center; gap: 2.6cqw; padding: 13cqw 4.5cqw 3cqw; background: var(--bx-white); border-bottom: 1px solid rgba(51, 70, 70, .14); font: 600 4.6cqw/1 var(--bx-font); color: var(--bx-slate); }
.am-c-av { flex: none; display: grid; place-items: center; width: 8.6cqw; height: 8.6cqw; border-radius: 50%; background: var(--bx-slate); }
.am-c-av i { width: 55%; height: 55%; background: var(--bx-cream); -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.am-c-feed { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior-y: auto; scrollbar-width: none; }
.am-c-feed::-webkit-scrollbar { display: none; }
.am-c-feed:focus-visible { outline: 2px solid var(--bx-teal); outline-offset: -3px; }
.am-c-feed__list { display: flex; flex-direction: column; gap: 3cqw; padding: 3cqw; }
.am-c-post { position: relative; display: block; flex: none; aspect-ratio: 1; overflow: hidden; border-radius: 1.8cqw; background: var(--bx-white); }
.am-c-post img { position: absolute; left: -.8%; top: -.8%; width: 101.6%; height: 101.6%; max-width: none; object-fit: cover; display: block; }

/* ---------- Pinned (live): the stage sticks under the header while the page scrolls ~3.5 screens ---------- */
.am-c-journey.is-live .am-c-track { height: 240vh; }   /* trimmed from 350 for the combined page */
.is-live .am-c-sticky { position: sticky; top: var(--am-head); height: calc(100svh - var(--am-head)); }
.is-live .am-c-stage {
  height: 100%; max-width: var(--max); padding: 20px var(--pad); align-content: stretch; gap: 0; column-gap: clamp(20px, 3vw, 44px);
  grid-template-columns: minmax(88px, 104px) minmax(200px, 290px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
}
.is-live .am-c-intro { grid-column: 2; grid-row: 1; align-self: start; gap: 12px; }
.is-live .am-c-title { font-size: clamp(24px, 2.4vw, 34px); }
.is-live .am-c-rail { position: relative; top: auto; grid-column: 1; grid-row: 1 / -1; align-self: center; height: min(100%, 460px); margin: 0; padding: 0; background: none; }
.is-live .am-c-rail__list { position: relative; z-index: 1; height: 100%; flex-direction: column; justify-content: space-between; gap: 0; }
.is-live .am-c-rail__list li { flex: none; }
.is-live .am-c-dot { flex-direction: row; justify-content: flex-start; gap: 14px; padding: 0; border-radius: 8px; font-size: 14px; }
.is-live .am-c-dot__pt { margin-left: -1px; }
.is-live .am-c-rail__line { display: block; position: absolute; left: 4px; top: 22px; bottom: 22px; width: 2px; border-radius: 2px; background: rgba(242, 235, 219, .2); overflow: hidden; }
.am-c-rail__fill { position: absolute; inset: 0; background: var(--bx-cream); transform-origin: 50% 0; transform: scaleY(0); }
.is-live .am-c-panel { display: block; grid-column: 3; grid-row: 1 / -1; border-radius: 28px; overflow: hidden; background: var(--bx-charcoal) url(/assets/img/case/amantyle/board/pattern-dark.webp) center / cover no-repeat; box-shadow: inset 0 0 0 1px rgba(242, 235, 219, .08); }
.is-live .am-c-step { display: contents; }
.is-live .am-c-copy { grid-column: 2; grid-row: 2; align-self: center; opacity: 0; transform: translateY(18px); pointer-events: none; transition: opacity .3s ease, transform .5s var(--am-ease); }
.is-live .am-c-step.is-on .am-c-copy { opacity: 1; transform: none; pointer-events: auto; transition-delay: .12s; }
.is-live .am-c-copy__n span { font-size: clamp(56px, 7vw, 96px); }

/* Each application walks onto the screen from its own direction (the --f* variables), then leaves the other way. */
.is-live .am-c-item {
  --fx: 10%; --fy: 0%; --fr: 0deg; --fs: .88;
  grid-column: 3; grid-row: 1 / -1; align-self: stretch; container-type: size; padding: 0; border-radius: 0; background: none; box-shadow: none;
  opacity: 0; transform: translate3d(var(--fx), var(--fy), 0) rotate(var(--fr)) scale(var(--fs)); pointer-events: none;
  transition: opacity .4s ease, transform .85s var(--am-spring);
}
.is-live .am-c-item--sign { --fx: 0%; --fy: -16%; --fr: -5deg; --fs: .92; transform-origin: 50% 0; }
.is-live .am-c-item--billboard { --fx: 9%; --fy: 0%; --fs: .84; }
.is-live .am-c-item--website { --fx: 0%; --fy: 14%; --fs: .9; }
.is-live .am-c-item--social { --fx: 0%; --fy: 22%; --fs: .94; }
.is-live .am-c-item--cards { --fx: -8%; --fy: -9%; --fr: -4deg; --fs: .9; }
.is-live .am-c-step.is-on .am-c-item { opacity: 1; transform: none; pointer-events: auto; }
.is-live .am-c-step.is-past .am-c-item { opacity: 0; transform: translate3d(-7%, 0, 0) scale(1.05); transition-duration: .3s, .5s; }
.is-live .am-c-card { width: min(90cqw, calc(84cqh * var(--ar))); }
.is-live .am-c-phone { width: min(82cqw, calc(88cqh * 9 / 19)); }
.is-live .am-c-feed { overflow: hidden; }
.is-live .am-c-feed__list { will-change: transform; }

/* ---------- The wipe: then and now ---------- */
.am-c-wipe { width: 100%; max-width: var(--max); margin-inline: auto; display: grid; gap: 24px; padding: clamp(56px, 8vw, 104px) var(--pad) clamp(48px, 6vw, 88px); }
.am-c-wipe__head { display: grid; justify-items: start; gap: 12px; }
.am-c-wipe__hint { margin: 0; color: rgba(242, 235, 219, .86); font: 400 15px/1.5 var(--bx-font); }
.am-c-wipe__stage {
  --x: calc(22px + (100% - 44px) * var(--v)); position: relative; width: min(100%, calc((100svh - 200px) * 2400 / 1357)); aspect-ratio: 2400 / 1357; overflow: hidden; isolation: isolate;
  border-radius: 24px; background: var(--bx-charcoal); box-shadow: 0 32px 64px -32px rgba(0, 0, 0, .7), 0 0 0 1px rgba(242, 235, 219, .1); container-type: size;
}
.am-c-wipe__now { position: absolute; inset: 0; clip-path: inset(0 0 0 var(--x)); }
.am-c-wipe__now img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; }
.am-c-wipe__line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 2px; margin-left: -1px; background: var(--bx-cream); box-shadow: 0 0 0 1px rgba(33, 40, 40, .35); pointer-events: none; }
.am-c-wipe__tag {
  position: absolute; bottom: 14px; max-width: calc(50% - 28px); padding: 8px 14px; border-radius: 999px; background: rgba(33, 40, 40, .82); color: var(--bx-cream);
  font: 500 13px/1.25 var(--bx-font); pointer-events: none;
}
.am-c-wipe__tag--then { left: 14px; }
.am-c-wipe__tag--now { right: 14px; }
/* The range input covers the whole stage and is invisible, so you can grab anywhere; only its thumb shows, riding the divider. */
.am-c-wipe__range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; padding: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: ew-resize; touch-action: pan-y; }
.am-c-wipe__range::-webkit-slider-runnable-track { height: 100%; background: transparent; }
.am-c-wipe__range::-moz-range-track { height: 100%; background: transparent; }
.am-c-wipe__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 44px; height: 44px; margin-top: calc(50cqh - 22px); border: 2px solid var(--bx-slate); border-radius: 50%;
  background: var(--bx-cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334646' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45); transition: transform .15s var(--am-ease);
}
.am-c-wipe__range::-moz-range-thumb {
  box-sizing: border-box; width: 44px; height: 44px; border: 2px solid var(--bx-slate); border-radius: 50%;
  background: var(--bx-cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334646' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 7l-5 5 5 5M15 7l5 5-5 5'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45);
}
.am-c-wipe__range:active::-webkit-slider-thumb { transform: scale(1.08); }
.am-c-wipe__range:focus-visible { outline: none; }
.am-c-wipe__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px var(--bx-slate), 0 0 0 6px var(--bx-cream); }
.am-c-wipe__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 3px var(--bx-slate), 0 0 0 6px var(--bx-cream); }
@media (max-width: 700px) {
  .am-c-wipe__stage { aspect-ratio: 4 / 5; }
}

/* ---------- Reduced motion: the finished state, no travel ---------- */
@media (prefers-reduced-motion: reduce) {
  .am-c-flap, .am-c-flap::after, .am-c-wm__l, .am-c-seg::before, .am-c-item, .am-c-copy, .am-c-dot__pt, .am-c-shop__video { transition: none !important; }
  .am-c-cap.is-swap { animation: none; }
}
