/* =====================================================================
   Studio-715 — motion layer
   Everything here only runs when <html> has the .js-motion class, which
   the small script in <head> adds unless the visitor has asked their
   device to reduce motion. No JS, or reduced motion = the static site.
   ===================================================================== */

:root {
  --ease-out: cubic-bezier(.16, 1, .3, 1);      /* long, soft settle */
  --ease-io: cubic-bezier(.65, 0, .35, 1);
}

/* ---------- Scroll progress: a hairline of brass across the top ---------- */
.progress-line {
  position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 100;
  background: var(--brass); transform-origin: 0 50%; transform: scaleX(0);
  pointer-events: none;
}
html:not(.js-motion) .progress-line { display: none; }

/* =====================================================================
   HERO — the opening moment
   ===================================================================== */
.js-motion .hero { background: var(--ink); }
.js-motion .hero::before {
  content: ""; position: absolute; inset: -4% 0; z-index: 0;
  background:
    linear-gradient(180deg, rgba(22,24,23,0.12) 0%, rgba(40,32,22,0.38) 55%, rgba(22,24,23,0.82) 100%),
    url('images/hero-bg.jpg');
  background-size: cover; background-position: center 30%;
  translate: 0 var(--hero-y, 0px);
  scale: 1.12; opacity: 0;
  transition: scale 3.2s var(--ease-out), opacity 1.6s ease;
}
.js-motion .hero.in::before { scale: 1; opacity: 1; }

/* nav drifts down, seal turns into place */
.js-motion .hero nav { opacity: 0; translate: 0 -14px; transition: opacity 1s ease .9s, translate 1.2s var(--ease-out) .9s; }
.js-motion .hero.in nav { opacity: 1; translate: 0 0; }
.js-motion .nav-logo-mark img { rotate: -120deg; scale: .7; transition: rotate 2s var(--ease-out) 1s, scale 2s var(--ease-out) 1s; }
.js-motion .hero.in .nav-logo-mark img { rotate: 0deg; scale: 1; }
.js-motion .nav-logo-mark:hover img { rotate: 360deg; transition: rotate 1.6s var(--ease-out); }

/* corner marks draw themselves */
.js-motion .corner-mark { opacity: 0; scale: .3; transition: opacity .8s ease 1.5s, scale 1.2s var(--ease-out) 1.5s; }
.js-motion .corner-mark.tl { transform-origin: 0 0; }
.js-motion .corner-mark.br { transform-origin: 100% 100%; }
.js-motion .hero.in .corner-mark { opacity: 1; scale: 1; }

/* "715 — identity in progress" types itself out (JS) — caret */
.js-motion .frame-tag::after {
  content: ""; display: inline-block; width: 6px; height: 1.1em; margin-left: 4px; vertical-align: -2px;
  background: var(--brass); animation: caret 1s steps(1) infinite;
}
.js-motion .frame-tag.done::after { animation: caret 1s steps(1) 3 forwards; }
@keyframes caret { 50% { opacity: 0; } }

/* eyebrow + headline: words rise out of a soft blur, one after another */
.js-motion .hero-eyebrow { opacity: 0; translate: 0 10px; letter-spacing: .4em; transition: opacity 1.2s ease .5s, translate 1.2s var(--ease-out) .5s, letter-spacing 1.8s var(--ease-out) .5s; }
.js-motion .hero.in .hero-eyebrow { opacity: 1; translate: 0 0; letter-spacing: .28em; }
.js-motion .hero-headline .w { display: inline-block; }
.js-motion .hero-headline .wi {
  display: inline-block; opacity: 0; translate: 0 .45em; filter: blur(10px);
  transition: opacity 1.1s ease, translate 1.4s var(--ease-out), filter 1.2s ease;
  transition-delay: calc(.75s + var(--i) * .07s);
}
.js-motion .hero.in .hero-headline .wi { opacity: 1; translate: 0 0; filter: blur(0); }
/* a brass underline draws beneath "understood" once the line has landed */
.js-motion .hero-headline em { position: relative; display: inline-block; }
.js-motion .hero-headline em::after {
  content: ""; position: absolute; left: 2%; right: 4%; bottom: .06em; height: 1.5px; background: var(--brass);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform 1.4s var(--ease-io) 2.3s;
}
.js-motion .hero.in .hero-headline em::after { transform: scaleX(1); }

.js-motion .scroll-cue { opacity: 0; transition: opacity 1.2s ease 2.6s; }
.js-motion .hero.in .scroll-cue { opacity: 1; }

/* ---------- Nav: tucks away as you scroll down, returns when you scroll up ---------- */
.js-motion nav.stuck {
  position: fixed; padding-top: 14px; padding-bottom: 14px;
  background: rgba(22,24,23,.86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(178,138,80,.22);
  animation: navIn .6s var(--ease-out);
  transition: transform .5s var(--ease-out);
}
.js-motion nav.stuck .nav-logo-mark { width: 40px; height: 40px; }
.js-motion nav.stuck.hide { transform: translateY(-110%); }
@keyframes navIn { from { transform: translateY(-100%); } }
.js-motion .nav-links a:not(.nav-cta) { position: relative; }
.js-motion .nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1px; background: var(--brass);
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform .5s var(--ease-out);
}
.js-motion .nav-links a:not(.nav-cta):hover::after { transform: scaleX(1); transform-origin: 0 50%; }
.js-motion .nav-cta { transition: background .4s, border-color .4s, color .4s; }
.js-motion .nav-cta:hover { background: var(--brass); border-color: var(--brass); color: var(--ink) !important; }

/* =====================================================================
   MARQUEE — the divider strip becomes a slow-moving statement band
   ===================================================================== */
.marquee { background: var(--ink); overflow: hidden; padding: 22px 0 26px; border-bottom: 1px solid rgba(178,138,80,.18); }
.marquee-track { display: flex; width: max-content; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.marquee-item {
  font-family: 'Playfair Display', serif; font-style: italic; font-size: 26px;
  color: rgba(245,241,234,.62); white-space: nowrap; padding: 0 28px;
}
.marquee-item.mono { font-family: 'IBM Plex Mono', monospace; font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(245,241,234,.38); }
.marquee-dot { width: 7px; height: 7px; flex-shrink: 0; border: 1px solid var(--brass); transform: rotate(45deg); }
.js-motion .marquee-track { animation: marquee 48s linear infinite; }
.js-motion .marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 768px) { .marquee-item { font-size: 19px; padding: 0 18px; } }

/* =====================================================================
   SCROLL REVEALS (JS adds .rv to elements, .on when they enter view)
   ===================================================================== */
.js-motion .rv { opacity: 0; translate: 0 26px; transition: opacity 1s ease, translate 1.2s var(--ease-out); transition-delay: var(--d, 0s); }
.js-motion .rv.on { opacity: 1; translate: 0 0; }

/* section eyebrows: a short brass rule draws in ahead of the words */
.js-motion .rv-eyebrow { display: flex; align-items: center; gap: 14px; }
.js-motion .rv-eyebrow::before { content: ""; width: 34px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: 0 50%; transition: transform 1s var(--ease-io) .1s; }
.js-motion .rv-eyebrow.on::before { transform: scaleX(1); }

/* headings: each word slides up from behind a mask */
.js-motion .split .w { display: inline-block; overflow: hidden; vertical-align: top; padding: 0 .08em .14em 0; margin: 0 -.08em -.14em 0; }
.js-motion .split .wi { display: inline-block; translate: 0 105%; transition: translate 1.1s var(--ease-out); transition-delay: calc(var(--i) * .045s); }
.js-motion .split.on .wi { translate: 0 0; }

/* clarity statement: the words ink in as you read down the page */
.js-motion .ink .iw { opacity: .16; transition: opacity .45s ease, color .45s ease; }
.js-motion .ink .iw.lit { opacity: 1; }

/* =====================================================================
   SERVICES — the three panels breathe open on hover
   ===================================================================== */
.js-motion .offer-panel { transition: flex 0.9s var(--ease-out); cursor: default; }
.js-motion .offer-strip:hover .offer-panel { flex: .85; }
.js-motion .offer-strip .offer-panel:hover { flex: 1.45; }
.js-motion .offer-panel > div { position: relative; z-index: 1; }
.js-motion .offer-panel .glow {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(178,138,80,.22), transparent 60%);
}
.js-motion .offer-panel:hover .glow { opacity: 1; }
.js-motion .offer-label { position: relative; display: inline-block; }
.js-motion .offer-label::after {
  content: ""; position: absolute; left: 0; bottom: -6px; width: 100%; height: 1px; background: var(--brass);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease-out);
}
.js-motion .offer-panel:hover .offer-label::after { transform: scaleX(1); }
.js-motion .offer-desc { transition: color .6s, translate .8s var(--ease-out); }
.js-motion .offer-panel:hover .offer-desc { color: var(--porcelain); translate: 0 -4px; }
@media (max-width: 768px) { .js-motion .offer-strip:hover .offer-panel, .js-motion .offer-strip .offer-panel:hover { flex: none; } }

/* =====================================================================
   SELECTED WORK — prints settle in, then a "View" cursor on hover
   ===================================================================== */
.js-motion .print .print-screen img { transition: transform 1.4s var(--ease-out); }
.js-motion .print:hover .print-screen img { transform: scale(1.04); }
.js-motion .portfolio-range .mono-tag { transition: background .4s, color .4s; }
.js-motion .portfolio-range .mono-tag:hover { background: var(--brass); color: var(--porcelain); }

/* =====================================================================
   ABOUT — photos are unveiled, then drift at different speeds
   ===================================================================== */
.js-motion .about-photo-group .photo-primary,
.js-motion .about-photo-group .photo-secondary { clip-path: inset(100% 0 0 0); transition: clip-path 1.6s var(--ease-io); }
.js-motion .about-photo-group .photo-secondary { transition-delay: .45s; translate: 0 var(--px2, 0px); }
.js-motion .about-photo-group .photo-primary { translate: 0 var(--px1, 0px); }
.js-motion .about-photo-group.on .photo-primary,
.js-motion .about-photo-group.on .photo-secondary { clip-path: inset(0 0 0 0); }
.js-motion .about-photo-tag { opacity: 0; translate: -12px 0; transition: opacity .8s ease 1.2s, translate 1s var(--ease-out) 1.2s; }
.js-motion .about-photo-group.on .about-photo-tag { opacity: 1; translate: 0 0; }

/* =====================================================================
   PRICING — cards lift and a brass edge traces the top
   ===================================================================== */
.js-motion .tier-card { position: relative; overflow: hidden; transition: opacity .8s ease, transform .8s ease, border-color .5s, background .5s; }
.js-motion .tier-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--brass);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .9s var(--ease-out);
}
.js-motion .tier-card.is-visible:hover { transform: translateY(-6px); border-color: rgba(178,138,80,.5); background: rgba(245,241,234,.03); }
.js-motion .tier-card:hover::before { transform: scaleX(1); }

/* =====================================================================
   LINKS & BUTTONS
   ===================================================================== */
/* brass underlines sweep out and back in */
.js-motion .clarity-cta, .js-motion .portfolio-cta, .js-motion .about-cta, .js-motion .pricing-cta {
  border-bottom-color: transparent;
  background: linear-gradient(var(--brass), var(--brass)) no-repeat 0 100% / 100% 1px;
}
.js-motion .clarity-cta:hover, .js-motion .portfolio-cta:hover, .js-motion .about-cta:hover, .js-motion .pricing-cta:hover { animation: sweep .9s var(--ease-io); }
@keyframes sweep {
  0%   { background-size: 100% 1px; background-position: 100% 100%; }
  50%  { background-size: 0% 1px;   background-position: 100% 100%; }
  50.1%{ background-size: 0% 1px;   background-position: 0 100%; }
  100% { background-size: 100% 1px; background-position: 0 100%; }
}
.js-motion .clarity-cta span { display: inline-block; transition: translate .5s var(--ease-out); }
.js-motion .clarity-cta:hover span { translate: 6px 0; }

/* magnetic buttons (JS nudges them toward the cursor) */
.js-motion .magnetic { transition: translate .6s var(--ease-out), background .25s ease; translate: var(--mgx, 0) var(--mgy, 0); }
.js-motion .submit-btn span { display: inline-block; transition: translate .5s var(--ease-out); }
.js-motion .submit-btn:hover span { translate: 5px 0; }

/* form: the underline draws across from the left as you type */
.js-motion .field input, .js-motion .field select, .js-motion .field textarea {
  background: linear-gradient(var(--brass), var(--brass)) no-repeat 0 100% / 0 1px;
  transition: background-size .7s var(--ease-out), border-color .25s;
}
.js-motion .field input:focus, .js-motion .field select:focus, .js-motion .field textarea:focus {
  background-size: 100% 1px; border-bottom-color: rgba(22,24,23,.25);
}
.js-motion .field label { transition: color .4s, translate .4s var(--ease-out); }
.js-motion .field:focus-within label { color: var(--brass); translate: 4px 0; }

/* footer seal turns slowly, like a record */
.js-motion .footer-logo img { animation: spin 60s linear infinite; }
@keyframes spin { to { rotate: 360deg; } }

/* =====================================================================
   CURSOR — a brass dot and ring (desktop with a mouse only)
   ===================================================================== */
.cursor-dot, .cursor-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  .js-motion.has-cursor, .js-motion.has-cursor a, .js-motion.has-cursor button, .js-motion.has-cursor select { cursor: none; }
  .js-motion .cursor-dot, .js-motion .cursor-ring {
    display: block; position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none; border-radius: 50%;
    opacity: 0; transition: opacity .3s;
  }
  .js-motion.has-cursor .cursor-dot, .js-motion.has-cursor .cursor-ring { opacity: 1; }
  .js-motion .cursor-dot { width: 6px; height: 6px; margin: -3px 0 0 -3px; background: var(--brass); }
  .js-motion .cursor-ring {
    width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid rgba(178,138,80,.7);
    display: flex; align-items: center; justify-content: center;
    transition: opacity .3s, width .45s var(--ease-out), height .45s var(--ease-out), margin .45s var(--ease-out), background .45s, border-color .45s;
  }
  .js-motion .cursor-ring span {
    font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
    color: var(--ink); opacity: 0; transition: opacity .3s;
  }
  .js-motion .cursor-ring.link { width: 54px; height: 54px; margin: -27px 0 0 -27px; background: rgba(178,138,80,.12); }
  .js-motion .cursor-ring.view { width: 92px; height: 92px; margin: -46px 0 0 -46px; background: var(--brass); border-color: var(--brass); }
  .js-motion .cursor-ring.view span { opacity: 1; }
  .js-motion .cursor-ring.view + .cursor-dot, .js-motion .cursor-dot.hide { opacity: 0; }
  .js-motion.has-cursor input, .js-motion.has-cursor textarea { cursor: text; }
}

/* Safety net: anyone who has asked for less motion gets none of it */
@media (prefers-reduced-motion: reduce) {
  .progress-line, .cursor-dot, .cursor-ring { display: none !important; }
  .marquee-track { animation: none !important; }
}

/* ---------- Process dial: the step in focus is lit, the others wait their turn ---------- */
@media (min-width: 901px) {
  .js-motion .pr-step > * { transition: opacity .7s ease, translate .9s var(--ease-out); opacity: .25; }
  .js-motion .pr-step.active > * { opacity: 1; }
  .js-motion .pr-step .pr-step-title { translate: -12px 0; }
  .js-motion .pr-step.active .pr-step-title { translate: 0 0; }
  .js-motion .pr-step::before { transition: -webkit-text-stroke-color .8s, translate 1.2s var(--ease-out); translate: 30px -50%; }
  .js-motion .pr-step.active::before { -webkit-text-stroke-color: rgba(178,138,80,.5); translate: 0 -50%; }
  .js-motion .pr-tags li { transition: border-color .5s, background .5s, translate .7s var(--ease-out); }
  .js-motion .pr-step.active .pr-tags li { border-color: var(--brass); }
  .js-motion .pr-step.active .pr-tags li:nth-child(2) { transition-delay: .08s; }
  .js-motion .pr-step.active .pr-tags li:nth-child(3) { transition-delay: .16s; }
  .js-motion .pr-step:not(.active) .pr-tags li { translate: 0 8px; }
  .js-motion .pr-dial-inner { opacity: 0; scale: .9; rotate: -20deg; transition: opacity 1.2s ease, scale 1.4s var(--ease-out), rotate 1.6s var(--ease-out); }
  .js-motion .pr-dial-inner.on { opacity: 1; scale: 1; rotate: 0deg; }
}
