/* ================================================================
   Studio — Nature photography portfolio
   Aesthetic: editorial-quiet, light, generous whitespace,
              sage / stone / forest palette, fine sans + display serif.
   ================================================================ */

:root {
  /* Palette — soft daylight default */
  --bg:        #f5f3ee;          /* warm paper */
  --bg-soft:   #ffffff;          /* card */
  --bg-strong: #ece7dc;          /* dividers / wash */
  --fg:        #1d2420;          /* near-black ink */
  --fg-soft:   #5b6660;          /* muted ink */
  --fg-dim:    #8a948e;          /* sub-muted */
  --accent:    #5a6f4f;          /* sage / forest */
  --accent-2:  #a87a4b;          /* warm earth highlight */
  --border:    #e3ddcf;
  --border-strong: #d2cab8;

  /* Type */
  --font-sans:  "Inter", ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", "Iowan Old Style", "Hoefler Text", Georgia, serif;
  --font-mono:  ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  /* Layout */
  --maxw: 1480px;
  --gutter: clamp(20px, 4vw, 56px);
  --gap: 18px;
  --radius: 2px;
  --radius-lg: 4px;
  --shadow: 0 1px 0 rgba(0,0,0,0.04), 0 8px 24px rgba(20,30,25,0.06);
  --header-h: 72px;
}

/* ----- Reset ----- */
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
code { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-strong); padding: 1px 6px; border-radius: 2px; }
::selection { background: var(--accent); color: #fff; }

/* ===============================================================
   Header — thin, quiet, hairline divider
   =============================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  height: var(--header-h);
  padding: 0 var(--gutter);
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 0;
}
.brand-mark::after {
  content: "";
  width: 16px; height: 12px;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'><path fill='%23fff' d='M2 14 L9 4 L13 9 L17 6 L22 14 Z'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 16'><path fill='%23fff' d='M2 14 L9 4 L13 9 L17 6 L22 14 Z'/></svg>") center/contain no-repeat;
  background: #fff;
}
.brand-name {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav { display: flex; gap: 28px; align-items: center; }
.nav a {
  font-size: 0.78em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
  padding: 6px 0;
  position: relative;
}
.nav a:hover { color: var(--fg); }
.nav a.active { color: var(--fg); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--accent);
  transform: translateX(-50%);
}
.nav a.nav-admin {
  color: var(--fg-dim);
  font-size: 0.7em;
  margin-left: 6px;
  padding-left: 18px;
  border-left: 1px solid var(--border);
  opacity: 0.75;
}
.nav a.nav-admin:hover { color: var(--accent); opacity: 1; }

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; height: auto; padding: 14px var(--gutter); gap: 10px; }
  .nav { width: 100%; gap: 18px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .nav a { font-size: 0.72em; }
}

/* ===============================================================
   Hero — generous, serif, breathable
   =============================================================== */
.hero {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(48px, 9vw, 120px) var(--gutter) clamp(36px, 6vw, 72px);
  text-align: left;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: end;
}
.hero::before {
  content: "Photographies";
  grid-column: 1 / -1;
  font-size: 0.74em;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 12px;
}
.hero::after {
  content: "";
  grid-column: 1 / -1;
  height: 1px;
  background: var(--border);
  margin-top: clamp(28px, 4vw, 56px);
  order: 99;
}
.hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  line-height: 1.02;
  letter-spacing: -0.01em;
  margin: 0;
}
.hero-title em { font-style: italic; color: var(--accent); }
.hero-sub {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--fg-soft);
  max-width: 44ch;
  margin: 0;
}
.hero-meta {
  margin-top: 8px;
  color: var(--fg-dim);
  font-size: 0.78em;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 18px; padding-top: 48px; }
}
@media (min-width: 1900px) {
  :root { --maxw: 1720px; }
}
@media (min-width: 2400px) {
  :root { --maxw: 2080px; --gutter: clamp(40px, 4vw, 96px); }
  .hero-title { font-size: clamp(4rem, 5.5vw, 6.4rem); }
}

/* ===============================================================
   Tag filters — quiet pill chips
   =============================================================== */
.filters {
  max-width: var(--maxw);
  margin: 0 auto 28px;
  padding: 0 var(--gutter);
  display: flex; flex-wrap: wrap; gap: 8px;
}
.chip {
  background: transparent;
  color: var(--fg-soft);
  border: 1px solid var(--border-strong);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.78em;
  letter-spacing: 0.06em;
  transition: all 0.18s ease;
}
.chip:hover { color: var(--fg); border-color: var(--fg-dim); }
.chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ===============================================================
   Masonry — CSS columns, hairline frames
   =============================================================== */
.masonry {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(64px, 10vw, 128px);
  column-gap: var(--gap);
  column-count: 3;
}
@media (min-width: 1900px) { .masonry { column-count: 4; } }
@media (min-width: 2600px) { .masonry { column-count: 5; --maxw: 2200px; } }
@media (max-width: 1100px) { .masonry { column-count: 2; } }
@media (max-width: 600px)  { .masonry { column-count: 1; } }

.tile img,
.tile video {
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: none;          /* tile <a> handles the click */
}

.tile {
  break-inside: avoid;
  margin: 0 0 var(--gap);
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-strong);
  cursor: zoom-in;
  display: block;
  transform: translateZ(0);
}
.tile img,
.tile video {
  width: 100%; height: auto;
  display: block;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.9s cubic-bezier(.2,.7,.2,1);
}
.tile img.loaded,
.tile video.loaded { opacity: 1; }
.tile:hover img,
.tile:hover video { transform: scale(1.025); }

.tile-caption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 18px 18px 16px;
  background: linear-gradient(to top, rgba(20,28,22,0.78) 0%, rgba(20,28,22,0.30) 60%, rgba(20,28,22,0) 100%);
  color: #fff;
  font-size: 0.86em;
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.25s ease, transform 0.3s ease;
  pointer-events: none;
}
.tile:hover .tile-caption { opacity: 1; transform: none; }

/* ===============================================================
   Albums grid (Series page)
   =============================================================== */
.albums {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter) clamp(64px, 10vw, 128px);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(20px, 3vw, 36px);
}
.album-card {
  display: block;
  background: transparent;
  border: 0;
  transition: transform 0.3s ease;
}
.album-card:hover { transform: translateY(-3px); }
.album-card .cover {
  aspect-ratio: 4/5;
  overflow: hidden;
  background: var(--bg-strong);
  border-radius: var(--radius);
  position: relative;
  margin-bottom: 14px;
}
.album-card .cover::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(20,28,22,0.18), transparent 40%);
  pointer-events: none;
}
.album-card .cover img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}
.album-card:hover .cover img { transform: scale(1.04); }
.album-card .body { padding: 0 2px; }
.album-card h3 {
  font-family: var(--font-serif);
  font-weight: 500;
  margin: 0 0 4px;
  font-size: 1.45rem;
  letter-spacing: 0.005em;
}
.album-card p { margin: 0; color: var(--fg-soft); font-size: 0.92em; max-width: 36ch; }
.album-card .meta {
  margin-top: 8px;
  color: var(--fg-dim);
  font-size: 0.72em;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  display: flex; gap: 12px;
}

/* ===============================================================
   Cards (auth, generic)
   =============================================================== */
.card {
  max-width: 480px;
  margin: 32px auto 64px;
  padding: 36px 32px 32px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.auth-form { display: grid; gap: 12px; }
.auth-form label {
  font-size: 0.74em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-soft);
}
.auth-form input {
  background: var(--bg);
  border: 1px solid var(--border-strong);
  color: var(--fg);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1em;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.auth-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 18%, transparent);
}
.btn {
  background: var(--fg);
  color: #fff;
  border: 0;
  border-radius: var(--radius);
  padding: 12px 18px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78em;
  transition: background 0.18s, color 0.18s, transform 0.1s;
}
.btn:hover { background: var(--accent); }
.btn:active { transform: translateY(1px); }
.auth-error { color: #b3402c; margin: 0; font-size: 0.9em; }
.auth-help { color: var(--fg-dim); font-size: 0.85em; margin-top: 18px; line-height: 1.5; }

/* ===============================================================
   Prose
   =============================================================== */
.prose {
  max-width: 64ch;
  margin: 0 auto 48px;
  padding: 0 var(--gutter);
  color: var(--fg-soft);
  font-size: 1.05rem;
  line-height: 1.75;
}
.prose p { margin: 0 0 1.1em; }
.prose strong { color: var(--fg); }

/* Empty / footer */
.empty {
  text-align: center;
  color: var(--fg-dim);
  padding: 80px var(--gutter);
  font-style: italic;
  font-family: var(--font-serif);
  font-size: 1.1rem;
}
.site-footer {
  border-top: 1px solid var(--border);
  padding: 40px var(--gutter) 56px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 0.78em;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ===============================================================
   Lightbox
   =============================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 18, 16, 0.96);
  display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  width: 44px; height: 44px;
  border-radius: 50%;
  font-size: 1.3em;
  display: grid; place-items: center;
  transition: background 0.15s, transform 0.15s;
}
.lb-close:hover, .lb-prev:hover, .lb-next:hover {
  background: rgba(255,255,255,0.14);
}
.lb-close { top: 22px; right: 22px; }
.lb-prev  { left: 22px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 22px; top: 50%; transform: translateY(-50%); }

.lb-stage {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 18px;
  width: min(96vw, 1620px);
  height: 92vh;
}
.lb-img-wrap {
  position: relative;
  width: 100%; height: 100%;
  background: #0d1310;
  border-radius: var(--radius);
  overflow: hidden;
  display: grid; place-items: center;
  cursor: zoom-in;
  touch-action: none;          /* let JS handle pinch */
  user-select: none;
}
.lb-img-wrap.is-zoomed { cursor: grab; }
.lb-img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
  transform-origin: center center;
  transition: transform 0.15s ease-out;
  -webkit-user-drag: none;
  user-select: none;
  -webkit-touch-callout: none;
  pointer-events: auto;
}
.lb-img-wrap.is-zoomed .lb-img { transition: none; }

.lb-actions {
  position: absolute;
  top: 22px; left: 22px;
  display: flex; gap: 8px;
  z-index: 2;
}
.lb-actions button,
.lb-actions a {
  background: rgba(255,255,255,0.05);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  width: 38px; height: 38px;
  border-radius: 50%;
  font-size: 1em;
  display: grid; place-items: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s;
}
.lb-actions button:hover,
.lb-actions a:hover { background: rgba(255,255,255,0.14); }
.lb-zoom-reset { font-size: 0.75em !important; letter-spacing: 0.05em; }
.lb-meta {
  background: rgba(255,255,255,0.04);
  color: #f1efe9;
  padding: 28px 26px;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  overflow: auto;
  font-size: 0.9em;
  display: flex; flex-direction: column; gap: 18px;
}
.lb-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.6rem;
  letter-spacing: 0.005em;
  line-height: 1.2;
}
.lb-exif { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; }
.lb-exif dt {
  color: rgba(241,239,233,0.55);
  font-size: 0.72em;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  align-self: center;
}
.lb-exif dd { margin: 0; color: #f1efe9; }
.lb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.lb-tags .tag {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74em;
  color: #d6d2c5;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .lb-stage { grid-template-columns: 1fr; grid-template-rows: 1fr auto; height: 96vh; }
  .lb-meta { max-height: 38vh; }
  .lb-actions { top: 12px; left: 12px; }
  .lb-close { top: 12px; right: 12px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}
@media (max-width: 480px) {
  .lb-actions button, .lb-actions a { width: 34px; height: 34px; }
}

/* ===============================================================
   Video tiles + lightbox player
   =============================================================== */
.tile.is-video video { background: #000; }
.tile .play-badge {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  pointer-events: none;
  color: #fff;
}
.tile .play-badge svg {
  width: 60px; height: 60px;
  background: rgba(20,28,22,0.55);
  border-radius: 50%;
  padding: 16px;
  backdrop-filter: blur(6px);
  transition: transform 0.25s, background 0.25s;
}
.tile.is-video:hover .play-badge svg {
  transform: scale(1.08);
  background: rgba(90,111,79,0.85);
}

.lb-video-wrap {
  position: relative;
  width: 100%; height: 100%;
  background: #000;
  border-radius: var(--radius);
  overflow: hidden;
}
.lb-video {
  width: 100%; height: 100%;
  object-fit: contain;
  background: #000;
}
.lb-video-overlay {
  position: absolute;
  left: 0; right: 0; top: 0;
  bottom: 60px;
  cursor: pointer;
}
.lb-seek-feedback {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  color: #fff;
  background: rgba(20,28,22,0.65);
  padding: 14px 24px;
  border-radius: 999px;
  font-size: 1.4rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  font-family: var(--font-serif);
  font-style: italic;
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.08);
}
.lb-seek-feedback.on { animation: seekFlash 700ms ease-out forwards; }
@keyframes seekFlash {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }
  20%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); }
}

/* ===============================================================
   Subtle entrance animation on tiles
   =============================================================== */
@media (prefers-reduced-motion: no-preference) {
  .tile { animation: tileIn 600ms ease-out both; }
  .masonry .tile:nth-child(1)  { animation-delay: 40ms; }
  .masonry .tile:nth-child(2)  { animation-delay: 80ms; }
  .masonry .tile:nth-child(3)  { animation-delay: 120ms; }
  .masonry .tile:nth-child(4)  { animation-delay: 160ms; }
  .masonry .tile:nth-child(5)  { animation-delay: 200ms; }
  .masonry .tile:nth-child(6)  { animation-delay: 240ms; }
  .masonry .tile:nth-child(n+7){ animation-delay: 280ms; }
}
@keyframes tileIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* =========================================================
   Landing page (cover) — hero plein écran, à la Lynchee.
   ========================================================= */
body.landing-body {
  margin: 0;
  background: #000;
  color: #fff;
  overflow: hidden;
}
.landing {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto auto;
  align-items: center;
  justify-items: center;
  text-align: center;
  padding: 6vh 6vw;
  box-sizing: border-box;
}
.landing-bg {
  position: absolute;
  inset: 0;
  background-color: #111;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: 0;
  animation: landingZoom 24s ease-in-out infinite alternate;
}
.landing-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 1;
}
.landing-content,
.landing-nav,
.landing-foot {
  position: relative;
  z-index: 2;
}
.landing-content {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  max-width: 880px;
  animation: landingFadeIn 1.4s ease both;
}
.landing-title {
  font-family: var(--font-serif, Georgia, serif);
  font-weight: 400;
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  margin: 0;
  text-shadow: 0 2px 30px rgba(0,0,0,0.45);
}
.landing-sub {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: rgba(255,255,255,0.85);
  max-width: 38em;
  margin: 0;
  font-style: italic;
}
.landing-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
  padding: 0.85rem 1.6rem;
  border: 1px solid rgba(255,255,255,0.7);
  color: #fff;
  text-decoration: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.85rem;
  background: rgba(0,0,0,0.05);
  backdrop-filter: blur(2px);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.landing-cta:hover,
.landing-cta:focus-visible {
  background: rgba(255,255,255,0.12);
  border-color: #fff;
  transform: translateY(-1px);
  outline: none;
}
.landing-cta-arrow { transition: transform 0.25s ease; }
.landing-cta:hover .landing-cta-arrow { transform: translateX(4px); }
.landing-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  justify-content: center;
  margin-top: 2rem;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.landing-nav a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.landing-nav a:hover { color: #fff; border-bottom-color: rgba(255,255,255,0.6); }
.landing-foot {
  margin-top: 1.5rem;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.1em;
}
@keyframes landingFadeIn {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes landingZoom {
  from { transform: scale(1.0); }
  to   { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .landing-bg, .landing-content { animation: none; }
}

