/* Homepage — the portfolio's opening movement, aligned with About and case stories. */

body.home-revamp {
  --hp-paper: #f2f1ec;
  --hp-ink: #111411;
  --hp-muted: #666b64;
  --hp-line: rgba(17, 20, 17, 0.16);
  --hp-green: #17684f;
  --hp-yellow: #f5d526;
  --hp-progress: 0;
  background: var(--hp-paper);
  color: var(--hp-ink);
  font-family: "Mozilla Headline", Arial, sans-serif;
}

body.home-revamp main { overflow: clip; }
body.home-revamp .editorial-header nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

.hp-hero,
.hp-proof,
.hp-work,
.hp-approach,
.hp-profile,
.hp-lab { position: relative; width: 100%; border-bottom: 1px solid var(--hp-line); }

.hp-meta,
.hp-kicker,
.hp-work-intro > div > span,
.hp-approach-copy > span,
.hp-profile-copy > span,
.hp-lab-head > span {
  font-size: 0.67rem;
  font-stretch: 80%;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.hp-hero {
  min-height: max(880px, 100svh);
  display: flex;
  flex-direction: column;
  padding: 104px max(4vw, 48px) 42px;
  background: var(--hp-paper);
}

.hp-meta {
  min-height: 66px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  padding: 0 20px;
  border: 1px solid rgba(23, 104, 79, 0.24);
  background: rgba(23, 104, 79, 0.08);
  color: #164f3f;
}

.hp-meta span:last-child { text-align: right; }

.hp-hero-grid {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(410px, 0.88fr);
  align-items: center;
  gap: clamp(48px, 6vw, 120px);
  padding: clamp(50px, 7vh, 96px) 0 64px;
}

.hp-hero-copy { position: relative; z-index: 4; }
.hp-kicker { display: flex; align-items: center; gap: 12px; margin: 0; color: var(--hp-green); }
.hp-kicker > span { width: 32px; height: 2px; background: var(--hp-green); }

.hp-hero h1 {
  max-width: 1120px;
  margin: 26px 0 0;
  font-size: clamp(5rem, 7.7vw, 9.5rem);
  font-stretch: 112%;
  font-weight: 345;
  letter-spacing: -0.066em;
  line-height: 0.77;
}

.hp-title-line { display: block; overflow: hidden; padding: 0.1em 0 0.08em; }
.hp-title-line > span {
  display: block;
  transform: translateY(calc((1 - var(--hp-progress)) * 112%));
  transition: transform 950ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hp-title-line:nth-child(2) > span { transition-delay: 75ms; }
.hp-title-line:nth-child(3) > span { transition-delay: 150ms; }
.hp-title-accent { color: var(--hp-green); }

.hp-intro { max-width: 610px; margin-top: clamp(36px, 5vh, 64px); }
.hp-intro > p { margin: 0; color: #3f443e; font-size: clamp(1.08rem, 1.35vw, 1.45rem); font-stretch: 92%; line-height: 1.5; }
.hp-hero-actions { display: flex; flex-wrap: wrap; gap: 26px; margin-top: 34px; }
.hp-hero-actions a,
.hp-project-link,
.hp-approach-copy > a,
.hp-profile-copy > a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0 0 8px;
  border-bottom: 1px solid currentColor;
  font-size: 0.74rem;
  font-stretch: 84%;
  font-weight: 650;
  letter-spacing: 0.035em;
  text-decoration: none;
}
.hp-hero-actions a:first-child { color: var(--hp-green); }

.hp-hero-reel { position: relative; height: min(64vh, 620px); min-height: 520px; perspective: 1200px; }
.hp-reel-card {
  position: absolute;
  width: min(31vw, 500px);
  overflow: hidden;
  border: 1px solid rgba(17, 20, 17, 0.42);
  background: var(--hp-paper);
  color: var(--hp-ink);
  box-shadow: 18px 22px 0 rgba(17, 20, 17, 0.08);
  transform: translate3d(var(--reel-x, 0), calc(var(--reel-y, 0) + var(--hero-shift, 0px)), 0) rotate(var(--reel-r, 0deg)) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  transition: transform 300ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 300ms ease;
}
.hp-reel-card:hover,
.hp-reel-card:focus-visible { z-index: 9; box-shadow: 24px 30px 0 rgba(245, 213, 38, 0.45); outline: none; }
.hp-reel-card img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.hp-reel-card > span { display: flex; justify-content: space-between; gap: 22px; padding: 14px 16px; font-size: 0.64rem; font-weight: 580; letter-spacing: 0.04em; }
.hp-reel-card > span b { color: var(--hp-green); font-weight: 680; }
.hp-reel-card-a { --reel-x: 1%; --reel-y: 2%; --reel-r: 2deg; z-index: 3; }
.hp-reel-card-b { --reel-x: 17%; --reel-y: 42%; --reel-r: -4deg; z-index: 2; }
.hp-reel-card-c { --reel-x: -8%; --reel-y: 82%; --reel-r: 5deg; z-index: 1; }

.hp-hero-foot { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 18px; color: #6e736c; font-size: 0.57rem; font-stretch: 80%; letter-spacing: 0.12em; }
.hp-hero-foot i { height: 1px; background: var(--hp-line); }

.hp-proof { padding: clamp(100px, 10vw, 165px) max(4vw, 48px); background: var(--hp-ink); color: var(--hp-paper); }
.hp-proof-lead { display: grid; grid-template-columns: 0.4fr 0.6fr; gap: 50px; align-items: start; }
.hp-proof-lead > span { color: var(--hp-yellow); font-size: 0.66rem; font-weight: 650; letter-spacing: 0.1em; }
.hp-proof-lead > p { max-width: 720px; margin: 0; font-size: clamp(1.55rem, 2.5vw, 3.1rem); font-stretch: 102%; font-weight: 360; letter-spacing: -0.035em; line-height: 1.1; }
.hp-proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: clamp(70px, 9vw, 130px); border-top: 1px solid rgba(242, 241, 236, 0.2); }
.hp-proof-grid article { min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; padding: 28px; border-right: 1px solid rgba(242, 241, 236, 0.2); }
.hp-proof-grid article:first-child { border-left: 1px solid rgba(242, 241, 236, 0.2); }
.hp-proof-grid strong { color: var(--hp-yellow); font-size: clamp(2.8rem, 4.8vw, 5.8rem); font-stretch: 108%; font-weight: 360; letter-spacing: -0.055em; }
.hp-proof-grid span { max-width: 150px; color: #b7bcb4; font-size: 0.68rem; line-height: 1.35; text-transform: uppercase; }

.hp-work { padding-top: clamp(110px, 12vw, 190px); background: var(--hp-paper); }
.hp-work-intro { display: grid; grid-template-columns: 1.4fr 0.6fr; align-items: end; gap: clamp(50px, 9vw, 160px); padding: 0 max(4vw, 48px); }
.hp-work-intro > div > span { color: var(--hp-green); }
.hp-work-intro h2,
.hp-approach-copy h2,
.hp-profile-copy h2 {
  margin: 22px 0 0;
  font-size: clamp(3.8rem, 6.6vw, 8rem);
  font-stretch: 112%;
  font-weight: 340;
  letter-spacing: -0.058em;
  line-height: 0.86;
}
.hp-work-intro > p { max-width: 460px; margin: 0 0 7px; color: var(--hp-muted); font-size: 0.96rem; line-height: 1.55; }

.hp-work-nav {
  position: sticky;
  z-index: 20;
  top: 82px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin-top: clamp(70px, 8vw, 120px);
  border-block: 1px solid var(--hp-line);
  background: rgba(242, 241, 236, 0.96);
  backdrop-filter: blur(14px);
}
body.home-revamp .hp-work-nav { display: grid; height: auto; gap: 0; justify-self: stretch; }
.hp-work-nav a { display: flex; gap: 12px; align-items: center; min-height: 66px; padding: 0 18px; border-right: 1px solid var(--hp-line); color: #6b7069; font-size: 0.64rem; font-weight: 580; letter-spacing: 0.025em; }
.hp-work-nav a:last-child { border-right: 0; }
.hp-work-nav a span { color: var(--hp-green); font-size: 0.56rem; font-weight: 680; }
.hp-work-nav a[aria-current="true"] { background: var(--hp-yellow); color: var(--hp-ink); }

.hp-project { --project-p: 0; min-height: max(860px, calc(100svh - 82px)); display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr); align-items: center; gap: clamp(48px, 7vw, 130px); padding: clamp(80px, 9vw, 140px) max(4vw, 48px); border-bottom: 1px solid var(--hp-line); overflow: hidden; }
.hp-project-media { position: relative; display: block; border: 1px solid rgba(17, 20, 17, 0.32); overflow: hidden; box-shadow: 24px 28px 0 rgba(17, 20, 17, 0.12); transform: translateY(calc((0.5 - var(--project-p)) * 54px)) rotate(calc((0.5 - var(--project-p)) * 2deg)); transition: box-shadow 260ms ease; }
.hp-project-media:hover,
.hp-project-media:focus-visible { box-shadow: 30px 34px 0 rgba(17, 20, 17, 0.2); outline: none; }
.hp-project-media img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transform: scale(calc(1.1 - var(--project-p) * 0.08)); transition: transform 80ms linear; }
.hp-project-open { position: absolute; right: 18px; bottom: 18px; padding: 11px 15px; border: 1px solid rgba(17, 20, 17, 0.28); background: var(--hp-paper); color: var(--hp-ink); font-size: 0.57rem; font-weight: 680; letter-spacing: 0.09em; }
.hp-project-copy { position: relative; transform: translateY(calc((0.5 - var(--project-p)) * -42px)); }
.hp-project-index { display: flex; justify-content: space-between; gap: 28px; padding-bottom: 20px; border-bottom: 1px solid currentColor; }
.hp-project-index span { font-size: 0.72rem; font-weight: 680; }
.hp-project-index i { font-size: 0.58rem; font-style: normal; letter-spacing: 0.09em; text-align: right; }
.hp-project-copy h3 { margin: clamp(34px, 4vw, 62px) 0 0; font-size: clamp(3.4rem, 5.2vw, 6.5rem); font-stretch: 110%; font-weight: 350; letter-spacing: -0.06em; line-height: 0.87; }
.hp-project-copy > p { max-width: 590px; margin: 34px 0 0; font-size: clamp(0.95rem, 1.15vw, 1.17rem); line-height: 1.55; opacity: 0.78; }
.hp-project-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.hp-project-tags span { padding: 8px 12px; border: 1px solid currentColor; border-radius: 999px; font-size: 0.57rem; letter-spacing: 0.05em; }
.hp-project-link { margin-top: 36px; color: inherit; }
.hp-project-green { background: var(--hp-green); color: #f4f2e9; }
.hp-project-green .hp-project-open { background: var(--hp-yellow); }
.hp-project-paper { background: #e5e8df; color: var(--hp-ink); }
.hp-project-yellow { background: var(--hp-yellow); color: var(--hp-ink); }
.hp-project-ink { background: var(--hp-ink); color: var(--hp-paper); }
.hp-project-ink .hp-project-media { border-color: rgba(242, 241, 236, 0.35); box-shadow-color: rgba(245, 213, 38, 0.2); }
.hp-project-play { background: #d9d3c4; color: var(--hp-ink); }

.hp-approach { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: clamp(70px, 9vw, 170px); padding: clamp(110px, 13vw, 210px) max(4vw, 48px); background: var(--hp-ink); color: var(--hp-paper); }
.hp-approach-copy { position: sticky; top: 150px; align-self: start; }
.hp-approach-copy > span { color: #aeb3ab; }
.hp-approach-copy h2 em { color: var(--hp-yellow); font-style: normal; }
.hp-approach-copy > p { max-width: 570px; margin: 38px 0 0; color: #aeb3ab; font-size: 1rem; line-height: 1.55; }
.hp-approach-copy > a { margin-top: 36px; color: var(--hp-yellow); }
.hp-approach-steps { margin: 0; padding: 0; list-style: none; }
.hp-approach-steps li { display: grid; grid-template-columns: 72px 1fr; gap: 24px; min-height: 260px; padding: 42px 0; border-top: 1px solid rgba(242, 241, 236, 0.22); }
.hp-approach-steps li:last-child { border-bottom: 1px solid rgba(242, 241, 236, 0.22); }
.hp-approach-steps > li > span { color: var(--hp-yellow); font-size: 0.72rem; font-weight: 680; }
.hp-approach-steps small { color: #90968e; font-size: 0.57rem; letter-spacing: 0.11em; }
.hp-approach-steps h3 { margin: 20px 0 14px; font-size: clamp(2rem, 3vw, 3.7rem); font-stretch: 106%; font-weight: 370; letter-spacing: -0.045em; line-height: 0.98; }
.hp-approach-steps p { max-width: 520px; margin: 0; color: #adb2aa; font-size: 0.88rem; line-height: 1.5; }

.hp-profile { display: grid; grid-template-columns: minmax(320px, 0.72fr) minmax(0, 1.28fr); align-items: center; gap: clamp(60px, 10vw, 180px); padding: clamp(110px, 13vw, 210px) max(4vw, 48px); background: var(--hp-paper); }
.hp-profile-image { margin: 0; transform: perspective(900px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)); transition: transform 280ms ease; }
.hp-profile-image img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 4.6; object-fit: cover; object-position: center bottom; border: 1px solid rgba(17, 20, 17, 0.38); background: var(--hp-yellow); box-shadow: 22px 24px 0 rgba(23, 104, 79, 0.14); }
.hp-profile-image figcaption { padding: 18px 0 0 22px; color: var(--hp-green); font-size: 0.6rem; font-weight: 680; letter-spacing: 0.1em; }
.hp-profile-copy > span { color: var(--hp-green); }
.hp-profile-copy > p { max-width: 760px; margin: 40px 0 0; color: #4f544e; font-size: clamp(1rem, 1.35vw, 1.36rem); line-height: 1.55; }
.hp-profile-proof { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 32px; }
.hp-profile-proof span { padding: 9px 14px; border: 1px solid var(--hp-green); border-radius: 999px; color: var(--hp-green); font-size: 0.61rem; letter-spacing: 0.045em; }
.hp-profile-copy > a { margin-top: 40px; color: var(--hp-green); }

.hp-lab { padding: clamp(100px, 11vw, 170px) max(4vw, 48px); background: var(--hp-yellow); }
.hp-lab-head { display: flex; justify-content: space-between; gap: 30px; padding-bottom: 22px; border-bottom: 1px solid rgba(17, 20, 17, 0.4); }
.hp-lab-head p { margin: 0; font-size: 0.62rem; font-weight: 650; letter-spacing: 0.1em; }
.hp-lab-grid { display: grid; grid-template-columns: 1.2fr 0.6fr 0.2fr; align-items: end; gap: clamp(40px, 7vw, 120px); padding-top: clamp(70px, 9vw, 130px); }
.hp-lab-title small { font-size: 0.6rem; font-weight: 680; letter-spacing: 0.1em; }
.hp-lab-title h2 { margin: 12px 0 0; font-size: clamp(6rem, 12vw, 15rem); font-stretch: 118%; font-weight: 330; letter-spacing: -0.072em; line-height: 0.72; }
.hp-lab-grid > p { max-width: 520px; margin: 0; color: #343832; font-size: 1rem; line-height: 1.55; }
.hp-lab-status { justify-self: end; padding: 11px 15px; border: 1px solid var(--hp-ink); border-radius: 999px; font-size: 0.57rem; font-weight: 680; letter-spacing: 0.08em; white-space: nowrap; }
.hp-contact { border-bottom: 0; }

@media (max-width: 1240px) {
  .hp-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(360px, 0.7fr); }
  .hp-hero h1 { font-size: clamp(4.7rem, 8vw, 7.6rem); }
  .hp-reel-card { width: min(35vw, 450px); }
  .hp-project { grid-template-columns: 1.05fr 0.95fr; }
  .hp-work-nav a { padding-inline: 12px; }
  .hp-lab-grid { grid-template-columns: 1fr 0.7fr; }
  .hp-lab-status { grid-column: 2; justify-self: start; }
}

@media (max-width: 980px) {
  .hp-hero { min-height: auto; padding-inline: 28px; }
  .hp-meta { grid-template-columns: 1fr auto; }
  .hp-meta span:nth-child(2) { display: none; }
  .hp-hero-grid { grid-template-columns: 1fr; padding-top: 64px; }
  .hp-hero-reel { width: min(100%, 690px); height: 600px; margin-left: auto; }
  .hp-reel-card { width: min(64vw, 500px); }
  .hp-proof { padding-inline: 28px; }
  .hp-proof-lead { grid-template-columns: 1fr; }
  .hp-proof-grid { grid-template-columns: repeat(2, 1fr); }
  .hp-proof-grid article:nth-child(3) { border-left: 1px solid rgba(242, 241, 236, 0.2); }
  .hp-work-intro { grid-template-columns: 1fr; padding-inline: 28px; }
  .hp-work-nav { grid-template-columns: repeat(5, minmax(160px, 1fr)); overflow-x: auto; }
  .hp-project { min-height: auto; grid-template-columns: 1fr; padding: 110px 28px; }
  .hp-project-media,
  .hp-project-copy { transform: none; }
  .hp-project-media img { transform: none; }
  .hp-project-copy { max-width: 760px; }
  .hp-approach { grid-template-columns: 1fr; padding-inline: 28px; }
  .hp-approach-copy { position: relative; top: auto; }
  .hp-profile { grid-template-columns: minmax(260px, 0.7fr) 1fr; padding-inline: 28px; }
  .hp-lab { padding-inline: 28px; }
}

@media (max-width: 680px) {
  .hp-hero { padding: 88px 18px 28px; }
  .hp-meta { min-height: 54px; padding: 0 12px; font-size: 0.54rem; }
  .hp-hero-grid { gap: 46px; padding: 48px 0 54px; }
  .hp-kicker { font-size: 0.58rem; }
  .hp-hero h1 { font-size: clamp(3.5rem, 17vw, 5.8rem); line-height: 0.8; }
  .hp-intro > p { font-size: 1.03rem; }
  .hp-hero-actions { align-items: flex-start; flex-direction: column; gap: 12px; }
  .hp-hero-reel { width: 100%; height: 440px; min-height: 0; margin: 0; }
  .hp-reel-card { width: 90%; box-shadow: 10px 12px 0 rgba(17, 20, 17, 0.08); }
  .hp-reel-card-a { --reel-x: 1%; --reel-y: 0%; }
  .hp-reel-card-b { --reel-x: 8%; --reel-y: 42%; }
  .hp-reel-card-c { --reel-x: 1%; --reel-y: 84%; }
  .hp-reel-card > span { padding: 10px 12px; font-size: 0.56rem; }
  .hp-hero-foot { grid-template-columns: auto 1fr; }
  .hp-hero-foot span:last-child { display: none; }
  .hp-proof { padding: 100px 18px; }
  .hp-proof-lead > p { font-size: 1.9rem; }
  .hp-proof-grid { margin-top: 64px; }
  .hp-proof-grid article { min-height: 140px; padding: 18px; }
  .hp-proof-grid strong { font-size: 2.7rem; }
  .hp-proof-grid span { font-size: 0.58rem; }
  .hp-work { padding-top: 100px; }
  .hp-work-intro { padding-inline: 18px; }
  .hp-work-intro h2,
  .hp-approach-copy h2,
  .hp-profile-copy h2 { font-size: clamp(3rem, 14vw, 4.8rem); }
  .hp-profile-copy h2 { font-size: clamp(2.45rem, 12.5vw, 4.2rem); }
  .hp-work-nav { top: 66px; grid-template-columns: repeat(5, minmax(145px, 1fr)); }
  .hp-work-nav a { min-height: 56px; }
  .hp-project { gap: 58px; padding: 88px 18px; }
  .hp-project-media { box-shadow: 12px 14px 0 rgba(17, 20, 17, 0.12); }
  .hp-project-open { right: 10px; bottom: 10px; padding: 8px 10px; font-size: 0.49rem; }
  .hp-project-copy h3 { font-size: clamp(3rem, 14vw, 4.7rem); }
  .hp-project-index { display: block; }
  .hp-project-index i { display: block; margin-top: 10px; text-align: left; }
  .hp-project-copy > p { font-size: 0.92rem; }
  .hp-approach { gap: 74px; padding: 100px 18px; }
  .hp-approach-steps li { grid-template-columns: 42px 1fr; min-height: 230px; gap: 12px; }
  .hp-profile { grid-template-columns: 1fr; padding: 100px 18px; }
  .hp-profile-image { width: calc(100% - 16px); }
  .hp-profile-copy { margin-top: 32px; }
  .hp-lab { padding: 100px 18px; }
  .hp-lab-grid { grid-template-columns: 1fr; gap: 42px; }
  .hp-lab-title h2 { font-size: clamp(5.4rem, 24vw, 8rem); }
  .hp-lab-status { grid-column: auto; justify-self: start; }
}

@media (prefers-reduced-motion: reduce) {
  .hp-title-line > span { transform: none; transition: none; }
  .hp-reel-card,
  .hp-project-media,
  .hp-project-copy,
  .hp-project-media img,
  .hp-profile-image { transform: none !important; transition: none; }
}
