/* ===== Louis Guichard Photography ===== */
:root {
  --bg: #ffffff;
  --fg: #111111;
  --muted: #8a8a8a;
  --line: #e8e8e8;
  --maxw: 1040px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

img { display: block; max-width: 100%; }

/* ---------- shared type ---------- */
.eyebrow {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ===================================================== */
/* SPLASH (index.html)                                   */
/* ===================================================== */
.splash {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}
.splash h1 {
  font-size: clamp(40px, 9.5vw, 96px);
  font-weight: 300;
  letter-spacing: .22em;
  text-transform: uppercase;
  margin: 0 0 22px;
}
.splash .descriptor {
  max-width: 520px;
  font-size: 15px;
  letter-spacing: .04em;
  color: var(--muted);
  margin: 0 auto 52px;
}
.enter {
  display: inline-block;
  font-size: 15px;
  letter-spacing: .4em;
  text-transform: uppercase;
  padding: 20px 60px;
  border: 1px solid var(--fg);
  transition: background .4s var(--ease), color .4s var(--ease);
}
.enter:hover { background: var(--fg); color: var(--bg); }

.socials {
  margin-top: 50px;
  display: flex;
  gap: 22px;
  align-items: center;
}
.socials a {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.socials a:hover { color: var(--fg); }

/* ---- splash with background photo (white text on dark scrim) ---- */
.splash--photo { position: relative; color: #fff; overflow: hidden; }
.splash-bg {
  position: fixed;
  inset: 0;
  background-image: url("img/home-bg.jpg");
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.splash-scrim {
  position: fixed;
  inset: 0;
  background: linear-gradient(rgba(0,0,0,.42), rgba(0,0,0,.52));
  z-index: 1;
}
.splash-content { position: relative; z-index: 2; }
.splash--photo h1 { color: #fff; text-shadow: 0 1px 30px rgba(0,0,0,.35); }
.splash--photo .descriptor { color: rgba(255,255,255,.86); }
.splash--photo .enter { border-color: rgba(255,255,255,.85); color: #fff; }
.splash--photo .enter:hover { background: #fff; color: #111; border-color: #fff; }
.splash--photo .socials a { color: rgba(255,255,255,.7); }
.splash--photo .socials a:hover { color: #fff; }

/* ===================================================== */
/* HEADER / NAV (inner pages)                            */
/* ===================================================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  background: rgba(255,255,255,.86);
  backdrop-filter: saturate(120%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .brand {
  font-size: 14px;
  letter-spacing: .22em;
  text-transform: uppercase;
}
.site-nav { display: flex; gap: 26px; }
.site-nav a {
  font-size: 11px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color .3s var(--ease);
}
.site-nav a:hover, .site-nav a.active { color: var(--fg); }

.nav-toggle { display: none; background: none; border: 0; cursor: pointer; font-size: 11px; letter-spacing:.2em; text-transform:uppercase; color: var(--fg); }

main { padding-top: 70px; }

/* ===================================================== */
/* WORK INDEX (work.html)                                */
/* ===================================================== */
.index-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  max-width: 1500px;
  margin: 0 auto;
  padding: 14px;
}
.index-item {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #ececec;
}
/* a lone last item spans full width (banner), like the reference bottom block */
.index-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7;
}
.index-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 1.4s var(--ease);
  -webkit-user-drag: none; user-select: none;
}
.index-item:hover img { transform: scale(1.04); }
.index-overlay {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .45s var(--ease);
}
.index-item:hover .index-overlay { background: rgba(0,0,0,.34); }
.index-title {
  color: #fff;
  font-size: clamp(20px, 2.7vw, 36px);
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-align: center;
  padding: 0 18px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  text-shadow: 0 1px 24px rgba(0,0,0,.4);
}
.index-item:hover .index-title { opacity: 1; transform: none; }

/* ===================================================== */
/* GALLERY (gallery.html)                                */
/* ===================================================== */
.gallery-head {
  text-align: center;
  padding: 60px 24px 30px;
}
.gallery-head h1 {
  font-size: clamp(26px, 5vw, 44px);
  font-weight: 300;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin: 0 0 8px;
}
.gallery-head p { color: var(--muted); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; margin: 0; }

.gallery {
  max-width: 1280px;
  margin: 0 auto;
  padding: 14px 14px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.gallery figure {
  margin: 0;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #f0f0f0;
}
/* transparent cover layer: deters drag / "save image as" (hits the layer, not the img) */
.gallery figure::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}
.gallery img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  height: auto;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity .8s var(--ease), transform 1.2s var(--ease);
  -webkit-user-drag: none;
  user-select: none;
}
.gallery img.in { opacity: 1; transform: none; }
.gallery figure:hover img.in { opacity: .82; }

.gallery-nav {
  display: flex;
  justify-content: space-between;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px 90px;
  font-size: 11px; letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted);
}
.gallery-nav a { transition: color .3s var(--ease); }
.gallery-nav a:hover { color: var(--fg); }

/* ===================================================== */
/* TEXT PAGES (about / contact)                          */
/* ===================================================== */
.page {
  max-width: 620px;
  margin: 0 auto;
  padding: 90px 24px 120px;
}
.page h1 {
  font-size: clamp(24px, 4.4vw, 36px);
  font-weight: 300;
  letter-spacing: .16em;
  text-transform: uppercase;
  margin: 0 0 26px;
}
.page p { font-size: 15px; color: #333; margin: 0 0 18px; }
.page a.link { border-bottom: 1px solid var(--line); }
.page a.link:hover { border-color: var(--fg); }

/* ---- contact form ---- */
.page--contact { max-width: 720px; }
.contact-intro { margin-bottom: 42px; }
.contact-form { margin-top: 6px; }
.field { margin-bottom: 22px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field label {
  display: block;
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%; box-sizing: border-box;
  font-family: inherit; font-size: 15px; font-weight: 300; color: var(--fg);
  background: #fafafa; border: 1px solid var(--line); border-radius: 0;
  padding: 12px 14px; transition: border-color .25s var(--ease);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--fg); }
.field textarea { resize: vertical; min-height: 120px; }
.contact-form .enter {
  margin-top: 8px; cursor: pointer;
  background: none; font-family: inherit;
}
.contact-form .enter:disabled { opacity: .5; cursor: default; }
.form-status { margin-top: 20px; font-size: 13px; letter-spacing: .02em; }
.form-status.ok { color: #2e7d32; }
.form-status.err { color: #c0392b; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; gap: 0; } }

/* ===================================================== */
/* LIGHTBOX                                              */
/* ===================================================== */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15,15,15,.975);
  display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox .lb-stage {
  max-width: 90vw; max-height: 86vh;
  display: flex; align-items: center; justify-content: center;
}
.lightbox img {
  max-width: 90vw; max-height: 86vh; width: auto; height: auto;
  opacity: 0; transition: opacity .35s var(--ease);
  -webkit-user-drag: none; user-select: none;
}
.lightbox img.ready { opacity: 1; }
.lb-btn {
  position: fixed;
  background: rgba(0,0,0,.28);
  color: #fff; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .25s var(--ease), opacity .25s var(--ease);
  z-index: 101;
}
.lb-btn:hover { background: rgba(0,0,0,.55); }
.lb-prev, .lb-next { top: 50%; transform: translateY(-50%); width: 52px; height: 76px; font-size: 26px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }
.lb-close { top: 16px; right: 18px; width: 46px; height: 46px; font-size: 26px; line-height: 1; }
.lb-count {
  position: fixed; bottom: 22px; left: 0; right: 0;
  text-align: center; color: rgba(255,255,255,.7);
  font-size: 11px; letter-spacing: .25em; z-index: 101;
}
@media (max-width: 640px) {
  .lb-prev, .lb-next { width: 40px; height: 60px; font-size: 20px; }
  .lb-prev { left: 6px; } .lb-next { right: 6px; }
}

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  text-align: center;
  padding: 34px 24px;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-footer a:hover { color: var(--fg); }

/* ===================================================== */
/* RESPONSIVE                                            */
/* ===================================================== */
@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: fixed; top: 53px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden;
    transition: max-height .4s var(--ease);
  }
  .site-nav.open { max-height: 320px; }
  .site-nav a { padding: 16px 20px; border-top: 1px solid var(--line); }
  main { padding-top: 54px; }
}

@media (max-width: 900px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}
@media (max-width: 520px) {
  .gallery { grid-template-columns: 1fr; gap: 6px; padding: 8px 8px 60px; }
}

/* touch / small screens have no hover: show series titles by default */
@media (hover: none), (max-width: 640px) {
  .index-grid { grid-template-columns: 1fr; gap: 8px; padding: 8px; }
  .index-item, .index-item:last-child:nth-child(odd) { aspect-ratio: 3 / 2; }
  .index-overlay { background: rgba(0,0,0,.28); }
  .index-title { opacity: 1; transform: none; }
}
