/* Fonts: Noto Serif and Noto Serif Display, SIL Open Font License 1.1 (see fonts/OFL.txt). */
@font-face {
  font-family: "Noto Serif Display XC";
  src: url("fonts/NotoSerifDisplay-ExtraCondensedLight.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif Display";
  src: url("fonts/NotoSerifDisplay-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("fonts/NotoSerif-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Noto Serif";
  src: url("fonts/NotoSerif-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --blanc: #ffffff;
  --toile: #ebe9e5;      /* image placeholder while photos load */
  --encre: #000000;
  --gris: #5c5c5c;
  --fil: #ece7dc;        /* ivory thread of the woven label */
  --couture: #b9ae98;    /* stitching thread */
  --gris-pied: #a9a59c;

  --texte: "Noto Serif", Georgia, "Times New Roman", serif;
  --titrage: "Noto Serif Display XC", "Noto Serif Display", Didot, "Bodoni 72", Georgia, serif;
  --marque: "Noto Serif Display", Didot, "Bodoni 72", Georgia, serif;

  --marge: clamp(1rem, 4vw, 3rem);
  --espace-bloc: clamp(4.5rem, 11vw, 10rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--blanc);
  color: var(--encre);
  font-family: var(--texte);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-variant-numeric: oldstyle-nums proportional-nums;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

p {
  margin: 0;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: inherit;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

/* Skip link, shown only when focused */
.evitement {
  position: absolute;
  left: var(--marge);
  top: -4rem;
  z-index: 10;
  padding: 0.5rem 0.875rem;
  background: var(--encre);
  color: var(--blanc);
  font-size: 0.875rem;
  text-decoration: none;
}
.evitement:focus {
  top: 0.75rem;
}

.lien {
  display: inline-block;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}
.lien:hover {
  text-decoration-thickness: 2px;
}

/* Header: section links, centred wordmark, season */
.entete {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.25rem var(--marge);
  font-size: 0.875rem;
  line-height: 1.4;
}

.entete-nav {
  display: flex;
  gap: clamp(1rem, 2.4vw, 2rem);
}

.entete-nav a {
  text-decoration: none;
}
.entete-nav a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.35em;
}

.entete-marque {
  font-size: 1rem;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  text-transform: uppercase;
  text-decoration: none;
}

.entete-saison {
  justify-self: end;
  color: var(--gris);
}

/* Opening photo with the woven label sewn on top */
.ouverture {
  display: grid;
  grid-template: minmax(0, 1fr) / minmax(0, 1fr);
  place-items: center;
  height: clamp(28rem, 86vh, 62rem);
  background: var(--toile);
  overflow: hidden;
}

.ouverture-photo,
.griffe {
  grid-area: 1 / 1;
}

.ouverture-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Woven label: satin ground, folded ends, a row of stitches across each fold */
.griffe {
  --pli: clamp(1rem, 2.6vw, 1.75rem);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75em;
  padding: clamp(1.1rem, 2.4vw, 1.75rem) calc(var(--pli) + clamp(1.4rem, 4.6vw, 3.5rem));
  background-color: var(--encre);
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 70%, rgba(0, 0, 0, 0.6)),
    linear-gradient(270deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0) 70%, rgba(0, 0, 0, 0.6)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 2px);
  background-size: var(--pli) 100%, var(--pli) 100%, auto, auto;
  background-position: left top, right top, 0 0, 0 0;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  color: var(--fil);
  text-transform: uppercase;
  line-height: 1;
  box-shadow:
    0 1px 1px rgba(0, 0, 0, 0.4),
    0 22px 44px -22px rgba(0, 0, 0, 0.7);
}

.griffe::before,
.griffe::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  bottom: 0.35rem;
  width: 2px;
  background: repeating-linear-gradient(180deg, var(--couture) 0 6px, transparent 6px 11px);
}
.griffe::before {
  left: calc(var(--pli) * 0.55);
}
.griffe::after {
  right: calc(var(--pli) * 0.55);
}

.griffe-nom {
  font-family: var(--marque);
  font-weight: 500;
  font-size: clamp(1.1rem, 4.8vw, 4rem);
  letter-spacing: 0.2em;
  margin-right: -0.2em;
}

.griffe-ville {
  font-family: var(--texte);
  font-size: clamp(0.6875rem, 1.25vw, 0.9375rem);
  letter-spacing: 0.6em;
  margin-right: -0.6em;
}

/* Page sections */
.bloc {
  padding: var(--espace-bloc) var(--marge) 0;
}

.titre-grand {
  font-family: var(--titrage);
  font-weight: 300;
  font-size: clamp(6rem, 19vw, 19rem);
  line-height: 0.8;
  letter-spacing: -0.01em;
}

.titre-section {
  font-family: var(--titrage);
  font-weight: 300;
  font-size: clamp(3rem, 7vw, 5.5rem);
  line-height: 0.9;
}

/* Collection introduction */
.collection {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: 2.5rem;
  align-items: end;
}

.collection-titre {
  grid-column: 1 / span 7;
}

.collection-saison {
  margin-bottom: 1.25rem;
}

.collection-texte {
  grid-column: 8 / -1;
  max-width: 34rem;
}

.collection-texte p + p {
  margin-top: 1em;
}

.collection-texte .lien {
  margin-top: 1.75rem;
}

/* Pieces grid; the middle column sits lower on wide screens */
.pieces-liste {
  list-style: none;
  margin: clamp(2.5rem, 5vw, 4rem) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: 3.5rem;
}

.piece-photo {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--toile);
  margin-bottom: 1rem;
}

.piece-nom {
  font-size: 1rem;
  line-height: 1.4;
}

.piece-matiere {
  font-style: italic;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: var(--gris);
}

.piece-prix {
  margin-top: 0.35rem;
  font-size: 0.9375rem;
  font-variant-numeric: lining-nums tabular-nums;
}

/* La maison: photo beside two short paragraphs */
.maison {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(1rem, 2.5vw, 2.5rem);
  row-gap: 2.5rem;
  align-items: end;
}

.maison-photo {
  grid-column: 1 / span 6;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--toile);
}

.maison-texte {
  grid-column: 8 / -1;
  max-width: 34rem;
}

.maison-texte .titre-section {
  margin-bottom: 1.75rem;
}

.maison-texte p + p {
  margin-top: 1em;
}

/* Footer */
.pied {
  margin-top: var(--espace-bloc);
  padding: 3rem var(--marge) 2.5rem;
  background: var(--encre);
  color: var(--fil);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
  column-gap: 2.5rem;
  row-gap: 1.25rem;
  font-size: 0.875rem;
  line-height: 1.55;
}

.pied-marque {
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.pied-note {
  max-width: 36rem;
  color: var(--gris-pied);
}

.pied-copyright {
  color: var(--gris-pied);
  font-variant-numeric: lining-nums;
}

.pied-haut {
  grid-column: 1 / -1;
  justify-self: start;
}

/* Breakpoints */
@media (min-width: 520px) {
  .pieces-liste {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .piece:nth-child(even) {
    margin-top: 4rem;
  }
}

@media (min-width: 1024px) {
  .pieces-liste {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 5rem;
  }
  .piece:nth-child(even) {
    margin-top: 0;
  }
  .piece:nth-child(3n + 2) {
    margin-top: 7rem;
  }
}

@media (max-width: 860px) {
  .entete {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 0.75rem;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  .entete-marque {
    order: -1;
  }
  .entete-saison {
    display: none;
  }

  .collection-titre,
  .collection-texte,
  .maison-photo,
  .maison-texte {
    grid-column: 1 / -1;
  }

  .pied {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Load sequence: the label settles, then each row of stitches is sewn top to bottom */
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
  .griffe {
    animation: poser 700ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }
  .griffe::before,
  .griffe::after {
    animation: coudre 650ms steps(14, end) both;
  }
  .griffe::before {
    animation-delay: 650ms;
  }
  .griffe::after {
    animation-delay: 1150ms;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@keyframes poser {
  from {
    opacity: 0;
    transform: translateY(10px) scale(1.015);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes coudre {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0 0 0 0);
  }
}

/* The display cut's hairline crossbars drop below a pixel at phone sizes (F reads as Γ),
   so the label switches to the sturdier text cut on narrow screens. */
@media (max-width: 700px) {
  .griffe-nom {
    font-family: var(--texte);
    font-weight: 400;
  }
}

/* Footer credits: a button that opens the photo and font credits in place. */
.pied-licences {
  grid-column: 1 / -1;
  color: var(--gris-pied);
}
.pied-licences summary {
  display: inline-block;
  cursor: pointer;
  list-style: none;
  border: 1px solid var(--gris-pied);
  padding: 0.3rem 0.9rem;
  color: var(--fil);
  letter-spacing: 0.05em;
}
.pied-licences summary::-webkit-details-marker {
  display: none;
}
.pied-licences summary:hover,
.pied-licences summary:focus-visible {
  border-color: var(--fil);
}
.pied-licences ul {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  max-width: 48rem;
}
.pied-licences li {
  margin: 0 0 0.35rem;
}
.pied-licences a {
  color: var(--fil);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
