/* ---------- PROJECT PAGE ---------- */
.p-hero {
  min-height: 78svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 90px var(--gutter) 24px;
  position: relative;
}
.p-back {
  position: absolute; top: 76px; left: var(--gutter);
  transition: transform .3s;
}
.p-back:hover { transform: translateX(-4px); }
.p-title {
  font-family: var(--display); font-weight: 400;
  line-height: .82; white-space: nowrap; margin-bottom: 22px; user-select: none;
}
.p-hero__row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; line-height: 1.45; }

/* Images */
.shot {
  margin: 0; border-radius: var(--radius); overflow: hidden;
  background: color-mix(in srgb, var(--ink) 12%, var(--bg));
}
.shot img, .shot video {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transform: scale(1.08); transition: transform 1.6s cubic-bezier(.2,.7,.2,1);
}
.shot.is-in img, .shot.is-in video { transform: scale(1); }
.shot--hero { margin: 0 var(--gutter); aspect-ratio: 16 / 9; }
.shot--wide { aspect-ratio: 16 / 9; }
.shot--tall { aspect-ratio: 9 / 16; }
.shot--square { aspect-ratio: 1; }
.row--2 .shot--tall { aspect-ratio: 4 / 5; }

.gallery { display: grid; gap: 8px; padding: 8px var(--gutter) 0; }
.row { display: grid; gap: 8px; }
.row--2 { grid-template-columns: 1fr 1fr; }
.row--3 { grid-template-columns: repeat(3, 1fr); }

/* Overview */
.p-overview {
  display: grid; grid-template-columns: 1fr 3fr; gap: 24px;
  padding: clamp(80px, 11vw, 160px) var(--gutter) clamp(40px, 6vw, 80px);
}
.p-lede {
  font-family: var(--display); font-size: clamp(40px, 5.6vw, 92px); line-height: .95;
  margin-bottom: 40px;
}
.p-body {
  display: grid; grid-template-columns: 1fr 1fr; gap: 32px;
  text-transform: none; font-size: 16px; line-height: 1.6; font-weight: 400;
}

.p-meta { margin: 0 var(--gutter) clamp(64px, 8vw, 120px); border-top: 1px solid var(--line); }
.p-meta > div {
  display: grid; grid-template-columns: 1fr 3fr; gap: 24px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.p-meta dt { font-family: var(--display); font-size: 20px; }
.p-meta dd { margin: 0; font-family: var(--display); font-size: 20px; text-align: right; }
.p-meta a { background: linear-gradient(currentColor,currentColor) 0 100% / 0 1px no-repeat; transition: background-size .35s; }
.p-meta a:hover { background-size: 100% 1px; }

/* Chapters */
.p-chapter {
  display: grid; grid-template-columns: 1fr 1.4fr 1.6fr; gap: 24px; align-items: start;
  padding: clamp(80px, 11vw, 160px) var(--gutter);
}
.p-chapter__num { font-family: var(--display); font-size: 20px; }
.p-chapter__title { font-family: var(--display); font-weight: 400; font-size: clamp(48px, 6vw, 104px); line-height: .88; }
.p-chapter__text { text-transform: none; font-size: 18px; line-height: 1.55; font-weight: 400; max-width: 46ch; }

/* Quote */
.p-quote { padding: clamp(96px, 13vw, 200px) var(--gutter); text-align: center; }
.p-quote blockquote { margin: 0 auto; max-width: 1100px; }
.p-quote p { font-family: var(--display); font-size: clamp(48px, 8vw, 140px); line-height: .9; }

/* Next */
.p-next {
  display: flex; flex-direction: column; align-items: center; gap: 22px;
  padding: clamp(96px, 12vw, 180px) var(--gutter) 40px;
}
.p-next__title { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 8vw, 128px); line-height: .9; }
.project .work { padding-bottom: clamp(64px, 8vw, 120px); }


/* Phones on a panel */
.panel {
  border-radius: var(--radius); background: var(--panel);
  display: flex; justify-content: center; align-items: center; gap: clamp(16px, 4vw, 64px);
  padding: clamp(40px, 7vw, 110px) var(--gutter);
}
.panel__phone {
  margin: 0; width: min(30%, 340px);
  border-radius: clamp(18px, 2.6vw, 40px); overflow: hidden;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.panel__phone img { display: block; width: 100%; }
.panel__phone:nth-child(2) { transform: translateY(60px); }
.panel.is-in .panel__phone:nth-child(2) { transform: translateY(24px); }

/* Tall screenshot that pans on scroll */
.pan {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  border-radius: var(--radius); background: var(--panel);
}
.pan img {
  position: absolute; left: 50%; top: 0;
  width: min(62%, 900px); transform: translate(-50%, var(--pan, 0%));
  border-radius: 10px 10px 0 0; margin-top: 5%;
  box-shadow: 0 30px 80px rgba(0,0,0,.45);
  will-change: transform;
}

/* Step-by-step flow */
.flow { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.flow__step p { margin-top: 14px; font-family: var(--display); font-size: 22px; }
.flow__step p span { opacity: .5; margin-right: 8px; }
.flow__step:nth-child(2) { transition-delay: 120ms !important; }
.flow__step:nth-child(3) { transition-delay: 240ms !important; }

/* Banner & paper shots */
.shot--banner { aspect-ratio: 5 / 2; }
.shot--paper { background: #fff; }
.shot--paper img { object-fit: contain; padding: 4%; }

/* Before / after compare */
.compare {
  position: relative; aspect-ratio: 33 / 20; overflow: hidden;
  border-radius: var(--radius); user-select: none; touch-action: pan-y;
}
.compare__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare__top { position: absolute; inset: 0; clip-path: inset(0 calc(100% - var(--c, 50%)) 0 0); }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--c, 50%); width: 2px; margin-left: -1px;
  background: var(--paper); pointer-events: none;
}
.compare__handle span {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center;
  background: var(--neon); color: var(--bg); font-family: var(--display); font-size: 18px; letter-spacing: .04em; box-shadow: 0 0 24px var(--neon-soft);
}
.compare__range {
  position: absolute; inset: 0; width: 100%; height: 100%; margin: 0;
  opacity: 0; cursor: ew-resize;
}
.compare__range:focus-visible + .compare__handle, .compare:focus-within .compare__handle span { outline: 2px solid var(--paper); outline-offset: 3px; }

/* Product range on black */
.range-wrap { margin: clamp(64px, 8vw, 120px) var(--gutter) 0; padding: clamp(28px, 4vw, 56px); background: #000; color: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.range { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 48px); }
.range__item img { display: block; width: 100%; aspect-ratio: 8 / 5; object-fit: contain; }
.range__item h3 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 4.4vw, 72px); line-height: .9; margin: 18px 0 10px; }
.range__item p { text-transform: none; font-size: 15px; line-height: 1.55; font-weight: 400; opacity: .75; max-width: 34ch; }

/* Sectors */
.sectors { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.sectors .shot { aspect-ratio: 512 / 350; }
.sectors p, .flow__step p { margin-top: 14px; font-family: var(--display); font-size: 22px; }
.sectors p span { opacity: .5; margin-right: 8px; }

/* Architecture */
.arch { border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(24px, 4vw, 56px); }
.arch__flow { display: flex; align-items: center; gap: 0; }
.arch__node {
  flex: 1; border: 1px solid currentColor; border-radius: 14px; padding: 18px;
  font-family: var(--display); font-size: clamp(18px, 1.7vw, 26px); line-height: 1.05;
}
.arch__node span { display: block; font-family: var(--body); font-size: 11px; opacity: .6; margin-bottom: 10px; }
.arch__line { flex: 0 0 clamp(16px, 3vw, 48px); height: 1px; background: currentColor; position: relative; }
.arch__line::after {
  content: ""; position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 8px var(--neon);
  animation: packet 2.4s linear infinite;
}
@keyframes packet { from { left: 0; } to { left: calc(100% - 7px); } }
.chips { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { border: 1px solid currentColor; border-radius: 999px; padding: 8px 14px; }

/* Big stat */
.stat { padding: clamp(80px, 11vw, 160px) var(--gutter) clamp(40px, 6vw, 80px); text-align: center; }
.stat .eyebrow { margin-bottom: clamp(16px, 2.4vw, 32px); }
.stat__num { background: var(--neon-grad); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 0 28px var(--neon-soft)); font-family: var(--display); font-size: clamp(120px, 30vw, 460px); line-height: .8; font-variant-numeric: tabular-nums; }
.stat__label { margin-top: 18px; font-size: 14px; }

/* Jolt Green brand panel */
.jolt {
  --jolt: #c4ff06; --jolt-ink: #101010;
  margin: 0 var(--gutter); background: var(--jolt); color: var(--jolt-ink);
  border-radius: var(--radius); padding: clamp(22px, 3vw, 40px) 0 clamp(28px, 4vw, 52px); overflow: hidden;
}
.jolt__head { display: flex; justify-content: space-between; gap: 16px; padding: 0 clamp(22px, 3vw, 40px) 24px; }
.jolt__hint { opacity: .6; }

/* Phone frame */
.phone {
  margin: 0; aspect-ratio: 828 / 1400; overflow: hidden;
  border-radius: clamp(20px, 2.4vw, 34px);
  border: clamp(5px, .6vw, 8px) solid #101010; background: #101010;
  box-shadow: 0 24px 60px rgba(16,16,16,.28);
}
.phone img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; pointer-events: none; }

/* Horizontal filmstrip */
.strip {
  list-style: none; margin: 0; display: flex; gap: clamp(14px, 1.8vw, 24px);
  overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
  padding: 0 clamp(22px, 3vw, 40px); cursor: grab; overscroll-behavior-x: contain;
}
.strip::-webkit-scrollbar { display: none; }
.strip.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.strip li { flex: 0 0 clamp(170px, 19vw, 260px); scroll-snap-align: start; }
.strip li p { margin-top: 14px; font-family: var(--display); font-size: 20px; }
.strip li p span { opacity: .45; margin-right: 6px; }

/* Quote attribution */
.p-quote__cite { margin-top: 28px; font-size: 12px; }

/* Collectible duo: three phones + panning tall screen */
.duo {
  display: grid; grid-template-columns: 3fr 1fr; gap: clamp(16px, 3vw, 48px); align-items: center;
  background: var(--panel); border-radius: var(--radius); padding: clamp(28px, 5vw, 80px);
}
.duo__phones { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(12px, 2vw, 28px); }
.duo .phone { border-color: #2a2a2a; box-shadow: none; }
.duo__phones .phone:nth-child(2) { transform: translateY(-24px); }
.pan--phone {
  aspect-ratio: 828 / 1400; background: #101010; border: clamp(5px, .6vw, 8px) solid #c4ff06;
  border-radius: clamp(20px, 2.4vw, 34px);
}
.pan--phone img { width: 100%; margin-top: 0; border-radius: 0; box-shadow: none; }

.shot--desk { aspect-ratio: 2880 / 2048; }
.duo:has(.duo__phones--one) { grid-template-columns: 1fr 2.6fr; }
.duo__phones--one { grid-template-columns: 1fr; }
.duo__phones--one .phone { transform: none !important; }

/* Awards */
.p-awards { padding-top: clamp(40px, 6vw, 80px); padding-bottom: 0; }

@media (max-width: 760px) {
  .p-hero { min-height: 60svh; }
  .p-hero__row, .p-overview, .p-body, .p-chapter { grid-template-columns: 1fr; }
  .p-hero__row .hero__meta-mid, .p-hero__row .hero__meta-end { text-align: left; }
  .row--2, .row--3, .flow, .range { grid-template-columns: 1fr; }
  .duo, .duo:has(.duo__phones--one) { grid-template-columns: 1fr; }
  .duo__phones--one { width: 70%; justify-self: center; }
  .duo__phones .phone:nth-child(2) { transform: none; }
  .pan--phone { width: 70%; justify-self: center; }
  .jolt__head { flex-direction: column; gap: 4px; }
  .sectors { grid-template-columns: 1fr 1fr; }
  .shot--banner { aspect-ratio: 16 / 9; }
  .compare { aspect-ratio: 4 / 3; }
  .arch__flow { flex-direction: column; align-items: stretch; }
  .arch__line { flex-basis: 24px; width: 1px; height: 24px; align-self: center; }
  .arch__line::after { left: -3px !important; animation-name: packet-v; }
  .shot--tall { aspect-ratio: 4 / 5; }
  .p-meta > div { grid-template-columns: 1fr 1.6fr; }
  .p-meta dt, .p-meta dd { font-size: 17px; }
  .panel__phone { width: 44%; }
  .pan { aspect-ratio: 4 / 5; }
  .pan img { width: 86%; }
}

@keyframes packet-v { from { top: 0; } to { top: calc(100% - 7px); } }

@media (prefers-reduced-motion: reduce) {
  .shot img, .shot video { transform: none; }
}
