/* ============================================================
   Shared styles — index.html + about.html
   Palette:
     --ink     deep indigo-black   (text on light, overlays)
     --paper   warm bone           (card backgrounds)
     --brass   warm brass accent   (links, rule, hover)
     --muted   soft slate          (secondary text)
   Type:
     Display: 'Fraunces'  (headings — has personality, used sparingly)
     Body:    'Inter'     (everything else)

   Layout approach:
   .page holds two normal-flow children: <nav> and .photo.
   Nav sits in its own space above the image — it never overlaps the
   picture, so it can't cover any part of it (mobile included). Nav is
   `position: sticky`, so it stays reachable while scrolling without
   sitting on top of the image on first load.
   .photo wraps the actual poster <img> (which sets .photo's height
   from its own natural aspect ratio) plus the scrim/hero/footer
   overlays, which are absolutely positioned *within .photo only* —
   never against the nav's space above it.
   ============================================================ */

:root {
  --ink: #14161f;
  --paper: #efe9df;
  --brass: #b98b4e;
  --brass-light: #d9b579;
  --muted: #9aa0ad;
  --overlay-top: rgba(10, 12, 18, 0.35);
  --overlay-bottom: rgba(10, 12, 18, 0.8);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background-color: var(--ink);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--paper);
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 600;
  margin: 0;
}

a {
  color: var(--paper);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}

a:hover,
a:focus-visible {
  color: var(--brass-light);
  border-bottom-color: var(--brass-light);
}

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

/* ---------- page wrapper ---------- */

.page {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* ---------- top nav — its own space above the image, stays reachable while scrolling ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.85rem clamp(1.25rem, 5vw, 3.5rem);
  background: rgba(15, 17, 24, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(239, 233, 223, 0.12);
}

.site-nav .brand {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.1rem;
  color: var(--paper);
  border: none;
}

.site-nav .links {
  display: flex;
  gap: 0.5rem;
}

.site-nav .links a {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-bottom: none;
}

.site-nav .links a:hover,
.site-nav .links a:focus-visible {
  color: var(--paper);
  background: rgba(185, 139, 78, 0.85);
}

.site-nav .links a.current {
  background: rgba(239, 233, 223, 0.14);
}

/* ---------- photo area: the img inside sets its height ---------- */

.photo {
  position: relative;
  width: 100%;
}

.photo picture {
  display: block; /* avoid the few px of inline whitespace <picture> can add below itself */
}

.bg-image {
  display: block;
  width: 100%;
  height: auto;
  min-height: 60vh; /* keeps layout sane before an image is added, or if one fails to load */
  background-color: var(--ink);
}

/* soft top/bottom scrim so footer text stays legible over any photo */
.scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--overlay-top) 0%, transparent 16%, transparent 55%, var(--overlay-bottom) 100%);
  pointer-events: none;
  z-index: 1;
}

/* ---------- hero (index page) — centered in the first screen only ---------- */

.hero {
  position: absolute;
  top: 50vh;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10;
  width: min(88%, 34rem);
  text-align: center;
  padding: 0 1rem;
}

.hero .rule {
  width: 1px;
  height: 64px;
  background: var(--brass-light);
  margin: 0 auto 1.75rem;
}

.hero h1 {
  font-size: clamp(2.1rem, 6vw, 4.25rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

.hero p.tagline {
  margin-top: 1rem;
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--paper);
  opacity: 0.9;
}

/* ---------- about page content card — same "first screen" treatment ---------- */

.about-wrap {
  position: absolute;
  top: 3rem;
  bottom: 5.5rem; /* reserved footer space — the card can never grow into it */
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  width: min(92%, 34rem);
  display: flex;
  align-items: flex-start; /* top-aligned: centering here could clip the card's top edge
                               when its content is taller than the space available, since
                               scroll containers can't scroll to a centered overflow's
                               negative offset */
  justify-content: center;
  padding: 0 1rem;
  overflow-y: auto; /* safety net if the card is ever taller than the space available */
}

.about-card {
  width: 100%;
  background: rgba(20, 22, 31, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(239, 233, 223, 0.15);
  border-radius: 2px;
  padding: clamp(1.5rem, 4vw, 3rem);
}

.about-card .rule {
  width: 48px;
  height: 1px;
  background: var(--brass-light);
  margin-bottom: 1.5rem;
}

.about-card h2 {
  font-size: clamp(1.6rem, 4vw, 2.5rem);
  margin-bottom: 1.25rem;
}

.about-card p {
  line-height: 1.7;
  color: var(--paper);
  opacity: 0.92;
  margin: 0 0 1rem 0;
}

.about-card p:last-child {
  margin-bottom: 0;
}

/* ---------- footer — sits at the very bottom of the full image ---------- */

.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  text-align: center;
  padding: 1.5rem 1.25rem 2rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer .email {
  color: var(--paper);
  font-weight: 600;
  background: rgba(15, 17, 24, 0.55);
  padding: 0.3rem 0.85rem;
  border-radius: 999px;
}

/* ---------- small screens ---------- */

@media (max-width: 640px) {
  .site-nav {
    padding: 0.7rem 1.1rem;
  }
  .site-nav .brand {
    font-size: 1rem;
  }
  .site-nav .links a {
    padding: 0.35rem 0.7rem;
    font-size: 0.88rem;
  }
  .hero,
  .about-wrap {
    width: 92%;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
