/* interactions.css: Aakar Studio's interaction layer, on top of the kit (assets/system.css, assets/motion/motion.css)
   and the scroll layer (css/scroll-motion.css). js/interactions.js adds the moving parts (the nav indicator, the
   "View" chip, the work lightbox, the form's states).
   Only transform, opacity and clip-path move (background-color and color change on hover). Every hover sits under
   (hover: hover) and (pointer: fine), with :focus-visible doing the same for the keyboard. Under reduced motion
   nothing travels or scales: colours and opacity still change.
   Where the kit animates the same element, its rule is overridden here with html[data-motion] (one attribute more
   than the kit's html:not([data-motion="off"])), so the kit files stay untouched. */

:root {
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);       /* entering, exiting, press, draw */
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);   /* moving on screen: the nav indicator, the lightbox morph */
  --d-press: 120ms;
  --d-hover: 220ms;
  --d-reveal: 600ms;
}

/* ================================================================ 1. text links: a directional underline
   A 1px line in the link's own colour draws in from the left on hover or keyboard focus and leaves toward the right.
   The kit's faint rest hairline stays (a standalone link still reads as one); the kit's own drawn layer is dropped
   so the line is drawn once, by transform. The arrow's 3px nudge is the kit's and stays. */
:where(.link, .footer__legal span > a) { position: relative; --ix-tail: 0px; }
html[data-motion]:not([data-motion="off"]) :is(.link, .footer__legal span > a) { transition: color var(--d-hover) ease; }
/* the kit's two layers: its drawn layer goes, its rest hairline stays the same on hover (the drawn line covers it) */
html[data-motion]:not([data-motion="off"]) .link,
html[data-motion]:not([data-motion="off"]) .link:is(:hover, :focus-visible) {
  background-image: linear-gradient(transparent, transparent), linear-gradient(var(--m-rest, var(--line-strong)), var(--m-rest, var(--line-strong)));
  background-size: 0% 1px, calc(100% - var(--ix-tail)) 1px; background-position: 0 100%, 0 100%;
}
html[data-motion]:not([data-motion="off"]) .footer ul .link,
html[data-motion]:not([data-motion="off"]) .footer ul .link:is(:hover, :focus-visible) { background-size: 0 0, 0 0; }
.link { --ix-tail: calc(1em + var(--s-2)); }               /* the text arrow after the words is not underlined */
.link:has(> .m-arrow) { --ix-tail: calc(10px + var(--s-2)); }  /* nor the drawn one (12px, -2px margin) */
:is(.link, .footer__legal span > a)::before {
  content: ""; position: absolute; left: 0; bottom: 0; width: calc(100% - var(--ix-tail)); height: 1px;
  background: currentColor; pointer-events: none;
  transform: scaleX(0); transform-origin: right center;
  transition: transform var(--d-hover) var(--ease-out);
}
:is(.link, .footer__legal span > a):focus-visible::before { transform: scaleX(1); transform-origin: left center; }
@media (hover: hover) and (pointer: fine) {
  :is(.link, .footer__legal span > a):hover::before { transform: scaleX(1); transform-origin: left center; }
}

/* ================================================================ 2. nav: one gold indicator
   js/interactions.js puts one 1px line in .nav__links and moves it by transform (translate + scaleX, 220ms, the
   on-screen ease-in-out); html.ix-nav is on while it runs (a desktop, the layer on), and then the kit's per-word
   lines (hover and the page's still bar) stand down so there is one line, not two. */
@media (min-width: 1024px) {
  .nav__links { position: relative; }
  html.ix-nav .nav__links .nav__link::before,
  html.ix-nav .nav__links .nav__link[aria-current="page"]::after { display: none; }
}
.ix-nav-ind {
  position: absolute; left: 0; top: 0; width: 100px; height: 1px; background: var(--p-accent);
  transform-origin: 0 0; pointer-events: none; opacity: 0;
  transition: transform var(--d-hover) var(--ease-in-out), opacity var(--d-hover) ease;
}
.ix-nav-ind.is-on { opacity: 1; }
.ix-nav-ind.is-jump { transition: none; }
@media (max-width: 1023px) { .ix-nav-ind { display: none; } }

/* ================================================================ 3. buttons: a press, a deeper gold
   Every button presses to 0.97 (120ms, ease-out), the label coming with it. The kit's 1px hover step and its
   lighter hover tone give way to the brief: no movement on hover, the primary deepens slightly toward the ink
   (93%: the dark label keeps 4.5:1) and its drawn arrow nudges 3px (the kit's .m-arrow rule). */
html[data-motion]:not([data-motion="off"]) .btn,
html[data-motion]:not([data-motion="off"]) .btn:hover {
  transition: background-color var(--d-hover) ease, color var(--d-hover) ease, border-color var(--d-hover) ease,
              transform var(--d-press) var(--ease-out);
}
html[data-motion]:not([data-motion="off"]) .btn--primary:hover { background-color: var(--action); }
@media (hover: hover) and (pointer: fine) {
  html[data-motion]:not([data-motion="off"]) .btn:hover { transform: none; }
  html[data-motion]:not([data-motion="off"]) .btn--primary:hover { background-color: color-mix(in oklab, var(--action) 93%, var(--ink)); }
}
html[data-motion]:not([data-motion="off"]) .btn:active { transform: scale(0.97); }
.nav__toggle { transition: transform var(--d-press) var(--ease-out); }
.nav__toggle:active { transform: scale(0.97); }
/* the films' pause button presses by its own `scale` (index.html), now to the same 0.97 */
.hero--reel .reel__pause { transition: opacity 300ms var(--m-ease), scale var(--d-press) var(--ease-out); }
.hero--reel .reel__pause:active { scale: 0.97; }

/* ================================================================ 4. photographs that link: a slow, quiet zoom
   Decorative hover on a marketing page, so longer than the UI timings on purpose: 1.04 over 700ms in, back over
   500ms, ease-out, inside the frame's own clip. It replaces the kit's 1.03 / 600ms rule on the same pictures (one
   transform, never two), and composes with the scroll layer's `scale` and `translate` (separate properties).
   The base rule stays below the scroll layer's reveal rule in weight, so its settle keeps its own transition. */
:is(a.m-zoom, a.frame--photo) > :is(img, .frame__img) {
  transition: transform 500ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  html[data-motion]:not([data-motion="off"]) body :is(a.m-zoom, a.frame--photo):hover > :is(img, .frame__img) {
    transform: scale(1.04); transition-duration: 700ms;
  }
  /* gallery focus: the tile under the pointer keeps the light, its neighbours step back */
  .work-mosaic:has(a.m-zoom:hover) a.m-zoom:not(:hover),
  .grid:has(> a.frame--photo:hover) > a.frame--photo:not(:hover) { opacity: 0.72; }
}
html[data-motion]:not([data-motion="off"]) body :is(a.m-zoom, a.frame--photo):focus-visible > :is(img, .frame__img) {
  transform: scale(1.04); transition-duration: 700ms;
}
.work-mosaic:has(a.m-zoom:focus-visible) a.m-zoom:not(:focus-visible),
.grid:has(> a.frame--photo:focus-visible) > a.frame--photo:not(:focus-visible) { opacity: 0.72; }
.work-mosaic a.m-zoom, .grid > a.frame--photo { transition: opacity 300ms ease; }

/* ================================================================ 5. the "View" chip over linked photographs
   One 56px ink disc that follows a mouse (js/interactions.js, transform only). The native cursor stays. */
.ix-chip {
  position: fixed; left: 0; top: 0; z-index: 45; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  pointer-events: none; will-change: transform;
}
.ix-chip__in {
  display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%;
  background: rgb(35 31 26 / 0.92); color: #fff; font: 500 13px/1 var(--font-text); letter-spacing: 0.01em;
  opacity: 0; transform: scale(0.6);
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}
.ix-chip.is-on .ix-chip__in { opacity: 1; transform: none; transition-duration: 200ms; }
@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) { .ix-chip { display: none; } }

/* ================================================================ 7. the work lightbox (<dialog>, js/interactions.js) */
.ix-lb {
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none;
  margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden;
}
.ix-lb::backdrop { background: transparent; }
.ix-lb__scrim { position: absolute; inset: 0; background: rgb(35 31 26 / 0.96); }
.ix-lb__ui { position: absolute; inset: 0; }
/* the picture's area; js/interactions.js sizes the picture with the same padding (PAD there) */
.ix-lb__stage {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 72px 104px;
  touch-action: pinch-zoom; user-select: none; -webkit-user-select: none;
}
.ix-lb__img { grid-area: 1 / 1; max-width: none; object-fit: cover; -webkit-user-drag: none; }
.ix-lb__count {
  position: absolute; left: 50%; bottom: 26px; translate: -50% 0; margin: 0;
  font: 500 var(--t-label, 13px)/1.4 var(--font-text); letter-spacing: 0.01em; color: rgb(255 255 255 / 0.8);
  font-variant-numeric: tabular-nums;
}
.ix-lb__btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%;
  border: 1px solid rgb(255 255 255 / 0.28); background: rgb(255 255 255 / 0); color: #fff; cursor: pointer;
  transition: background-color var(--d-hover) ease, transform var(--d-press) var(--ease-out);
}
.ix-lb__btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ix-lb__btn:active { transform: scale(0.97); }
.ix-lb__btn:focus-visible { outline: 2px solid var(--p-accent); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .ix-lb__btn:hover { background-color: rgb(255 255 255 / 0.12); } }
.ix-lb__close { top: 16px; right: 24px; }
.ix-lb__prev { left: 28px; top: 50%; margin-top: -24px; }
.ix-lb__next { right: 28px; top: 50%; margin-top: -24px; }
@media (max-width: 767px) {
  .ix-lb__stage { padding: 72px 16px 96px; }
  .ix-lb__close { top: 12px; right: 12px; }
  .ix-lb__prev, .ix-lb__next { top: auto; bottom: 16px; margin-top: 0; }
  .ix-lb__prev { left: 16px; }
  .ix-lb__next { right: 16px; }
  .ix-lb__count { bottom: 30px; }
}
/* the morph from the tile: the photograph's box travels on screen (ease-in-out), both pictures cover it, so the
   tile's crop opens out into the whole render */
::view-transition-group(ix-photo) { animation-duration: 420ms; animation-timing-function: var(--ease-in-out); overflow: clip; }
::view-transition-old(ix-photo), ::view-transition-new(ix-photo) { width: 100%; height: 100%; object-fit: cover; }
/* while the lightbox morphs, the header is not lifted out above the dark ground */
html.ix-lb-vt .nav { view-transition-name: none !important; }
/* the page under the open lightbox stands still (the gutter is kept by script only where a scrollbar takes room) */
html.ix-locked body { overflow: hidden; }

/* ================================================================ 8. the form: a gold line, a calm "Sending"
   On focus a 2px gold line draws in along the field's foot from the left (in place of the kit's ring), the field's
   border deepens and its label turns to ink. js/interactions.js wraps each control in .ix-field to carry the line. */
.ix-field { position: relative; display: grid; border-radius: var(--r-sm); overflow: clip; }
.ix-field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--p-accent);
  transform: scaleX(0); transform-origin: left center; pointer-events: none;
  transition: transform var(--d-hover) var(--ease-out);
}
.ix-field:focus-within::after { transform: scaleX(1); }
html[data-motion]:not([data-motion="off"]) .field .ix-field > :is(input, select, textarea):focus {
  outline: none; box-shadow: none; border-color: color-mix(in oklab, var(--ink) 48%, transparent);
}
.field > label { color: var(--muted); transition: color var(--d-hover) ease; }
.field:focus-within > label { color: var(--ink); }
/* the submit button's words: "Sending…" crossfades in while system.js holds the button (aria-busy), after the same
   300ms system.js waits before its status line says so; the button keeps the longer label's width */
.ix-swap { display: inline-grid; }
.ix-swap > span { grid-area: 1 / 1; text-align: center; transition: opacity 200ms ease; }
.ix-swap__alt { opacity: 0; }
[aria-busy="true"] .ix-swap__main { opacity: 0; transition-delay: 300ms; }
[aria-busy="true"] .ix-swap__alt { opacity: 1; transition-delay: 300ms; }

/* ================================================================ 9. page to page: a soft crossfade
   Cross-document view transitions: the page crossfades in 250ms and the header stays where it is. A browser
   without them simply navigates. The open phone sheet is never lifted out (its fixed panels need the page). */
@view-transition { navigation: auto; }
.nav:not(.is-open) { view-transition-name: site-header; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 250ms; animation-timing-function: ease; }
::view-transition-group(site-header) { animation-duration: 250ms; }

/* ================================================================ 10. the footer's Instagram mark: a 2px lift */
.socials a { transition: transform var(--d-hover) var(--ease-out), border-color var(--d-hover) ease; }
.socials a:focus-visible { transform: translateY(-2px); }
@media (hover: hover) and (pointer: fine) { .socials a:hover { transform: translateY(-2px); } }

/* ================================================================ reduced motion: nothing travels or scales */
@media (prefers-reduced-motion: reduce) {
  :is(.link, .footer__legal span > a)::before { transform: none !important; opacity: 0; transition: opacity var(--d-hover) ease; }
  :is(.link, .footer__legal span > a):focus-visible::before { opacity: 1; }
  @media (hover: hover) and (pointer: fine) { :is(.link, .footer__legal span > a):hover::before { opacity: 1; } }
  .ix-nav-ind { transition: opacity var(--d-hover) ease; }
  .nav__toggle:active, .ix-lb__btn:active, .socials a:is(:hover, :focus-visible) { transform: none; }
  .hero--reel .reel__pause:active { scale: none; }
  html[data-motion]:not([data-motion="off"]) body :is(a.m-zoom, a.frame--photo):is(:hover, :focus-visible) > :is(img, .frame__img) { transform: none; }
  .ix-field::after { transform: none; opacity: 0; transition: opacity var(--d-hover) ease; }
  .ix-field:focus-within::after { opacity: 1; }
  ::view-transition-group(*) { animation-duration: 0s !important; }
}

/* 11. a section reached from an in-page link takes the keyboard focus (interactions.js); it shows no ring of its own */
main section[tabindex="-1"]:focus { outline: none; }
