/* ============================================================
   Keyla — editorial portfolio
   Paper, ink, one drop of oxblood. Photography does the talking.
   ============================================================ */

:root {
  --paper: #f5f1e9;
  --paper-deep: #ece5d8;
  --ink: #1b1916;
  --ink-soft: #6a6256;
  --ox: #7d2e1e;
  --hairline: rgba(27, 25, 22, 0.16);
  --serif: "Cormorant Garamond", "Times New Roman", serif;
  --sans: "Archivo", "Helvetica Neue", sans-serif;
  --hand: "Nothing You Could Do", cursive;
  --ease: cubic-bezier(0.25, 1, 0.4, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
em { font-style: italic; }
::selection { background: var(--ink); color: var(--paper); }

.section-mark {
  font-size: 0.7rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ox);
  margin-bottom: 1.1rem;
}

/* Reveal is progressive enhancement: hidden only when JS is confirmed,
   so content is always visible if scripts fail. */
.js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Masthead ---------- */
.masthead {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 1.05rem clamp(1.2rem, 4vw, 3rem);
  font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
  transition: background 0.4s var(--ease), box-shadow 0.4s var(--ease), color 0.4s var(--ease);
  /* At the top the bar is transparent: blend the text against whatever is behind it
     (light over the dark photo, dark over the pale text column) so it's always legible. */
  color: #fff; mix-blend-mode: difference;
}
.masthead__left { color: inherit; opacity: 0.8; order: 1; justify-self: center; }
/* Once scrolled, a solid paper bar takes over — normal ink text, no blend. */
.masthead.is-scrolled {
  color: var(--ink); mix-blend-mode: normal;
  background: rgba(245, 241, 233, 0.92); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--hairline);
}
.masthead.is-scrolled .masthead__left { color: var(--ink-soft); opacity: 1; }
.masthead__name { font-family: var(--serif); font-size: 1.45rem; font-weight: 500; font-style: italic; letter-spacing: 0.05em; text-transform: none; justify-self: start; order: 0; }
.masthead__nav { justify-self: end; display: flex; gap: 1.8rem; order: 2; }
.masthead__nav a { position: relative; padding-bottom: 2px; }
.masthead__nav a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.45s var(--ease); }
.masthead__nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.masthead__toggle { display: none; justify-self: end; background: none; border: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; padding: 0.4rem 0; }

.drawer { position: fixed; inset: 0; z-index: 49; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.2rem; background: var(--paper); font-family: var(--serif); font-size: 2rem; font-style: italic; opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s; }
.drawer.is-open { opacity: 1; visibility: visible; }
.drawer a:hover { color: var(--ox); }

/* ---------- Cover ---------- */
.cover {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100svh;
  align-items: stretch;
}
.cover__text {
  display: flex; flex-direction: column; justify-content: center;
  align-items: flex-end; text-align: right;
  padding: 7rem clamp(1.5rem, 4vw, 4rem) 3rem;
}
.cover__kicker { font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink-soft); }
.cover__title { font-family: var(--serif); font-weight: 300; font-size: clamp(4.5rem, 12vw, 10rem); line-height: 0.9; letter-spacing: -0.01em; margin: 0.3rem 0 0; }
.cover__hand { font-family: var(--hand); font-size: clamp(1.2rem, 2.4vw, 1.8rem); color: var(--ox); transform: rotate(-2deg); margin: 0.4rem 0.4rem 0 0; }
.cover__blurb { font-family: var(--serif); font-size: clamp(1.05rem, 1.7vw, 1.35rem); line-height: 1.5; color: var(--ink-soft); max-width: 38ch; margin-top: 2rem; }
.cover__cta { margin-top: 2.2rem; align-self: flex-end; font-size: 0.74rem; letter-spacing: 0.22em; text-transform: uppercase; border-bottom: 1px solid var(--ink); padding-bottom: 0.35rem; transition: gap 0.3s; }
.cover__cta span { display: inline-block; transition: transform 0.4s var(--ease); }
.cover__cta:hover span { transform: translateY(4px); }
.cover__media { position: relative; overflow: hidden; order: -1; }
.cover__media img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; }
.cover__credit {
  position: absolute; bottom: 1.4rem; left: 1.4rem;
  font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--paper); mix-blend-mode: difference;
}

/* ---------- Press line ---------- */
.pressline {
  text-align: center; font-family: var(--serif);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  padding: 1.9rem clamp(1.2rem, 5vw, 4rem);
  border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  color: var(--ink-soft);
}
.pressline em { color: var(--ink); }

/* ---------- About ---------- */
.apropos {
  display: grid;
  grid-template-columns: 1fr 0.95fr;
  grid-template-areas: "photo col";
  column-gap: clamp(2rem, 5vw, 5rem);
  max-width: 1180px; margin: 0 auto;
  padding: clamp(4.5rem, 11vh, 8rem) clamp(1.2rem, 5vw, 4rem);
  align-items: center;
}

/* Right column: quote + body, centered as one block against the portrait */
.apropos__col { grid-area: col; }

/* Lead statement — sits above the body */
.apropos__intro { max-width: 40ch; }
.apropos__quote {
  position: relative; margin-top: 0.5rem;
  font-family: var(--serif); font-weight: 300; font-style: italic;
  font-size: clamp(1.55rem, 2.4vw, 2.3rem); line-height: 1.14; letter-spacing: -0.005em;
}
.apropos__quote::before {
  content: "\201C"; position: absolute; top: -0.34em; left: -0.52em;
  font-size: 1.7em; line-height: 1; color: var(--ox); opacity: 0.85;
}

/* Framed portrait — capped so it reads as a print, not a column */
.apropos__photo { grid-area: photo; position: relative; align-self: center; }
.apropos__photo img {
  width: 100%; aspect-ratio: 4 / 5; max-height: 74vh;
  object-fit: cover; object-position: 38% 14%;
  box-shadow: 0 30px 70px rgba(27, 25, 22, 0.26);
}
.apropos__photo figcaption {
  font-family: var(--serif); font-style: italic; font-size: 0.95rem;
  color: var(--ink-soft); text-align: right; margin-top: 0.8rem;
}

/* Body copy, vertically centered against the portrait */
.apropos__body { max-width: 48ch; margin-top: clamp(1.6rem, 3vw, 2.4rem); }
.apropos__body p { color: var(--ink-soft); }
.apropos__body p + p { margin-top: 1.2rem; }
.apropos__body em { color: var(--ink); }
.dropcap { float: left; font-family: var(--serif); font-size: 3.6rem; line-height: 0.7; padding: 0.26rem 0.5rem 0 0; color: var(--ox); }

.apropos__meta {
  margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid var(--hairline);
  display: grid; gap: 0.9rem;
}
.apropos__meta div { display: grid; grid-template-columns: 8rem 1fr; align-items: baseline; gap: 1rem; }
.apropos__meta dt { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ox); }
.apropos__meta dd { font-family: var(--serif); font-style: italic; font-size: 1.1rem; color: var(--ink); }

.apropos__sig { font-family: var(--hand); font-size: 2.1rem; color: var(--ink); margin-top: 1.8rem; transform: rotate(-3deg); }

/* ---------- Series (themed galleries) ---------- */
.series { padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 5vw, 4rem); }
.series--alt { background: var(--paper-deep); }
.series__head { max-width: 60ch; margin-bottom: 2.6rem; }
.series__head h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.6rem, 7vw, 4.8rem); line-height: 1.02; }
.series__note { color: var(--ink-soft); margin-top: 0.7rem; font-family: var(--serif); font-style: italic; font-size: 1.15rem; max-width: 46ch; }

/* Centered gallery — photos kept at their true proportions and sized to a
   uniform row height; each row is centered, so leftover space splits evenly
   on both sides instead of pooling on the right. Click any to enlarge. */
.masonry { display: flex; flex-wrap: wrap; justify-content: center; gap: clamp(0.45rem, 0.9vw, 0.85rem); }
.masonry figure {
  position: relative; margin: 0;
  flex: 0 0 auto; height: clamp(260px, 34vw, 440px);
  overflow: hidden; cursor: zoom-in; background: var(--paper-deep);
}
/* aspect-ratio (set inline per photo) + fixed height give each tile its natural width. */
.masonry img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.8s var(--ease); }
.masonry figure:hover img { transform: scale(1.04); }
.masonry figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.6rem 1rem 0.8rem; color: #fff;
  font-family: var(--serif); font-style: italic; font-size: 1rem;
  background: linear-gradient(transparent, rgba(15,12,10,0.72));
  opacity: 0; transform: translateY(8px); transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.masonry figure:hover figcaption { opacity: 1; transform: none; }
@media (max-width: 900px)  { .masonry figure { height: clamp(220px, 38vw, 340px); } }
@media (max-width: 680px)  { .masonry figure { height: clamp(200px, 56vw, 300px); } .masonry figcaption { font-size: 0.88rem; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(13, 11, 9, 0.94);
  opacity: 0; visibility: hidden; transition: opacity 0.35s var(--ease), visibility 0.35s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox img { max-width: 90vw; max-height: 86vh; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox__cap { position: absolute; bottom: 1.4rem; left: 0; right: 0; text-align: center; color: #e8e2d6; font-family: var(--serif); font-style: italic; font-size: 1.05rem; }
.lightbox__btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: #fff; cursor: pointer;
  font-size: 2.4rem; line-height: 1; padding: 1rem; opacity: 0.7; transition: opacity 0.3s;
  font-family: var(--serif);
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__prev { left: clamp(0.3rem, 2vw, 2rem); }
.lightbox__next { right: clamp(0.3rem, 2vw, 2rem); }
.lightbox__close { position: absolute; top: 1rem; right: 1.4rem; font-size: 1.7rem; transform: none; }
@media (max-width: 680px) { .lightbox__btn { font-size: 1.8rem; padding: 0.5rem; } }

/* ---------- Stats / fiche ---------- */
.fiche { padding: clamp(5rem, 12vh, 9rem) clamp(1.2rem, 5vw, 4rem); max-width: 900px; margin: 0 auto; }
.fiche h2 { font-family: var(--serif); font-weight: 300; font-style: italic; font-size: clamp(2.4rem, 6vw, 4rem); }
.fiche__aside { font-family: var(--sans); font-style: normal; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--ink-soft); text-transform: none; }
.fiche__card { margin: 2.4rem 0 0; }
.fiche__card img { width: 100%; height: auto; display: block; }

/* ---------- Métier ---------- */
.metier { padding: clamp(4rem, 10vh, 7rem) clamp(1.2rem, 5vw, 4rem); background: var(--paper-deep); }
.metier__list { list-style: none; counter-reset: m; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); margin-top: 1.5rem; }
.metier__list li { counter-increment: m; border-top: 1px solid var(--ink); padding-top: 1.1rem; }
.metier__list li::before { content: counter(m, lower-roman) "."; font-family: var(--serif); font-style: italic; color: var(--ox); font-size: 1.1rem; }
.metier__list h3 { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; margin: 0.4rem 0 0.5rem; }
.metier__list p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- Contact ---------- */
.contact { padding: clamp(5rem, 13vh, 9rem) clamp(1.2rem, 5vw, 4rem); max-width: 760px; margin: 0 auto; text-align: center; }
.contact h2 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 6.5vw, 4.2rem); line-height: 1.12; }
.contact h2 em { color: var(--ox); }
.contact__email { display: inline-block; margin: 2rem 0 3rem; font-family: var(--serif); font-size: clamp(1.3rem, 3.5vw, 1.9rem); border-bottom: 1px solid var(--ink); padding-bottom: 0.15rem; transition: color 0.35s var(--ease), border-color 0.35s var(--ease); }
.contact__email:hover { color: var(--ox); border-color: var(--ox); }
.contact__form { text-align: left; display: grid; gap: 1.6rem; }
.contact__form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.6rem; }
.field label { display: block; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.45rem; }
.field input, .field textarea { width: 100%; background: transparent; border: none; border-bottom: 1px solid var(--hairline); font-family: var(--serif); font-size: 1.15rem; color: var(--ink); padding: 0.45rem 0.1rem; resize: vertical; transition: border-color 0.35s var(--ease); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--ink); }
.contact__send { justify-self: center; background: none; border: 1px solid var(--ink); border-radius: 999px; padding: 0.85rem 2.6rem; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--ink); cursor: pointer; transition: background 0.35s var(--ease), color 0.35s var(--ease); }
.contact__send:hover { background: var(--ink); color: var(--paper); }
.contact__note { text-align: center; font-family: var(--serif); font-style: italic; font-size: 1.05rem; min-height: 1.4em; color: var(--ox); }
.contact__agency { margin-top: 2.2rem; font-family: var(--serif); font-style: italic; color: var(--ink-soft); }

/* ---------- Colophon ---------- */
.colophon { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; padding: 1.5rem clamp(1.2rem, 5vw, 4rem); border-top: 1px solid var(--hairline); font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cover { grid-template-columns: 1fr; }
  .cover__media { min-height: 100svh; }
  .cover__text { padding-top: 6rem; align-items: flex-start; text-align: left; }
  .cover__cta { align-self: flex-start; }
  .apropos {
    grid-template-columns: 1fr;
    grid-template-areas: "photo" "col";
    max-width: 560px; margin: 0 auto;
  }
  .apropos__intro { max-width: none; }
  .apropos__photo { max-width: 360px; margin: 0 auto; }
  .apropos__photo img { aspect-ratio: 4 / 3; max-height: 52vh; object-position: 38% 16%; }
  .apropos__body { max-width: none; }
}
@media (max-width: 760px) {
  .masthead { grid-template-columns: auto 1fr auto; }
  .masthead__left { display: none; }
  .masthead__name { justify-self: start; }
  .masthead__nav { display: none; }
  .masthead__toggle { display: block; position: relative; z-index: 51; }
  .apropos__photo { max-width: 300px; }
  .contact__form .row { grid-template-columns: 1fr; }
}
