/* Premium motion, 2026-10-15 (Carson picked groups A, B and C from MOTION-IDEAS-2026-10-15.md).
   House rules: one curve (--ease-out), each touch plays once when it enters and ends inside 5 s,
   nothing loops, nothing moves under reduced motion, hover effects only on a real mouse. */

/* Type and finish (2026-10-15): balanced headings, no lone last words, and a blurred stand-in under card images */
h1,h2,h3,.lost-title{text-wrap:balance}
p,li,dd{text-wrap:pretty}
.editorial,blockquote{hanging-punctuation:first}
.project-image,.brand-cover{background-size:cover;background-position:center top;background-repeat:no-repeat}
.brand-cover{background-position:center}

/* The headline's lines sit in masks. Without motion they read as plain text. */
.hero h1 .hl{display:block;margin:0;padding:0;font:inherit;font-size:1em;line-height:inherit;letter-spacing:inherit;color:inherit;white-space:normal}
.hero h1 .hl-in{display:block;margin:0;padding:0;font:inherit;font-size:1em;line-height:inherit;letter-spacing:inherit;color:inherit;white-space:inherit}

/* Thank-you seal (static by default) */
.thanks-seal{display:grid;place-items:center;width:84px;height:84px;margin:0 0 26px;border-radius:50%;border:1px solid var(--aged-gold);background:radial-gradient(circle at 35% 30%,#2a241a,#120f0b 70%);box-shadow:inset 0 0 0 5px #120f0b,inset 0 0 0 6px rgba(218,166,67,.45),0 10px 30px -12px rgba(0,0,0,.8)}
.thanks-seal img{width:42px;height:42px}

/* Brand mark names on hover or keyboard focus */
.mark-link{position:relative}
.mark-link::after{content:attr(data-name);position:absolute;left:50%;bottom:calc(100% + 8px);transform:translate(-50%,4px);padding:4px 10px;border:1px solid var(--border);background:var(--bg-elevated);color:var(--ivory);font-size:.8rem;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .2s var(--ease-out),transform .2s var(--ease-out)}
.mark-link:focus-visible::after{opacity:1;transform:translate(-50%,0)}
@media(hover:hover) and (pointer:fine){.mark-link:hover::after{opacity:1;transform:translate(-50%,0)}}

@media(prefers-reduced-motion:no-preference){
  /* Card images fade in over their blurred stand-in (JS adds the classes only to images still loading) */
  .img-fade{opacity:0;transition:opacity .6s var(--ease-out)}
  .img-fade.is-loaded{opacity:1}

  /* A1. Brass sheen: one band of light crosses the gold name bar, once per visit (JS adds .is-sheen) */
  .name-band.is-sheen .container::after{content:'';position:absolute;inset:0;pointer-events:none;z-index:1;
    background:linear-gradient(100deg,transparent 38%,rgba(255,246,222,.0) 40%,rgba(255,246,222,.55) 50%,rgba(255,246,222,0) 60%,transparent 62%);
    background-size:260% 100%;background-position:130% 0;mix-blend-mode:overlay;animation:cl-sheen 1.8s cubic-bezier(.45,0,.25,1) .5s both}
  @keyframes cl-sheen{to{background-position:-30% 0}}

  /* A2. Headline: each line rises out of its mask, the gold line 220 ms later */
  .hero-copy>h1{animation:none}
  .hero h1 .hl,.hero h1 .hl-2{animation:cl-mask 1.5s linear both}
  .hero h1 .hl-in{animation:cl-line 1.1s var(--ease-out) .12s both}
  .hero h1 .hl-2 .hl-in{animation-delay:.34s}
  @keyframes cl-line{from{transform:translateY(105%)}}
  /* The mask only exists while the lines rise, so italic overhangs are never cut afterwards */
  @keyframes cl-mask{from,99%{clip-path:inset(-.4em -.6em -.08em -.6em)}to{clip-path:none}}

  /* A3. Section headings settle like engraving coming into focus (JS runs it with the Web Animations API) */
  .js .engrave-wait{opacity:0}

  /* A4. Portrait frame: a gold line traces around the photo once */
  @property --frame-a{syntax:'<angle>';inherits:false;initial-value:0deg}
  .hero-portrait::after{content:'';position:absolute;inset:-1px;pointer-events:none;border:1px solid var(--accent);
    -webkit-mask:conic-gradient(from -90deg at 50% 50%,#000 var(--frame-a),transparent 0);mask:conic-gradient(from -90deg at 50% 50%,#000 var(--frame-a),transparent 0);
    opacity:.9;animation:cl-frame 1.6s var(--ease-out) .5s both,cl-frame-rest .8s ease 2.1s both}
  @keyframes cl-frame{from{--frame-a:0deg}to{--frame-a:360deg}}
  @keyframes cl-frame-rest{to{opacity:0}}

  /* A5. Steps 01 to 03: a gold line draws through them, one after another */
  .how-steps.will-draw li{border-top-color:transparent;position:relative}
  .how-steps.will-draw li::before{content:'';position:absolute;top:-1px;left:0;right:-28px;height:1px;background:#A88E61;transform:scaleX(0);transform-origin:left}
  .how-steps.will-draw li:last-child::before{right:0}
  .how-steps.will-draw.is-in li::before{transform:scaleX(1);transition:transform .7s var(--ease-out)}
  .how-steps.will-draw.is-in li:nth-child(2)::before{transition-delay:.55s}
  .how-steps.will-draw.is-in li:nth-child(3)::before{transition-delay:1.1s}
  .how-steps.will-draw li>*{opacity:.35;transition:opacity .6s var(--ease-out)}
  .how-steps.will-draw.is-in li>*{opacity:1}
  .how-steps.will-draw.is-in li:nth-child(2)>*{transition-delay:.55s}
  .how-steps.will-draw.is-in li:nth-child(3)>*{transition-delay:1.1s}
  @media(max-width:767px){.how-steps.will-draw li::before{right:0}}

  /* B7. Work screenshots uncover top to bottom, the same move as the portrait */
  .project-image.will-reveal{clip-path:inset(0 0 100% 0);transition:clip-path 1.1s var(--ease-out)}
  .project-image.will-reveal.is-in{clip-path:inset(0)}

  /* B9. The four brand marks arrive one after another after the buttons */
  .hero-copy .mark-link{animation:cl-rise .7s var(--ease-out) backwards}
  .hero-copy .mark-link:nth-child(1){animation-delay:.55s}
  .hero-copy .mark-link:nth-child(2){animation-delay:.63s}
  .hero-copy .mark-link:nth-child(3){animation-delay:.71s}
  .hero-copy .mark-link:nth-child(4){animation-delay:.79s}

  /* C10. Between pages the header and brass bar hold still and the page fades up 8 px */
  .site-header{view-transition-name:site-header}
  ::view-transition-old(root){animation:cl-vt-out .18s ease-out both}
  ::view-transition-new(root){animation:cl-vt-in .36s var(--ease-out) both}
  @keyframes cl-vt-out{to{opacity:0}}
  @keyframes cl-vt-in{from{opacity:0;transform:translateY(8px)}}

  /* C11. Form steps slide in the direction you're going; a picked tile gets one gold sweep */
  .js .apply-widget[data-dir=fwd] .step.is-current{animation:cl-step-fwd .34s var(--ease-out)}
  .js .apply-widget[data-dir=back] .step.is-current{animation:cl-step-back .34s var(--ease-out)}
  @keyframes cl-step-fwd{from{opacity:0;transform:translateX(18px)}}
  @keyframes cl-step-back{from{opacity:0;transform:translateX(-18px)}}
  .widget-bar span{transition:width .5s var(--ease-out)}
  label.tile{overflow:hidden}
  label.tile:has(input:checked)::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(100deg,transparent 30%,rgba(218,166,67,.22) 50%,transparent 70%);background-size:250% 100%;animation:cl-tile .6s var(--ease-out) both}
  @keyframes cl-tile{from{background-position:120% 0}to{background-position:-20% 0}}

  /* C12. Send: the button turns into a gold check that draws itself */
  .step-send .send-check{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
  .step-send .send-check path{stroke-dasharray:1;stroke-dashoffset:1;animation:cl-check .42s var(--ease-out) .05s forwards}
  @keyframes cl-check{to{stroke-dashoffset:0}}

  /* C13. Thank-you: the seal presses in once, with one soft ring */
  .thanks-seal{animation:cl-seal .8s cubic-bezier(.2,.9,.25,1.15) .15s both;position:relative}
  .thanks-seal::after{content:'';position:absolute;inset:-1px;border-radius:50%;border:1px solid var(--accent);opacity:0;animation:cl-seal-ring 1.1s var(--ease-out) .75s both}
  @keyframes cl-seal{from{opacity:0;transform:scale(1.18) rotate(-8deg);filter:blur(3px)}}
  @keyframes cl-seal-ring{from{opacity:.8;transform:scale(1)}to{opacity:0;transform:scale(1.6)}}

  /* C14. A brand card's cover grows into the viewer (same-document View Transition, set up in JS) */
  ::view-transition-group(bv-cover){animation-duration:.5s;animation-timing-function:cubic-bezier(.16,1,.3,1)}
  ::view-transition-old(bv-cover),::view-transition-new(bv-cover){height:100%;object-fit:cover}
}

@media(prefers-reduced-motion:no-preference) and (hover:hover) and (pointer:fine){
  /* B6. A soft gold light follows the mouse across the page and fades out over project and brand cards
     (Carson, 2026-10-15: "everywhere but those places"). JS moves it; it never takes clicks. */
  .cursor-glow{position:fixed;left:0;top:0;width:560px;height:560px;margin:-280px 0 0 -280px;z-index:50;pointer-events:none;border-radius:50%;
    background:radial-gradient(circle,rgba(218,166,67,.10),rgba(218,166,67,.04) 38%,transparent 68%);mix-blend-mode:screen;opacity:0;transition:opacity .35s var(--ease-out);will-change:transform}
  .cursor-glow.is-on{opacity:1}

  /* B8. The gold button leans toward the mouse (JS, 4 px max), one sheen crosses it, the arrow nudges */
  .button-primary{position:relative;overflow:hidden;transition:background-color .18s ease,border-color .18s ease,transform .35s var(--ease-out)}
  .button-primary::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient(100deg,transparent 35%,rgba(255,250,235,.45) 50%,transparent 65%);background-size:260% 100%;background-position:130% 0;transition:background-position 0s}
  .button-primary:hover::after{background-position:-30% 0;transition:background-position .8s var(--ease-out)}
  .button svg{transition:transform .3s var(--ease-out)}
  .button:hover svg{transform:translateX(3px)}
}

/* 404, 2026-10-15: a big gold 4 0 4 where the 0 is a brass coin with the CL mark. The coin rolls in once,
   one sheen crosses the numbers, then the headline (a wink at the home hero) and the way back. */
.lost{position:relative;isolation:isolate;overflow:hidden;min-height:calc(100dvh - 82px);display:grid;place-items:center;text-align:center;padding-block:clamp(56px,8vw,110px)}
.lost::before{content:'';position:absolute;left:50%;top:38%;width:min(900px,120vw);aspect-ratio:1;transform:translate(-50%,-50%);z-index:-1;pointer-events:none;background:radial-gradient(circle,rgba(218,166,67,.14),rgba(218,166,67,.04) 40%,transparent 66%)}
.lost-inner{position:relative}
.lost-digits{display:flex;justify-content:center;align-items:center;gap:clamp(4px,1.6vw,20px);font-family:var(--font-display);font-size:clamp(6.5rem,27vw,17rem);line-height:.92;margin:0 0 clamp(18px,3vw,34px)}
.lost-d{display:inline-block;overflow:hidden;padding:.04em .02em .02em}
.lost-d span{display:inline-block;color:transparent;-webkit-background-clip:text;background-clip:text;
  background-image:linear-gradient(100deg,#B98A34 0%,#DAA643 38%,#FFF1C8 50%,#DAA643 62%,#9C7330 100%);background-size:260% 100%;background-position:0% 0;filter:drop-shadow(0 .05em .12em rgba(0,0,0,.5))}
.lost-coin{position:relative;overflow:hidden;display:grid;place-items:center;width:.74em;height:.74em;border-radius:50%;
  background:radial-gradient(circle at 34% 28%,#3d3323,#16120c 70%);
  box-shadow:inset 0 0 0 .03em #16120c,inset 0 0 0 .04em rgba(218,166,67,.8),inset 0 0 0 .085em #16120c,inset 0 0 0 .092em rgba(218,166,67,.35),0 .05em .18em rgba(0,0,0,.65),0 0 .45em rgba(218,166,67,.14)}
.lost-coin-face{display:grid;place-items:center}
.lost-coin-face img{width:.34em;height:.34em}
.lost-title{font-family:var(--font-display);font-size:clamp(1.9rem,4.4vw,3.5rem);line-height:1.12;margin:0 auto;max-width:none}
.lost-title .hl,.lost-title .hl-2,.lost-title .hl-in{display:block}
.lost-title .hl-2{margin-top:.18em;padding-bottom:.08em;font-family:var(--font-editorial);font-style:italic;font-weight:500;font-size:1.12em;line-height:1.08;color:var(--accent)}
.lost-lead{max-width:44ch;margin:18px auto 0;color:var(--text-secondary);font-size:1.05rem}
.lost-actions{justify-content:center;margin-top:28px}
.lost-links{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 28px;margin-top:22px}
.lost-links a{display:inline-flex;align-items:center;min-height:44px;color:var(--text-muted);font-size:.95rem;border-bottom:1px solid transparent;transition:color .2s ease,border-color .2s ease}
.lost-links a:hover{color:var(--accent);border-bottom-color:var(--border)}
@media(max-width:767px){.lost{min-height:calc(100dvh - 72px)}.lost-actions .button{width:100%;justify-content:space-between}}
@media(prefers-reduced-motion:no-preference){
  .lost-d span{animation:cl-line 1.1s var(--ease-out) .15s backwards,cl-404-sheen 1.8s cubic-bezier(.45,0,.25,1) 1.5s backwards}
  .lost-d-2 span{animation-delay:.32s,1.5s}
  @keyframes cl-404-sheen{from{background-position:100% 0}}
  .lost-coin{animation:cl-coin 1.5s cubic-bezier(.2,.9,.25,1.12) .2s backwards}
  @keyframes cl-coin{from{opacity:0;transform:translateY(.55em) rotate(-220deg) scale(.6)}}
  .lost-coin::after{content:'';position:absolute;inset:0;border-radius:50%;pointer-events:none;background:linear-gradient(110deg,transparent 35%,rgba(255,241,200,.35) 50%,transparent 65%);transform:translateX(-120%);animation:cl-coin-glint 1.1s cubic-bezier(.45,0,.25,1) 1.7s both}
  @keyframes cl-coin-glint{to{transform:translateX(120%)}}
  .lost-title .hl,.lost-title .hl-2{animation:cl-mask 1.6s linear .55s both}
  .lost-title .hl-in{animation:cl-line 1.1s var(--ease-out) .6s backwards}
  .lost-title .hl-2 .hl-in{animation-delay:.82s}
  .lost-lead{animation:cl-rise .8s var(--ease-out) 1.05s backwards}
  .lost-actions{animation:cl-rise .8s var(--ease-out) 1.18s backwards}
  .lost-links{animation:cl-rise .8s var(--ease-out) 1.3s backwards}
}
