/* ==========================================================================
   Tatevik Mayilyan — portfolio
   Implementation of the Claude Design prototype (Site.dc.html).
   Values — clamps, timings, easings, colours — are carried over verbatim.
   ========================================================================== */

/* Animatable mask radius for the hero AI reveal. Without @property the
   custom property is a plain token and can't be transitioned. */
@property --r {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}

:root {
  /* dark surfaces */
  --dark:        #131311;
  --dark-deep:   #0B0B0C;
  --ink:         #EDECE6;
  --ink-bright:  #F3F2EC;
  --ink-muted:   #9A9A92;
  --ink-body:    #B8B7AF;
  --ink-dim:     #B5B4AC;
  --ink-faint:   #4B4B45;

  /* light surfaces */
  --paper:       #F6F5EF;
  --paper-warm:  #EDECE6;
  --paper-sunk:  #E9E8E1;
  --graphite:    #161614;
  --graphite-2:  #3B3B36;
  --graphite-3:  #56564F;
  --graphite-4:  #6E6E68;

  --accent:      #6E1526;

  --font: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);

  --gutter: clamp(20px, 3.4vw, 54px);
  --shell:  1460px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  padding: 0;
  background: var(--dark);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

img, video { display: block; }

.shell {
  max-width: var(--shell);
  width: 100%;
  margin: 0 auto;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 2px;
}

.line {
  display: block;
  overflow: hidden;
  padding: 0.04em 0.1em 0.18em;
  margin: -0.04em -0.1em -0.14em;
}
.line__inner { display: block; }


/* ==========================================================================
   01 — HERO
   ========================================================================== */

@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px) }
  to   { opacity: 1; transform: none }
}

@keyframes lineReveal {
  0%   { transform: translateY(104%) rotate(2.4deg); opacity: 0; filter: blur(7px) }
  55%  { opacity: 1 }
  100% { transform: translateY(0) rotate(0deg); opacity: 1; filter: blur(0) }
}

@keyframes portraitIn {
  from { opacity: 0; transform: translateX(-46%) scale(1.035) }
  to   { opacity: 1; transform: translateX(-46%) scale(1) }
}

@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top }
  45%  { transform: scaleY(1); transform-origin: top }
  55%  { transform: scaleY(1); transform-origin: bottom }
  100% { transform: scaleY(0); transform-origin: bottom }
}

@keyframes dotPulse { 0%, 100% { opacity: 1 } 50% { opacity: 0.25 } }

.hero {
  position: relative;
  height: 100svh;
  width: 100%;
  overflow: hidden;
  background:
    radial-gradient(62% 52% at 52% 92%, rgba(255,255,255,0.065), rgba(255,255,255,0) 72%),
    var(--dark);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(16px, 2.2vw, 32px) var(--gutter) clamp(16px, 2.2vw, 30px);
}

/* --- portrait stage ------------------------------------------------------ */

.hero__stage {
  position: absolute;
  left: 50%;
  bottom: 0;
  height: min(86svh, 105vw);
  aspect-ratio: 549 / 568;
  transform: translateX(-46%);
  z-index: 1;
  cursor: none;
  touch-action: none;
  animation: portraitIn 1800ms var(--ease) 200ms both;
}

.hero__portrait { position: absolute; inset: 0; }

.hero__portrait-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  user-select: none;
  -webkit-user-select: none;
}

/* The AI variant sits on top of the clean portrait and is punched through by
   a radial mask. JS drives --mx / --my (pointer position) and --r (radius). */
.hero__portrait-img--ai {
  --r: 0px;
  --mx: 50%;
  --my: 42%;
  -webkit-mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 0%, #000 52%, rgba(0,0,0,0.45) 76%, transparent 100%);
          mask-image: radial-gradient(circle var(--r) at var(--mx) var(--my), #000 0%, #000 52%, rgba(0,0,0,0.45) 76%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  transition: --r 620ms var(--ease);
}

.hero__ring {
  position: absolute;
  left: 0;
  top: 0;
  width: 280px;
  height: 280px;
  margin: -140px 0 0 -140px;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
  background: radial-gradient(circle at center,
    rgba(150,195,255,0) 76%,
    rgba(150,195,255,0.26) 86%,
    rgba(235,245,255,0.16) 91%,
    rgba(150,195,255,0) 97%);
  transition: opacity 520ms var(--ease);
  will-change: transform;
}

/* --- nav ----------------------------------------------------------------- */

.hero__nav {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeIn 1100ms var(--ease) both;
}

.hero__wordmark { font-weight: 500; letter-spacing: 0.22em; color: var(--ink); }

.hero__status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-muted);
}
.hero__status-text { white-space: nowrap; }

.hero__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink);
  animation: dotPulse 2600ms ease-in-out 1200ms infinite;
}

/* --- headline ------------------------------------------------------------ */

.hero__main {
  position: relative;
  z-index: 2;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  justify-content: space-between;
  gap: clamp(22px, 3vw, 48px);
  /* lets the pointer through to the portrait stage underneath */
  pointer-events: none;
}

.hero__lead {
  flex: 1 1 380px;
  min-width: 0;
  max-width: min(620px, 46%);
  display: flex;
  flex-direction: column;
  gap: clamp(14px, 2.4vh, 30px);
  pointer-events: auto;
}

.hero__eyebrow {
  margin: 0;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  line-height: 1.8;
  color: var(--ink-muted);
  animation: fadeUp 900ms var(--ease) 260ms both;
}

.hero__title {
  margin: 0;
  font-size: min(clamp(40px, 6.2vw, 104px), 16vh);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.042em;
}

.hero__title .line {
  padding: 0.04em 0.1em 0.18em;
  margin: -0.04em -0.1em -0.14em;
}

.hero__title .line__inner {
  transform-origin: left bottom;
  animation: lineReveal 1400ms var(--ease) var(--d, 0ms) both;
}

.hero__slash { color: var(--ink-faint); padding-left: 0.12em; }

.hero__copy {
  margin: 0;
  max-width: 24em;
  font-size: clamp(14px, 1.15vw, 17px);
  line-height: 1.55;
  color: var(--ink-body);
  animation: fadeUp 900ms var(--ease) 760ms both;
}

/* --- cta ----------------------------------------------------------------- */

.hero__cta {
  align-self: flex-start;
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 18px 26px 18px 30px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--dark);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: fadeUp 900ms var(--ease) 900ms both;
  transition: color 420ms var(--ease);
}
.hero__cta:hover { color: var(--ink); }

.hero__cta-fill {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 320px;
  height: 320px;
  margin: -160px 0 0 -160px;
  border-radius: 50%;
  background: #2B2B27;
  transform: scale(0);
  transition: transform 620ms var(--ease);
  pointer-events: none;
}

.hero__cta-label { position: relative; }

.hero__cta-rule {
  position: relative;
  display: block;
  width: 26px;
  height: 1px;
  background: currentColor;
}

/* --- aside --------------------------------------------------------------- */

.hero__aside {
  flex: 1 1 190px;
  max-width: 200px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 10svh, 110px);
  pointer-events: auto;
}

.hero__disciplines {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  animation: fadeUp 900ms var(--ease) 1040ms both;
}

.hero__years {
  display: flex;
  gap: 16px;
  align-items: stretch;
  animation: fadeUp 900ms var(--ease) 1180ms both;
}

.hero__years-rule { width: 1px; background: rgba(237,236,230,0.2); }

.hero__years-text {
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  line-height: 1.7;
}

/* --- footer -------------------------------------------------------------- */

.hero__footer {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  font-size: 10px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-muted);
  animation: fadeUp 900ms var(--ease) 1300ms both;
}

.hero__scroll { display: flex; flex-direction: column; gap: 14px; }

.hero__scroll-line {
  width: 1px;
  height: clamp(28px, 5vh, 46px);
  background: rgba(237,236,230,0.27);
  animation: scrollLine 2800ms var(--ease) 1800ms infinite;
}

.hero__place { text-align: right; line-height: 1.9; }


/* ==========================================================================
   Custom cursors (shared)
   ========================================================================== */

.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms ease;
  will-change: transform;
}

.cursor__ring {
  position: relative;
  display: block;
  border-radius: 50%;
}

.cursor__dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 3px;
  margin: -1.5px 0 0 -1.5px;
  border-radius: 50%;
}

.cursor__label {
  white-space: nowrap;
  text-transform: uppercase;
}

/* hero */
.cursor--hero { gap: 10px; }
.cursor--hero .cursor__ring {
  width: 28px; height: 28px; margin: -14px 0 0 -14px;
  border: 1px solid rgba(237,236,230,0.6);
}
.cursor--hero .cursor__dot { background: var(--ink); }
.cursor--hero .cursor__label {
  margin-left: 14px;
  padding: 4px 7px 3px;
  border-radius: 999px;
  background: rgba(19,19,17,0.82);
  border: 1px solid rgba(237,236,230,0.18);
  backdrop-filter: blur(4px);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--ink);
}
.cursor--hero[data-label="off"] .cursor__label { display: none; }

/* ideas */
.cursor--ideas { gap: 12px; }
.cursor--ideas .cursor__ring {
  width: 30px; height: 30px; margin: -15px 0 0 -15px;
  border: 1px solid rgba(110,21,38,0.6);
}
.cursor--ideas .cursor__dot { background: var(--accent); }
.cursor--ideas .cursor__label {
  padding: 4px 8px 3px;
  border-radius: 999px;
  background: rgba(246,245,239,0.88);
  backdrop-filter: blur(4px);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--accent);
}

/* capabilities — inverts over the dark cards */
.cursor--caps { gap: 10px; }
.cursor--caps .cursor__ring {
  width: 26px; height: 26px; margin: -13px 0 0 -13px;
  border: 1px solid rgba(22,22,20,0.45);
  transition: border-color 300ms var(--ease);
}
.cursor--caps .cursor__dot { background: var(--graphite); transition: background 300ms var(--ease); }
.cursor--caps .cursor__label {
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--graphite-4);
  transition: color 300ms var(--ease);
}
.cursor--caps[data-dark="true"] .cursor__ring { border-color: rgba(237,236,230,0.6); }
.cursor--caps[data-dark="true"] .cursor__dot { background: var(--ink); }
.cursor--caps[data-dark="true"] .cursor__label { color: #C9C8C0; }


/* ==========================================================================
   Scroll-reveal primitive
   Elements opt in with [data-anim] and stage themselves with --d; JS adds
   [data-shown] once the section is in view. The resting half of this pair
   lives at the very end of the file — see "Reveal — resting state".
   ========================================================================== */

[data-anim] {
  transition:
    opacity   1100ms var(--ease) var(--d, 0ms),
    transform 1100ms var(--ease) var(--d, 0ms),
    filter    1100ms var(--ease) var(--d, 0ms),
    clip-path 1400ms var(--ease) var(--d, 0ms);
}


/* ==========================================================================
   02 — IDEAS TO LIFE
   ========================================================================== */

.ideas {
  position: relative;
  width: 100%;
  height: 260svh;
  background: var(--paper);
  color: var(--graphite);
}

.ideas__pin {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 5svh, 80px) var(--gutter) clamp(20px, 4svh, 60px);
}

.ideas__head {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}

.ideas__title {
  margin: 0;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.16em;
  white-space: nowrap;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.052em;
  font-size: min(clamp(34px, 12.4vw, 216px), 19svh);
}

.ideas__title .line { padding: 0.04em 0.12em 0.22em; margin: -0.04em -0.12em -0.16em; }

.ideas__title .line__inner {
  opacity: 0;
  filter: blur(9px);
  transform: translateY(106%) scale(0.96);
  transform-origin: left bottom;
  transition-duration: 1500ms;
}

.ideas__title-it { font-style: italic; font-weight: 500; padding: 0 0.06em; }

.ideas__sub {
  margin: clamp(8px, 1.6svh, 24px) 0 0;
  max-width: 34em;
  font-size: 10.5px;
  letter-spacing: 0.26em;
  line-height: 2;
  text-transform: uppercase;
  color: var(--graphite-4);
  opacity: 0;
  filter: blur(4px);
  transform: translateY(18px);
}

.ideas__stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: clamp(4px, 0.6vw, 14px);
  margin: 0 auto;
  max-width: var(--shell);
  min-height: 0;
  flex: 0 1 auto;
}

.ideas__col {
  flex: 0 1 clamp(78px, 13vw, 170px);
  max-width: 170px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(20px, 9svh, 130px);
  will-change: transform, opacity;
  transition: opacity 700ms var(--ease);
}
.ideas__col--left  { text-align: left; }
.ideas__col--right { align-items: flex-end; text-align: right; }

.ideas__step { opacity: 0; transform: translateY(20px); }

.ideas__word {
  font-weight: 700;
  font-size: min(clamp(24px, 3.1vw, 50px), 6svh);
  line-height: 1;
  letter-spacing: -0.035em;
  padding: 0.04em 0.1em 0.2em;
  margin: -0.04em -0.1em -0.16em;
}
.ideas__word .line__inner {
  transform: translateY(106%);
  transition-duration: 1300ms;
}

.ideas__rule {
  display: block;
  width: 34px;
  height: 1px;
  background: rgba(110,21,38,0.25);
  margin: 14px 0 12px;
}
.ideas__col--right .ideas__rule { margin-left: auto; }

.ideas__note {
  margin: 0;
  font-size: 9.5px;
  letter-spacing: 0.24em;
  line-height: 1.9;
  text-transform: uppercase;
  color: var(--graphite-4);
}

.ideas__media {
  position: relative;
  flex: 1 1 min(100%, 520px);
  max-width: 1080px;
  max-height: clamp(200px, 54svh, 820px);
  margin: 0 auto;
  cursor: none;
  transform: scale(1);
  transform-origin: center center;
  transition: transform 900ms var(--ease);
  will-change: transform;
}

.ideas__video {
  width: 100%;
  height: auto;
  max-height: clamp(200px, 54svh, 820px);
  object-fit: contain;
  pointer-events: none;
  mix-blend-mode: multiply;
  -webkit-mask-image:
    linear-gradient(to right,  transparent 0%, #000 11%, #000 89%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%,  #000 78%, transparent 100%);
          mask-image:
    linear-gradient(to right,  transparent 0%, #000 11%, #000 89%, transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 9%,  #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-composite: intersect;
  user-select: none;
  -webkit-user-select: none;
}

.ideas__kicker {
  position: relative;
  z-index: 2;
  margin: auto 0 0;
  padding-top: clamp(10px, 3svh, 56px);
  text-align: center;
  font-weight: 500;
  font-size: min(clamp(17px, 2.1vw, 34px), 4.4svh);
  line-height: 1.22;
  letter-spacing: -0.03em;
  color: var(--graphite);
  opacity: 0;
}
.ideas__kicker .line { padding: 0.04em 0.1em 0.2em; margin: -0.04em -0.1em -0.14em; }
.ideas__kicker .line__inner {
  transform: translateY(108%);
  transition-duration: 1300ms;
}


/* ==========================================================================
   03 — CAPABILITIES
   ========================================================================== */

.caps {
  position: relative;
  width: 100%;
  background: var(--paper);
  color: var(--graphite);
  padding: clamp(80px, 11vw, 170px) var(--gutter) clamp(24px, 3vw, 52px);
  overflow: hidden;
}

.caps__rule {
  height: 1px;
  background: rgba(22,22,20,0.125);
  transform: scaleX(0);
  transform-origin: left center;
  margin-bottom: clamp(44px, 6vw, 92px);
  transition: transform 1600ms var(--ease);
}

.caps__head,
.caps__work {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(28px, 4vw, 80px);
}

.caps__title {
  margin: 0;
  flex: 1 1 420px;
  min-width: 0;
  max-width: 760px;
  font-weight: 700;
  font-size: min(clamp(38px, 6.2vw, 104px), 17svh);
  line-height: 0.94;
  letter-spacing: -0.045em;
}
.caps__title .line { padding: 0.04em 0.1em 0.36em; margin: -0.04em -0.1em -0.12em; }
.caps__title .line__inner {
  opacity: 0;
  transform: translateY(108%);
  transition-duration: 1400ms;
}
.caps__title--work .line__inner { opacity: 1; will-change: transform; }

.caps__lead {
  margin: 0 0 clamp(4px, 1vw, 14px);
  flex: 0 1 430px;
  min-width: 0;
  max-width: 430px;
  font-size: clamp(15px, 1.25vw, 19px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: var(--graphite-2);
  opacity: 0;
  transform: translateY(24px);
}

.caps__grid {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: clamp(10px, 1.1vw, 18px);
  margin-top: clamp(52px, 7vw, 100px);
}

.caps__work { margin-top: clamp(90px, 13vw, 190px); }

/* --- cards --------------------------------------------------------------- */

.card {
  position: relative;
  flex: 1 1 22%;
  min-width: min(48%, 250px);
  min-height: clamp(320px, 48svh, 560px);
  overflow: hidden;
  border-radius: clamp(16px, 1.5vw, 26px);
  opacity: 0;
  transform: translateY(50px) scale(0.97);
  will-change: transform, opacity;
}

.card--wide { flex: 1 1 48%; min-width: min(100%, 650px); }

.card--light {
  background: var(--paper-warm);
  border: 1px solid rgba(22,22,20,0.07);
}

.card--dark { background: #000; color: var(--ink); }

/* [data-rest] is set once the entry transition has finished, handing the
   element from the (long, staggered) reveal curve to the hover curve. */
.card[data-rest] { transition: transform 700ms var(--ease); }
.card[data-rest]:hover { transform: scale(1.01); }

.card__body {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(20px, 2.1vw, 34px);
}

.card__index {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--graphite-4);
}
.card--dark .card__index { color: rgba(237,236,230,0.5); }

.card__text { transition: transform 700ms var(--ease); }
.card:hover .card__text { transform: translateY(-3px); }

.card__title {
  margin: 0;
  font-weight: 600;
  font-size: clamp(22px, 1.9vw, 32px);
  line-height: 1.06;
  letter-spacing: -0.035em;
}
.card--dark .card__title { color: var(--ink-bright); }

.card__title--lg {
  font-size: clamp(24px, 2.7vw, 44px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.card__copy {
  margin: clamp(12px, 1.2vw, 18px) 0 0;
  font-size: clamp(13px, 0.95vw, 15px);
  line-height: 1.55;
  color: var(--ink-dim);
}
.card--light .card__copy {
  max-width: 30em;
  font-size: clamp(13px, 1vw, 15.5px);
  color: var(--graphite-3);
}

/* card 01 — video bleed */
.card__media--video {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: min(58%, 520px);
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 22%);
          mask-image: linear-gradient(to right, transparent 0%, #000 22%);
}

.card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  opacity: 0;
  transform: scale(1.02);
  transition:
    opacity 1200ms var(--ease) 400ms,
    transform 900ms var(--ease);
}
.card__video[data-playing] { opacity: 1; transform: scale(1); }

/* card 02 — floating frames */
.card__glow {
  position: absolute;
  inset: -20%;
  opacity: 0;
  transition: opacity 900ms var(--ease);
  background: radial-gradient(42% 34% at 62% 22%, rgba(237,236,230,0.13), rgba(237,236,230,0) 70%);
  pointer-events: none;
}

.card__media--frames {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 66%;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 62%, transparent 96%);
}

.card__frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 96%;
  height: 96%;
  transform: translate(-50%, -50%);
  object-fit: contain;
  mix-blend-mode: screen;
  opacity: 0.62;
  filter: contrast(1.02) brightness(1);
  transition:
    transform 1100ms var(--ease),
    opacity 900ms var(--ease),
    filter 900ms var(--ease);
  user-select: none;
  -webkit-user-select: none;
}

/* card 03 — tilting sculpture */
.card__media--object {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 56%, transparent 86%);
          mask-image: linear-gradient(to bottom, #000 0%, #000 56%, transparent 86%);
}

.card__object {
  position: absolute;
  left: 50%;
  top: 34%;
  width: min(64%, 250px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  transform-style: preserve-3d;
  will-change: transform;
}

.card__sculpt { position: absolute; inset: 0; transform-style: preserve-3d; }

.card__halo {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  background: radial-gradient(60% 60% at 42% 38%, rgba(237,236,230,0.16), rgba(237,236,230,0) 72%);
  filter: blur(14px);
}

.card__core {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: screen;
  filter: contrast(1.04) brightness(1.02);
  transition: filter 700ms var(--ease);
  user-select: none;
  -webkit-user-select: none;
}


/* ==========================================================================
   04 — SELECTED WORK
   ========================================================================== */

.work {
  position: relative;
  width: 100%;
  background: var(--paper);
  color: var(--graphite);
  padding: clamp(18px, 2.4vw, 40px) var(--gutter) clamp(100px, 15vw, 220px);
}

.work__row {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(22px, 2.6vw, 44px) clamp(14px, 1.6vw, 26px);
}
.work__row--gap { margin-top: clamp(36px, 4.4vw, 70px); }

.project {
  flex: 1 1 48%;
  min-width: min(100%, 320px);
  display: block;
  color: var(--graphite);
  opacity: 0;
  transform: translateY(50px);
}
.project--third { flex: 1 1 30%; min-width: min(100%, 250px); }

.project__frame {
  position: relative;
  overflow: hidden;
  border-radius: clamp(10px, 1vw, 18px);
  background: var(--paper-sunk);
  height: clamp(210px, 21vw, 360px);
  clip-path: inset(100% 0 0 0);
}
.project__frame--tall { height: clamp(250px, 31vw, 500px); }

/* The media eases out of its 1.06 overscan 40ms behind its frame's clip-path
   wipe, then hands over to the hover curve once settled. */
.project__media {
  position: absolute;
  inset: 0;
  background: var(--paper-sunk);
  transform: scale(1.06);
  transition: transform 1600ms var(--ease) calc(var(--d, 0ms) + 40ms);
}
.project__frame[data-shown] .project__media { transform: scale(1); }

.project[data-rest] .project__media { transition: transform 900ms var(--ease); }
.project[data-rest]:hover .project__media { transform: scale(1.025); }

.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.project__meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  margin-top: clamp(14px, 1.4vw, 22px);
}

.project__name {
  margin: 0;
  font-weight: 600;
  font-size: clamp(19px, 1.7vw, 28px);
  line-height: 1.1;
  letter-spacing: -0.032em;
}

.project__tags {
  margin: 9px 0 0;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--graphite-4);
}

.project__arrow {
  flex: none;
  font-size: clamp(15px, 1.3vw, 20px);
  line-height: 1;
  transition: transform 600ms var(--ease);
}
.project:hover .project__arrow { transform: translate(3px, -3px); }

.work__cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 9;
  width: 86px;
  height: 86px;
  margin: -43px 0 0 -43px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 8.5px;
  letter-spacing: 0.2em;
  line-height: 1.7;
  text-transform: uppercase;
  opacity: 0;
  transform: scale(0.6);
  pointer-events: none;
  transition: opacity 320ms var(--ease), transform 420ms var(--ease);
  will-change: left, top;
}
.work__cursor[data-on] { opacity: 1; transform: scale(1); }


/* ==========================================================================
   05 — CONTACT
   ========================================================================== */

.contact {
  position: relative;
  width: 100%;
  min-height: 96svh;
  overflow: hidden;
  background: var(--dark-deep);
  color: var(--ink-bright);
  display: flex;
  flex-direction: column;
  padding: clamp(70px, 11vw, 170px) var(--gutter) clamp(24px, 3vw, 46px);
}

.contact__flood {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260vmax;
  height: 260vmax;
  margin: -130vmax 0 0 -130vmax;
  border-radius: 50%;
  background: var(--accent);
  transform: scale(0);
  transform-origin: center center;
  transition: transform 1250ms var(--ease);
  pointer-events: none;
  z-index: 0;
}

.contact__inner {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Each piece below carries `color` (and where relevant border-color) in its own
   transition, so the crimson flood crossfades at 900ms while the entry
   choreography keeps its own durations and per-element --d stagger. */

.contact__label {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(243,242,236,0.62);
  opacity: 0;
  transform: translateY(14px);
  transition:
    opacity 900ms var(--ease) var(--d, 0ms),
    transform 900ms var(--ease) var(--d, 0ms),
    color 900ms var(--ease);
}

.contact__title {
  margin: clamp(22px, 3vw, 50px) 0 0;
  font-weight: 700;
  font-size: min(clamp(40px, 8.4vw, 150px), 21svh);
  line-height: 0.92;
  letter-spacing: -0.048em;
}
.contact__title .line { padding: 0.04em 0.1em 0.36em; margin: -0.04em -0.1em -0.12em; }
.contact__title .line__inner {
  opacity: 0;
  transform: translateY(110%);
  transition:
    opacity 1200ms var(--ease) var(--d, 0ms),
    transform 1400ms var(--ease) var(--d, 0ms),
    color 900ms var(--ease);
}

.contact__foot-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: clamp(30px, 4vw, 70px);
  margin-top: clamp(38px, 5vw, 80px);
}

.contact__copy {
  margin: 0;
  flex: 0 1 420px;
  min-width: 0;
  max-width: 420px;
  font-size: clamp(14px, 1.15vw, 18px);
  line-height: 1.5;
  letter-spacing: -0.012em;
  color: rgba(243,242,236,0.78);
  opacity: 0;
  transform: translateY(22px);
  transition:
    opacity 1000ms var(--ease) var(--d, 0ms),
    transform 1000ms var(--ease) var(--d, 0ms),
    color 900ms var(--ease);
}

.contact__cta {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  color: var(--ink-bright);
  opacity: 0;
  transform: translateY(24px);
  -webkit-tap-highlight-color: transparent;
  /* transform stays on the short curve throughout — it doubles as the
     magnetic pull once the button has faded in */
  transition:
    opacity 1000ms var(--ease) var(--d, 0ms),
    transform 700ms var(--ease),
    color 900ms var(--ease);
}

.contact__cta-text {
  font-weight: 600;
  font-size: clamp(28px, 4.2vw, 68px);
  line-height: 1;
  letter-spacing: -0.042em;
  transition: color 900ms var(--ease);
}

.contact__cta-ring {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: clamp(54px, 5.6vw, 92px);
  height: clamp(54px, 5.6vw, 92px);
  border-radius: 50%;
  border: 1px solid rgba(243,242,236,0.3);
  transition:
    border-color 900ms var(--ease),
    background 900ms var(--ease),
    transform 800ms var(--ease);
}

.contact__cta-arrow {
  font-size: clamp(17px, 1.7vw, 27px);
  line-height: 1;
  transition: transform 800ms var(--ease), color 900ms var(--ease);
}

.contact__footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px clamp(24px, 4vw, 60px);
  margin: clamp(60px, 9vw, 130px) auto 0;
  padding-top: clamp(18px, 2vw, 30px);
  border-top: 1px solid rgba(243,242,236,0.16);
  font-size: 9.5px;
  letter-spacing: 0.24em;
  line-height: 2;
  text-transform: uppercase;
  color: rgba(243,242,236,0.6);
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 1000ms var(--ease) var(--d, 0ms),
    transform 1000ms var(--ease) var(--d, 0ms),
    color 900ms var(--ease),
    border-color 900ms var(--ease);
}

/* --- crimson flood state ------------------------------------------------- */

.contact[data-flood="on"] [data-bg]              { transform: scale(1); }
.contact[data-flood="on"] [data-ink="strong"]    { color: #FFFFFF; }
.contact[data-flood="on"] [data-ink="mid"]       { color: rgba(255,255,255,0.92); }
.contact[data-flood="on"] [data-ink="soft"]      { color: rgba(255,255,255,0.8); }
.contact[data-flood="on"] [data-foot]            { border-top-color: rgba(255,255,255,0.3); }
.contact[data-flood="on"] [data-ring]            { border-color: rgba(255,255,255,0.62); transform: scale(1.06); }
.contact[data-flood="on"] [data-arrow]           { transform: rotate(45deg); }


/* ==========================================================================
   Responsive
   The prototype is fluid via clamp(); these handle the narrow-viewport
   regroupings the desktop-first layout can't express on its own.
   ========================================================================== */

@media (max-width: 900px) {
  .hero__lead { max-width: 100%; }
  .hero__aside { max-width: 100%; flex-basis: 100%; }
  .hero__disciplines { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .hero__stage { opacity: 0.55; }
  .hero__nav { font-size: 10px; }
}

@media (max-width: 720px) {
  .ideas { height: 220svh; }
  .ideas__stage { flex-wrap: wrap; }
  .ideas__col {
    flex: 1 1 40%;
    max-width: none;
    flex-direction: row;
    gap: 18px;
    order: 2;
  }
  .ideas__media { flex: 1 1 100%; order: 1; }
  .ideas__step { flex: 1 1 0; }
  .card--wide, .card { min-width: 100%; }
  .project, .project--third { min-width: 100%; }
}

/* ==========================================================================
   Reduced motion
   Entry choreography is dropped; hover/scrub affordances stay usable.
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }

  .cursor, .work__cursor { display: none; }
  .hero__stage, .ideas__media { cursor: auto; }
}


/* ==========================================================================
   Reveal — resting state
   Deliberately last in the file and deliberately free of !important: at
   (0,2,0) it outranks the single-class rules that declare each element's
   entry offset, and wins ties against equally-specific ones on source order.
   Keeping it un-forced leaves inline transforms — the magnetic CTA, the
   headline drift, the scrubbed parallax — free to take over afterwards.
   ========================================================================== */

[data-anim][data-shown] {
  opacity: 1;
  transform: none;
  filter: none;
  clip-path: inset(0% 0 0 0);
}
