/* JP Lautrup — portfolio
   Editorial paper: warm ivory ground, Fraunces serif display, Archivo labels,
   press-red accents, hairline + heavy rules. */

:root {
  --paper: #f7f3eb;
  --paper-deep: #efe9dd;
  --ink: #1d1a17;
  --ink-2: #6e6459;
  --line: rgba(29, 26, 23, 0.16);
  --red: #c8102e;
  --red-deep: #9e0c24;
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Archivo', -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --pad: clamp(1.25rem, 5vw, 4rem);
  --measure: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5.5rem;
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #fff; }

img { display: block; max-width: 100%; }

button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

a { color: inherit; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

/* ---------- masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.wordmark {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.wordmark .dot { color: var(--red); }

.masthead-nav {
  display: flex;
  gap: clamp(1.2rem, 3vw, 2.4rem);
}

.masthead-nav a {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.25rem 0;
}

.masthead-nav a:hover { color: var(--red); }

/* ---------- layout ---------- */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--pad);
}

section { padding-block: clamp(2.5rem, 6vh, 4.5rem); }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  border-top: 2px solid var(--ink);
  padding-top: 0.9rem;
  margin-bottom: clamp(1.6rem, 4vw, 2.6rem);
}

.label {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.head-no {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--red);
}

.kicker {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--red);
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.kicker::before {
  content: '';
  width: 2.2rem;
  height: 2px;
  background: var(--red);
}

/* ---------- hero ---------- */

.hero { padding-top: clamp(3.5rem, 9vh, 6.5rem); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: 1.8rem;
}

.hero-title {
  font-family: var(--serif);
  font-weight: 380;
  font-size: clamp(2.9rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  max-width: 14ch;
}

.hero-title em {
  font-style: italic;
  font-weight: 340;
}

.hero-rail { min-width: clamp(200px, 22vw, 260px); }

.hero-rail div {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  border-top: 1px solid var(--line);
  padding: 0.6rem 0;
}

.hero-rail div:last-child { border-bottom: 1px solid var(--line); }

.hero-rail dt {
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.hero-rail dd { font-size: 0.8125rem; font-weight: 500; text-align: right; }

.hero-sub {
  font-family: var(--serif);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 52ch;
  margin-top: clamp(2rem, 5vh, 3.2rem);
}

/* ---------- stills ---------- */

.still {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--paper-deep);
}

.still img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.97);
  transform: scale(1.001);
  transition: transform 0.7s cubic-bezier(0.2, 0.6, 0.2, 1);
}

.still:hover img, .still:focus-visible img { transform: scale(1.035); }

.play-badge {
  position: absolute;
  left: 1.1rem;
  bottom: 1.1rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 0.35s ease;
}

.play-badge svg { width: 100%; height: 100%; display: block; }

.play-badge circle {
  fill: rgba(20, 15, 10, 0.38);
  stroke: rgba(255, 253, 248, 0.85);
  stroke-width: 1.5;
  transition: fill 0.35s ease;
}

.play-badge path { fill: #fffdf8; }

.still:hover .play-badge { transform: scale(1.06); }

.still:hover .play-badge circle { fill: var(--red); stroke: var(--red); }

/* ---------- featured ---------- */

.featured { padding-top: clamp(1.5rem, 4vh, 2.5rem); }

.feature-caption {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: 1.4rem;
}

.feature-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(1.5rem, 2.8vw, 2.2rem);
  line-height: 1.18;
  letter-spacing: -0.01em;
}

.title-link {
  text-align: left;
  transition: color 0.25s ease;
}

.title-link:hover { color: var(--red-deep); }

.feature-desc {
  font-family: var(--serif);
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink-2);
  margin-top: 0.7rem;
  max-width: 48ch;
}

.feature-meta {
  border-left: 1px solid var(--line);
  padding-left: clamp(1.2rem, 3vw, 2.2rem);
  align-self: start;
}

.meta-line {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.ext {
  display: inline-block;
  margin-top: 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-underline-offset: 4px;
}

.ext:hover { color: var(--red); }

/* ---------- works grid ---------- */

.works-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(2rem, 4vw, 3.5rem);
  row-gap: clamp(3rem, 6vw, 4.5rem);
  align-items: start;
}

.works-grid .card:nth-child(even) { margin-top: 3.5rem; }

.card-caption { padding-top: 1.1rem; }

.card-no {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--red);
}

.card-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.25;
  letter-spacing: -0.005em;
  margin-top: 0.45rem;
}

.card .meta-line { margin-top: 0.55rem; }

.card-desc {
  font-family: var(--serif);
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--ink-2);
  margin-top: 0.55rem;
  max-width: 46ch;
}

.empty {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink-2);
  font-size: 1.1rem;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
}

.bio {
  font-family: var(--serif);
  font-size: clamp(1.1rem, 1.6vw, 1.25rem);
  line-height: 1.75;
  max-width: 58ch;
}

.bio p + p { margin-top: 1.2em; }

.bio p:first-of-type::first-letter {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 3.3em;
  line-height: 0.82;
  float: left;
  padding-right: 0.13em;
  color: var(--red);
}

.about-rail {
  border-left: 1px solid var(--line);
  padding-left: clamp(1.2rem, 3vw, 2.2rem);
  align-self: start;
}

.rail-block + .rail-block { margin-top: 1.8rem; }

.rail-label {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-2);
  margin-bottom: 0.5rem;
}

.about-rail a {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  padding: 0.2rem 0;
}

.about-rail a:hover { color: var(--red); }

/* ---------- contact ---------- */

.contact { text-align: center; padding-block: clamp(4rem, 10vh, 7rem); }

.contact .kicker { justify-content: center; }

.contact .kicker::after {
  content: '';
  width: 2.2rem;
  height: 2px;
  background: var(--red);
}

.contact-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  letter-spacing: -0.015em;
  margin-top: 1.6rem;
}

.contact-email {
  display: inline-block;
  margin-top: 1.4rem;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  text-decoration: underline;
  text-decoration-color: var(--red);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 6px;
}

.contact-email:hover { color: var(--red); }

/* ---------- footer ---------- */

.footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.5rem var(--pad) 3rem;
  border-top: 2px solid var(--ink);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ink-2);
}

.footer a { text-decoration: none; }

.footer a:hover { color: var(--red); }

/* ---------- lightbox ---------- */

.lightbox { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; }

.lightbox[hidden] { display: none; }

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 11, 0.96);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.lightbox-panel { position: relative; width: min(1060px, 92vw); }

.lightbox-frame { aspect-ratio: 16 / 9; background: #000; }

.lightbox-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

.lightbox-close {
  position: absolute;
  top: -3rem;
  right: -0.4rem;
  font-size: 2.1rem;
  line-height: 1;
  color: #f7f3eb;
  padding: 0.4rem;
}

.lightbox-close:hover { color: var(--red); }

.lightbox-title {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: rgba(247, 243, 235, 0.85);
  margin-top: 1rem;
}

body.locked { overflow: hidden; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(18px); }

.reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 0.6, 0.2, 1);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
  .still img, .play-badge { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; align-items: start; }
  .hero-rail { min-width: 0; max-width: 340px; width: 100%; }
  .works-grid { grid-template-columns: 1fr; }
  .works-grid .card:nth-child(even) { margin-top: 0; }
  .feature-caption { grid-template-columns: 1fr; }
  .feature-meta { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1.1rem; }
  .about-grid { grid-template-columns: 1fr; }
  .about-rail { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; padding-top: 1.4rem; }
  .lightbox-close { top: -2.8rem; right: 0; }
}
