/* ==========================================================================
   Marina Photo Art — stylesheet
   Palette drawn from the work itself: swamp umber, ivory, lichen green,
   with an ember highlight reserved for focus and hover moments.
   ========================================================================== */

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/Fraunces.woff2') format('woff2');
}
@font-face {
  font-family: 'Fraunces';
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url('../fonts/Fraunces-Italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Ephesis';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/Ephesis.woff2') format('woff2');
}
@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url('../fonts/Archivo.woff2') format('woff2');
}

/* ---------- tokens ---------- */

:root {
  /* dark is the gallery's native state */
  --bg: #161210;
  --bg-raise: #1f1916;
  --ink: #ece4d8;
  --ink-soft: #b3a795;
  --line: #362d26;
  --accent: #8fa77e;      /* lichen — nod to the original green wordmark */
  --accent-ink: #161210;  /* text on accent */
  --ember: #c96b3b;       /* reserved: hover + focus moments */
  --veil: rgba(12, 9, 7, 0.45);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}


:root[data-theme="dark"] {
  --bg: #161210;
  --bg-raise: #1f1916;
  --ink: #ece4d8;
  --ink-soft: #b3a795;
  --line: #362d26;
  --accent: #8fa77e;
  --accent-ink: #161210;
  --ember: #c96b3b;
  --veil: rgba(12, 9, 7, 0.45);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg: #f3efe7;
  --bg-raise: #ffffff;
  --ink: #241d18;
  --ink-soft: #6f6252;
  --line: #ddd4c4;
  --accent: #5c7350;
  --accent-ink: #f6f3ec;
  --ember: #b05426;
  --veil: rgba(20, 14, 10, 0.38);
  --shadow: 0 18px 44px rgba(60, 44, 30, 0.18);
  color-scheme: light;
}

/* ---------- base ---------- */

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Archivo', 'Segoe UI', system-ui, sans-serif;
  font-weight: 300;
  font-size: 1.05rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 300;
  line-height: 1.05;
  text-wrap: balance;
}

h2 { font-size: clamp(1.9rem, 3.9vw, 2.7rem); }
h3 { font-size: clamp(1.4rem, 2.5vw, 1.7rem); }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.section {
  padding: clamp(4.5rem, 9vw, 8rem) clamp(1.25rem, 5vw, 4.5rem);
  max-width: 1440px;
  margin-inline: auto;
}

.section-head { margin-bottom: clamp(2rem, 4vw, 3.5rem); }

:focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 3px;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.9em 1.9em;
  border: 1px solid transparent;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}

.btn-solid {
  background: var(--accent);
  color: var(--accent-ink);
}
.btn-solid:hover { background: var(--ember); color: #fff8ef; }

.btn-ghost {
  border-color: currentColor;
  color: inherit;
  background: none;
}
.btn-ghost:hover { color: var(--ember); }

/* ---------- header ---------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem clamp(1.25rem, 4vw, 3rem);
  color: var(--ink);
  transition: background-color 0.35s, color 0.35s, box-shadow 0.35s;
}

.site-header.is-scrolled,
.site-header.on-page {
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 1px 0 var(--line);
}

/* subpages: clear the fixed header */
.page-main { padding-top: 4.2rem; }

.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
}

.brand-name {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.7rem;
  line-height: 1;
}

.brand-sub {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0.75;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 1.9rem);
}

.site-nav a {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s, color 0.2s;
}
.site-nav a:hover { opacity: 1; color: var(--ember); }

.site-nav a[aria-current="page"] {
  opacity: 1;
  color: var(--accent);
}

.nav-ig svg { display: block; transform: translateY(2px); }

/* ---------- home hero: quiet split, photo framed by the page ---------- */

.home-hero {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(3rem, 6vw, 5rem);
}

.home-hero h1 {
  font-family: 'Ephesis', 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.5rem, 5.1vw, 3.6rem);
  line-height: 1.1;
  margin: 0.1rem 0 0.9rem;
}

.home-hero h1 em {
  font-style: normal;
  color: var(--ember);
}

.hero-lede {
  max-width: 28rem;
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  margin-bottom: 1.8rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* two stacked layers; the incoming photo fades in over the outgoing one
   (a film-style cross dissolve) */
.hero-link { display: block; text-decoration: none; }

.hero-stack {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 62vh;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--bg-raise);
}

.hero-stack img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 2s ease;
}

.hero-stack img.is-active { opacity: 1; }

.home-hero-photo figcaption {
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  padding-top: 0.7rem;
  transition: opacity 0.7s ease;
}
.home-hero-photo figcaption a { color: inherit; }

/* ---------- page head (subpages) ---------- */

.page-head {
  padding-bottom: 0;
}

.page-head h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.3rem);
}

.page-head + .section {
  padding-top: clamp(2.2rem, 4vw, 3.5rem);
}

.page-lede {
  color: var(--ink-soft);
  max-width: 38rem;
  margin-top: 1rem;
}

/* ---------- featured filmstrip (home) ----------
   Two identical sets drift left; when the first has fully passed,
   the loop restarts invisibly. Pausing on hover keeps photos clickable. */

.filmstrip {
  overflow: hidden;
}

/* the featured strip's title sits quieter than other section titles */
.featured .section-head h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
}

.film-track {
  display: flex;
  gap: 1rem;
  width: max-content;
  animation: film-drift 110s linear infinite;
}

.film-set {
  display: flex;
  gap: 1rem;
}

.film-track a {
  flex-shrink: 0;
  transition: opacity 0.3s;
}

.film-track a:hover img { opacity: 0.85; }

.film-track img {
  height: clamp(120px, 16vw, 190px);
  width: auto;
  display: block;
}

.filmstrip:hover .film-track,
.filmstrip:focus-within .film-track {
  animation-play-state: paused;
}

/* one full set plus the gap between sets = a seamless loop */
@keyframes film-drift {
  to { transform: translateX(calc(-50% - 0.5rem)); }
}

.albums-more { margin-top: clamp(1.6rem, 3vw, 2.4rem); }

/* ---------- album rows (albums page) ---------- */

.album-rows {
  display: grid;
  gap: clamp(3rem, 7vw, 5.5rem);
}

.album-row {
  display: grid;
  grid-template-columns: 7fr 5fr;
  gap: clamp(1.6rem, 4vw, 3.5rem);
  align-items: center;
}

.album-row:nth-child(even) { grid-template-columns: 5fr 7fr; }
.album-row:nth-child(even) .album-row-photo { order: 2; }

.album-row-photo {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
}

a.album-row-photo,
button.album-row-photo { cursor: pointer; }

.album-row-photo img {
  width: 100%;
  max-height: 60vh;
  object-fit: cover;
  box-shadow: var(--shadow);
  transition: opacity 0.3s;
}

a.album-row-photo:hover img,
button.album-row-photo:hover img { opacity: 0.9; }

/* album detail pages: show each photo whole (no crop), text alongside */
.photo-detail .album-row-photo {
  cursor: zoom-in;
}

.photo-detail .album-row-photo img {
  max-height: none;
  height: auto;
  object-fit: contain;
}

/* vertical photos shown as a landscape crop in the row; the lightbox keeps the full frame */
.photo-detail .album-row-photo.crop-landscape {
  aspect-ratio: 3 / 2;
  overflow: hidden;
}

.photo-detail .album-row-photo.crop-landscape img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.back-link {
  text-decoration: none;
  color: var(--accent);
}
.back-link:hover { color: var(--ember); }

.album-back { padding-top: 0; }

/* placeholder cover for an album with no photos yet */
.album-cover-soon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 340px;
  border: 1px solid var(--line);
  background: var(--bg-raise);
}
.album-cover-soon span {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink-soft);
}

.album-empty {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.35rem;
  color: var(--ink-soft);
}

.photo-place {
  margin-top: 1.2rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
}

button.btn { font: inherit; cursor: pointer; }

.album-row-text p {
  color: var(--ink-soft);
  font-size: 0.85rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  max-width: 30rem;
  margin: 1rem 0 1.6rem;
}

/* ---------- gallery ---------- */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: clamp(1.6rem, 3vw, 2.4rem);
}

.filter {
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line);
  padding: 0.55em 1.3em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}

.filter:hover { color: var(--ink); border-color: var(--ink-soft); }

.filter.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}

.masonry {
  columns: 3;
  column-gap: 1.1rem;
}

.shot {
  break-inside: avoid;
  margin-bottom: 1.1rem;
}

.shot.is-hidden { display: none; }

.shot-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
  font: inherit;
  color: inherit;
  text-align: left;
}

.shot img {
  width: 100%;
  transition: opacity 0.3s;
}

.shot-open:hover img { opacity: 0.88; }

.shot figcaption {
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  padding: 0.55rem 0.1rem 0.2rem;
  font-style: italic;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1rem;
}

/* ---------- about ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(280px, 4fr) 6fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  border-top: 1px solid var(--line);
}

.about-photo img {
  width: 100%;
  box-shadow: var(--shadow);
}

.about-text p + p { margin-top: 1rem; }

.about-text h2 { margin-bottom: 1.2rem; }

.about-text p {
  max-width: 34rem;
  color: var(--ink-soft);
}

.about-links { margin-top: 1.8rem; }

/* ---------- contact ---------- */

.contact {
  border-top: 1px solid var(--line);
  text-align: center;
}

.contact-inner { max-width: 44rem; margin-inline: auto; }

.contact p {
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 1.1rem auto 0;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.9rem;
  margin-top: 2.2rem;
}

.contact-notes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.6rem;
  margin-top: clamp(2.5rem, 5vw, 4rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line);
  text-align: left;
}

.contact-notes dt {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.contact-notes dd {
  font-size: 0.95rem;
  color: var(--ink-soft);
}

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem clamp(1.25rem, 5vw, 4.5rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

/* ---------- lightbox ---------- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(10, 7, 5, 0.93);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ece4d8;
}

.lightbox[hidden] { display: none; }

.lb-stage {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
}

.lb-stage img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
}

.lb-stage figcaption {
  font-family: 'Fraunces', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
  color: #cfc3ab;
}

.lightbox button {
  position: absolute;
  font: inherit;
  background: none;
  border: 0;
  color: #cfc3ab;
  cursor: pointer;
  font-size: 1.6rem;
  line-height: 1;
  padding: 0.6rem 0.9rem;
  transition: color 0.2s;
}
.lightbox button:hover { color: var(--ember); }

.lb-close { top: 1rem; right: 1.2rem; font-size: 2.2rem; }
.lb-prev { left: 0.8rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 0.8rem; top: 50%; transform: translateY(-50%); }

/* ---------- like button ---------- */

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--line);
  padding: 0.5em 1.1em;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
  margin-top: 1rem;
}
.like-btn:hover,
.like-btn.is-liked { color: var(--ember); border-color: var(--ember); }

.lb-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

/* overrides .lightbox button (which is position:absolute + large font) */
.lightbox .lb-like {
  position: static;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.45em 1em;
  border: 1px solid rgba(207, 195, 171, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  line-height: normal;
  transition: color 0.2s, border-color 0.2s;
  margin-top: 0;
}
.lightbox .lb-like:hover,
.lightbox .lb-like.is-liked { color: var(--ember); border-color: var(--ember); }

/* ---------- reveal on scroll ---------- */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .film-track { animation: none; }
  .filmstrip { overflow-x: auto; }
  .hero-stack img { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .masonry { columns: 2; }
  .about { grid-template-columns: 1fr; }
  .about-photo { max-width: 420px; }
  .album-row,
  .album-row:nth-child(even) { grid-template-columns: 1fr; }
  .album-row:nth-child(even) .album-row-photo { order: 0; }
  .contact-notes { grid-template-columns: 1fr; }
  .home-hero { grid-template-columns: 1fr; }
  .hero-stack { max-height: 48vh; }
}

@media (max-width: 620px) {
  .masonry { columns: 1; }
  .site-header { flex-direction: column; align-items: center; gap: 0.5rem; padding-block: 0.8rem; }
  .brand-sub { display: none; }
  .site-nav { gap: 0.9rem; }
  .site-nav a { font-size: 0.7rem; letter-spacing: 0.12em; }
  .page-main { padding-top: 6.5rem; }
}
