/* Project pages (portfolio) — clean white page, blog-style Photolog.
 *
 * Loaded on every public project page (project.html). Kept in its own file so
 * the shared theme (styles.css) stays untouched and browser caches don't serve
 * a stale merged bundle. */

/* Plain white page — replaces the old black footer stripe. */
body#page-top {
  background: #ffffff;
}

/* ---------------------------------------------------------------- Footer -- */
.project-footer {
  padding: 2.75rem 1.5rem;
  text-align: center;
  background: #ffffff;
  border-top: 1px solid #ececec;
  color: #9a9a9a;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.project-footer a { color: #6a6a6a; text-decoration: none; }
.project-footer a:hover { text-decoration: underline; }

/* -------------------------------------------- Photolog: photo-essay feed -- */
.project-photolog {
  padding: 2.5rem 0 0.5rem;
  background: #ffffff;
}

.photolog-container {
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.photolog-post {
  margin: 0 0 4.5rem;
  text-align: center;
}
.photolog-post:last-child { margin-bottom: 1.5rem; }

/* Text blocks interleaved between photo posts */
.photolog-textblock {
  max-width: 40rem;
  margin: 0 auto 4.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
  color: #333;
}
.photolog-textblock > :first-child { margin-top: 0; }
.photolog-textblock > :last-child { margin-bottom: 0; }
.photolog-textblock p { margin: 0 0 1rem; }
.photolog-textblock a { color: #1c1c1c; text-decoration: underline; }
.photolog-textblock--2col { max-width: 1040px; text-align: left; }
@media (min-width: 768px) {
  .photolog-textblock--2col { column-count: 2; column-gap: 3rem; }
}
/* The block's Zwischentitel. Set in the post-title's face so it reads as a
 * heading of this page rather than as bold prose, one step smaller so it
 * still sits below a photograph's title in the hierarchy. column-span keeps
 * it out of the two-column flow. */
.photolog-textblock-title {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.3rem;
  line-height: 1.3;
  color: #1c1c1c;
  margin: 0 0 0.9rem;
  column-span: all;
}

.photolog-post-title {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  line-height: 1.25;
  color: #1c1c1c;
  margin: 0 0 1.1rem;
  letter-spacing: 0.01em;
}

.photolog-figure { margin: 0; }

/* Centered; never rendered larger than its original size (the inline
 * max-width caps at the source width, this caps at the column width) and
 * never wider than the page. Overrides the theme's global `img { width:100% }`. */
.photolog-image {
  display: block;
  margin: 0 auto;
  width: auto;
  height: auto;
  max-width: 100%;
  padding: 0;
  border-radius: 2px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
  cursor: zoom-in;
}

/* An image group in this preset has to be made of the same material as the
 * single photos around it, or it reads as a different kind of object on the
 * page. Layout lives in photolog_group.css (shared with the Journal layout,
 * which is deliberately flat); only the skin is here.
 *
 * The rounding goes on each photo — that is the edge you actually see — but
 * the shadow goes on the ROW. One group is one statement, and per-photo
 * shadows would muddy the narrow gaps between them into grey seams. */
.photolog-post--group .pf-group-row {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.07);
  border-radius: 2px;
}
.photolog-post--group .pf-group-item { border-radius: 2px; }

.photolog-caption {
  margin: 1.1rem auto 0;
  max-width: 640px;
  font-family: Georgia, "Times New Roman", serif;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.65;
  color: #555;
}

@media (max-width: 600px) {
  .project-photolog { padding-top: 1.5rem; }
  .photolog-post { margin-bottom: 3rem; }
  .photolog-post-title { font-size: 1.25rem; }
  .photolog-caption { font-size: 1rem; }
}

/* ------------------------------------------------------ Project hero -- */
/* Full-viewport image banner with a bottom-left, editorial text overlay.
 * The image fills the whole viewport (below the fixed site nav when present);
 * a bottom-weighted scrim keeps the text legible over any photo. Text colour
 * (light/dark) is chosen per project in the editor's Hero tab. */
.project-hero {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 100vh;        /* fallback for browsers without svh */
  min-height: 100svh;
  overflow: hidden;
  background: #0d0d0d;       /* shows while the photo decodes */
  isolation: isolate;
}
/* When the fixed site nav is shown, main gets 72px top padding — fill exactly
 * the viewport area beneath it so the hero is edge-to-edge without overflow. */
.project-page--with-nav .project-hero {
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
}

.project-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  padding: 0;               /* beat the theme's global img rule */
  max-width: none;
}

.project-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.project-hero--light .project-hero__scrim {
  background: linear-gradient(to top,
      rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.42) 28%, rgba(0, 0, 0, 0.12) 55%, rgba(0, 0, 0, 0) 78%);
}
.project-hero--dark .project-hero__scrim {
  background: linear-gradient(to top,
      rgba(255, 255, 255, 0.84) 0%, rgba(255, 255, 255, 0.5) 28%, rgba(255, 255, 255, 0.16) 55%, rgba(255, 255, 255, 0) 78%);
}

.project-hero__inner {
  position: relative;
  z-index: 2;
  flex: 1 1 auto;
  display: flex;
  align-items: flex-end;
  padding: clamp(1.75rem, 5.5vw, 5rem);
}
.project-hero__content {
  /* Wide enough that a long lead can flow into two columns; the title is
     capped narrower below so it keeps its stacked, magazine-cover wrap. */
  max-width: min(94%, 46rem);
  animation: pjHeroRise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Two shadow layers: a tight one for crisp edges over busy/bright areas, plus a
   wide soft glow that lifts the whole block off the photo. */
.project-hero--light .project-hero__content { color: #ffffff; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55), 0 2px 34px rgba(0, 0, 0, 0.35); }
.project-hero--dark  .project-hero__content { color: #17171a; text-shadow: 0 1px 3px rgba(255, 255, 255, 0.65), 0 2px 28px rgba(255, 255, 255, 0.5); }

.project-hero__eyebrow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  margin: 0 0 clamp(0.7rem, 2vw, 1.15rem);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Nunito", sans-serif;
  font-weight: 600;
  font-size: clamp(0.72rem, 1.4vw, 0.82rem);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}
.project-hero--light .project-hero__eyebrow { color: rgba(255, 255, 255, 0.9); }
.project-hero--dark  .project-hero__eyebrow { color: rgba(20, 20, 22, 0.78); }
.project-hero__sep { opacity: 0.6; }

.project-hero__title {
  margin: 0;
  max-width: min(100%, 32rem);      /* keep the cover title stacked, not one long line */
  font-family: "Playfair Display", Georgia, "Times New Roman", serif;
  font-weight: 600;
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.02em;
  text-wrap: balance;
  overflow-wrap: break-word;
}

/* The lead is shown in full; long copy flows into as many ~17rem columns as
   the content box allows (1 on phones, up to 2 on desktop). */
.project-hero__lede {
  margin: clamp(1rem, 2.4vw, 1.5rem) 0 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Nunito", sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.12rem);
  line-height: 1.55;
  columns: 17rem;
  column-gap: clamp(1.5rem, 3vw, 2.75rem);
  orphans: 3;
  widows: 3;
}
.project-hero--light .project-hero__lede { color: rgba(255, 255, 255, 0.92); }
.project-hero--dark  .project-hero__lede { color: rgba(23, 23, 26, 0.9); }
/* Rich-text content authored in the lead (paragraphs, emphasis, links). */
.project-hero__lede > :first-child { margin-top: 0; }
.project-hero__lede > :last-child { margin-bottom: 0; }
.project-hero__lede p { margin: 0 0 0.85rem; }
.project-hero__lede a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.project-hero__lede strong { font-weight: 700; }
.project-hero__lede em { font-style: italic; }
.project-hero__lede h2, .project-hero__lede h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 600;
  font-size: 1.2em;
  margin: 0 0 0.5rem;
  break-after: avoid;
}

/* Slim animated scroll cue at the bottom centre. */
.project-hero__scroll {
  position: absolute;
  left: 50%;
  bottom: clamp(1.1rem, 2.6vw, 1.9rem);
  transform: translateX(-50%);
  z-index: 2;
  width: 1px;
  height: clamp(26px, 5vh, 46px);
  overflow: hidden;
  color: currentColor;
}
.project-hero--light .project-hero__scroll { color: rgba(255, 255, 255, 0.7); }
.project-hero--dark  .project-hero__scroll { color: rgba(20, 20, 22, 0.6); }
.project-hero__scroll-line {
  display: block;
  width: 1px;
  height: 100%;
  background: currentColor;
  transform-origin: top;
  animation: pjHeroScroll 2.2s ease-in-out infinite;
}

@keyframes pjHeroRise {
  from { opacity: 0; transform: translateY(1.75rem); }
  to   { opacity: 1; transform: none; }
}
@keyframes pjHeroScroll {
  0%   { transform: scaleY(0); transform-origin: top; }
  45%  { transform: scaleY(1); transform-origin: top; }
  55%  { transform: scaleY(1); transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

@media (prefers-reduced-motion: reduce) {
  .project-hero__content { animation: none; }
  .project-hero__scroll-line { animation: none; opacity: 0.45; }
}

@media (max-width: 600px) {
  .project-hero__scroll { display: none; }
}

/* ---- Preset: Custom — plain pass-through; the owner template owns layout. ---- */
.project-hero-custom { display: block; position: relative; }

/* ---- Preset: Hero-01 (default) is the base above: bottom-left, editorial. ---- */

/* ---- Preset: Centered — calm, symmetric, gallery title-card. ---- */
.project-hero--preset-centered .project-hero__inner {
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-block: clamp(4rem, 10vh, 7rem);
}
.project-hero--preset-centered .project-hero__content {
  max-width: min(92%, 46rem);
}
.project-hero--preset-centered .project-hero__title {
  max-width: none;
}
.project-hero--preset-centered .project-hero__eyebrow {
  justify-content: center;
}
/* Centered copy reads calmer as a single centred column than in magazine columns. */
.project-hero--preset-centered .project-hero__lede {
  columns: auto;
  max-width: 56ch;
  margin-inline: auto;
}
/* An even, full-frame scrim (vs the bottom gradient) keeps centred text legible. */
.project-hero--preset-centered.project-hero--light .project-hero__scrim {
  background: linear-gradient(rgba(0, 0, 0, 0.32), rgba(0, 0, 0, 0.48));
}
.project-hero--preset-centered.project-hero--dark .project-hero__scrim {
  background: linear-gradient(rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.56));
}
.project-hero--preset-centered .project-hero__scroll {
  display: none;
}

/* -------------------------------------- Visitor feedback (likes/comments) -- */
/* Shared skeleton lives in _project_feedback.html; this styles it for the
 * classic layout (white page, Nunito). Journal styles it in journal.css. */
.pf-feedback {
  max-width: 40rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 3.5rem;
  border-top: 1px solid #ececec;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #333;
}

.pf-feedback__likes {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}
.pf-feedback__like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border: 1px solid #d9d9d9;
  border-radius: 999px;
  background: #ffffff;
  color: #4a4a4a;
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.pf-feedback__like-btn:hover { border-color: #9a9a9a; color: #1c1c1c; }
.pf-feedback__like-btn:disabled { opacity: 0.6; cursor: default; }
.pf-feedback__like-btn.is-liked { border-color: #1c1c1c; color: #1c1c1c; }
.pf-feedback__like-btn.is-liked .pf-feedback__heart path {
  fill: currentColor;
}
.pf-feedback__heart { display: block; }
.pf-feedback__like-note { font-size: 0.85rem; color: #9a9a9a; }

.pf-feedback__heading {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0 0 1.25rem;
  color: #1c1c1c;
}

.pf-feedback__list {
  list-style: none;
  margin: 0 0 2.25rem;
  padding: 0;
}
.pf-feedback__item {
  padding: 1rem 0;
  border-bottom: 1px solid #f1f1f1;
}
.pf-feedback__item:first-child { border-top: 1px solid #f1f1f1; }
.pf-feedback__meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.pf-feedback__author { font-weight: 700; color: #1c1c1c; font-size: 0.95rem; }
.pf-feedback__date { font-size: 0.8rem; color: #9a9a9a; }
.pf-feedback__text {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}
.pf-feedback__empty { color: #9a9a9a; font-size: 0.95rem; padding: 0.5rem 0; }

/* Author's own comment: quiet text buttons, present only on rows the server
   marked as this visitor's. Deliberately not icon buttons — two words are
   clearer than two glyphs on a page a visitor sees once. */
.pf-feedback__edited {
  font-size: 0.75rem;
  color: #9a9a9a;
  font-style: italic;
}
.pf-feedback__own {
  display: flex;
  gap: 0.9rem;
  margin-top: 0.5rem;
}
.pf-feedback__own-btn {
  padding: 0;
  border: none;
  background: none;
  font: inherit;
  font-size: 0.8rem;
  color: #6b6b6b;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pf-feedback__own-btn:hover { color: #1c1c1c; }
.pf-feedback__own-btn--danger:hover { color: #b34a4a; }
.pf-feedback__own-btn:disabled { opacity: 0.5; cursor: default; }
.pf-feedback__edit { margin-top: 0.5rem; }
.pf-feedback__edit-input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid #d8d8d8;
  border-radius: 6px;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.6;
  resize: vertical;
}
.pf-feedback__edit-input:focus {
  outline: none;
  border-color: var(--pf-accent, #64a19d);
  box-shadow: 0 0 0 3px rgba(var(--pf-accent-rgb, 100, 161, 157), 0.18);
}
.pf-feedback__edit-actions { display: flex; gap: 0.9rem; margin-top: 0.5rem; }

.pf-feedback__form-heading {
  font-size: 1rem;
  font-weight: 700;
  margin: 0 0 1rem;
  color: #1c1c1c;
}
.pf-feedback__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 575px) {
  .pf-feedback__row { grid-template-columns: 1fr; }
}
.pf-feedback__field { display: block; margin-bottom: 0.85rem; }
.pf-feedback__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #6a6a6a;
  margin-bottom: 0.3rem;
}
.pf-feedback__field input,
.pf-feedback__field textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #ffffff;
  color: #1c1c1c;
  font: inherit;
  font-size: 0.95rem;
}
.pf-feedback__field input:focus,
.pf-feedback__field textarea:focus {
  outline: none;
  border-color: #6a6a6a;
}
.pf-feedback__hint {
  font-size: 0.8rem;
  color: #9a9a9a;
  margin: -0.35rem 0 0.85rem;
}
.pf-feedback__submit {
  padding: 0.55rem 1.6rem;
  border: 1px solid #1c1c1c;
  border-radius: 999px;
  background: #1c1c1c;
  color: #ffffff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  cursor: pointer;
  transition: opacity 0.2s ease;
}
.pf-feedback__submit:hover { opacity: 0.85; }
.pf-feedback__submit:disabled { opacity: 0.55; cursor: default; }
.pf-feedback__msg { margin: 0.85rem 0 0; font-size: 0.9rem; color: #3f7d3f; }
.pf-feedback__msg.is-error { color: #b34a4a; }

/* Honeypot: off-screen for people, present for bots. Not display:none, so
 * naive bots still consider it fillable. */
.pf-feedback__hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  opacity: 0;
}

/* ------------------------------------ Feedback strip (hero/header/band) -- */
/* Compact like button + comment-count jump link. One skeleton
 * (_project_feedback_strip.html), styled per surface below. */
.pf-strip {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
.pf-strip__item {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.9rem;
  border: 1px solid;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}
.pf-strip__item:disabled { opacity: 0.6; cursor: default; }
.pf-strip__icon { display: block; flex: none; }
.pf-strip__like.is-liked .pf-strip__icon path { fill: currentColor; }

/* Heart pop on like — restarted from JS via .pf-like-pop. */
@keyframes pf-like-pop {
  0% { transform: scale(1); }
  35% { transform: scale(1.18); }
  100% { transform: scale(1); }
}
.pf-like-pop .pf-strip__icon,
.pf-like-pop .pf-feedback__heart {
  animation: pf-like-pop 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  transform-origin: center;
}
@media (prefers-reduced-motion: reduce) {
  .pf-like-pop .pf-strip__icon,
  .pf-like-pop .pf-feedback__heart { animation: none; }
}

/* In the full-viewport hero: ghost pills on the photo, inheriting the hero's
 * light/dark text colour and its legibility text-shadow. */
.project-hero__content .pf-strip { margin-top: 1.4rem; }
.project-hero__content .pf-strip__item {
  border-color: currentColor;
  /* currentColor at full strength is too loud on a photo — soften via opacity
   * on the border only (color-mix keeps text/icon at full contrast). */
  border-color: color-mix(in srgb, currentColor 45%, transparent);
  backdrop-filter: blur(2px);
}
.project-hero__content .pf-strip__item:hover {
  border-color: currentColor;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

/* Standalone band (no hero, or custom hero): a slim row above the content,
 * aligned with the photolog container width. */
.pf-strip-band {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 0;
}
.pf-strip-band .pf-strip__item {
  border-color: #d9d9d9;
  color: #4a4a4a;
}
.pf-strip-band .pf-strip__item:hover { border-color: #9a9a9a; color: #1c1c1c; }
.pf-strip-band .pf-strip__like.is-liked,
.project-hero__content .pf-strip__like.is-liked { border-color: currentColor; }

/* Jump target clears the fixed site nav on scroll. */
#pfComments { scroll-margin-top: 90px; }

/* ---- legal links in the footer ----
   portfolio/includes/_legal_footer.html, shared with the classic home page and
   the standalone legal pages. */
.project-footer .pf-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1rem;
  margin-top: 0.5rem;
}
.project-footer .pf-legal a { font-size: 0.8rem; text-decoration: underline; }

/* ---- standalone legal page ----
   A text page: no hero, no photolog, just a measure of prose. */
.project-body--legal { padding-top: 2.5rem; }
.project-body--legal .project-prose { max-width: 68ch; }
.project-body--legal .project-prose h2 { margin-top: 2rem; }
.project-body--legal .project-prose p { margin-bottom: 1rem; line-height: 1.65; }
