/* ============================================================
   PARALLEL PLAY — PP-OS v3
   white field · logo blue · web 1.0 structure · ascii futurism
   ============================================================ */

:root {
  --blue: #0008fe;
  --blue-dim: rgba(0, 8, 254, 0.55);
  --blue-faint: rgba(0, 8, 254, 0.22);
  --blue-wash: rgba(0, 8, 254, 0.045);
  --ink: #0a0a0c;
  --white: #ffffff;

  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Monaco, "Cascadia Mono", monospace;

  --pad: clamp(1.1rem, 3.5vw, 3.5rem);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@view-transition { navigation: auto; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.5;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection { background: var(--blue); color: var(--white); }

img, video { max-width: 100%; height: auto; display: block; }

[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

p { margin: 0 0 1em; }

.mono {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  font-weight: 400;
}

/* links — classic blue, inverted on hover */
a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; }
a:hover { background: var(--blue); color: var(--white); text-decoration: none; }

.label { color: var(--blue); margin: 0 0 1.2rem; }

.star { color: var(--blue); display: inline-block; margin-left: 0.3em; animation: spin 16s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   TOPBAR
   ============================================================ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.85rem var(--pad);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--blue);
}

.topnav { display: flex; gap: 1.4rem; margin-left: auto; }
.topnav a {
  color: var(--ink);
  font-size: 0.85rem;
  text-decoration: none;
}
.topnav a:hover { background: var(--blue); color: var(--white); }

.topmeta { color: var(--blue-dim); white-space: nowrap; }

.topcta { color: var(--blue); text-decoration: none; white-space: nowrap; }
.topcta:hover { background: var(--blue); color: var(--white); }

/* ============================================================
   HERO — split mark converges on scroll
   ============================================================ */
.hero { height: 200vh; }

.hero-pin {
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(2.2rem, 6vh, 3.8rem);
  padding: 4.5rem var(--pad) 3rem;
  overflow: hidden;
}

.hero-mark {
  width: min(44vw, 50vh, 380px);
  aspect-ratio: 367 / 282;
  flex: 0 0 auto;
}

.pp-mark {
  display: block;
  width: 100%;
  height: 100%;
  color: var(--blue);
  overflow: visible;
}

.pp-mark .fig { will-change: transform; }

.pp-mark path { fill: currentColor; }

/* the mark assembles piece by piece on load (JS present only) */
.js .pp-mark path {
  opacity: 0;
  animation: markin 500ms ease forwards;
  animation-delay: calc(var(--i, 0) * 45ms + 100ms);
}

@keyframes markin { to { opacity: 1; } }

.hero-copy { max-width: 34rem; }

.hero-desc {
  font-size: clamp(1.1rem, 1.55vw, 1.5rem);
  line-height: 1.45;
  letter-spacing: -0.015em;
  margin: 0;
}

.hero-desc b { font-weight: 700; }

.hero-cue {
  position: absolute;
  bottom: 1.1rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--blue-dim);
}

.hero-cue .arrow { display: inline-block; animation: bob 1.6s ease-in-out infinite; }

@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(4px); } }

.btn {
  display: inline-block;
  border: 1px solid var(--blue);
  color: var(--blue);
  background: var(--white);
  padding: 0.7em 1.1em;
  text-decoration: none;
  transition: background 140ms ease, color 140ms ease;
}
.btn:hover { background: var(--blue); color: var(--white); }
.btn-solid { background: var(--blue); color: var(--white); }
.btn-solid:hover { background: var(--ink); border-color: var(--ink); }
.btn-ghost { border-color: var(--white); color: var(--white); background: transparent; }
.btn-ghost:hover { background: var(--white); color: var(--blue); }

/* ============================================================
   SECTION HEADS
   ============================================================ */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 1.2rem;
  border-top: 1px solid var(--blue);
  padding: 1.1rem 0 2.2rem;
}

.section-title {
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0;
}

.section-count { color: var(--blue); }
.section-note { margin-left: auto; color: var(--blue-dim); }

/* ============================================================
   WORK INDEX
   ============================================================ */
.work { padding: clamp(2rem, 6vh, 4rem) var(--pad) clamp(4rem, 10vh, 7rem); position: relative; }

.index { display: flex; flex-direction: column; }

.row {
  display: grid;
  grid-template-columns: 1.5fr 1fr 0.8fr 2rem;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.15rem 0.4rem;
  border-bottom: 1px solid var(--blue-faint);
  text-decoration: none;
  color: var(--ink);
  transition: background 120ms ease, color 120ms ease, padding-left 250ms var(--ease);
}

.index .row:first-child { border-top: 1px solid var(--blue-faint); }

.row:hover {
  background: var(--blue);
  color: var(--white);
  padding-left: 1.2rem;
}

.row:hover .row-scope, .row:hover .row-proof,
.row:hover .row-arrow { color: var(--white); }

.row-client {
  font-size: clamp(1.3rem, 2.6vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.row-scope { color: var(--blue-dim); }
.row-proof { color: var(--blue); }

.row-arrow {
  color: var(--blue);
  justify-self: end;
  transition: transform 250ms var(--ease);
}
.row:hover .row-arrow { transform: translateX(6px); }

/* floating preview */
.index-preview {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 50;
  width: clamp(200px, 21vw, 320px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 180ms ease;
  border: 1px solid var(--blue);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--blue-faint);
}
.index-preview.on { opacity: 1; }
.index-preview img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* ============================================================
   CAPABILITIES
   ============================================================ */
.caps { padding: clamp(4rem, 10vh, 7rem) var(--pad); }

.caps-list { list-style: none; margin: 0; padding: 0; }

.cap {
  display: grid;
  grid-template-columns: 3rem 1.1fr 1fr;
  gap: 1.2rem;
  align-items: baseline;
  padding: 1.3rem 0.4rem;
  border-bottom: 1px solid var(--blue-faint);
  transition: background 120ms ease;
}
.caps-list .cap:first-child { border-top: 1px solid var(--blue-faint); }
.cap:hover { background: var(--blue-wash); }

.cap-no { color: var(--blue); }

.cap-name {
  font-size: clamp(1.15rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.cap-desc { font-size: 0.92rem; color: rgba(10, 10, 12, 0.65); }

/* ============================================================
   OPERATOR
   ============================================================ */
.operator {
  padding: clamp(4rem, 10vh, 7rem) var(--pad);
  border-top: 1px solid var(--blue);
}

/* on the dedicated about page the section flows under the page title */
.about-page .operator {
  border-top: 0;
  padding-top: clamp(1rem, 3vh, 2rem);
}

.operator .section-title { margin-bottom: clamp(1.6rem, 4vh, 2.4rem); }

/* bio wraps around the floated photo + card stack */
.operator-body { max-width: 54rem; }
.operator-body::after { content: ""; display: block; clear: both; }

.operator-side { float: left; width: 15rem; margin: 0.35rem 2.4rem 1rem 0; }

.operator-body > p { font-size: clamp(1rem, 1.3vw, 1.15rem); line-height: 1.6; margin: 0 0 1.2em; }

.headshot {
  margin: 0 0 1.2rem;
  border: 1px solid var(--blue);
  box-shadow: 4px 4px 0 var(--blue-faint);
  overflow: hidden;
}
.headshot img { width: 100%; height: auto; display: block; }

.opcard {
  border: 1px solid var(--blue);
  padding: 1rem 1.1rem;
  color: var(--ink);
  line-height: 1.9;
  box-shadow: 4px 4px 0 var(--blue-faint);
  font-size: 0.72rem;
  width: fit-content;
  max-width: 100%;
}
.opcard p { margin: 0; white-space: nowrap; }

.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 1.8rem 0 0; padding: 0; }
.chips a { text-decoration: none; border: 1px solid var(--blue); padding: 0.55em 0.9em; display: inline-block; }
.chips a:hover { background: var(--blue); color: var(--white); }

/* ============================================================
   CONTACT MODAL — blue card popup, web 1.0 honesty
   ============================================================ */
.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 320;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(255, 255, 255, 0.85);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.contact-modal.is-open, .contact-modal:target { display: flex; }

.contact-card {
  position: relative;
  width: min(32rem, 100%);
  max-height: calc(100svh - 2.4rem);
  overflow: auto;
  background: var(--blue);
  color: var(--white);
  padding: clamp(1.6rem, 4vw, 2.6rem);
  box-shadow: 8px 8px 0 var(--blue-faint);
}

.contact-eyebrow { color: rgba(255, 255, 255, 0.75); margin: 0 0 0.9rem; }

.contact-title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 0 0 1.6rem;
  color: var(--white);
}
.contact-title .star { color: var(--white); margin-left: 0.1em; }

.contact-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.contact-close:hover { background: var(--white); color: var(--blue); }

body.modal-open { overflow: hidden; }

.contact-form {
  max-width: 34rem;
  margin: 0 0 1.4rem;
  text-align: left;
}

.form-row { margin-bottom: 1rem; }

.form-row label {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.4rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.55);
  color: var(--white);
  font-family: var(--sans);
  font-size: 1rem;
  padding: 0.7em 0.9em;
  border-radius: 0;
  -webkit-appearance: none;
  resize: vertical;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--white);
  background: rgba(255, 255, 255, 0.06);
}

.form-send {
  display: inline-block;
  width: 100%;
  background: var(--white);
  color: var(--blue);
  border: 1px solid var(--white);
  font-size: 0.85rem;
  padding: 1em 1.2em;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}

.form-send:hover { background: transparent; color: var(--white); }

.cta-alt { color: rgba(255, 255, 255, 0.75); margin: 0; }
.cta-alt a { color: var(--white); }
.cta-alt a:hover { background: var(--white); color: var(--blue); }

/* sent toast */
.sent-toast {
  position: fixed;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 400;
  background: var(--blue);
  color: var(--white);
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 0.9em 1.4em;
  border: 1px solid var(--white);
  box-shadow: 4px 4px 0 rgba(0, 8, 254, 0.25);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
  padding: 1rem var(--pad);
  border-top: 1px solid var(--blue);
  color: var(--blue-dim);
}

.footer a { color: var(--blue); text-decoration: none; }
.footer a:hover { background: var(--blue); color: var(--white); }

.footer-links { display: flex; gap: 1.1rem; }

.footer-joke { margin-left: auto; }

/* ============================================================
   PROJECT PAGES
   ============================================================ */
.pcrumb {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 1.4rem var(--pad) 0;
  color: var(--blue-dim);
}
.pcrumb a { text-decoration: none; }

.phead { padding: clamp(2rem, 6vh, 4rem) var(--pad) clamp(1.5rem, 4vh, 2.5rem); }

.ptitle {
  font-size: clamp(2.6rem, 7.5vw, 6.5rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 0.96;
  margin: 0 0 1.4rem;
}

.pmeta { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; }
.pmeta .tag { border: 1px solid var(--blue); color: var(--blue); padding: 0.45em 0.8em; }
.pmeta .tag-year { border-color: var(--blue-faint); color: var(--blue-dim); }
.pmeta .tag-link { text-decoration: none; }
.pmeta .tag-link:hover { background: var(--blue); color: var(--white); }

.plede {
  padding: 0 var(--pad) clamp(2rem, 5vh, 3.5rem);
  font-size: clamp(1.25rem, 2.2vw, 1.9rem);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.3;
  max-width: 56rem;
}
.plede em { font-style: normal; color: var(--blue); }

.pbody {
  max-width: 56rem;
  padding: 0 var(--pad) clamp(3rem, 8vh, 5rem);
}

.plays-label { margin-bottom: 0.4rem; }

.play {
  border-top: 1px solid var(--blue-faint);
  padding: 1.1rem 0;
}
.play:last-child { border-bottom: 1px solid var(--blue-faint); }
.play b { display: block; font-size: 1.05rem; letter-spacing: -0.02em; margin-bottom: 0.3rem; }
.play p { margin: 0; color: rgba(10, 10, 12, 0.7); font-size: 0.95rem; line-height: 1.55; }

/* media filmstrip — horizontal drag/snap carousel */
.pcar { padding: 0 0 clamp(2.5rem, 7vh, 4.5rem); }

.pcar-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--pad) 0.9rem;
}

.pcar-ctl { display: flex; align-items: center; gap: 0.9rem; }
.pcar-count { color: var(--blue-dim); letter-spacing: 0.08em; }

.pcar-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.pcar-btn:hover { background: var(--blue); color: var(--white); }
.pcar-btn:disabled { opacity: 0.25; cursor: default; background: var(--white); color: var(--blue); }

.pmedia {
  display: flex;
  gap: clamp(0.7rem, 1.4vw, 1.2rem);
  padding: 0 var(--pad);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-left: var(--pad);
  cursor: grab;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.pmedia::-webkit-scrollbar { display: none; }
.pmedia.is-drag { scroll-snap-type: none; }
.pmedia.is-drag, .pmedia.is-drag img, .pmedia.is-drag video { cursor: grabbing; }

.pm-item {
  margin: 0;
  flex: 0 0 auto;
  scroll-snap-align: start;
  height: clamp(340px, 58vh, 600px);
  border: 1px solid var(--blue-faint);
  background: var(--blue-wash);
  overflow: hidden;
}

.pm-item img, .pm-item video {
  display: block;
  height: 100%;
  width: auto;
  max-width: min(86vw, 1100px);
  object-fit: cover;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 700ms var(--ease);
}
.pm-item video { aspect-ratio: 16 / 10; }
.pm-item:hover img, .pm-item:hover video { transform: scale(1.015); }

.pcar-progress {
  position: relative;
  height: 2px;
  margin: 1rem var(--pad) 0;
  background: var(--blue-faint);
}
.pcar-progress span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  background: var(--blue);
}

.pnav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--blue);
}
.pnav a {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 2rem var(--pad);
  text-decoration: none;
  color: var(--ink);
}
.pnav a:hover { background: var(--blue); color: var(--white); }
.pnav a:hover .mono { color: var(--white); }
.pnav .pnav-label { color: var(--blue-dim); }
.pnav .pnav-client { font-size: clamp(1.3rem, 2.6vw, 2rem); font-weight: 700; letter-spacing: -0.03em; }
.pnav-next { text-align: right; border-left: 1px solid var(--blue); align-items: flex-end; }

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.96);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  opacity: 0;
  transition: opacity 200ms ease;
  cursor: zoom-out;
}
.lightbox.is-open { display: flex; opacity: 1; }

.lightbox-media {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 1px solid var(--blue);
  box-shadow: 8px 8px 0 var(--blue-faint);
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox-btn {
  position: absolute;
  width: 44px;
  height: 44px;
  border: 1px solid var(--blue);
  background: var(--white);
  color: var(--blue);
  font-family: var(--mono);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}
.lightbox-btn:hover { background: var(--blue); color: var(--white); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-btn[hidden] { display: none; }

body.lightbox-open { overflow: hidden; }

/* ============================================================
   REVEAL
   ============================================================ */
.js .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms var(--ease), transform 700ms var(--ease);
}
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal.d1 { transition-delay: 90ms; }
.reveal.d2 { transition-delay: 180ms; }
.reveal.d3 { transition-delay: 270ms; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .star, .hero-cue .arrow { animation: none; }
  .hero { height: auto; }
  .hero-pin { position: static; height: auto; min-height: calc(100svh - 49px); }
  .js .pp-mark path { animation: none; opacity: 1; }
  .pmedia img, .pmedia video { transition: none; }
  @view-transition { navigation: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .index-preview { display: none; }
}

@media (max-width: 720px) {
  /* topbar: nav left, cta right, no clock */
  .topbar { padding: 0.75rem var(--pad); gap: 0.9rem; }
  .topmeta { display: none; }
  .topnav { margin-left: 0; margin-right: auto; gap: 0.9rem; }
  .topnav a { font-size: 0.8rem; }
  .topcta { font-size: 0.66rem; }

  /* hero: compact stack, shorter scroll runway */
  .hero { height: 150vh; }
  .hero-pin { gap: 1.8rem; padding-top: 3.5rem; }
  .hero-mark { width: min(62vw, 38vh, 280px); }
  .hero-desc { font-size: 1.1rem; line-height: 1.5; }

  /* work index: number, name, scope, arrow — no metrics */
  .section-head { flex-wrap: wrap; row-gap: 0.3rem; padding-bottom: 1.4rem; }
  .section-note { display: none; }
  .row { grid-template-columns: 1fr 1.6rem; row-gap: 0.25rem; padding: 0.95rem 0.2rem; }
  .row-client { grid-column: 1; font-size: 1.25rem; }
  .row-scope { grid-column: 1; font-size: 0.62rem; }
  .row-proof { display: none; }
  .row-arrow { grid-column: 2; grid-row: 1; }
  .row:hover { padding-left: 0.2rem; }

  .cap { grid-template-columns: 2.2rem 1fr; padding: 1.1rem 0.2rem; }
  .cap-desc { grid-column: 2; }

  .operator-side { float: none; width: auto; margin: 0 0 1.5rem; }
  .headshot { max-width: 13rem; }
  .opcard { font-size: 0.62rem; }

  .contact-form { max-width: none; }

  .footer { gap: 0.8rem; font-size: 0.68rem; }
  .footer-joke { display: none; }

  /* project pages */
  .phead { padding-top: 1.6rem; }
  .plede { font-size: 1.15rem; }
  .pm-item { height: clamp(220px, 36vh, 340px); }
  .pm-item img, .pm-item video { max-width: 140vw; }
  .pcar-btn { width: 34px; height: 34px; }
  .pnav { grid-template-columns: 1fr; }
  .pnav-next { border-left: 0; border-top: 1px solid var(--blue); text-align: left; align-items: flex-start; }

  .lightbox { padding: 1.2rem; }
}
