/* =========================================================================
   RJ Parfums — the introduction

   Kept in its own file rather than in style.css, and loaded only by the page
   that uses it. Two reasons: nothing else on the site downloads rules it will
   never need, and a screen this self-contained is easier to work on — or to
   remove — when it lives in one place.

   The shape: a portrait filling the screen, with a card resting over the
   bottom of it. Her name reads off the picture; everything you can do sits in
   the card, inside a thumb's reach.

   COLOUR RULE: there is not one raw hex value below this line. Every colour is
   a house token from style.css :root, and every translucent one is that same
   token run through color-mix(). That is what keeps the cover honest — change
   the palette once and this screen follows, in daylight and after hours, with
   nothing left behind holding an old colour.

   MOTION RULE: anything that moves on its own — the aura, the motes, the ring,
   the auto-advance — is switched off wholesale in the reduced-motion block at
   the foot of the file. Nothing here is load-bearing; take the movement away
   and the same screen is still readable and still works.

   TRANSFORM RULE: the entrance animations own `transform`, and an animation
   holding its final frame beats an inline style. So everything the script
   moves at runtime — the parallax, the drag, the exit — is written to the
   independent `translate` / `scale` properties instead, which compose with a
   transform rather than fight it.
   ========================================================================= */

/* This is the whole page, not a section on one. No scroll, exactly one screen,
   sized in svh/dvh so the mobile browser bars collapsing does not leave a
   strip of nothing showing underneath. */
.is-welcome {
  overflow: hidden;
  height: 100svh;
  height: 100dvh;
  background: var(--cream-light);
  padding-bottom: 0 !important;
  /* the shop's phone rules make room for a tab bar this page has not got */
}

.wel {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: 1fr auto;
  /* the picture takes what the card leaves */
  height: 100svh;
  height: 100dvh;
  overflow: hidden;

  /* one easing curve for everything that settles, one that overshoots for the
     two things that should feel sprung — the tile marker and the card */
  --wel-ease: cubic-bezier(.2, .7, .3, 1);
  --wel-spring: cubic-bezier(.34, 1.46, .48, 1);

  /* Three layers rather than one flat wash: a bloom where her head goes, a
     warm floor under her, and the house cream between them. Depth on a cover
     comes from the light having a direction. */
  background:
    radial-gradient(76% 52% at 50% 6%, var(--cream-light) 0%, transparent 66%),
    radial-gradient(120% 66% at 50% 104%, var(--cream-deep) 0%, transparent 72%),
    linear-gradient(168deg, var(--cream-light) 0%, var(--cream) 58%, var(--cream-deep) 100%);
}

/* A vignette, drawn in ink rather than black so it tints rather than greys.
   It sits above the picture but below everything readable. */
.wel::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(112% 80% at 50% 34%,
      transparent 52%,
      color-mix(in srgb, var(--ink) 9%, transparent) 100%);
}

/* ---- the aura ----------------------------------------------------------
   Three soft clouds drifting behind her at different speeds. A flat gradient
   reads as a backdrop; a gradient that moves reads as a room with air in it.
   Blurred and enormous on purpose — nothing here should be identifiable as a
   shape, only as light shifting.
   ---------------------------------------------------------------------- */
.wel-aura {
  position: absolute;
  inset: -12%;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  contain: paint;
}

.wel-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(46px);
  opacity: .5;
  will-change: transform;
}

.wel-blob--1 {
  top: 4%;
  left: -8%;
  width: 58%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 40% 40%,
      color-mix(in srgb, var(--gold) 46%, transparent) 0%,
      transparent 70%);
  animation: wel-drift-a 26s ease-in-out infinite;
}

.wel-blob--2 {
  top: 22%;
  right: -14%;
  width: 64%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 60% 40%,
      color-mix(in srgb, var(--cream-deep) 92%, transparent) 0%,
      transparent 68%);
  animation: wel-drift-b 34s ease-in-out infinite;
}

.wel-blob--3 {
  bottom: -6%;
  left: 18%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%,
      color-mix(in srgb, var(--gold-fill) 26%, transparent) 0%,
      transparent 66%);
  animation: wel-drift-c 42s ease-in-out infinite;
}

@keyframes wel-drift-a {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(9%, 7%, 0) scale(1.14); }
}

@keyframes wel-drift-b {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1.06); }
  50%      { transform: translate3d(-11%, 9%, 0) scale(.92); }
}

@keyframes wel-drift-c {
  0%, 100% { transform: translate3d(0, 0, 0) scale(.96); }
  50%      { transform: translate3d(7%, -8%, 0) scale(1.1); }
}

/* ---- the picture -------------------------------------------------------
   Two different jobs behind one element, because the two kinds of image want
   opposite things. A photograph fills the frame and is cropped to fit. A
   cut-out is a person with no background at all: crop it and you take the top
   of her head off, so it is *contained* and anchored to the bottom.
   ---------------------------------------------------------------------- */
.wel-stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
}

/* The ring she stands in. An editorial device, and a practical one: it gives
   the eye an edge to read her silhouette against where hair meets backdrop.
   A second, dashed ring turns very slowly outside it — the only thing on the
   screen that never stops, and slow enough that it is felt before it is
   noticed. Both take a little of the pointer parallax, opposite to her, which
   is what makes the picture read as having depth rather than being flat. */
.wel-halo {
  position: absolute;
  left: 50%;
  bottom: -18%;
  z-index: 0;
  width: min(96%, 620px);
  aspect-ratio: 1;
  transform: translateX(-50%);
  translate: calc(var(--px, 0) * 10px) calc(var(--py, 0) * 7px);
  pointer-events: none;
}

.wel-halo span {
  position: absolute;
  inset: 0;
  border-radius: 50%;
}

.wel-halo span:first-child {
  border: 1px solid color-mix(in srgb, var(--gold-deep) 34%, transparent);
  background: radial-gradient(circle at 50% 34%,
      color-mix(in srgb, var(--cream-light) 88%, transparent) 0%,
      transparent 68%);
}

.wel-halo span + span {
  inset: -5%;
  border: 1px dashed color-mix(in srgb, var(--gold-deep) 22%, transparent);
  animation: wel-turn 90s linear infinite;
}

@keyframes wel-turn {
  to { transform: rotate(360deg); }
}

.wel-portrait {
  position: absolute;
  left: 60%;
  bottom: 0;
  z-index: 1;
  transform: translateX(-50%);
  /* against the halo, and a shade further than it — the parallax reads as
     distance between the two, not as the picture sliding about */
  translate: calc(var(--px, 0) * -16px) calc(var(--py, 0) * -11px);
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 22%;
  display: block;
}

.wel-portrait--cutout {
  /* Sized by HEIGHT so she fills the stage rather than floating in it — the
     source is landscape, so driving it off width leaves a band of nothing
     above her head. The transparent margins that spill past the sides are
     clipped by .wel-stage. Capped because past roughly 1.4x a cut-out goes
     soft at the hairline — the first place anyone looks. */
  height: min(100%, 490px);
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom center;
  /* A touch off the saturation: the shirt in this photograph is a hotter pink
     than anything the house owns, and left alone it is the loudest thing on a
     screen otherwise made of rose. Small enough that skin stays skin. */
  filter:
    saturate(.88)
    drop-shadow(0 26px 46px color-mix(in srgb, var(--ink) 26%, transparent));
}

/* ---- the motes ---------------------------------------------------------
   Fragrance, drawn. Fourteen specks lifting through the frame on staggered
   loops, half of them behind the vignette so they read as being in the room
   rather than on the glass. Every value that varies is an inline custom
   property from the markup, so this is one rule rather than fourteen.
   ---------------------------------------------------------------------- */
.wel-motes {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
  translate: calc(var(--px, 0) * -6px) 0;
}

.wel-motes i {
  position: absolute;
  bottom: -4%;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: color-mix(in srgb, var(--gold) 72%, transparent);
  box-shadow: 0 0 8px color-mix(in srgb, var(--gold) 46%, transparent);
  opacity: 0;
  animation: wel-mote var(--t) linear var(--d) infinite;
}

@keyframes wel-mote {
  0%   { transform: translate3d(0, 0, 0) scale(.5); opacity: 0; }
  14%  { opacity: var(--o); }
  50%  { transform: translate3d(16px, -34svh, 0) scale(1); }
  62%  { opacity: var(--o); }
  /* gone before it reaches the top edge — a speck cut off by the clip reads
     as a rendering fault rather than as air */
  100% { transform: translate3d(-12px, -72svh, 0) scale(.6); opacity: 0; }
}

/* ---- day and night ------------------------------------------------------
   The shop has had a light/dark switch since the beginning and the cover did
   not, so a visitor who reads in the dark met one white screen on the way in.
   Same storage key as the shop's, so the choice made here is already made
   when the homepage loads. */
.wel-theme {
  position: absolute;
  top: calc(clamp(14px, 3vw, 22px) + env(safe-area-inset-top, 0px));
  right: clamp(14px, 4vw, 26px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--gold-deep) 30%, transparent);
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  color: var(--gold-dark);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--ink) 12%, transparent);
  transition: transform .22s var(--wel-spring), background .22s, border-color .22s;
}

.wel-theme:hover {
  transform: scale(1.08);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  border-color: color-mix(in srgb, var(--gold-deep) 62%, transparent);
}

.wel-theme:active {
  transform: scale(.94);
}

/* Both marks live in the same grid cell and trade places on a rotation — the
   one showing is the mode you are about to move to. */
.wel-theme .ico {
  grid-area: 1/1;
  width: 19px;
  height: 19px;
  transition: opacity .3s, transform .45s var(--wel-spring);
}

.wel-theme .ico--sun {
  opacity: 0;
  transform: rotate(-110deg) scale(.4);
}

[data-theme="dark"] .wel-theme .ico--moon {
  opacity: 0;
  transform: rotate(110deg) scale(.4);
}

[data-theme="dark"] .wel-theme .ico--sun {
  opacity: 1;
  transform: none;
}

/* ---- her name, off the picture ----------------------------------------- */
.wel-id {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  padding:
    calc(clamp(18px, 3.2vw, 30px) + env(safe-area-inset-top, 0px)) clamp(20px, 5vw, 34px) clamp(26px, 7vw, 48px);
  /* room for the theme button, which sits in the same line as the name */
  padding-right: clamp(66px, 16vw, 84px);
  /* A wash under the type rather than over the whole picture: her face keeps
     its own light, and the name still holds against a pale shoulder. It stays
     near-opaque past the role line and only fades in the padding below it —
     the fade was cutting across the second line, and rose type on light hair
     is exactly where that shows. */
  background: linear-gradient(180deg,
      color-mix(in srgb, var(--cream-light) 97%, transparent) 0%,
      color-mix(in srgb, var(--cream-light) 92%, transparent) 40%,
      color-mix(in srgb, var(--cream-light) 68%, transparent) 62%,
      transparent 100%);
}

.wel-id h1 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-family: var(--sans);
  font-weight: 800;
  letter-spacing: -.025em;
  font-size: clamp(26px, 6.4vw, 40px);
  line-height: 1.08;
  color: var(--ink);
}

.wel-id p {
  margin-top: 6px;
  font-size: clamp(12px, 3vw, 14px);
  font-weight: 600;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--gold-dark);
  /* the role reads in after the name has finished arriving */
  animation: wel-rise .6s var(--wel-ease) .34s both;
}

/* A word that lifts out of its own line rather than fading in place. The
   overflow is what does it, so each word needs a box of its own; the padding
   and the negative margin that cancels it are there so the box does not
   clip a descender. */
.wel-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: bottom;
  padding-bottom: .14em;
  margin-bottom: -.14em;
}

.wel-w > i {
  display: inline-block;
  font-style: normal;
  animation: wel-word .72s var(--wel-ease) both;
  animation-delay: calc(var(--i) * .07s + .06s);
}

@keyframes wel-word {
  from {
    transform: translateY(112%) rotate(3deg);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

/* ---- the seal beside her name ------------------------------------------
   Scaled off the name it sits with rather than the viewport, so it stays the
   same size relative to the type at every width. The shadow is the badge's
   own gold rather than grey: it lifts off a pale shoulder without printing a
   dirty ring on it. */
.wel-tick {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: .72em;
  height: .72em;
  filter: drop-shadow(0 1px 3px color-mix(in srgb, var(--gold-fill) 44%, transparent));
  animation: wel-pop .52s var(--wel-spring) .42s both;
}

.wel-tick svg {
  width: 100%;
  height: 100%;
}

/* --gold-fill is the one gold that stays deep in both themes, which is what
   keeps the white mark on it legible either way; the foot darkens towards the
   ink that the palette already pairs with a gold fill. */
.wel-seal-a {
  stop-color: var(--gold-fill);
}

.wel-seal-b {
  stop-color: color-mix(in srgb, var(--gold-fill) 78%, var(--on-gold));
}

/* Struck after the seal lands. The dash is the mark's own length — 11.2 at
   this size — so it wipes on from the short arm to the long one. */
.wel-tick-mark {
  fill: none;
  stroke: #fff;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 11.2;
  animation: wel-tick-draw .4s var(--wel-ease) .66s both;
}

@keyframes wel-pop {
  from {
    opacity: 0;
    transform: scale(.3) rotate(-40deg);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wel-tick-draw {
  from {
    stroke-dashoffset: 11.2;
  }

  to {
    stroke-dashoffset: 0;
  }
}

/* ---- the card -----------------------------------------------------------
   Frosted rather than solid: she carries on underneath it, which is what says
   the card is resting on the picture instead of ending it. The blur is what
   keeps the copy readable over whatever happens to be behind it.

   `translate` is the drag handle's channel — see the TRANSFORM RULE at the
   top. It is separate from the entrance animation, which owns `transform`. */
.wel-sheet {
  position: relative;
  z-index: 4;
  translate: 0 var(--drag, 0px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(26px) saturate(1.35);
  -webkit-backdrop-filter: blur(26px) saturate(1.35);
  border-top: 1px solid color-mix(in srgb, var(--surface) 70%, transparent);
  border-radius: 28px 28px 0 0;
  padding:
    8px clamp(16px, 4.4vw, 26px) calc(clamp(14px, 3vw, 20px) + env(safe-area-inset-bottom, 0px));
  box-shadow:
    0 -1px 0 color-mix(in srgb, var(--cream-deep) 60%, transparent),
    0 -18px 46px color-mix(in srgb, var(--ink) 14%, transparent);
  display: grid;
  gap: clamp(12px, 2.6vw, 16px);
  transition: translate .38s var(--wel-spring);
}

/* while a finger is on it, the card goes exactly where the finger is */
.wel-sheet.is-drag {
  transition: none;
}

/* A gold thread along the top edge, brightest in the middle. It is what
   catches the eye first and tells you the card is a thing you can take hold
   of. */
.wel-sheet::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  right: 12%;
  height: 1px;
  pointer-events: none;
  background: linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--gold) 78%, transparent),
      transparent);
}

/* Where a browser cannot blur, a translucent card is just a washed-out one —
   so it goes solid instead. */
@supports not (backdrop-filter: blur(1px)) {
  .wel-sheet {
    background: var(--surface);
  }
}

/* The grab handle is a real button now, not a decoration: it opens the card
   to its full height, which is the same thing dragging it up does. Anything
   a gesture can do has to be reachable without the gesture. */
.wel-grab {
  display: block;
  width: 68px;
  justify-self: center;
  padding: 8px 0 4px;
  margin: 0 auto -4px;
  background: none;
  border: 0;
  cursor: pointer;
  touch-action: none;
}

.wel-grab i {
  display: block;
  width: 42px;
  height: 4px;
  margin: 0 auto;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--gold-deep) 34%, transparent);
  transition: background .2s, width .3s var(--wel-spring);
}

.wel-grab:hover i,
.wel-sheet.is-open .wel-grab i {
  width: 56px;
  background: color-mix(in srgb, var(--gold-deep) 62%, transparent);
}

.wel-sheet-top {
  display: flex;
  align-items: flex-start;
  gap: clamp(12px, 3vw, 22px);
}

/* The three panels are stacked in one grid cell rather than positioned on top
   of one another. The container is then naturally as tall as the tallest of
   them — nothing to measure, nothing to re-measure when the fonts land or the
   window changes, and no way for a mis-timed measurement to collapse the box
   and drop the button on top of the copy. */
.wel-say {
  flex: 1;
  min-width: 0;
  display: grid;
  /* Each panel sizes to its own copy rather than stretching to the tallest.
     Left alone the box is as tall as the longest of the three, which is
     invisible while the copy is clamped to four lines and an obvious hole
     underneath the short one once the card is opened out. intro.js sets the
     height to whichever panel is showing and transitions between them; with
     no script the box falls back to being as tall as it needs to be for all
     of them, which is wrong by a few pixels and never broken. */
  align-items: start;
  transition: height .42s var(--wel-ease);
}

.wel-panel {
  grid-area: 1/1;
  opacity: 0;
  visibility: hidden;
  transform: translateY(7px);
  transition: opacity .34s ease, transform .34s cubic-bezier(.4, 0, .2, 1), visibility .34s;
}

.wel-panel.is-on {
  opacity: 1;
  visibility: visible;
  transform: none;
  /* The panel arrives from the side it was asked for — forward from the
     right, back from the left. `--dir` is set on .wel-say as the tiles are
     pressed, so the card reads as a strip being moved along rather than three
     paragraphs cross-fading in place. */
  animation: wel-panel-in .46s var(--wel-ease) both;
}

@keyframes wel-panel-in {
  from { translate: calc(var(--dir, 1) * 30px) 0; }
  to   { translate: 0 0; }
}

.wel-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: .2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--gold-dark);
}

/* the rule in front of the kicker draws itself in */
.wel-kicker::before {
  content: '';
  width: 18px;
  height: 1px;
  background: currentColor;
  opacity: .5;
  transform-origin: left;
  animation: wel-rule .5s var(--wel-ease) .1s both;
}

@keyframes wel-rule {
  from { transform: scaleX(0); }
  to   { transform: none; }
}

.wel-title {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.005em;
  font-size: clamp(20px, 5.2vw, 27px);
  line-height: 1.16;
  color: var(--ink);
  margin-top: 6px;
  text-wrap: balance;
}

.wel-body {
  font-size: clamp(12.5px, 3.1vw, 14px);
  line-height: 1.65;
  color: var(--body);
  margin-top: 8px;
  /* The card is not where a paragraph is read to the end — it is where you
     decide whether to go in. Four lines, then it stops; the handle above
     opens it out to the whole thing. */
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  animation: wel-rise .5s var(--wel-ease) .16s both;
}

.wel-sheet.is-open .wel-body {
  -webkit-line-clamp: 10;
}

/* ---- what the house is known for ---------------------------------------
   Three short claims per panel, folded away until the card is opened. The
   0fr → 1fr grid row is the trick that lets a box of unknown height animate;
   the child carries the overflow.
   ---------------------------------------------------------------------- */
.wel-points {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows .42s var(--wel-ease),
    opacity .3s ease,
    margin-top .42s var(--wel-ease);
}

.wel-sheet.is-open .wel-points {
  grid-template-rows: 1fr;
  opacity: 1;
  margin-top: 10px;
}

.wel-points ul {
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  min-height: 0;
}

.wel-points li {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .01em;
  color: var(--gold-dark);
  padding: 5px 11px;
  border-radius: var(--r-pill);
  border: 1px solid color-mix(in srgb, var(--gold-deep) 24%, transparent);
  background: color-mix(in srgb, var(--cream) 44%, transparent);
}

.wel-sheet.is-open .wel-panel.is-on .wel-points li {
  animation: wel-pop .42s var(--wel-spring) both;
  animation-delay: calc(var(--i) * .07s + .08s);
}

/* ---- the way in ---------------------------------------------------------
   Filled in mauve, which is the one brand token that holds the same value in
   both themes — a button that inverts with the palette is a button that ends
   up cream-on-cream one night.

   Three things move on it: a halo that turns behind it, a sheen that crosses
   the face, and the button itself, which leans a few pixels towards the
   pointer. The last one is the reason `--mx`/`--my` exist. */
.wel-go {
  flex: none;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: clamp(13px, 3.4vw, 17px) clamp(20px, 4.8vw, 30px);
  border-radius: var(--r-pill);
  background: var(--gold-fill);
  color: var(--on-fill);
  font-weight: 700;
  font-size: clamp(13.5px, 3.4vw, 15px);
  letter-spacing: .015em;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  translate: var(--mx, 0px) calc(var(--my, 0px) + var(--lift, 0px));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--on-fill) 26%, transparent),
    0 12px 26px color-mix(in srgb, var(--gold-fill) 46%, transparent);
  transition: translate .3s var(--wel-ease), box-shadow .2s;
}

/* the halo — a slow turn of gold just inside the edge, so the button looks
   lit rather than painted */
.wel-go::before {
  content: '';
  position: absolute;
  inset: -60%;
  z-index: -1;
  opacity: .45;
  background: conic-gradient(from 0deg,
      transparent 0deg,
      color-mix(in srgb, var(--gold) 70%, transparent) 90deg,
      transparent 180deg,
      color-mix(in srgb, var(--cream) 60%, transparent) 270deg,
      transparent 360deg);
  animation: wel-turn 8s linear infinite;
}

/* A sheen that crosses on hover — the one flourish on this screen, and it is
   on the thing we want pressed. */
.wel-go::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg,
      transparent,
      color-mix(in srgb, var(--on-fill) 30%, transparent),
      transparent);
  transition: transform .6s cubic-bezier(.4, 0, .2, 1);
}

.wel-go:hover {
  --lift: -2px;
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--on-fill) 26%, transparent),
    0 18px 34px color-mix(in srgb, var(--gold-fill) 54%, transparent);
}

.wel-go:hover::after {
  transform: translateX(120%) skewX(-18deg);
}

.wel-go:active {
  --lift: 0px;
  scale: .97;
}

.wel-go .ico {
  width: 16px;
  height: 16px;
  position: relative;
  transition: transform .24s var(--wel-spring);
}

.wel-go:hover .ico {
  transform: translateX(4px);
}

/* ---- the tiles ----------------------------------------------------------
   The fill under the selected tile is one element that slides between the
   three rather than three backgrounds switching on and off. It is measured
   from the tiles themselves in intro.js, so it stays right whatever the copy
   or the screen does — and until it has been measured the tiles keep their
   own fill, which is why `.has-glide` exists rather than the marker simply
   being there from the start.
   ---------------------------------------------------------------------- */
.wel-tiles {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 2.4vw, 12px);
}

.wel-glide {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  height: 100%;
  width: var(--w, 33%);
  translate: var(--x, 0px) 0;
  border-radius: 16px;
  border: 1px solid var(--gold-deep);
  background: linear-gradient(150deg, var(--cream-light), var(--cream));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--surface) 70%, transparent),
    0 8px 18px color-mix(in srgb, var(--gold-fill) 24%, transparent);
  opacity: 0;
  pointer-events: none;
}

.wel-tiles.has-glide .wel-glide {
  opacity: 1;
}

/* the transition is only switched on once the marker has been put in the
   right place, so it does not slide in from the corner on the first paint */
.wel-tiles.is-live .wel-glide {
  transition:
    translate .44s var(--wel-spring),
    width .44s var(--wel-spring);
}

/* The auto-advance, drawn. It is not a decoration of the timer — it *is* the
   timer: intro.js moves to the next panel when this animation ends, so what
   you see and what happens can never drift apart, and pausing the animation
   pauses the carousel. */
.wel-glide i {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 6px;
  height: 2px;
  border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--gold-fill) 62%, transparent);
  transform-origin: left;
  transform: scaleX(0);
  animation: wel-progress var(--auto, 7s) linear forwards;
}

@keyframes wel-progress {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* hovering the card, focusing inside it, or leaving the tab holds it */
.wel-tiles.is-hold .wel-glide i {
  animation-play-state: paused;
}

/* once the visitor has chosen a panel themselves, the cover stops choosing */
.wel-tiles.is-manual .wel-glide i {
  display: none;
}

.wel-tile {
  position: relative;
  z-index: 1;
  overflow: hidden;
  display: grid;
  gap: clamp(14px, 4vw, 26px);
  justify-items: start;
  text-align: left;
  padding: clamp(11px, 3vw, 15px);
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--gold-deep) 26%, transparent);
  background: color-mix(in srgb, var(--cream-light) 62%, transparent);
  color: var(--ink);
  transition:
    border-color .22s, background .22s, box-shadow .22s,
    transform .3s var(--wel-spring), color .22s;
}

.wel-tile .ico {
  width: 19px;
  height: 19px;
  color: var(--gold-dark);
  transition: transform .3s var(--wel-spring), color .22s;
}

.wel-tile span {
  font-size: clamp(11.5px, 3vw, 13px);
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.wel-tile:hover {
  border-color: color-mix(in srgb, var(--gold-deep) 60%, transparent);
  background: var(--cream-light);
  transform: translateY(-2px);
}

.wel-tile:active {
  transform: scale(.97);
}

/* The one you are reading is filled rather than outlined — the same gesture
   the shop's active chip uses, so it needs no explaining. Once the sliding
   marker is in play it does the filling, and the tile hands back its own. */
.wel-tile.is-on {
  border-color: var(--gold-deep);
  background: linear-gradient(150deg, var(--cream-light), var(--cream));
  box-shadow:
    inset 0 1px 0 color-mix(in srgb, var(--surface) 70%, transparent),
    0 8px 18px color-mix(in srgb, var(--gold-fill) 24%, transparent);
}

.wel-tiles.has-glide .wel-tile.is-on {
  border-color: transparent;
  background: none;
  box-shadow: none;
}

.wel-tiles.has-glide .wel-tile.is-on:hover {
  transform: none;
}

.wel-tile.is-on .ico {
  color: var(--gold-fill);
  transform: scale(1.12) rotate(-4deg);
}

/* the press, drawn where the finger landed — added by intro.js and removed
   the moment it has finished */
.wel-ripple {
  position: absolute;
  z-index: 0;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle,
      color-mix(in srgb, var(--gold) 46%, transparent) 0%,
      transparent 70%);
  animation: wel-ripple .62s ease-out forwards;
}

.wel-go .wel-ripple {
  background: radial-gradient(circle,
      color-mix(in srgb, var(--on-fill) 40%, transparent) 0%,
      transparent 70%);
}

@keyframes wel-ripple {
  from { transform: scale(0); opacity: .9; }
  to   { transform: scale(1); opacity: 0; }
}

.wel-skip {
  /* it takes a press mark of its own, so it has to be the box that mark is
     measured and clipped by — left static it would land somewhere across the
     card instead */
  position: relative;
  overflow: hidden;
  justify-self: center;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  transition: color .2s, background .2s;
}

.wel-skip:hover {
  color: var(--gold-dark);
  background: color-mix(in srgb, var(--cream) 60%, transparent);
}

/* ---- arrival ------------------------------------------------------------
   The card and her name lift in rather than appearing. Staggered, and short —
   this is the first thing anybody sees and it must not feel like waiting. */
@keyframes wel-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes wel-fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* the picture does not simply appear: it settles out of a soft focus, which
   covers the moment a large photograph decodes */
@keyframes wel-arrive {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(1.06);
    filter: blur(14px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%);
    filter: blur(0);
  }
}

.wel-portrait {
  animation: wel-arrive .9s var(--wel-ease) .05s both;
}

/* the cut-out keeps its own colour correction and shadow, so it gets its own
   pair of frames rather than losing the filter to the one above */
@keyframes wel-arrive-cutout {
  from {
    opacity: 0;
    transform: translateX(-50%) scale(1.05);
    filter: saturate(.88) blur(12px);
  }

  to {
    opacity: 1;
    transform: translateX(-50%);
    filter:
      saturate(.88)
      drop-shadow(0 26px 46px color-mix(in srgb, var(--ink) 26%, transparent));
  }
}

.wel-portrait--cutout {
  animation: wel-arrive-cutout .9s var(--wel-ease) .05s both;
}

.wel-halo {
  animation: wel-halo 1.1s var(--wel-ease) both;
}

@keyframes wel-halo {
  from {
    opacity: 0;
    scale: .84;
  }

  to {
    opacity: 1;
    scale: 1;
  }
}

.wel-aura {
  animation: wel-fade 1.2s ease both;
}

.wel-motes {
  animation: wel-fade 1.6s ease .5s both;
}

.wel-theme {
  animation: wel-rise .6s var(--wel-ease) .5s both;
}

.wel-sheet {
  animation: wel-rise .62s var(--wel-ease) .14s both;
}

.wel-tiles {
  animation: wel-rise .6s var(--wel-ease) .3s both;
}

.wel-skip {
  animation: wel-fade .6s ease .5s both;
}

/* ---- leaving ------------------------------------------------------------
   Pressing Explore does not cut to the shop — the cover stands back and the
   card drops away first, and the navigation happens underneath that. It is
   a third of a second, and it is the difference between arriving somewhere
   and being moved somewhere. Written to `scale`/`translate` so it composes
   with the entrance animations still holding their last frame. */
.is-welcome.is-leaving .wel-stage,
.is-welcome.is-leaving .wel-sheet,
.is-welcome.is-leaving .wel-id {
  transition: opacity .34s ease, scale .44s var(--wel-ease), translate .34s ease;
}

.is-welcome.is-leaving .wel-stage {
  opacity: 0;
  scale: 1.06;
}

.is-welcome.is-leaving .wel-id {
  opacity: 0;
  translate: 0 -14px;
}

.is-welcome.is-leaving .wel-sheet {
  opacity: 0;
  translate: 0 26px;
}

/* ---- wide screens -------------------------------------------------------
   The card stops being a sheet across the bottom and becomes a column beside
   her — a full-width band of tiles on a 1440px screen is a lot of nothing.
   There is room here, so the three claims are simply shown. */
@media (min-width:861px) {
  .wel {
    grid-template-rows: none;
    grid-template-columns: 1.05fr minmax(400px, 480px);
    align-items: stretch;
  }

  .wel-portrait--cutout {
    height: min(100%, 560px);
  }

  .wel-halo {
    bottom: -12%;
    width: min(88%, 660px);
  }

  .wel-id {
    padding-left: clamp(30px, 4vw, 56px);
    /* the button has moved out of this column — see below — so the name gets
       the width back. Reserving eighty pixels of a four-hundred pixel column
       was pushing the seal onto a line of its own. */
    padding-right: clamp(20px, 3vw, 34px);
    background: linear-gradient(180deg,
        color-mix(in srgb, var(--cream-light) 90%, transparent) 0%,
        transparent 100%);
  }

  /* Over the card rather than over her: on this layout the top right of the
     picture is where the name ends, and the top right of the screen is empty.
     Fixed rather than absolute because the two are in different columns —
     nothing here scrolls, so there is no difference beyond which box it is
     measured from. */
  .wel-theme {
    position: fixed;
    top: clamp(16px, 2.2vw, 26px);
    right: clamp(16px, 2.2vw, 26px);
  }

  .wel-sheet {
    border-radius: 0;
    border-top: none;
    border-left: 1px solid color-mix(in srgb, var(--cream-deep) 70%, transparent);
    align-content: center;
    padding: clamp(28px, 4vw, 48px) clamp(26px, 3.4vw, 44px);
    gap: 22px;
    box-shadow: -22px 0 56px color-mix(in srgb, var(--ink) 11%, transparent);
  }

  .wel-sheet::before {
    top: 0;
    bottom: 0;
    left: 0;
    right: auto;
    width: 1px;
    height: auto;
    background: linear-gradient(180deg,
        transparent,
        color-mix(in srgb, var(--gold) 70%, transparent),
        transparent);
  }

  .wel-grab {
    display: none;
  }

  .wel-sheet-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
  }

  .wel-say {
    width: 100%;
  }

  .wel-title {
    font-size: clamp(26px, 2.4vw, 34px);
  }

  .wel-body {
    -webkit-line-clamp: 6;
  }

  .wel-points {
    grid-template-rows: 1fr;
    opacity: 1;
    margin-top: 14px;
  }

  .wel-panel.is-on .wel-points li {
    animation: wel-pop .42s var(--wel-spring) both;
    animation-delay: calc(var(--i) * .07s + .14s);
  }

  .wel-go {
    align-self: flex-start;
  }
}

/* ---- short screens ------------------------------------------------------
   A phone turned sideways. The picture gives up its height first; the card
   keeps every control it had. */
@media (max-height:620px) and (max-width:860px) {
  .wel-body {
    -webkit-line-clamp: 2;
  }

  .wel-sheet.is-open .wel-body {
    -webkit-line-clamp: 5;
  }

  .wel-id {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .wel-theme {
    top: calc(10px + env(safe-area-inset-top, 0px));
  }

  .wel-tile {
    gap: 8px;
  }
}


/* A landscape phone is wide and barely tall: stacked, the card eats the whole
   screen and leaves the picture about forty pixels to live in. Side by side is
   the only arrangement that shape allows. */
@media (max-height:560px) and (min-width:620px) {
  .wel {
    grid-template-rows: none;
    grid-template-columns: .9fr minmax(330px, 44%);
  }

  .wel-sheet {
    border-radius: 0;
    border-top: none;
    align-content: center;
    padding: 14px clamp(16px, 3vw, 26px);
    gap: 10px;
    box-shadow: -14px 0 36px color-mix(in srgb, var(--ink) 12%, transparent);
  }

  .wel-grab {
    display: none;
  }

  .wel-sheet-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .wel-say {
    width: 100%;
  }

  .wel-body {
    display: -webkit-box;
    -webkit-line-clamp: 2;
  }

  .wel-points {
    display: none;
  }

  .wel-skip {
    display: none;
  }
}

/* Shorter than a credit card is tall. Whatever layout is in force, the copy
   goes and the controls stay — a card that runs past the bottom of the screen
   takes the way in with it. Placed last so it wins over the landscape block
   above, which re-showed the body it had hidden. */
@media (max-height:460px) {
  .wel-body {
    display: none !important;
  }

  .wel-points,
  .wel-motes {
    display: none;
  }

  .wel-id h1 {
    font-size: 22px;
  }

  .wel-id p {
    font-size: 11px;
    letter-spacing: .1em;
  }

  .wel-title {
    font-size: 17px;
    margin-top: 4px;
  }

  .wel-sheet {
    gap: 9px;
    padding-top: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  }

  .wel-sheet-top {
    gap: 10px !important;
  }

  .wel-tile {
    gap: 7px;
    padding: 9px 10px;
    border-radius: 13px;
  }

  .wel-glide {
    border-radius: 13px;
  }

  .wel-go {
    padding: 11px 18px;
  }
}

/* ---- movement off -------------------------------------------------------
   Everything that moves is listed here, including the things that move on
   their own. The auto-advance goes with them: it is driven by the progress
   animation, so removing the animation is what stops the carousel — there is
   no second timer to remember. */
@media (prefers-reduced-motion:reduce) {

  .wel-panel,
  .wel-say,
  .wel-go,
  .wel-go::after,
  .wel-go .ico,
  .wel-tile,
  .wel-tile .ico,
  .wel-sheet,
  .wel-glide,
  .wel-points,
  .wel-grab i,
  .wel-theme,
  .wel-theme .ico {
    transition: none;
  }

  .wel-id,
  .wel-id p,
  .wel-w > i,
  .wel-tick,
  /* the mark's dash offset is 0 at rest, so dropping the animation leaves it
     struck rather than half-drawn */
  .wel-tick-mark,
  .wel-portrait,
  .wel-portrait--cutout,
  .wel-halo,
  .wel-halo span + span,
  .wel-aura,
  .wel-blob,
  .wel-motes,
  .wel-theme,
  .wel-sheet,
  .wel-tiles,
  .wel-skip,
  .wel-panel.is-on,
  .wel-kicker::before,
  .wel-body,
  .wel-points li,
  .wel-go::before,
  .wel-glide i,
  .wel-ripple {
    animation: none !important;
  }

  /* the motes and the halo's second ring exist only as movement */
  .wel-motes,
  .wel-halo span + span {
    display: none;
  }

  .wel-glide i {
    display: none;
  }

  .wel-portrait,
  .wel-portrait--cutout,
  .wel-halo,
  .wel-motes {
    translate: none;
  }
}
