/* =========================================================
   project.css — styling for generated project detail pages
   (content/projects/*.md  →  projects/<slug>.html)

   Loaded AFTER styles.css, so all design tokens (--accent,
   --text, --bg, fonts, etc.) are available here. This layout
   is intentionally its own thing — a calm, centered editorial
   reading view — while staying in the site's dark palette.
   ========================================================= */

body.project {
  background: var(--bg);
}

.project-page {
  padding-bottom: 0;
}

/* Sections size to their content — override the site-wide 70vh min-height
   so the page height tracks the description length and margins stay
   consistent. The photo hero keeps its own min-height (set below). */
.project-page > section:not(.project-hero) { min-height: 0; }

/* Centered content column shared by every block */
.project-wrap {
  width: min(960px, 100% - 48px);
  margin: 0 auto;
}

/* ── Eyebrow / title / subtitle ─────────────────────────── */

.project-eyebrow {
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 18px;
}

.project-title {
  font-family: "Futura", system-ui, sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 88px);
  line-height: 0.96;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
}

.project-subtitle {
  font-size: clamp(16px, 2.2vw, 22px);
  font-weight: 400;
  color: var(--text-muted);
  margin: 18px 0 0;
  max-width: 60ch;
}

/* ── Photo project: full-bleed cover hero ───────────────── */

.project-hero {
  position: relative;
  min-height: clamp(440px, 78vh, 820px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.project-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.project-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(0,0,0,0.86) 0%, rgba(0,0,0,0.35) 45%, rgba(0,0,0,0.15) 100%);
  z-index: 1;
}

.project-hero-inner {
  position: relative;
  z-index: 2;
  padding: 0 0 64px;
}

.project-hero .project-subtitle {
  color: rgba(237, 236, 232, 0.78);
}

/* ── Body copy ──────────────────────────────────────────── */

.project-intro {
  padding-top: 64px;
}

.project-text {
  max-width: 68ch;
  font-size: clamp(16px, 1.5vw, 18px);
  line-height: 1.75;
  color: rgba(237, 236, 232, 0.82);
}

.project-text p { margin: 0 0 1.2em; }
.project-text a { color: var(--accent); text-decoration: none; border-bottom: 1px solid color-mix(in srgb, var(--accent) 45%, transparent); }
.project-text h2, .project-text h3, .project-text h4 {
  font-family: "Futura", system-ui, sans-serif;
  color: #fff;
  letter-spacing: -0.01em;
  margin: 1.6em 0 0.5em;
}

/* ── Feature subphoto (photo projects) ──────────────────── */

.project-feature {
  margin-top: 48px;
}
.project-feature img {
  display: block;
  width: 100%;
  height: auto;
}

/* ── Extra-photos gallery ───────────────────────────────── */

.project-gallery {
  margin-top: 48px;
}
.project-gallery .project-wrap {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.project-shot { margin: 0; }
.project-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 3 / 2;
}

/* ── Video project: the video is the main event ─────────── */

/* Video pages: the title block sits above the video (no full-bleed hero) */
.project-head {
  padding-top: clamp(56px, 9vh, 104px);
}

.project-stage {
  padding-top: 18px;
}
/* when the video sits under a full-bleed cover hero, give it room to breathe
   (the tight 18px is only for the plain text-title fallback) */
.project-hero + .project-stage {
  padding-top: 56px;
}
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}
.video-frame iframe,
.video-frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.project-video .project-intro { padding-top: 48px; }

/* Instagram reel: portrait, centered — Instagram's embed.js sizes the
   player itself, so we only constrain the width and center it. */
.project-stage--ig { padding-top: 18px; }
.ig-embed {
  display: flex;
  justify-content: center;
}
.ig-embed .instagram-media {
  margin: 0 auto !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 420px !important;
}

/* ── Back link ──────────────────────────────────────────── */

.project-back {
  display: inline-block;
  margin-top: 80px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--ease);
}
.project-back:hover { color: var(--accent); }

/* Keep the contact card clear of the back link */
.project-page .contact { margin-top: 96px; }

/* ── Responsive ─────────────────────────────────────────── */

@media (max-width: 768px) {
  .project-wrap { width: calc(100% - 40px); }
  .project-hero { min-height: 70vh; }
  .project-hero-inner { padding-bottom: 40px; }
  .project-intro { padding-top: 48px; }
  .project-feature,
  .project-gallery { margin-top: 48px; }
  .project-gallery .project-wrap { grid-template-columns: 1fr; }
  .project-back { margin-top: 56px; }
}
