/* About and Contact page styles. Owned by the about page agent; uses the tokens defined in index.html */

/* ---------- about 1: the statement lights up word by word ---------- */
  .pg-about { padding-top: 0; }
  .ab-open { position: relative; height: 230vh; height: 230svh; overflow-x: clip; }
  .ab-open__stage { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; align-content: center; gap: clamp(18px, 3vh, 30px); padding-top: calc(48px + env(safe-area-inset-top, 0px)); isolation: isolate; }
  .ab-open__t { max-width: 12.6em; }
  .ab-open .pg__title .wd { opacity: .13; transition: opacity .8s var(--ease); }
  .ab-open__glow { position: absolute; left: 0; top: 0; z-index: -1; width: min(70vw, 900px); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; pointer-events: none; opacity: 0; transition: opacity 2s var(--ease);
    background: radial-gradient(closest-side, rgba(45,61,255,.13), rgba(45,61,255,.05) 50%, rgba(45,61,255,0)); will-change: transform; }
  .ab-open__glow.in { opacity: 1; }
  .ab-open__hint { position: absolute; left: 0; bottom: calc(26px + env(safe-area-inset-bottom, 0px)); display: flex; align-items: center; gap: 14px; color: rgba(11,14,42,.62); transition: opacity 1.2s var(--ease); }
  .ab-open__hint i { position: relative; width: 64px; height: 1px; background: var(--rule); overflow: hidden; }
  .ab-open__hint i::after { content: ''; position: absolute; inset: 0; background: var(--ink); animation: ab-line 3.2s var(--slow) infinite; }
  .ab-open.past .ab-open__hint { opacity: 0; }
  .ab-open.calm { height: auto; }
  .ab-open.calm .ab-open__stage { position: relative; height: auto; min-height: 88svh; }
  .ab-open.calm .ab-open__hint { display: none; }
  @keyframes ab-line { 0% { transform: translateX(-100%); } 62%, 100% { transform: translateX(100%); } }

/* ---------- about 2: four steps, pinned, turned by scroll ---------- */
  .ab-steps { position: relative; }
  .ab-steps.is-pin { height: calc(100svh + 4 * 72svh); }
  .ab-steps__stage { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--m); }
  .is-pin .ab-steps__stage { position: sticky; top: 0; height: 100vh; height: 100svh; grid-template-rows: auto minmax(0, 1fr) auto; padding: calc(96px + env(safe-area-inset-top, 0px)) 0 calc(30px + env(safe-area-inset-bottom, 0px)); }
  .ab-steps__lbl { grid-column: 1 / -1; grid-row: 1; }
  .ab-steps__num { grid-column: 1 / span 5; grid-row: 2; align-self: center; margin: 0; height: 1em; overflow: hidden; font: 300 italic clamp(7rem, 19vw, 21rem)/1 var(--display); letter-spacing: -.05em; color: var(--ink); }
  .ab-steps__roll { display: block; translate: 0 calc(var(--i, 0) * -1em); transition: translate 1.5s var(--ease); }
  .ab-steps__roll i { display: block; height: 1em; font-style: inherit; }
  .ab-steps__list { grid-column: 6 / span 7; grid-row: 2; align-self: center; display: grid; list-style: none; margin: 0; padding: 0; }
  .ab-steps__list li { grid-area: 1 / 1; opacity: 0; translate: 0 44px; transition: opacity .9s var(--ease), translate 1.4s var(--ease); }
  .ab-steps__list li.past { translate: 0 -44px; }
  .ab-steps__list li.on { opacity: 1; translate: 0 0; transition-delay: .28s; }
  .ab-steps__list .lbl { color: rgba(11,14,42,.6); }
  .ab-steps__t { margin: 16px 0 22px; font: 300 clamp(3rem, 7vw, 7.8rem)/.94 var(--display); letter-spacing: -.035em; text-wrap: balance; }
  .ab-steps__list p { margin: 0; max-width: 25em; font-size: clamp(1.0625rem, 1.35vw, 1.3rem); line-height: 1.45; color: rgba(11,14,42,.8); }
  .ab-steps__rail { grid-column: 1 / -1; grid-row: 3; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--m); }
  .ab-steps__rail button { display: grid; gap: 12px; padding: 0 0 6px; border: 0; background: none; text-align: left; cursor: pointer; font: 500 .8125rem/1.3 var(--text); color: rgba(11,14,42,.5); transition: color .9s var(--ease); }
  .ab-steps__rail button em { font-style: normal; margin-right: 6px; }
  .ab-steps__rail button.on, .ab-steps__rail button:hover { color: var(--ink); }
  .ab-steps__rail button:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
  .ab-steps__rail b { position: relative; display: block; height: 1px; background: var(--rule); overflow: hidden; }
  .ab-steps__rail b i { position: absolute; inset: 0; background: var(--ink); transform-origin: left; transform: scaleX(0); }
  /* reduced motion: a plain list */
  .ab-steps:not(.is-pin) { margin-top: clamp(56px, 10vh, 120px); }
  .ab-steps:not(.is-pin) .ab-steps__num, .ab-steps:not(.is-pin) .ab-steps__rail { display: none; }
  .ab-steps:not(.is-pin) .ab-steps__list { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px var(--m); margin-top: 28px; }
  .ab-steps:not(.is-pin) .ab-steps__list li { grid-area: auto; opacity: 1; translate: 0 0; border-top: 1px solid var(--ink); padding-top: 14px; }
  .ab-steps:not(.is-pin) .ab-steps__t { font-size: clamp(2rem, 3.4vw, 3.4rem); }

/* ---------- about 3: what we make, a real piece follows the pointer ---------- */
  .ab-make { position: relative; margin-top: clamp(80px, 14vh, 180px); overflow-x: clip; overflow-y: visible; }
  .ab-make__list { list-style: none; margin: clamp(28px, 5vh, 56px) 0 0; padding: 0; border-bottom: 1px solid var(--rule); }
  .ab-make__list li { border-top: 1px solid var(--rule); }
  .ab-make__a { display: grid; grid-template-columns: 4.2em minmax(0, 1fr) minmax(0, 21em) 1.6em; align-items: baseline; gap: 6px var(--m); padding: clamp(18px, 3.2vh, 32px) 0; color: var(--ink); text-decoration: none; transition: opacity 1s var(--ease); }
  .ab-make__a .lbl { color: rgba(11,14,42,.6); }
  .ab-make__t { font: 300 clamp(2.4rem, 6.2vw, 6.8rem)/1 var(--display); letter-spacing: -.035em; transition: translate 1.2s var(--ease); }
  .ab-make__d { color: rgba(11,14,42,.76); font-size: .9375rem; line-height: 1.45; }
  .ab-make__ar { font: 300 clamp(1.4rem, 2vw, 2rem)/1 var(--display); opacity: .35; transition: opacity .8s var(--ease), translate 1.2s var(--ease); }
  .ab-make__thumb { display: none; }
  @media (hover: hover) {
    .ab-make__list:hover li:not(:hover) .ab-make__a { opacity: .3; }
    .ab-make__a:hover .ab-make__t { translate: 20px 0; font-style: italic; }
    .ab-make__a:hover .ab-make__ar { opacity: 1; translate: 8px 0; }
  }
  .ab-make__a:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
  .ab-peek { position: absolute; left: 0; top: 0; z-index: 2; width: clamp(260px, 25vw, 420px); aspect-ratio: 16 / 10; pointer-events: none; overflow: hidden; background: var(--night);
    clip-path: inset(50% 0 50% 0); transition: clip-path 1.1s var(--ease); will-change: transform; }
  .ab-peek.on { clip-path: inset(0 0 0 0); }
  .ab-peek figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .9s var(--ease); }
  .ab-peek figure.on { opacity: 1; }
  .ab-peek img, .ab-peek video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .ab-peek figcaption { position: absolute; left: 12px; bottom: 10px; font: 500 .75rem/1 var(--text); color: var(--star); letter-spacing: .02em; text-shadow: 0 1px 8px rgba(5,6,26,.6); }

/* ---------- about 4: the play area, glass in the dark ---------- */
  .ab-play { position: relative; margin-top: clamp(90px, 15vh, 190px); height: 88vh; height: 88svh; min-height: 560px; overflow: hidden; background: var(--night); color: var(--star); touch-action: pan-y; }
  .ab-play__c { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
  .ab-play__txt { position: absolute; inset: 0; display: grid; align-content: center; justify-items: center; gap: 24px; padding: var(--m); text-align: center; pointer-events: none; }
  .ab-play__txt .lbl { color: rgba(243,242,251,.7); }
  .ab-play__s { margin: 0; max-width: 15em; font: 300 clamp(2rem, 4.6vw, 4.8rem)/1.04 var(--display); letter-spacing: -.025em; text-wrap: balance; }
  .ab-play__s em { font-size: 1.04em; }
  .ab-play__hint { position: absolute; left: var(--m); bottom: calc(var(--m) + 4px); color: rgba(243,242,251,.62); pointer-events: none; }
  .ab-play__hint .touch { display: none; }
  @media (hover: none) { .ab-play__hint .fine { display: none; } .ab-play__hint .touch { display: inline; } }

@media (max-width: 760px) {
  .ab-open { height: 200svh; }
  .is-pin .ab-steps__stage { grid-template-rows: auto auto minmax(0, 1fr) auto; padding-top: calc(84px + env(safe-area-inset-top, 0px)); }
  .ab-steps__num { grid-column: 1 / -1; grid-row: 2; align-self: start; margin-top: 18px; font-size: clamp(5.5rem, 30vw, 8rem); }
  .ab-steps__list { grid-column: 1 / -1; grid-row: 3; align-self: start; margin-top: 10px; }
  .ab-steps__t { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .ab-steps__rail { grid-row: 4; gap: 10px; }
  .ab-steps__rail .w { display: none; }
  .ab-steps__rail button { padding-block: 0 12px; }
  .ab-steps:not(.is-pin) .ab-steps__list { grid-template-columns: minmax(0, 1fr); }
  .ab-make__a { grid-template-columns: 2.8em minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
  .ab-make__a .lbl { align-self: start; padding-top: .7em; }
  .ab-make__t { font-size: clamp(2rem, 9vw, 2.6rem); }
  .ab-make__d { grid-column: 2 / span 2; grid-row: 2; }
  .ab-make__ar { display: none; }
  .ab-play { min-height: 520px; height: 78svh; }
  .ab-play__s { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}
@media (hover: none), (max-width: 760px) {
  .ab-peek { display: none; }
  .ab-make__thumb { display: block; grid-column: 3; grid-row: 1; width: clamp(84px, 24vw, 160px); aspect-ratio: 16 / 10; overflow: hidden; background: var(--night); align-self: center; }
  .ab-make__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
}
@media (hover: none) and (min-width: 761px) {
  .ab-make__a { grid-template-columns: 4.2em minmax(0, 1fr) minmax(0, 18em) auto; }
  .ab-make__thumb { grid-column: 4; }
  .ab-make__ar { display: none; }
}

/* ---------- contact: big type, a sentence that answers back ---------- */
  @property --ct-lx { syntax: '<length>'; inherits: true; initial-value: -4000px; }
  .pg-contact .pg__head { margin-bottom: clamp(40px, 7vh, 90px); }
  .pg-contact .pg__title { max-width: 11.5em; }
  /* a slow light passes through the title: one shared gradient, placed per letter */
  .pg-contact .pg__title.lit .ch { color: transparent; background-color: var(--ink); background-image: linear-gradient(100deg, rgba(11,14,42,0) 0%, rgba(11,14,42,0) 34%, #2d3dff 44%, #9ea8ff 50%, #2d3dff 56%, rgba(11,14,42,0) 66%, rgba(11,14,42,0) 100%);
    background-repeat: no-repeat; background-size: calc(var(--ct-tw, 1000px) * .8) 100%; background-position: calc(var(--ct-lx) - var(--ct-ox, 0px)) 0;
    -webkit-background-clip: text; background-clip: text; padding: .14em .1em; margin: -.14em -.1em; }
  .pg-contact .pg__title.lit { animation: ct-light 10s cubic-bezier(.45, 0, .55, 1) 0s infinite; }
  @keyframes ct-light { 0% { --ct-lx: calc(var(--ct-tw, 1000px) * -.85); } 46%, 100% { --ct-lx: calc(var(--ct-tw, 1000px) * 1.05); } }

  .pg-contact .talk { max-width: 1180px; margin-top: 0; gap: clamp(20px, 3.4vh, 34px); }
  .pg-contact .talk__line { font-size: clamp(1.75rem, 3.8vw, 3.8rem); gap: 10px 18px; }
  .pg-contact .fld { position: relative; flex: 1 1 10em; min-width: 0; display: flex; }
  .pg-contact .talk .fld input { flex: 1 1 auto; width: 100%; border-bottom: 1px solid var(--rule); transition: border-color .9s var(--ease); }
  .pg-contact .talk .fld input:focus { border-bottom-color: rgba(11,14,42,.3); }
  .fld__ln { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: var(--ink); transform-origin: left; transform: scaleX(var(--k, 0)); transition: transform .9s var(--ease), background-color .9s var(--ease); pointer-events: none; }
  .fld:focus-within .fld__ln { background: var(--blue); }
  .pg-contact .talk__chips { gap: 12px; }
  .pg-contact .talk__chips legend { margin-right: 18px; }
  .pg-contact .talk__chips span { position: relative; isolation: isolate; overflow: hidden; padding: 13px 19px; font-size: .9375rem; border-color: rgba(11,14,42,.32); transition: color .9s var(--ease), border-color .9s var(--ease); }
  .pg-contact .talk__chips span::before { content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: var(--ink); opacity: 0; transform: scale(.55); transition: transform 1.1s var(--ease), opacity .9s var(--ease); }
  .pg-contact .talk__chips label:hover span { border-color: var(--ink); }
  .pg-contact .talk__chips input:checked + span { background: none; color: var(--paper); border-color: var(--ink); }
  .pg-contact .talk__chips input:checked + span::before { opacity: 1; transform: scale(1); }
  .ct-send { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 24px; margin-top: 14px; }
  .pg-contact .talk .go { position: relative; overflow: hidden; margin: 0; padding: 22px 38px; font-size: 1.0625rem; transition: background-color .9s var(--ease); }
  .pg-contact .go::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.34) 50%, rgba(255,255,255,0) 70%); transform: translateX(-110%); pointer-events: none; }
  .go__t { display: inline-block; transition: opacity .5s var(--ease), translate .9s var(--ease); }
  .go__t.out { opacity: 0; translate: 0 -8px; }
  .talk.sent .go { background: var(--ink); }
  .talk.sent .go::after { animation: ct-pass 2.6s var(--slow) 2; }
  @keyframes ct-pass { to { transform: translateX(110%); } }
  .pg-contact .talk__note { max-width: 30em; transition: opacity .6s var(--ease); }
  .pg-contact .talk__note.out { opacity: 0; }

  .ct-mail { margin-top: clamp(96px, 16vh, 190px); display: grid; gap: 20px; }
  .ct-mail__a { justify-self: start; position: relative; padding-bottom: .06em; font: 300 min(15rem, calc((100vw - 2 * var(--m)) / 7.9))/1 var(--display); letter-spacing: -.035em; color: var(--ink); text-decoration: none; white-space: nowrap; }
  .ct-mail__a em { font-size: 1.04em; }
  @media (min-width: 761px) { .ct-mail__a { font-size: min(15rem, calc((100vw - 2 * var(--m)) / 6.7)); } }
  .ct-mail__a::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--ink); transform: scaleX(0); transform-origin: right; transition: transform 1.3s var(--ease); }
  .ct-mail__a:hover::after, .ct-mail__a:focus-visible::after { transform: scaleX(1); transform-origin: left; }
  .ct-mail__a:focus-visible { outline: none; }
  .ct-mail__foot { display: flex; flex-wrap: wrap; gap: 8px 32px; color: rgba(11,14,42,.7); }
  @media (hover: none) { .ct-mail__a::after { transform: scaleX(1); opacity: .25; } }

@media (prefers-reduced-motion: reduce) {
  .pg-contact .pg__title.lit { animation: none; }
  .talk.sent .go::after, .ab-open__hint i::after { animation: none; }
}
