/* ============================================
   Kevin Jordan O'Shea — Portfolio
   style.css
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --color-bg:     #ffffff;
  --color-text:   #0d0d0d;
  --color-muted:  #888888;
  --color-border: #e8e8e8;

  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --strip-h: clamp(240px, 44vh, 460px);
  --ease:    220ms ease;
}

html  { font-size: 16px; -webkit-text-size-adjust: 100%; }
body  {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  animation: pagefade 300ms ease both;
}
main   { flex: 1; }
img    { display: block; max-width: 100%; height: auto; }
a      { color: inherit; text-decoration: none; }
figure { margin: 0; line-height: 0; }

@keyframes pagefade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ============================================
   Header
   ============================================ */

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 1.125rem 2rem;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-bg);
  z-index: 100;
}

.nav-primary {
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
  row-gap: 0.25rem;
}

.nav-link {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color var(--ease);
  white-space: nowrap;
}
.nav-link:hover     { color: var(--color-text); }
.nav-link--active   {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.site-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.82rem, 1.05vw, 0.96rem);
  letter-spacing: -0.01em;
  white-space: nowrap;
  justify-self: center;
  transition: opacity var(--ease);
}
.site-name:hover { opacity: 0.4; }

.header-right {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.instagram-link       { display: flex; color: var(--color-muted); transition: color var(--ease); }
.instagram-link:hover { color: var(--color-text); }
.instagram-link svg   { width: 18px; height: 18px; }

/* ============================================
   Hamburger toggle
   ============================================ */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  margin-left: 0.5rem;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
}

.nav-toggle__bar {
  display: block;
  width: 20px;
  height: 1.5px;
  background: var(--color-text);
  transition: transform 220ms ease, opacity 220ms ease;
  transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(6.5px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-6.5px) rotate(-45deg);
}

/* ============================================
   Hero
   ============================================ */

.hero {
  padding: 5rem 2rem 3.5rem;
  text-align: center;
}

.hero__title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 8rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
}

.hero__tagline {
  font-size: clamp(0.875rem, 1.4vw, 1rem);
  font-weight: 300;
  line-height: 1.8;
  color: var(--color-muted);
  max-width: 36em;
  margin-inline: auto;
}

/* ============================================
   Série intro (pages séries)
   ============================================ */

.serie-intro {
  padding: 3.5rem 2rem 2rem;
  max-width: 700px;
}

.serie-intro p {
  font-size: 0.9375rem;
  font-weight: 300;
  line-height: 1.85;
  color: var(--color-muted);
}

/* ============================================
   Gallery — Horizontal strip
   ============================================ */

.gallery-strip {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  overflow-y: hidden;
  height: var(--strip-h);
  scrollbar-width: none;
  padding: 0 2rem 0;
  margin-bottom: 6rem;
  cursor: grab;
  -webkit-overflow-scrolling: touch;
}
.gallery-strip::-webkit-scrollbar { display: none; }
.gallery-strip.is-grabbing         { cursor: grabbing; }

.strip__item {
  flex: 0 0 auto;
  height: 100%;
  overflow: hidden;
}

.strip__item img {
  height: 100%;
  width: auto;
  display: block;
  object-fit: cover;
  transition: filter var(--ease);
  filter: brightness(0.96);
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.strip__item:hover img { filter: brightness(1.02); }

/* ============================================
   Page label (À Propos, Contact)
   ============================================ */

.page-label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  padding: 3rem 2rem 1.5rem;
}

/* ============================================
   About
   ============================================ */

.about-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  column-gap: clamp(2rem, 4vw, 5rem);
  padding: 0 2rem 6rem;
  align-items: start;
}

.about-text p {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.85;
}
.about-text p + p { margin-top: 1.5rem; }

.about-photo img { width: 100%; }

/* ============================================
   Contact
   ============================================ */

.contact-layout {
  padding: 5rem 2rem 4rem;
  text-align: center;
}

.contact-location {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-muted);
  margin-bottom: 2.5rem;
}

.contact-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.contact-links a {
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 300;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 3px;
  transition: color var(--ease), border-color var(--ease);
}
.contact-links a:hover {
  color: var(--color-muted);
  border-color: transparent;
}

.contact-diptych       { margin: 4rem 0 0; }
.contact-diptych img   { width: 100%; height: auto; }

/* ============================================
   Lightbox
   ============================================ */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 999;
  cursor: zoom-out;
}
.lightbox.is-open {
  display: grid;
  place-items: center;
}
.lightbox__img {
  max-width: 92vw;
  max-height: 92vh;
  object-fit: contain;
  cursor: default;
}
.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.75rem;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.75rem;
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem;
  transition: color var(--ease);
}
.lightbox__close:hover { color: #fff; }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.35);
  font-size: 2.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.5rem 1.5rem;
  transition: color var(--ease);
  user-select: none;
  -webkit-user-select: none;
}
.lightbox__prev:hover,
.lightbox__next:hover { color: #fff; }
.lightbox__prev { left: 0; }
.lightbox__next { right: 0; }

/* ============================================
   Footer
   ============================================ */

.site-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--color-border);
  margin-top: auto;
}

.site-footer__copy,
.site-footer a {
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--color-muted);
  transition: color var(--ease);
}
.site-footer a:hover { color: var(--color-text); }

/* ============================================
   Hub — série rows (page d'accueil)
   ============================================ */

.hub-intro {
  padding: 3.5rem 2rem 0;
}

.hub-intro__tagline {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.serie-row {
  margin-bottom: 5rem;
}

.serie-row__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 2rem 1rem;
}

.serie-row__title {
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  transition: opacity var(--ease);
}
.serie-row__title:hover { opacity: 0.45; }

.serie-row__desc {
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  font-weight: 300;
}

.serie-row__more {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  transition: color var(--ease);
}
.serie-row__more:hover { color: var(--color-text); }

.serie-row .gallery-strip {
  --strip-h: clamp(160px, 28vh, 280px);
  margin-bottom: 0;
}

/* Header & footer need solid bg to sit above the cross pattern */
.site-header { background: var(--color-bg); }
.site-footer  { background: var(--color-bg); }

/* ============================================
   Focus
   ============================================ */

:focus-visible {
  outline: 1.5px solid var(--color-text);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {

  /* Header: single row — nom à gauche, icônes à droite */
  .site-header {
    grid-template-columns: 1fr auto;
    grid-template-rows: auto;
    padding: 1rem 1.25rem;
  }
  .site-name    { grid-column: 1; grid-row: 1; justify-self: start; }
  .header-right { grid-column: 2; grid-row: 1; display: flex; align-items: center; gap: 0.25rem; }

  /* Afficher le bouton hamburger */
  .nav-toggle { display: flex; }

  /* Nav = overlay plein écran */
  .nav-primary {
    position: fixed;
    inset: 0;
    background: var(--color-bg);
    z-index: 99;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 2rem;
    gap: 1.75rem;
    /* état fermé */
    opacity: 0;
    pointer-events: none;
    transform: translateY(-10px);
    transition: opacity 200ms ease, transform 200ms ease;
    /* reset des styles inline-flow */
    flex-wrap: nowrap;
    column-gap: 0;
    row-gap: 0;
    border-top: none;
    margin-top: 0;
  }
  .nav-primary.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  body.nav-open { overflow: hidden; }

  /* Liens nav — grands et lisibles dans l'overlay */
  .nav-link {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 8vw, 2.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: none;
    color: var(--color-muted);
    line-height: 1;
    white-space: normal;
  }
  .nav-link:hover,
  .nav-link--active { color: var(--color-text); }

  /* Galeries */
  :root { --strip-h: clamp(180px, 44vw, 300px); }
  .serie-row .gallery-strip { --strip-h: clamp(140px, 38vw, 220px); }
  .gallery-strip {
    padding: 0 1.25rem;
    margin-bottom: 4rem;
    /* fondu droit = indicateur de scroll */
    -webkit-mask-image: linear-gradient(to right, black 82%, transparent 100%);
    mask-image: linear-gradient(to right, black 82%, transparent 100%);
  }

  /* Titres de séries — réduits sur mobile */
  .hero__title  { font-size: clamp(1.75rem, 6vw, 2.5rem); margin-bottom: 1rem; }

  /* Autres layouts */
  .hero         { padding: 2.5rem 1.25rem 1.75rem; }
  .serie-intro  { padding: 2rem 1.25rem 1.5rem; }
  .page-label   { padding: 2rem 1.25rem 1rem; }
  .about-layout {
    grid-template-columns: 1fr;
    padding: 0 1.25rem 4rem;
  }
  .contact-layout  { padding: 3rem 1.25rem 2.5rem; }
  .contact-diptych { margin: 3rem 0 0; }
  .site-footer     { padding: 1.25rem; }
}

/* Très petits écrans */
@media (max-width: 380px) {
  .nav-link   { font-size: 1.4rem; }
  :root       { --strip-h: 50vw; }
  .serie-row .gallery-strip { --strip-h: 42vw; }
}
