/* =====================================================================
   Home page
   ===================================================================== */

section { position: relative; }
.sec { padding-block: clamp(80px, 11vw, 150px); }
.sec-tight { padding-top: 0; }

/* ---------------------------------------------------------------------
   Hero — text left, framed portrait right
   --------------------------------------------------------------------- */

.hero {
  min-height: 100svh;
  display: grid;
  align-items: center;
  padding-block: calc(var(--header-h) + clamp(28px, 4vw, 56px)) clamp(36px, 5vw, 64px);
  background: linear-gradient(180deg, #e4e4e4 0%, #dcdcdc 100%);
  overflow-x: clip;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
}

.hero-text { display: grid; justify-items: start; }
.hero-kicker { margin-bottom: 18px; }

.hero-title {
  display: grid;
  font-weight: 500;
  font-size: clamp(48px, 7.4vw, 118px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  text-transform: uppercase;
}
.hero-title .mask:first-child { color: var(--gray); }
.hero-title .mask { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero-title .mask > span { display: inline-block; transform: translateY(105%); transition: transform 1.2s var(--ease); }
.hero-title .mask:nth-child(2) > span { transition-delay: 0.08s; }
.is-ready .hero-title .mask > span { transform: none; }

.hero-role { margin-top: 26px; font-size: 12px; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; }
.hero-quote { margin-top: 10px; max-width: 420px; font-size: 16px; color: #3b3b3b; line-height: 1.6; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }
.hero-social { margin-top: 30px; }
.hero-social a { background: rgba(255, 255, 255, 0.4); }

.hero-text > * { opacity: 0; transform: translateY(18px); transition: opacity 0.9s ease, transform 1s var(--ease); }
.hero-text > .hero-title { opacity: 1; transform: none; }
.is-ready .hero-text > * { opacity: 1; transform: none; }
.is-ready .hero-role { transition-delay: 0.25s; }
.is-ready .hero-quote { transition-delay: 0.32s; }
.is-ready .hero-actions { transition-delay: 0.4s; }
.is-ready .hero-social { transition-delay: 0.48s; }

.hero-frame {
  position: relative;
  width: 100%;
  max-width: 560px;
  justify-self: end;
  perspective: 1000px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s var(--ease) 0.2s, transform 1.4s var(--ease) 0.2s;
}
.is-ready .hero-frame { opacity: 1; transform: none; }

/* soft floor shadow + glow behind the cutout for depth */
.hero-frame::before {
  content: "";
  position: absolute;
  inset: 12% 8% 4%;
  background: radial-gradient(closest-side, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0));
  z-index: 0;
}
.hero-frame::after {
  content: "";
  position: absolute;
  left: 14%; right: 14%; bottom: -2%;
  height: 7%;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
  filter: blur(6px);
  z-index: 0;
}

.hero-3d {
  position: relative;
  z-index: 1;
  display: block;
  transform-style: preserve-3d;
  transform: rotateY(var(--ry, -5deg)) rotateX(var(--rx, 0deg));
  transition: transform 0.6s var(--ease);
  will-change: transform;
}
.hero-3d img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(16px 18px 18px rgba(0, 0, 0, 0.22));
  transform: translateZ(40px);
}

@media (max-width: 900px) {
  .hero { min-height: auto; }
  .hero-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-areas: "kick photo" "title photo" "role photo" "quote quote" "act act" "soc soc";
    column-gap: 8px;
    row-gap: 0;
    align-items: end;
  }
  .hero-text { display: contents; }
  .hero-kicker { grid-area: kick; font-size: 9px; margin-bottom: 10px; }
  .hero-title { grid-area: title; position: relative; z-index: 2; font-size: clamp(34px, 11vw, 72px); }
  .hero-role { grid-area: role; margin-top: 14px; font-size: 10px; letter-spacing: 0.12em; }
  .hero-quote { grid-area: quote; margin-top: 22px; }
  .hero-actions { grid-area: act; }
  .hero-actions .btn { flex: 1 1 150px; }
  .hero-social { grid-area: soc; }
  .hero-frame { grid-area: photo; justify-self: end; align-self: end; width: 112%; max-width: none; margin-right: -4%; }
  .hero-3d { --ry: -6deg; }
}

/* ---------------------------------------------------------------------
   Project grids (websites, dashboards, AI)
   --------------------------------------------------------------------- */

.grid-phone {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(28px, 3vw, 44px) clamp(12px, 1.6vw, 22px);
}

.grid-desk {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(32px, 3.4vw, 52px) clamp(12px, 1.6vw, 22px);
}

/* An odd last card is centred at normal size instead of stretched */
.grid-desk .proj:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: calc(50% - clamp(6px, 0.8vw, 11px));
}

.grid-ai {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px);
  max-width: 860px;
  margin-inline: auto;
}

@media (max-width: 1100px) { .grid-phone { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

@media (max-width: 760px) {
  .grid-phone { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-desk { grid-template-columns: 1fr; }
  .grid-phone .proj:last-child:nth-child(odd) { grid-column: 1 / -1; justify-self: center; width: calc(50% - 6px); }
  .grid-desk .proj:last-child:nth-child(odd) { width: 100%; }
  .grid-ai { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}

.proj { display: grid; gap: 14px; align-content: start; }

.proj-media {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 9 / 16;
}

.grid-desk .proj-media { aspect-ratio: 16 / 10; }
.dark .proj-media { background: var(--ink-3); }

.proj-media img,
.proj-media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* Black & white at rest, colour while the preview plays */
.proj-media img {
  transform: scale(1.01);
  transition: transform 1.2s var(--ease), opacity 0.6s ease;
}

.proj-media video { opacity: 0; transition: opacity 0.6s ease; }
.proj-media.is-playing video { opacity: 1; }

@media (hover: hover) {
  .proj:hover .proj-media img { transform: scale(1.05); }
}

.proj-cta {
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
}

.proj-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 2;
  padding: 6px 9px;
  background: var(--ink);
  color: var(--white);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.proj-info {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  padding-top: 12px;
}

.dark .proj-info { border-top-color: var(--line-dark); }

.proj-name {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.3;
}

.proj-num { font-size: 11px; color: var(--gray); letter-spacing: 0.1em; }
.dark .proj-num { color: var(--gray-2); }

.proj-cat {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
}

.dark .proj-cat { color: var(--gray-2); }

.proj-desc { font-size: 13px; color: var(--gray); line-height: 1.55; }
.dark .proj-desc { color: var(--gray-2); }

@media (max-width: 760px) {
  .proj-cta { left: 8px; bottom: 8px; height: 30px; padding: 0 10px; font-size: 10px; gap: 6px; }
  .proj-badge { top: 8px; left: 8px; font-size: 9px; }
  .proj-name { font-size: 12px; }
  .grid-phone .proj-desc { display: none; }
}

.sub-head { margin-top: clamp(90px, 11vw, 150px); }

/* ---------------------------------------------------------------------
   Feedback
   --------------------------------------------------------------------- */

.fb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 22px);
}

.fb-card { display: grid; gap: 14px; }

.fb-frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
  aspect-ratio: 4 / 5;
}

.fb-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 1.2s var(--ease);
}

@media (hover: hover) {
  .fb-card:hover .fb-frame img { transform: scale(1.03); }
}

.fb-info { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.fb-brand { font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }

@media (max-width: 760px) {
  .fb-grid { grid-template-columns: 1fr; gap: 36px; max-width: 420px; margin-inline: auto; }
}

/* ---------------------------------------------------------------------
   About
   --------------------------------------------------------------------- */

.about { background: var(--paper-3); }

.about-top {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(32px, 6vw, 90px);
  align-items: center;
}

.about-heading { display: grid; margin-block: 16px 22px; }
.about-heading span:nth-child(2) { color: var(--gray); }

.about-desc { font-size: 17px; max-width: 520px; color: #333; }

.about-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 30px; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(40px, 5vw, 64px);
  border-top: 1px solid var(--line);
}

.stat { padding: 18px 12px 0 0; display: grid; gap: 6px; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat strong { font-size: clamp(28px, 3.4vw, 46px); font-weight: 500; letter-spacing: -0.03em; line-height: 1; }
.stat span { font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gray); line-height: 1.4; }

.about-photo {
  position: relative;
  background: linear-gradient(180deg, #cfcfcf, #bdbdbd);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  display: grid;
  align-items: end;
}

.about-photo img { width: 100%; height: auto; transform: translateY(4%); }

.about-photo figcaption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
  mix-blend-mode: difference;
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: clamp(70px, 9vw, 120px);
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.info-cell {
  padding: clamp(22px, 2.6vw, 34px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  gap: 14px;
  align-content: start;
}

.info-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.info-cell p { font-size: 14px; color: #3a3a3a; }

.kv { display: grid; gap: 2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; padding-bottom: 0; }
.kv span { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.kv strong { font-size: 14px; font-weight: 500; word-break: break-word; }

.lang { display: grid; gap: 8px; }
.lang-row { display: flex; justify-content: space-between; font-size: 13px; }
.lang-row span:last-child { color: var(--gray); }
.lang-bar { height: 2px; background: var(--line); position: relative; overflow: hidden; }
.lang-bar span { position: absolute; inset: 0; background: var(--ink); transform-origin: 0 50%; transform: scaleX(0); transition: transform 1.4s var(--ease) 0.2s; }
.lang-bar.in span { transform: scaleX(var(--v)); }

.do-list { list-style: none; display: grid; }
.do-list li { padding: 11px 0; border-bottom: 1px solid var(--line); display: grid; gap: 2px; }
.do-list li:last-child { border-bottom: 0; }
.do-list strong { font-size: 14px; font-weight: 600; }
.do-list span { font-size: 13px; color: var(--gray); }

.pill-group { display: grid; gap: 10px; }
.pill-group > span { font-size: 10px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gray); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 6px 11px; border: 1px solid var(--line); border-radius: 2px; font-size: 12px; transition: background-color 0.3s ease, color 0.3s ease; }

@media (hover: hover) { .pill:hover { background: var(--ink); color: var(--white); border-color: var(--ink); } }

.interests { list-style: none; display: grid; }
.interests li { padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }

.info-cell .fun-fact { margin-top: 6px; padding: 16px; background: var(--ink); color: var(--white); font-size: 13px; }
.fun-fact strong { font-weight: 600; }

.about-cta {
  margin-top: clamp(50px, 7vw, 90px);
  background: var(--ink);
  color: var(--white);
  padding: clamp(26px, 4vw, 48px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.about-cta h3 { font-size: clamp(20px, 2.4vw, 30px); font-weight: 500; letter-spacing: -0.02em; text-transform: uppercase; line-height: 1.1; }
.about-cta p { margin-top: 10px; color: var(--gray-2); max-width: 560px; font-size: 14px; }

@media (max-width: 900px) {
  .about-top { grid-template-columns: 1fr; }
  .about-photo { max-width: 360px; width: 100%; margin-inline: auto; }
  .info-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); margin-top: 18px; }
}

/* ---------------------------------------------------------------------
   Services / Why — bordered editorial cells
   --------------------------------------------------------------------- */

.cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.dark .cells { border-color: var(--line-dark); }

.cell {
  position: relative;
  isolation: isolate;
  padding: clamp(22px, 2.4vw, 32px);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 230px;
  transition: color 0.5s var(--ease-io);
}

.dark .cell { border-color: var(--line-dark); }

.cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.55s var(--ease-io);
}

.dark .cell::before { background: var(--white); }

.cell-num { font-size: 11px; letter-spacing: 0.14em; color: var(--gray); transition: color 0.5s var(--ease-io); }
.dark .cell-num { color: var(--gray-2); }
.cell h3 { margin-top: auto; padding-top: 34px; font-size: 16px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1.25; }
.cell p { font-size: 13px; color: var(--gray); line-height: 1.55; transition: color 0.5s var(--ease-io); }
.dark .cell p { color: var(--gray-2); }

@media (hover: hover) {
  .cell:hover { color: var(--white); }
  .cell:hover::before { transform: scaleY(1); }
  .cell:hover p,
  .cell:hover .cell-num { color: rgba(255, 255, 255, 0.7); }
  .dark .cell:hover { color: var(--ink); }
  .dark .cell:hover p,
  .dark .cell:hover .cell-num { color: rgba(0, 0, 0, 0.62); }
}

@media (max-width: 1100px) { .cells { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .cells { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell { min-height: 0; padding: 18px 14px; }
  .cell h3 { padding-top: 18px; font-size: 13px; }
  .cell p { font-size: 12px; }
}

.why-quote {
  margin: clamp(60px, 8vw, 110px) auto 0;
  max-width: 980px;
  text-align: center;
  display: grid;
  gap: 22px;
  justify-items: center;
}

.why-quote p {
  font-size: clamp(22px, 3vw, 40px);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.18;
}

.why-quote p em { font-style: normal; color: var(--gray); }
.why-quote cite { font-style: normal; font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gray); }

/* ---------------------------------------------------------------------
   Contact
   --------------------------------------------------------------------- */

.contact { padding-top: clamp(90px, 12vw, 160px); }

.contact-title {
  font-weight: 500;
  font-size: clamp(48px, 9vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.05em;
  text-transform: uppercase;
  display: grid;
}

.contact-title span:nth-child(2) { color: var(--gray-2); }

.contact-top { display: grid; gap: 26px; }
.contact-top p { max-width: 560px; color: var(--gray-2); font-size: 16px; }

.contact-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(36px, 6vw, 90px);
  margin-top: clamp(56px, 7vw, 96px);
  padding-bottom: clamp(60px, 8vw, 110px);
}

.form { display: grid; gap: 4px; align-content: start; }
.form-head { margin-bottom: 18px; display: grid; gap: 6px; }
.form-head h3 { font-size: 13px; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; }
.form-head p { font-size: 13px; color: var(--gray-2); }

.field { position: relative; }

.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line-dark);
  padding: 16px 0 12px;
  font-size: 15px;
  outline: none;
  border-radius: 0;
  transition: border-color 0.35s ease;
}

.field textarea { min-height: 120px; resize: vertical; }
.field input::placeholder,
.field textarea::placeholder { color: var(--gray-2); text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; }
.field input:focus,
.field textarea:focus { border-bottom-color: var(--white); }

.form .btn { margin-top: 22px; justify-self: start; }

.methods { display: grid; align-content: start; }
.methods-title { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--gray-2); margin-bottom: 8px; }

.method {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 18px 10px;
  border-bottom: 1px solid var(--line-dark);
  transition: color 0.45s var(--ease-io);
}

.method:first-of-type { border-top: 1px solid var(--line-dark); }

.method::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--white);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.45s var(--ease-io);
}

.method .m-icon { width: 40px; height: 40px; display: grid; place-items: center; border: 1px solid var(--line-dark); transition: border-color 0.45s ease; }
.method strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.method small { font-size: 12px; color: var(--gray-2); transition: color 0.45s ease; }
.method > .icon { transition: transform 0.45s var(--ease-io); }

@media (hover: hover) {
  .method:hover { color: var(--ink); }
  .method:hover::before { transform: scaleY(1); }
  .method:hover small { color: var(--gray); }
  .method:hover .m-icon { border-color: var(--line); }
  .method:hover > .icon { transform: translate(3px, -3px); }
}

@media (max-width: 900px) {
  .contact-body { grid-template-columns: 1fr; }
  .form .btn { justify-self: stretch; }
}

.footer-left { display: grid; gap: 6px; }

/* Tighter gap between reviews and about */
#feedback { padding-bottom: clamp(24px, 4vw, 48px); }
.about { padding-top: clamp(28px, 3.5vw, 44px); }

/* =====================================================================
   Premium showcase layer (v2)
   Websites: drag/snap rail of large cards. Dashboards: sticky stacking
   cards. Media: clip-path reveal, autoplay in view, "View" cursor.
   ===================================================================== */

.work-marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding-block: clamp(14px, 2vw, 24px);
  margin-bottom: clamp(48px, 7vw, 96px);
  white-space: nowrap;
  user-select: none;
}
.work-marquee__track {
  display: inline-flex;
  gap: 0.35em;
  font-size: clamp(44px, 9vw, 150px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.95;
  text-transform: uppercase;
  animation: wm-scroll 40s linear infinite;
  will-change: transform;
}
.work-marquee__track span:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ink); }
@keyframes wm-scroll { to { transform: translateX(-50%); } }

#work .sec-head {
  text-align: left;
  justify-items: start;
  max-width: none;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 40px;
}
#work .sec-head .kicker { grid-column: 1 / -1; }
#work .sec-head .h-display { font-size: clamp(40px, 7vw, 112px); letter-spacing: -0.05em; line-height: 0.92; }
#work .sec-head p { max-width: 360px; }
@media (max-width: 760px) { #work .sec-head { grid-template-columns: 1fr; } }

/* ---------- Websites: full-screen stacking panels ---------- */
.work-index {
  list-style: none;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(20px, 4vw, 64px);
  margin-bottom: clamp(60px, 9vw, 130px); border-top: 1px solid var(--line);
}
.work-index a {
  display: grid; grid-template-columns: 48px 1fr auto; align-items: baseline; gap: 12px;
  padding: clamp(14px, 1.6vw, 22px) 10px; border-bottom: 1px solid var(--line);
  font-size: clamp(20px, 2.6vw, 40px); font-weight: 500; letter-spacing: -0.035em; line-height: 1.1;
  position: relative; overflow: hidden; isolation: isolate; transition: color .4s var(--ease);
}
.work-index a small { font-size: 11px; letter-spacing: .14em; color: var(--gray); font-weight: 500; }
.work-index a em { font-style: normal; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--gray); }
.work-index a span { display: inline-block; transition: transform .6s var(--ease); }
.work-index a::before { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleY(0); transform-origin: bottom; transition: transform .6s var(--ease); z-index: -1; }
@media (hover: hover) {
  .work-index a:hover { color: var(--white); }
  .work-index a:hover::before { transform: scaleY(1); }
  .work-index a:hover span { transform: translateX(14px); }
}
@media (max-width: 760px) { .work-index { grid-template-columns: 1fr; } .work-index a em { display: none; } }

#work .grid-phone { display: block; }
#work .grid-phone .proj {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  margin-inline: calc(var(--gutter) * -1);
  padding: calc(var(--header-h) + clamp(16px, 3vh, 40px)) var(--gutter) clamp(24px, 5vh, 56px);
  background: #fff; color: var(--ink);
  box-shadow: 0 -30px 80px rgba(0,0,0,.08);
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(24px, 5vw, 90px); row-gap: clamp(18px, 3vh, 32px);
  overflow: hidden; isolation: isolate;
  border-radius: clamp(16px, 2.4vw, 32px) clamp(16px, 2.4vw, 32px) 0 0;
  transform-origin: center top;
  transform: scale(var(--stack-scale, 1));
  opacity: 1;
}
#work .grid-phone .proj.in { transform: scale(var(--stack-scale, 1)); }
#work .grid-phone .proj::before {
  content: ""; position: absolute; inset: -60px; z-index: -2;
  background: var(--bg) center / cover no-repeat;
  filter: blur(80px) saturate(1.3); opacity: .28;
}
#work .grid-phone .proj::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(110% 90% at 72% 50%, rgba(255,255,255,0), rgba(255,255,255,.92) 70%);
}
#work .grid-phone .proj-info { grid-column: 1; grid-row: 2; border: 0; padding: 0; flex-direction: column-reverse; align-items: flex-start; gap: clamp(14px, 2vh, 26px); }
#work .grid-phone .proj-num { font-size: 12px; letter-spacing: .2em; color: var(--gray); }
#work .grid-phone .proj-name { font-size: clamp(48px, 8vw, 146px); font-weight: 600; letter-spacing: -0.055em; line-height: .88; text-transform: uppercase; }
#work .grid-phone .proj-cat { margin-top: clamp(14px, 2vh, 24px); color: var(--gray); font-size: 12px; }
#work .grid-phone .proj-desc { display: block; grid-column: 1; grid-row: 3; max-width: 420px; color: #4a4a4a; font-size: 15px; }
#work .grid-phone .proj-media {
  grid-column: 2; grid-row: 1 / -1; justify-self: center; align-self: center;
  height: calc(100svh - var(--header-h) - 40px); width: auto; max-width: 100%; aspect-ratio: 9 / 16;
  border-radius: clamp(18px, 2vw, 34px);
  box-shadow: 0 50px 120px rgba(0,0,0,.28), 0 0 0 1px rgba(0,0,0,.08);
  transform: translateY(var(--par, 0px)) rotate(var(--rot, 0deg));
  filter: brightness(var(--stack-dim, 1));
}
#work .grid-phone .proj-cta { opacity: 1; transform: none; left: 50%; translate: -50% 0; bottom: 18px; }
#work .grid-phone .proj-badge { top: 16px; left: 16px; }
#work .grid-phone .proj { padding-top: calc(var(--header-h) + 16px); padding-bottom: 20px; }

#work .grid-phone .proj-name, #work .grid-phone .proj-cat, #work .grid-phone .proj-desc, #work .grid-phone .proj-num {
  transform: translateY(44px); opacity: 0; transition: transform 1.1s var(--ease), opacity 1s ease;
}
#work .grid-phone .proj.is-live .proj-name, #work .grid-phone .proj.is-live .proj-cat,
#work .grid-phone .proj.is-live .proj-desc, #work .grid-phone .proj.is-live .proj-num { transform: none; opacity: 1; }
#work .grid-phone .proj.is-live .proj-cat { transition-delay: .12s; }
#work .grid-phone .proj.is-live .proj-desc { transition-delay: .22s; }

@media (max-width: 860px) {
  #work .grid-phone .proj { grid-template-columns: 1fr; grid-template-rows: auto auto minmax(0, 1fr); row-gap: 12px; }
  #work .grid-phone .proj-info { grid-row: 1; }
  #work .grid-phone .proj-name { font-size: clamp(38px, 11vw, 64px); }
  #work .grid-phone .proj-cat { margin-top: 8px; }
  #work .grid-phone .proj-desc { grid-row: 2; font-size: 13px; }
  #work .grid-phone .proj-media { grid-column: 1; grid-row: 3; height: 100%; max-height: none; align-self: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  #work .grid-phone .proj { position: relative; transform: none; }
  #work .grid-phone .proj * { transform: none !important; opacity: 1 !important; }
}

/* ---------- Card polish ---------- */
.proj-media { border-radius: 4px; isolation: isolate; }
.proj-media::after {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.5), transparent 45%);
  opacity: 0; transition: opacity .5s var(--ease);
}
.proj:hover .proj-media::after, .proj-media.is-playing::after { opacity: 1; }
@media (hover: hover) {
  .proj-cta { transform: translateY(12px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease); }
  .proj:hover .proj-cta { transform: none; opacity: 1; }
}
.proj-name { font-size: clamp(14px, 1.2vw, 18px); }

.js-reveal .proj-media { clip-path: inset(10% 6% 0 6% round 4px); transition: clip-path 1.2s var(--ease); }
.js-reveal .proj-media.is-shown { clip-path: inset(0 0 0 0 round 4px); }
.js-reveal .proj-media img { transform: scale(1.15); }
.js-reveal .proj-media.is-shown img { transform: scale(1.01); }

/* ---------- Dashboards: sticky stack ---------- */
#work .grid-desk { display: block; }
#work .grid-desk .proj {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  width: 100%;
  margin-bottom: clamp(40px, 8vh, 90px);
  background: var(--ink);
  color: var(--white);
  padding: clamp(12px, 1.4vw, 20px);
  border-radius: 6px;
  transform-origin: center top;
  transform: scale(var(--stack-scale, 1));
  box-shadow: 0 -20px 60px rgba(0,0,0,.18);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  grid-template-rows: auto 1fr;
  gap: 16px clamp(18px, 2.4vw, 36px);
}
#work .grid-desk .proj.in { transform: scale(var(--stack-scale, 1)); }
#work .grid-desk .proj:last-child { margin-bottom: 0; }
#work .grid-desk .proj-media {
  grid-row: 1 / span 2;
  aspect-ratio: 16 / 9;
  max-height: 66vh;
  width: 100%;
  background: var(--ink-3);
  filter: brightness(var(--stack-dim, 1));
}
#work .grid-desk .proj-info { border-top-color: var(--line-dark); flex-direction: column-reverse; align-items: flex-start; gap: 18px; }
#work .grid-desk .proj-num { font-size: clamp(40px, 5vw, 80px); font-weight: 600; letter-spacing: -0.05em; color: var(--white); line-height: 1; }
#work .grid-desk .proj-name { font-size: clamp(20px, 2vw, 30px); text-transform: none; letter-spacing: -0.02em; }
#work .grid-desk .proj-cat, #work .grid-desk .proj-desc { color: var(--gray-2); }
#work .grid-desk .proj-desc { align-self: end; font-size: 14px; }
@media (max-width: 860px) {
  #work .grid-desk .proj { grid-template-columns: 1fr; grid-template-rows: auto; top: calc(var(--header-h) + 12px); }
  #work .grid-desk .proj-media { grid-row: auto; }
  #work .grid-desk .proj-info { flex-direction: row-reverse; justify-content: space-between; align-items: baseline; width: 100%; }
  #work .grid-desk .proj-num { font-size: 34px; }
}

/* ---------- Site-wide editorial pass ---------- */
.hero-title { font-size: clamp(54px, 9vw, 150px); letter-spacing: -0.055em; line-height: 0.88; }
.hero-role { font-size: 13px; }

.sec-head:not(.about-top) {
  text-align: left;
  justify-items: start;
  max-width: none;
  grid-template-columns: 1fr auto;
  align-items: end;
  column-gap: 40px;
}
.sec-head .kicker { grid-column: 1 / -1; }
.sec-head .kicker::before { content: ""; display: inline-block; width: 28px; height: 1px; background: currentColor; vertical-align: middle; margin-right: 12px; }
.h-display { font-size: clamp(38px, 6.4vw, 104px); letter-spacing: -0.05em; line-height: 0.92; }
.sec-head p { max-width: 360px; text-align: left; }
@media (max-width: 760px) { .sec-head:not(.about-top) { grid-template-columns: 1fr; } }

/* Hairline between sections, like an editorial index */
.sec + .sec:not(.dark) { border-top: 1px solid var(--line); }

/* Rounded top edge on dark blocks so they slide over the light ones */
.sec.dark, .dark.contact { border-radius: clamp(16px, 2.4vw, 32px) clamp(16px, 2.4vw, 32px) 0 0; position: relative; z-index: 1; }

/* Scroll progress line */
.scroll-line { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 1000; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); pointer-events: none; mix-blend-mode: difference; filter: invert(1); }

/* AI cards get the same lift on hover */
@media (hover: hover) {
  .grid-ai .proj-media { transition: transform .6s var(--ease); }
  .grid-ai .proj:hover .proj-media { transform: translateY(-6px); }
}

html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

/* ---------- Exact media ratios: never crop a preview ---------- */
.proj-media { aspect-ratio: 430 / 930 !important; }
.grid-desk .proj-media, #work .grid-desk .proj-media { aspect-ratio: 16 / 10 !important; }
.proj-media img, .proj-media video { object-fit: contain !important; object-position: center !important; }
.proj-media img, .js-reveal .proj-media img, .js-reveal .proj-media.is-shown img,
.proj:hover .proj-media img { transform: none !important; }
.js-reveal .proj-media { clip-path: inset(6% 0 0 0 round 4px); }
#work .grid-desk .proj-media { max-height: none; height: auto; width: min(100%, calc((100svh - var(--header-h) - 90px) * 1.6)); }
@media (max-width: 860px) {
  #work .grid-phone .proj { grid-template-rows: auto auto auto; align-content: start; }
  #work .grid-phone .proj-media {
    height: calc(100svh - var(--header-h) - var(--txt, 200px) - 60px);
    min-height: 0; width: auto; max-width: 100%; justify-self: center; align-self: start;
  }
}
#work .proj-media[data-href] { cursor: pointer; }

/* Reviews: show the whole screenshot */
.fb-frame { aspect-ratio: 722 / 1600; }
.fb-frame img { object-fit: contain; object-position: center; }
.fb-card:hover .fb-frame img { transform: none; }

/* ---------- Website panels v4: text beside (desktop) or above (phone)
   the video, never on top of it. Video as tall as the screen allows. ---------- */
#work .grid-phone .proj {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: clamp(32px, 6vw, 120px);
  row-gap: 22px;
  align-items: center;
  padding: calc(var(--header-h) + 14px) var(--gutter) 18px;
}
#work .grid-phone .proj-media {
  grid-column: 2; grid-row: 1 / -1; z-index: 2;
  height: calc(100svh - var(--header-h) - 32px) !important;
  width: auto !important; max-width: 100%;
  justify-self: end; align-self: center;
}
#work .grid-phone .proj-info {
  grid-column: 1; grid-row: 2; position: static; z-index: 1;
  display: flex; flex-direction: column-reverse; align-items: flex-start; gap: 18px;
  text-align: left; pointer-events: auto; padding: 0; width: auto;
}
#work .grid-phone .proj-name {
  font-size: clamp(48px, 7.4vw, 140px); line-height: .88; letter-spacing: -0.055em; color: var(--ink);
}
#work .grid-phone .proj-num,
#work .grid-phone .proj-cat { position: static; display: block; font-size: 12px; letter-spacing: .2em; color: var(--gray); }
#work .grid-phone .proj-cat { margin-top: 16px; text-transform: uppercase; }
#work .grid-phone .proj-desc {
  position: static; grid-column: 1; grid-row: 3; display: block;
  max-width: 420px; font-size: 15px; color: #4a4a4a;
}
#work .grid-phone .proj-cta {
  left: 50%; bottom: 20px; translate: -50% 0;
  height: 40px; padding: 0 18px; font-size: 11px; letter-spacing: .14em; white-space: nowrap;
}
#work .grid-phone .proj-cta .icon { width: 14px; height: 14px; }

@media (max-width: 860px) {
  #work .grid-phone .proj {
    grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr);
    row-gap: 12px; align-items: start;
    padding: calc(var(--header-h) + 10px) 14px 12px;
  }
  #work .grid-phone .proj-info { grid-column: 1; grid-row: 1; gap: 6px; }
  #work .grid-phone .proj-name { font-size: clamp(28px, 8.5vw, 44px); line-height: .95; }
  #work .grid-phone .proj-num, #work .grid-phone .proj-cat { font-size: 10px; }
  #work .grid-phone .proj-cat { margin-top: 6px; }
  #work .grid-phone .proj-desc { display: none !important; }
  #work .grid-phone .proj-media {
    grid-column: 1; grid-row: 2; justify-self: center; align-self: stretch;
    height: 100% !important; min-height: 0;
  }
  #work .grid-phone .proj-media::after { opacity: 0; }
  #work .grid-phone .proj-cta { bottom: 14px; height: 36px; font-size: 10px; }
}

/* ---------- Cursor follower ---------- */
.view-cursor {
  position: fixed; left: 0; top: 0; z-index: 999; pointer-events: none;
  width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%;
  background: var(--white); color: var(--ink);
  display: grid; place-items: center;
  font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  transform: translate3d(var(--x, -200px), var(--y, -200px), 0) scale(0);
  transition: transform .4s var(--ease);
}
.view-cursor.on { transform: translate3d(var(--x), var(--y), 0) scale(1); }

@media (prefers-reduced-motion: reduce) {
  .work-marquee__track { animation: none; }
  .js-reveal .proj-media, .js-reveal .proj-media img { clip-path: none; transform: none; }
  #work .grid-desk .proj { position: relative; top: 0; transform: none; }
}
