/* ==========================================================
   Michal Erez — Portfolio 2026
   Built from Figma file "project-2" / New Website
   ========================================================== */

:root {
  color-scheme: light;
  --ink: #322a2a;
  --muted: #706b6b;
  --grey: #8f8f8f;
  --line: #e3e3e3;
  --card: #f1f3f9;
  --bg: #ffffff;
  --focus: #322a2a;

  --f-display: "Bricolage Grotesque", system-ui, sans-serif;
  --f-body: "DM Sans", system-ui, sans-serif;
  --f-mono: "Space Mono", ui-monospace, monospace;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --gutter: 32px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; border-radius: 4px; }

.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  padding: 10px 16px; border-radius: 999px;
  background: var(--ink); color: #fff;
  font: 400 14px/1 var(--f-display);
  transform: translateY(-160%); transition: transform .3s var(--ease-out);
}
.skip:focus-visible { transform: none; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  height: 105px; padding: 0 56px 0 var(--gutter);
  background: rgba(255, 255, 255, 0);
  transition: background .35s ease, height .35s var(--ease-out), box-shadow .35s ease, backdrop-filter .35s ease;
}
.nav--case { height: 118px; }
.nav.is-scrolled {
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 1px 0 rgba(50, 42, 42, .08);
  height: 76px;
}
.nav__item {
  font: 400 16px/64px var(--f-display);
  font-variation-settings: "opsz" 14, "wdth" 100;
  white-space: nowrap;
}
.nav__brand { justify-self: start; display: inline-flex; align-items: center; gap: 16px; color: var(--ink); }
.nav__center { justify-self: center; }
.nav__right { justify-self: end; color: var(--muted); }

/* underline state for text links */
.ulink { position: relative; display: inline-block; line-height: 1.2; padding: 4px 0; }
.ulink::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
@media (hover: hover) {
  .ulink:hover::after { transform: scaleX(1); transform-origin: left; }
}
.ulink[aria-current="page"]::after { transform: scaleX(1); }
.ulink:active { opacity: .6; }

/* ---------- Logo mark ---------- */
.mark { display: block; width: 76.859px; height: 76.859px; flex: none; overflow: visible; }
.mark-bg { fill: var(--ink); transform-origin: 50% 50%; transition: transform .5s var(--ease-out); }
.mark-sig { color: #ffffff; }
.mark-sig path { transition: transform .5s var(--ease-out); }
.mark-link { display: inline-flex; border-radius: 50%; }
@media (hover: hover) {
  .mark-link:hover .mark-bg, .nav__brand:hover .mark-bg { transform: scale(1.06); }
  .mark-link:hover .mark-sig, .nav__brand:hover .mark-sig { animation: wiggle .6s var(--ease-out); }
}
.mark-link:active .mark-bg, .nav__brand:active .mark-bg { transform: scale(.94); }
@keyframes wiggle { 0%,100% { transform: translate(14.588px, 21.382px) rotate(0); } 35% { transform: translate(14.588px, 21.382px) rotate(-5deg); } 70% { transform: translate(14.588px, 21.382px) rotate(3deg); } }
.mark-sig { transform-box: fill-box; transform-origin: 50% 60%; }

/* signature "writing" reveal on load */
.is-intro .mark-sig { clip-path: inset(0 100% 0 0); }
.is-loaded .mark-sig { clip-path: inset(0 0 0 0); transition: clip-path 1.2s var(--ease-io) .35s; }
.is-intro .mark-bg { transform: scale(.4); opacity: 0; }
.is-loaded .mark-bg { transform: scale(1); opacity: 1; transition: transform .8s var(--ease-out) .1s, opacity .5s ease .1s; }

/* ---------- Home ---------- */
.home { width: min(1140px, 100% - 2 * var(--gutter)); margin: 0 auto; padding: 80px 0 140px; }
.hero { width: min(992px, 100%); margin: 0 auto; display: flex; flex-direction: column; align-items: center; gap: 21px; }
.hero__mark { height: 85px; display: flex; align-items: center; justify-content: center; }
.hero__text { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 27px; padding-bottom: 60px; text-align: center; }
.hero__title {
  margin: 0;
  font: 800 45px/64px var(--f-display);
  font-variation-settings: "opsz" 96, "wdth" 100;
  color: var(--ink);
}
.hero__intro {
  margin: 0 auto; max-width: 926.8px;
  font: 300 36px/45px var(--f-body);
  font-variation-settings: "opsz" 14;
  color: var(--muted);
}
.w { display: inline-block; }
.is-intro .w { opacity: 0; transform: translateY(.45em); filter: blur(6px); }
.is-loaded .w {
  opacity: 1; transform: none; filter: blur(0);
  transition: opacity .7s ease, transform .9s var(--ease-out), filter .7s ease;
  transition-delay: calc(var(--i) * 28ms + .45s);
}

.work { width: min(990px, 100%); margin: 100px auto 0; scroll-margin-top: 110px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 50px; row-gap: 48px; }

/* Project tile + its states */
.tile { display: flex; flex-direction: column; gap: 24px; color: inherit; position: relative; outline: none; }
.tile__media {
  position: relative; aspect-ratio: 470 / 466; border-radius: 16px; overflow: hidden;
  background: var(--card);
  transform: translateZ(0);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), border-radius .6s var(--ease-out);
}
.tile__media--black { background: #0a0a0a; }
.tile__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out), filter .6s ease; }
.tile__label {
  display: flex; align-items: center; gap: 10px; min-height: 24px;
  font-size: 16px; line-height: 24px; color: var(--muted);
}
.tile__label--display { font-family: var(--f-display); font-variation-settings: "opsz" 14, "wdth" 100; }
.tile__label--body { font-family: var(--f-body); color: var(--grey); }
.tile__label .upper { text-transform: uppercase; }
.tile__arrow {
  display: inline-block; width: 18px; height: 18px; flex: none;
  opacity: 0; transform: translateX(-8px);
  transition: opacity .35s ease, transform .5s var(--ease-out);
}
.tile__soon {
  font: 400 11px/1 var(--f-mono); letter-spacing: .02em; text-transform: uppercase;
  color: var(--grey); border: 1px solid var(--line); border-radius: 999px; padding: 5px 8px 4px;
  opacity: 0; transform: translateX(-6px); transition: opacity .35s ease, transform .5s var(--ease-out);
}

/* cursor-follow pill (desktop) */
.tile__pill {
  position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none;
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 999px;
  background: rgba(255, 255, 255, .92); color: var(--ink);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(20, 12, 12, .18);
  font: 400 14px/1 var(--f-display); font-variation-settings: "opsz" 14, "wdth" 100; white-space: nowrap;
  opacity: 0; transform: translate(var(--px, 50%), var(--py, 50%)) translate(-50%, -50%) scale(.6);
  transition: opacity .3s ease, transform .18s linear;
}
.tile__media--black .tile__pill, .tile.is-soon .tile__pill { background: rgba(50, 42, 42, .9); color: #fff; }
.tile__pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (hover: hover) and (pointer: fine) {
  .tile:hover .tile__media { transform: translateY(-6px); box-shadow: 0 24px 50px -24px rgba(50, 42, 42, .45); }
  .tile:hover .tile__media img { transform: scale(1.045); }
  .tile:hover .tile__arrow, .tile:hover .tile__soon { opacity: 1; transform: none; }
  .tile:hover .tile__label { color: var(--ink); }
  .tile:hover .tile__pill { opacity: 1; transform: translate(var(--px, 50%), var(--py, 50%)) translate(-50%, -50%) scale(1); }
  .tile__media { cursor: none; }
  .grid:hover .tile:not(:hover) .tile__media img { filter: saturate(.7) brightness(.97); }
}
.tile:focus-visible .tile__media { outline: 2px solid var(--focus); outline-offset: 6px; }
.tile:focus-visible .tile__arrow, .tile:focus-visible .tile__soon { opacity: 1; transform: none; }
.tile:active .tile__media { transform: scale(.985); transition-duration: .15s; }
@media (hover: none) { .tile__arrow { opacity: .55; transform: none; } .tile__soon { opacity: 1; transform: none; } }

/* ---------- Case study ---------- */
.case { width: min(1140px, 100% - 2 * var(--gutter)); margin: 0 auto; padding-top: 80px; display: flex; flex-direction: column; gap: 20px; }
.overview { display: flex; justify-content: space-between; align-items: flex-start; gap: 48px; padding-bottom: 60px; }
.overview__title { display: flex; flex-direction: column; gap: 24px; width: 582px; max-width: 100%; }
.overview__title--narrow { width: 520px; }
.overview__logo { display: block; height: auto; }
.overview__intro { margin: 0; font: 400 16px/24px var(--f-body); font-variation-settings: "opsz" 14; color: var(--grey); white-space: pre-line; }

.details { width: 424px; flex: none; margin: 0; }
/* first details row lines up with the first line of the intro paragraph:
   logo height + 24px gap + half the intro line (12px) − half a row (23px) */
.overview .details { margin-top: calc(var(--logo-h, 0px) + 13px); }
.details__row {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  height: 46px; padding: 13px 0;
  font: 400 14px/1.2 var(--f-display); font-variation-settings: "opsz" 14, "wdth" 100;
}
.details__row::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--line);
  transform-origin: left; transition: transform 1s var(--ease-out), background .3s ease;
}
.details__row dt { color: var(--ink); }
.details__row dd { margin: 0; color: var(--muted); text-align: right; transition: color .3s ease, transform .4s var(--ease-out); }
@media (hover: hover) {
  .details__row:hover::after { background: var(--ink); }
  .details__row:hover dd { color: var(--ink); transform: translateX(-4px); }
}
.is-intro .details__row::after { transform: scaleX(0); }
.is-loaded .details__row::after { transform: scaleX(1); transition-delay: calc(var(--i) * 90ms + .5s); }
.is-intro .details__row > * { opacity: 0; transform: translateY(8px); }
.is-loaded .details__row > * { opacity: 1; transform: none; transition: opacity .6s ease, transform .7s var(--ease-out), color .3s ease; transition-delay: calc(var(--i) * 90ms + .55s); }
.is-intro .overview__title > * { opacity: 0; transform: translateY(14px); }
.is-loaded .overview__title > * { opacity: 1; transform: none; transition: opacity .8s ease, transform 1s var(--ease-out); }
.is-loaded .overview__title > *:nth-child(2) { transition-delay: .15s; }

/* Experiment: more breathing room between blocks (Lili) */
.case--airy { gap: 48px; }
.case--airy .overview { padding-bottom: 32px; }

/* Media blocks */
.block { position: relative; margin: 0; border-radius: var(--r, 20px); overflow: hidden; }
.block img { width: 100%; }
.block--zoom { cursor: zoom-in; }
.block--zoom img { transition: transform 1.1s var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .block--zoom:hover img { transform: scale(1.012); }
  .block--zoom::after {
    content: "+"; position: absolute; right: 18px; bottom: 18px; width: 40px; height: 40px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(255, 255, 255, .9); color: var(--ink);
    font: 300 24px/1 var(--f-body); box-shadow: 0 6px 20px rgba(0,0,0,.15);
    opacity: 0; transform: scale(.6); transition: opacity .3s ease, transform .45s var(--ease-out);
  }
  .block--zoom:hover::after { opacity: 1; transform: none; }
}
.block--zoom:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
.block--zoom:active img { transform: scale(.995); }

.pair { display: grid; gap: 20px; grid-template-columns: 1fr 1fr; }
.pair--seam { gap: 0; border-radius: 20px; overflow: hidden; grid-template-columns: 496fr 644fr; }
.pair--seam .block { border-radius: 0; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.split__half { display: block; border-radius: 20px; overflow: hidden; aspect-ratio: 570 / 638; background-size: 200% 100%; background-repeat: no-repeat; }
.split__half--l { background-position: 0 0; }
.split__half--r { background-position: 100% 0; }
.split__half--own { background-size: 100% 100%; background-position: 0 0; }

/* Scroll reveal */
[data-reveal] { will-change: transform, opacity; }
.js [data-reveal] { opacity: 0; transform: translateY(40px); clip-path: inset(6% 0 0 0 round var(--r, 20px)); }
.js [data-reveal].is-in {
  opacity: 1; transform: none; clip-path: inset(0 0 0 0 round var(--r, 20px));
  transition: opacity .9s ease, transform 1.1s var(--ease-out), clip-path 1.2s var(--ease-out);
  transition-delay: var(--d, 0s);
}
.js .tile[data-reveal] { clip-path: none; }

/* Video blocks: real video over its exact Figma rectangle, poster image beneath */
.block__video { position: absolute; object-fit: fill; opacity: 0; transition: opacity .6s ease; pointer-events: none; }
.block__video.is-playing { opacity: 1; }
.block__video--cover { object-fit: cover; }

/* Lottie animation inside a design slot (Lili mobile recording) */
.split__half { position: relative; }
.lottie-slot { position: absolute; overflow: hidden; background: #f6f7fa; opacity: 0; transition: opacity .5s ease; }
.lottie-slot.is-ready { opacity: 1; }
.lottie-slot svg { display: block; width: 100% !important; height: 100% !important; }

/* Animated confetti layer (Meitav) */
.block--confetti { cursor: pointer; }
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* Next case + footer */
.next {
  margin-top: 100px; padding: 28px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; overflow: hidden; position: relative;
}
.next__k { font: 400 12px/1 var(--f-mono); color: var(--grey); text-transform: uppercase; }
.next__name { font: 800 45px/1.1 var(--f-display); font-variation-settings: "opsz" 96, "wdth" 100; color: var(--ink); display: inline-flex; align-items: center; gap: 18px; }
.next__name svg { width: 34px; height: 34px; transition: transform .6s var(--ease-out); }
.next__thumb {
  position: absolute; right: 90px; top: 50%; width: 150px; aspect-ratio: 470/466; border-radius: 12px; overflow: hidden;
  transform: translateY(-50%) rotate(6deg) scale(.6); opacity: 0; transition: transform .6s var(--ease-out), opacity .4s ease; pointer-events: none;
}
.next__thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (hover: hover) {
  .next:hover .next__name svg { transform: translateX(10px) rotate(-45deg); }
  .next:hover .next__thumb { opacity: 1; transform: translateY(-50%) rotate(-4deg) scale(1); }
}
.next:active { opacity: .7; }

.footer { padding: 80px 0 120px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.footer__credit { font: 400 12px/18px var(--f-mono); color: var(--grey); }
.footer__top { font: 400 12px/18px var(--f-mono); color: var(--grey); display: inline-flex; gap: 8px; align-items: center; transition: color .3s ease; }
.footer__top svg { transition: transform .4s var(--ease-out); }
@media (hover: hover) { .footer__top:hover { color: var(--ink); } .footer__top:hover svg { transform: translateY(-3px); } }

/* Progress bar on case pages */
.progress { position: fixed; left: 0; top: 0; height: 2px; width: 100%; z-index: 60; background: var(--ink); transform-origin: left; transform: scaleX(var(--p, 0)); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 90;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-radius: 999px; background: var(--ink); color: #fff;
  font: 400 14px/1 var(--f-display); font-variation-settings: "opsz" 14, "wdth" 100;
  box-shadow: 0 18px 40px rgba(20, 12, 12, .25);
  transform: translate(-50%, 140%); opacity: 0; transition: transform .5s var(--ease-out), opacity .3s ease;
}
.toast.is-on { transform: translate(-50%, 0); opacity: 1; }
.toast .dot { width: 7px; height: 7px; border-radius: 50%; background: #00bc6e; animation: pulse 1.4s ease infinite; }
@keyframes pulse { 50% { opacity: .3; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 48px;
  background: rgba(20, 16, 16, .86); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; visibility: hidden; transition: opacity .35s ease, visibility 0s linear .35s;
  cursor: zoom-out;
}
.lightbox.is-on { opacity: 1; visibility: visible; transition: opacity .35s ease; }
.lightbox img { max-width: 100%; max-height: 100%; width: auto; border-radius: 14px; transform: scale(.94); transition: transform .5s var(--ease-out); box-shadow: 0 30px 80px rgba(0,0,0,.4); }
.lightbox.is-on img { transform: none; }
.lightbox__close {
  position: absolute; top: 20px; right: 20px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff; display: grid; place-items: center; transition: background .3s ease, transform .3s var(--ease-out);
}
.lightbox__close:hover { background: rgba(255,255,255,.24); transform: rotate(90deg); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .nav { padding-right: var(--gutter); }
}
@media (max-width: 960px) {
  .overview { flex-direction: column; gap: 40px; padding-bottom: 40px; }
  .overview__title, .overview__title--narrow { width: 100%; max-width: 640px; }
  .details { width: 100%; }
  .overview .details { margin-top: 0; }
  .hero__title { font-size: 40px; line-height: 52px; }
  .hero__intro { font-size: 30px; line-height: 39px; }
  .grid { column-gap: 28px; }
}
@media (max-width: 720px) {
  :root { --gutter: 20px; }
  .nav, .nav--case { height: 72px; padding: 0 var(--gutter); }
  .nav.is-scrolled { height: 60px; }
  .nav__item { font-size: 13px; line-height: 40px; }
  .nav__brand { gap: 10px; }
  .nav .mark { width: 40px; height: 40px; }

  .home { padding-top: 32px; padding-bottom: 80px; }
  .hero { gap: 16px; }
  .hero__mark .mark { width: 60px; height: 60px; }
  .hero__mark { height: 66px; }
  .hero__text { gap: 16px; padding-bottom: 20px; }
  .hero__title { font-size: 32px; line-height: 40px; }
  .hero__intro { font-size: 22px; line-height: 30px; }
  .work { margin-top: 48px; }
  .grid { grid-template-columns: 1fr; row-gap: 36px; }
  .tile { gap: 14px; }

  .case { padding-top: 32px; gap: 12px; }
  .case--airy { gap: 24px; }
  .case--airy .overview { padding-bottom: 16px; }
  .overview__logo { max-width: 70%; }
  .details__row { font-size: 12.5px; height: auto; min-height: 44px; }
  .pair { grid-template-columns: 1fr; gap: 12px; }
  .pair--seam { grid-template-columns: 1fr; gap: 0; border-radius: 20px; background: #dce0e0; }
  .pair--seam .block--seam-a { border-radius: 20px 0 0 20px; }

  .split { grid-template-columns: 1fr; gap: 12px; }

  .next { margin-top: 56px; padding: 22px 0; }
  .next__name { font-size: 30px; gap: 12px; }
  .next__name svg { width: 24px; height: 24px; }
  .next__thumb { display: none; }
  .footer { padding: 48px 0 64px; flex-direction: column; align-items: flex-start; }
  .lightbox { padding: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal] { opacity: 1; transform: none; clip-path: none; }
  .is-intro .w, .is-intro .overview__title > *, .is-intro .details__row > * { opacity: 1; transform: none; filter: none; }
  .is-intro .mark-sig { clip-path: none; }
  .is-intro .mark-bg { transform: none; opacity: 1; }
  html { scroll-behavior: auto; }
}

/* ---------- Hero: LinkedIn link ---------- */
.hero__link {
  font: 400 16px/1 var(--f-display); font-variation-settings: "opsz" 14, "wdth" 100; color: var(--ink);
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 2px;
  border-bottom: 1px solid var(--line); transition: border-color .3s ease, gap .3s var(--ease-out);
}
.hero__link .ext, .contact__link .ext { width: 9px; height: 9px; transition: transform .35s var(--ease-out); }
.is-intro .hero__link { opacity: 0; transform: translateY(8px); }
.is-loaded .hero__link { opacity: 1; transform: none; transition: opacity .6s ease 1.1s, transform .8s var(--ease-out) 1.1s, border-color .3s ease; }
@media (hover: hover) {
  .hero__link:hover { border-color: var(--ink); }
  .hero__link:hover .ext, .contact__link:hover .ext { transform: translate(2px, -2px); }
}
.hero__link:focus-visible, .contact a:focus-visible, .contact button:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 4px; }

/* ---------- Contact footer ---------- */
.contact { margin-top: 120px; padding: 72px 0 40px; border-top: 1px solid var(--line); color: var(--ink); }
.case .contact { margin-top: 24px; }
.contact__lead {
  margin: 0; max-width: 19em;
  font: 300 32px/40px var(--f-body); font-variation-settings: "opsz" 14; color: var(--ink);
  opacity: 0; transform: translateY(16px); transition: opacity .8s ease, transform 1s var(--ease-out);
}
.contact.is-in .contact__lead { opacity: 1; transform: none; }

.contact__mail { position: relative; display: block; margin-top: 96px; color: var(--ink); text-decoration: none; }
.contact__line {
  display: inline-block; white-space: nowrap; overflow: hidden; padding: .06em 0 .1em; margin: -.06em 0 -.1em;
  font: 800 100px/.92 var(--f-display); font-variation-settings: "opsz" 96, "wdth" 100; letter-spacing: -.045em;
}
.ch { display: inline-block; transform: translateY(110%); transition: transform .9s var(--ease-out) calc(var(--i) * 22ms); }
.contact.is-in .ch { transform: none; }
.ch--mark { padding: 0 .015em 0 .03em; vertical-align: top; }
.ch--mark .mark {
  width: .74em; height: .74em; margin-top: .14em;
  transform: rotate(-200deg) scale(.5); transition: transform 1.2s var(--ease-out) .35s;
}
.contact.is-in .ch--mark .mark { transform: none; }
/* the hero intro hides marks until load; the footer mark is always drawn */
.contact .mark-sig { clip-path: none !important; }
.contact .mark-bg { transform: none !important; opacity: 1 !important; }
.contact__mail::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -10px; height: 3px; background: var(--ink);
  transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease-out);
}
@media (hover: hover) {
  .contact__mail:hover::after { transform: scaleX(1); transform-origin: left; }
  .contact.is-in .contact__mail:hover .ch--mark .mark { transform: rotate(-18deg) scale(1.06); transition-delay: 0s; transition-duration: .5s; }
  .contact.is-in .contact__mail:hover .mark-sig { animation: wiggle .6s var(--ease-out); }
}
.contact__mail:active .contact__line { opacity: .7; }

.contact__meta {
  margin-top: 40px; display: grid; grid-template-columns: repeat(4, auto); justify-content: space-between; align-items: center; gap: 12px 24px;
  font: 400 15px/1.3 var(--f-display); font-variation-settings: "opsz" 14, "wdth" 100;
  opacity: 0; transition: opacity .8s ease .6s;
}
.contact.is-in .contact__meta { opacity: 1; }
.contact__cell { white-space: nowrap; }
.contact__link {
  color: var(--ink); font: inherit; background: none; border: 0; padding: 0; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px;
  border-bottom: 1px dotted var(--grey); transition: border-color .3s ease, color .3s ease;
}
.contact__copy.is-done { color: #2e7d4f; border-bottom-color: #2e7d4f; }
.contact__top { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); }
.contact__top svg { transition: transform .4s var(--ease-out); }
@media (hover: hover) {
  .contact__link:hover { border-bottom: 1px solid var(--ink); }
  .contact__top:hover svg { transform: translateY(-3px); }
}
.contact__link:active, .contact__top:active { opacity: .6; }

@media (max-width: 720px) {
  .contact { margin-top: 64px; padding: 48px 0 32px; }
  .contact__lead { font-size: 22px; line-height: 30px; }
  .contact__mail { margin-top: 48px; }
  .contact__mail::after { height: 2px; bottom: -6px; }
  .contact__meta { grid-template-columns: 1fr 1fr; justify-content: stretch; font-size: 14px; margin-top: 28px; }
  .contact__meta > :nth-child(even) { justify-self: end; }
  .hero__link { font-size: 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .ch, .ch--mark .mark, .contact__lead, .contact__meta { transition: none !important; transform: none !important; opacity: 1 !important; }
}
/* the footer animates its own parts; skip the generic block reveal (its rounded clip ate the divider ends) */
.js .contact[data-reveal], .js .contact[data-reveal].is-in { opacity: 1; transform: none; clip-path: none; }
.case .contact { border-top: 0; margin-top: 0; padding-top: 40px; }
/* very narrow phones (under 340px): footer details stack in one column */
@media (max-width: 340px) {
  .contact__meta { grid-template-columns: 1fr; }
  .contact__meta > :nth-child(even) { justify-self: start; }
  .nav__item { font-size: 12px; }
}

/* ---------- Nav links: Work / Contact ---------- */
/* four items spread evenly from the logo to "2026 / PORTFOLIO" */
.nav { display: flex; justify-content: space-between; }
.nav__links { display: contents; }
.nav__link { color: var(--ink); line-height: 1.2; }
.nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.nav__link:active { opacity: .6; }
.nav__link:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 2px; }
#contact { scroll-margin-top: 40px; }
@media (max-width: 720px) {
  .nav__right .yr { display: none; }
}
@media (max-width: 520px) {
  .nav__right { display: none; }
}
/* very narrow phones (under 340px): footer details stack in one column */
@media (max-width: 340px) {
  .contact__meta { grid-template-columns: 1fr; }
  .contact__meta > :nth-child(even) { justify-self: start; }
  .nav__item { font-size: 12px; }
}

