/* styles.css — shared stylesheet for observedbutnotreally.com
   (assembled from the pages' inline styles; both pages are built by
   scripts/build.js from templates/ + site-en.json) */

body {
  background-color: #ffffff;
  color: #000000;
  font-family: "Outfit", sans-serif;
  font-weight: 300;
  margin: 0;
}
.font-serif-elegant {
  --soft: 28;
  --wght: 500;
  --wonk: 1;
  --opsz: 143.999;
  font-family: "Fraunces", serif;
  font-optical-sizing: auto;
  font-variation-settings:
    "opsz" var(--opsz),
    "wght" var(--wght),
    "SOFT" var(--soft),
    "WONK" var(--wonk);
}
/* Ampersands inside titles use Alegreya's calligraphic glyph, weighted
         up so it matches Fraunces' presence */
.amp {
  font-family: "Alegreya", serif;
  font-weight: 500;
  font-size: 0.95em;
}
/* Page-based scroll snapping: cover, quote and every spread is a snap
         point. proximity (not mandatory) so tall mobile spreads stay scrollable;
         scroll-snap-stop: always so a fast fling can't skip multiple pages. */
html {
  scroll-snap-type: y proximity;
}
/* Zoomed in? disable snapping — it fights pinch-panning */
html.no-snap {
  scroll-snap-type: none;
}
.cover-wrapper,
.quote-page,
.portfolio-page,
.break-page {
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
/* Thematic break pages — the gap, and the narrator readjusting */
.break-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 5vh 8vh;
  text-align: center;
}
.break-page--dark {
  background-color: #000000;
  color: #ffffff;
}
.quote-container {
  width: clamp(500px, 33vw, 100%);
}
.cover-wrapper {
  height: 100vh;
  height: 100svh; /* mobile browsers: fit the visible viewport, not the URL-bar area */
  display: flex;
  flex-direction: column;
}
.cover-image-container {
  flex-grow: 1;
  background-color: #ffffff;
  display: flex;
  padding: 2vh 3vh;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.cover-image {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Changed back to contain to prevent cropping */
}
.cover-title-container {
  letter-spacing: -0.02em;
  padding: 2vh 3vh 6vh;
  text-align: center;
  transform: translateY(-20px); /* Moves the container up */
}
.portfolio-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 5vh 5vw;
  gap: 30px;
}
.quote-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2vh 5vh 8vh;
  text-align: center;
}
.image-container {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: calc(90vw - 250px);
}
.text-link.lang-current {
  color: #000000;
  border-bottom-color: #000000;
  font-weight: 500;
}

.text-container {
  width: fit-content;
  min-width: 200px;
  max-width: 500px;
  flex-shrink: 1;
}
/* Caption text pulled from picture metadata may contain newlines */
.text-container p {
  white-space: pre-line;
  font-size: 1.05em;
  line-height: 1.5em;
  text-wrap-style: balance;
}
.text-container h2 {
  /* no text-wrap: same forced-break flattening issue as the captions */
}
.index-container {
  font-family: "Outfit";
  font-size: 2vh;
  position: absolute;
  bottom: 0.5vh;
  font-weight: 900;
  opacity: 0.1;
  line-height: 0.8;
  letter-spacing: -0.02em;
  right: 0.5vh;
}
/* Left/right alternation via parity classes (assigned among spreads
         only, so break pages don't disturb it). Desktop only; mobile stacks. */
@media (min-width: 769px) {
  .portfolio-pages .portfolio-page.page-parity-odd .image-container {
    order: 1;
    justify-content: flex-end;
  }
  .portfolio-pages .portfolio-page.page-parity-odd .text-container {
    order: 2;
    text-align: left;
  }
  .portfolio-pages .portfolio-page.page-parity-even .image-container {
    order: 2;
    justify-content: flex-start;
  }
  .portfolio-pages .portfolio-page.page-parity-even .text-container {
    order: 1;
    text-align: right;
  }
}
.image-container img {
  height: auto;
  object-fit: contain;
  max-height: 90vh;
  max-width: 100%;
}
/* Responsive styles for screens smaller than 768px (tablets and phones) */
@media (max-width: 768px) {
  /* Cover: group photo + title into one centered unit so they don't
           get separated by a big void; whitespace splits evenly top/bottom. */
  .cover-wrapper {
    height: auto;
    min-height: 100svh;
    justify-content: center;
  }
  .cover-image-container {
    flex-grow: 0;
  }
  .cover-title-container {
    transform: none;
  }
  .portfolio-page {
    align-items: flex-start;
    flex-direction: column;
  }
  .portfolio-pages .image-container {
    order: 1;
    width: 100%;
    max-width: none;
    justify-content: flex-start;
  }
  /* Landscape photos bleed edge-to-edge on mobile/tablet;
           portrait images stay contained within the padded column. */
  .portfolio-pages .image-container.image-landscape {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  .portfolio-pages .text-container {
    order: 2;
    width: 100%;
    max-width: none; /* full width on mobile/tablet — no 500px cap */
    text-align: left;
  }
  .portfolio-pages .image-container img {
    max-height: 66vh;
  }
}
/* Text links (imprint style) — used for the social rows */
.text-link {
  color: #4b5563; /* gray-600 */
  text-decoration: none;
  border-bottom: 1px solid #d1d5db; /* gray-300 */
  transition: color 0.2s;
}
.text-link:hover {
  color: #000000;
  border-bottom-color: #000000;
}
/* Site footer (link to imprint page) — also a snap point so the
         snapping can't trap the scroll above it */
.site-footer {
  text-align: center;
  font-size: 0.8rem;
  flex-direction: column;
  scroll-snap-align: end;
}
/* Book title in the footer: deliberately much smaller than the cover */
.site-footer-title {
  font-weight: 500;
  font-size: 1.25rem;
  margin: 0 0 1rem;
}
.site-footer-copyright {
  margin-top: 1.5rem;
  font-size: 0.7rem;
  color: #777;
  letter-spacing: 0.04em;
}
.site-footer a {
  color: #4b5563;
  text-decoration: none;
  border-bottom: 1px solid #d1d5db;
}
.site-footer a:hover {
  color: #000000;
  border-bottom-color: #000000;
}
/* ---- imprint page (body.imprint) ---- */
body.imprint {
  font-size: 15px;
}
.imprint .wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 5vh;
}
.imprint h1 {
  font-weight: 500;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}
.imprint .amp {
  font-family: "Alegreya", serif;
  font-weight: 600;
  font-size: 0.95em;
}
.imprint h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 1.6rem 0 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.imprint p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: #222;
}
.imprint a {
  color: #4b5563;
  text-decoration: none;
  border-bottom: 1px solid #d1d5db;
}
.imprint a:hover {
  color: #000000;
  border-bottom-color: #000000;
}
.imprint .back {
  display: inline-block;
  margin-bottom: 3rem;
  font-size: 0.85rem;
}
.imprint .note {
  color: #888;
  font-size: 0.8rem;
}
.imprint .social {
  margin-top: 3rem;
  font-size: 0.9rem;
}
.imprint .lang {
  font-size: 0.9rem;
}
