/* Just Focus by SG — portfolio */
:root {
  --ground: #0E0E0E;
  --ground-2: #161616;
  --ink: #F2EFEA;
  --ink-soft: #D9D5CE;
  --muted: #A8A39B;
  /* mood colours (turquoise by default, see "Moods" below) */
  --m-hi: #2EC4B6; --m-lo: #08766C;
  --m-fill-d: #2EC4B6; --m-on-d: #0E0E0E;
  --m-fill-l: #08766C; --m-on-l: #F4F2EE;
  --glitch: #2EC4B6;
  --accent: var(--m-hi);
  --accent-fill: var(--m-fill-d);
  --on-accent: var(--m-on-d);
  --paper: #F2EFEA;
  --paper-ink: #0E0E0E;
  --paper-muted: #4A463F;
  --paper-accent: var(--m-lo);
  --line: #4A463F;
  --header-bg: rgba(14, 14, 14, .94);
  color-scheme: dark;

  --f-display: 'Archivo', 'Arial Narrow', sans-serif;
  --f-label: 'Archivo', 'Arial Narrow', sans-serif;
  --f-text: 'Archivo', system-ui, sans-serif;
  --f-script: 'Yellowtail', 'Brush Script MT', cursive;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1600px;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--f-text);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--accent-fill); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
/* Yellowtail is already a slanted brush script: no italic, and a touch larger than the caps it sits beside */
.script { font-family: var(--f-script); font-style: normal; font-weight: 400; font-stretch: normal; text-transform: none; letter-spacing: 0; }
.accent { color: var(--accent); }

/* ---------- Progress + header ---------- */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60;
  background: var(--accent); transform-origin: 0 50%; transform: scaleX(0);
}
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  transition: background .4s var(--ease), transform .5s var(--ease), padding .4s var(--ease);
}
.site-header.is-solid { background: var(--header-bg); padding-top: 10px; padding-bottom: 10px; }
.site-header.is-hidden { transform: translateY(-110%); }
.logo img { height: 56px; width: auto; transition: height .4s var(--ease); }
.site-header.is-solid .logo img { height: 44px; }
.nav { display: flex; align-items: center; gap: clamp(14px, 2.6vw, 36px); }
.nav a.link {
  position: relative; font-family: var(--f-label); font-stretch: 75%; font-weight: 600; font-size: 18px;
  letter-spacing: .06em; text-transform: uppercase; padding: 10px 2px;
}
.nav a.link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease);
}
.nav a.link:hover::after, .nav a.link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.nav a.link[aria-current="page"] { color: var(--accent); }
.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn {
  position: relative; overflow: hidden; isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px; border: 1px solid currentColor;
  font-family: var(--f-label); font-stretch: 75%; font-weight: 700; font-size: 19px;
  letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
  background: transparent; transition: color .45s var(--ease), transform .2s var(--ease);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); transform: translateY(101%);
  transition: transform .45s var(--ease);
}
.btn:hover::before, .btn:focus-visible::before { transform: translateY(0); }
.btn:hover, .btn:focus-visible { color: var(--ground); }
.btn:active { transform: scale(.97); }
.btn .arrow { transition: transform .45s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }
.btn--fill { background: var(--accent-fill); border-color: var(--accent-fill); color: var(--on-accent); }
.btn--light { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.btn--light::before { background: var(--accent-fill); }
.btn--light:hover, .btn--light:focus-visible { color: var(--on-accent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(110px, 10vw, 140px) 0 clamp(56px, 7vw, 96px); }
.hero__top { display: grid; grid-template-columns: 1fr; gap: 28px; }
.hero__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 24px 40px; }
.hero__row .hero__kicker {
  max-width: none; margin: 0 0 14px; font-family: var(--f-script); font-style: normal;
  font-size: clamp(25px, 2.5vw, 34px); color: var(--accent);
}
.hero h1 {
  margin: 0; font-family: var(--f-display); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(64px, 9.4vw, 150px); line-height: .9; letter-spacing: -0.02em;
}
.hero h1 .script { text-transform: none; font-size: 1.1em; color: var(--accent); }
.hero__row p { margin: 0; font-size: clamp(18px, 1.6vw, 22px); line-height: 1.5; color: var(--ink-soft); max-width: 30ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__strip {
  margin-top: clamp(36px, 4vw, 56px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.hero__strip figure { margin: 0; overflow: hidden; height: clamp(440px, 42vw, 640px); }
.hero__strip img { width: 100%; height: 118%; object-fit: cover; will-change: transform; }
.hero__strip figure:nth-child(2) { margin-top: clamp(24px, 4vw, 64px); }

/* line mask reveal for headings */
.line { display: block; }
.line > span { display: inline-block; }
.js .line > span { opacity: 0; transform: translateY(45%); transition: transform 1.1s var(--ease), opacity .9s var(--ease); }
.is-in .line > span, .line.is-in > span { opacity: 1; transform: none; }
.line:nth-child(2) > span { transition-delay: .09s; }
.line:nth-child(3) > span { transition-delay: .18s; }

/* ---------- Marquee ---------- */
.refs { padding: 34px 0; background: var(--accent-fill); color: var(--on-accent); overflow: hidden; }
.refs__label { margin: 0 0 14px; padding: 0 var(--gutter); font-family: var(--f-script); font-style: normal; font-size: 25px; }
.marquee { display: flex; width: max-content; animation: marquee 34s linear infinite; }
.refs:hover .marquee { animation-play-state: paused; }
.marquee ul { display: flex; margin: 0; padding: 0; list-style: none; }
.marquee li {
  display: flex; align-items: center; gap: 36px; padding-right: 36px; white-space: nowrap;
  font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: clamp(34px, 4.4vw, 60px);
  text-transform: uppercase; letter-spacing: -0.01em; line-height: 1;
}
.marquee li::after { content: ""; width: .22em; height: .22em; border-radius: 50%; background: currentColor; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { padding: clamp(96px, 12vw, 180px) 0; }
.section__head { display: grid; grid-template-columns: 1.6fr 1fr; gap: 32px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.h2 {
  margin: 0; font-family: var(--f-display); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(48px, 6.4vw, 96px); line-height: .95; letter-spacing: -0.015em;
}
.h2 .script { text-transform: none; font-size: 1.1em; }
.lede { margin: 0; font-size: 19px; line-height: 1.6; color: var(--ink-soft); max-width: 44ch; }

/* reveal (rise + fade) */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
/* image wipe reveal */
.wipe { overflow: hidden; }
.js .wipe { clip-path: inset(100% 0 0 0); transition: clip-path 1.2s var(--ease-io); transition-delay: var(--d, 0s); }
.js .wipe img { transform: scale(1.18); transition: transform 1.6s var(--ease); transition-delay: var(--d, 0s); }
.wipe.is-in { clip-path: inset(0 0 0 0); }
.wipe.is-in img { transform: scale(1); }

/* ---------- Univers ---------- */
.univers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.univers a { display: block; }
.univers figure { margin: 0 0 18px; aspect-ratio: 3 / 4; overflow: hidden; }
.univers figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease), filter .6s; }
.univers a:hover figure img { transform: scale(1.06); }
.univers h3 {
  margin: 0 0 6px; font-family: var(--f-display); font-stretch: 62%; font-weight: 800; font-size: 30px;
  text-transform: uppercase; line-height: 1; display: flex; justify-content: space-between; gap: 8px;
}
.univers h3 .arrow { color: var(--accent); transform: translateX(-8px); opacity: 0; transition: .4s var(--ease); }
.univers a:hover h3 .arrow { transform: none; opacity: 1; }
.univers p { margin: 0; font-size: 16px; color: var(--muted); }
.univers a:nth-child(even) { margin-top: 64px; }

/* ---------- Sélection ---------- */
.selection { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.selection figure { position: relative; margin: 0; overflow: hidden; }
.selection figure img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.selection figure:hover img { transform: scale(1.04); }
.selection .big { grid-column: span 4; height: 680px; }
.selection .tall { grid-column: span 2; height: 680px; }
.selection .third { grid-column: span 2; height: 400px; }
.selection figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 48px 20px 18px;
  background: linear-gradient(to top, rgba(0,0,0,.72), transparent); /* photo scrim — taste-skill-ignore */
  font-size: 16px; line-height: 1.35;
  transform: translateY(12px); opacity: .92; transition: transform .5s var(--ease), opacity .5s;
}
.selection figcaption b { display: block; font-family: var(--f-label); font-stretch: 75%; font-weight: 700; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.selection figure:hover figcaption { transform: none; opacity: 1; }
.more-link { font-family: var(--f-label); font-stretch: 75%; font-weight: 700; font-size: 20px; text-transform: uppercase; letter-spacing: .05em; color: var(--accent); justify-self: end; display: inline-flex; gap: 8px; padding: 10px 0; }
.more-link span { transition: transform .4s var(--ease); }
.more-link:hover span { transform: translateX(6px); }

/* ---------- À propos ---------- */
.about { background: var(--paper); color: var(--paper-ink); }
.about__grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.about__img { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; }
.credit { margin: 12px 0 0; font-size: 14px; color: var(--paper-muted); }
.credit .script { font-size: 18px; color: var(--paper-ink); }
.about__img img { width: 100%; height: 115%; object-fit: cover; object-position: center 40%; }
.about .h2 { margin-bottom: 28px; }
.about .h2 .script { color: var(--paper-accent); }
.about p { margin: 0 0 18px; font-size: 19px; line-height: 1.65; }
/* closing line of the About text */
.about p.about__punch { margin-top: 30px; padding-left: 20px; border-left: 2px solid var(--paper-accent); font-size: clamp(22px, 2vw, 27px); font-weight: 500; line-height: 1.35; }
.about__punch .script { color: var(--paper-accent); font-size: 1.25em; line-height: 1; }
.stats { display: flex; flex-wrap: wrap; gap: 48px; margin-top: 40px; }
.stat b { display: block; font-family: var(--f-display); font-stretch: 62%; font-weight: 900; font-size: clamp(56px, 6vw, 84px); line-height: .9; }
.stat span { font-size: 15px; color: var(--paper-muted); }

/* ---------- Vidéo ---------- */
.reels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.reel { position: relative; display: block; aspect-ratio: 9 / 16; overflow: hidden; background: var(--ground-2); }
.reel img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .6s; filter: saturate(.85); }
.reel:hover img { transform: scale(1.07); filter: none; }
.reel .play {
  position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  border-radius: 50%; background: var(--accent-fill); color: var(--on-accent);
  display: grid; place-items: center; transform: scale(.7); opacity: 0;
  transition: transform .5s var(--ease), opacity .4s;
}
.reel:hover .play, .reel:focus-visible .play { transform: none; opacity: 1; }
.reel .tag {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 16px 16px;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent); /* photo scrim — taste-skill-ignore */
  font-family: var(--f-label); font-stretch: 75%; font-weight: 700; font-size: 21px; text-transform: uppercase;
}

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; padding: clamp(110px, 12vw, 180px) 0; }
.contact__bg { position: absolute; inset: -10% 0; }
.contact__bg img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.contact__bg::after { content: ""; position: absolute; inset: 0; background: rgba(14, 14, 14, .62); }
.contact__grid { position: relative; display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: end; }
.contact .h2 { font-size: clamp(60px, 9.5vw, 140px); }
.contact__info p { margin: 22px 0; color: #E4E0D9; max-width: 42ch; }
.contact__links { display: flex; flex-wrap: wrap; gap: 4px 28px; }
.contact__links a { padding: 10px 0; border-bottom: 1px solid transparent; /* hover underline — taste-skill-ignore */ transition: border-color .3s, color .3s; }
.contact__links a:hover { color: var(--accent); border-color: var(--accent); }
.form { background: rgba(14, 14, 14, .9); padding: clamp(22px, 3vw, 40px); display: grid; gap: 18px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; font-size: 14px; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 17px; color: var(--ink); background: #141414;
  border: 1px solid #5A5650; border-radius: 0; padding: 12px 14px; min-height: 50px; width: 100%;
  transition: border-color .3s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); }
.form .note { margin: 0; font-size: 13px; color: #B8B3AB; }
.form .btn { justify-self: start; }

/* ---------- Footer ---------- */
.footer { padding: clamp(64px, 8vw, 110px) 0 28px; }
.footer__name {
  margin: 0; font-family: var(--f-display); font-stretch: 62%; font-weight: 900; text-transform: uppercase;
  font-size: clamp(56px, 13.5vw, 210px); line-height: .82; letter-spacing: -0.025em; white-space: nowrap;
}
.footer__name .script { text-transform: none; color: var(--accent); font-size: .74em; white-space: nowrap; }
.footer__bottom { margin-top: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; font-size: 15px; color: var(--muted); }
.footer__bottom img { height: 36px; width: auto; }
.footer__bottom span { display: flex; align-items: center; gap: 14px; }

/* ---------- Travaux page ---------- */
.page-head { padding: clamp(140px, 15vw, 200px) 0 32px; }
.page-head__top { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: end; }
.page-head h1 { margin: 0; font-family: var(--f-display); font-stretch: 62%; font-weight: 900; text-transform: uppercase; font-size: clamp(76px, 13vw, 200px); line-height: .85; letter-spacing: -0.02em; }
.page-head h1 .script { text-transform: none; color: var(--accent); }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 40px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px;
  border-radius: 999px; border: 1px solid var(--line); background: transparent; cursor: pointer;
  font-family: var(--f-label); font-stretch: 75%; font-weight: 700; font-size: 18px; text-transform: uppercase; letter-spacing: .04em;
  transition: background .35s var(--ease), color .35s, border-color .35s, transform .2s;
}
.chip small { font-family: var(--f-text); font-weight: 500; font-size: 13px; opacity: .7; }
.chip:hover { border-color: var(--ink); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--ground); border-color: var(--ink); }
.masonry { column-width: 300px; column-gap: 16px; padding-bottom: clamp(80px, 10vw, 140px); }
.tile {
  display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; background: var(--ground-2);
  cursor: zoom-in; break-inside: avoid; overflow: hidden; position: relative;
}
.js .tile { opacity: 0; transform: translateY(30px); transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.tile.is-in { opacity: 1; transform: none; }
.tile.is-hidden { display: none; }
.tile img { width: 100%; height: auto; transition: transform 1s var(--ease), opacity .4s; }
.tile:hover img { transform: scale(1.04); }
.tile span {
  position: absolute; left: 12px; bottom: 12px; padding: 4px 10px; background: var(--ground);
  font-size: 13px; transform: translateY(8px); opacity: 0; transition: .4s var(--ease);
}
.tile:hover span, .tile:focus-visible span { transform: none; opacity: 1; }

.lightbox {
  position: fixed; inset: 0; z-index: 80; background: rgba(8, 8, 8, .97);
  display: grid; grid-template-rows: 1fr auto; gap: 16px; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox figure { margin: 0; display: grid; place-items: center; min-height: 0; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; transform: scale(.96); opacity: 0; transition: transform .5s var(--ease), opacity .4s; }
.lightbox img.is-ready { transform: none; opacity: 1; }
.lb-bar { display: flex; align-items: center; justify-content: center; gap: 16px; }
.lb-btn { width: 52px; height: 52px; border-radius: 50%; border: 1px solid #5A5650; background: var(--ground); display: grid; place-items: center; cursor: pointer; transition: .3s; }
.lb-btn:hover { border-color: var(--accent); color: var(--accent); }
.lb-count { min-width: 220px; text-align: center; font-size: 14px; color: var(--muted); }
.lb-count b { font-family: var(--f-script); font-style: normal; font-weight: 400; font-size: 20px; color: var(--ink); }

.cta-band { padding: clamp(80px, 10vw, 140px) 0; background: var(--ground-2); }
.cta-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 32px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__top, .section__head, .about__grid, .contact__grid, .page-head__top { grid-template-columns: 1fr; }
  .univers { grid-template-columns: repeat(2, 1fr); }
  .univers a:nth-child(even) { margin-top: 40px; }
  .reels { grid-template-columns: repeat(2, 1fr); }
  .selection .big, .selection .tall { grid-column: span 6; height: auto; aspect-ratio: 4 / 3; }
  .selection .third { grid-column: span 3; height: 340px; }
  .selection .third:last-child { grid-column: span 6; }
}
@media (max-width: 760px) {
  body { font-size: 17px; }
  .menu-btn {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border: 0;
    background: transparent; cursor: pointer; z-index: 2;
  }
  .menu-btn span, .menu-btn span::before, .menu-btn span::after {
    content: ""; display: block; width: 26px; height: 2px; background: var(--ink); position: relative; transition: .35s var(--ease);
  }
  .menu-btn span::before { position: absolute; top: -8px; }
  .menu-btn span::after { position: absolute; top: 8px; }
  .menu-open .menu-btn span { background: transparent; }
  .menu-open .menu-btn span::before { top: 0; transform: rotate(45deg); }
  .menu-open .menu-btn span::after { top: 0; transform: rotate(-45deg); }
  .nav {
    position: fixed; inset: 0; background: var(--ground); flex-direction: column; justify-content: center; gap: 18px;
    clip-path: circle(0 at calc(100% - 40px) 40px); visibility: hidden;
    transition: clip-path .7s var(--ease-io), visibility 0s .7s;
  }
  .menu-open .nav { clip-path: circle(150% at calc(100% - 40px) 40px); visibility: visible; transition: clip-path .7s var(--ease-io), visibility 0s; }
  .nav a.link { font-size: 44px; font-stretch: 62%; font-weight: 900; }
  .logo img { height: 44px; }
  .hero__strip { grid-template-columns: 1fr 1fr; }
  .hero__strip figure { height: 300px; }
  .hero__strip figure:nth-child(2) { margin-top: 32px; }
  .hero__strip figure:nth-child(3) { grid-column: span 2; height: 260px; }
  .univers { grid-template-columns: 1fr; }
  .univers a:nth-child(even) { margin-top: 0; }
  .selection .third { grid-column: span 6; }
  .form .row { grid-template-columns: 1fr; }
  .footer__name { white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .reveal, .tile, .tile span, .line > span { opacity: 1 !important; transform: none !important; }
  .wipe { clip-path: none !important; }
  .wipe img, .hero__strip img, .about__img img { transform: none !important; }
}
.page-head h1 .script { margin-left: 0; }
/* space before the italic word inside a heading line */
.line > span > .script, .footer__name .script { margin-left: .1em; }
.hero h1, .h2, .footer__name, .page-head h1, .marquee li { word-spacing: .1em; }
.page-head h1 .line > span > .script { margin-left: 0; }

/* ---------- Intro loader : glitch logo ---------- */
.loader { display: none; }
.js .loader {
  position: fixed; inset: 0; z-index: 100; display: grid; place-content: center; justify-items: center; gap: 36px;
  background: var(--ground);
  transition: transform 1s var(--ease-io);
}
.loader__logo { position: relative; width: clamp(220px, 36vw, 420px); aspect-ratio: 150 / 129; }
.loader__logo img { width: 100%; height: auto; display: block; opacity: 0; animation: glitch-main 1.35s .05s steps(1, end) forwards; }
.loader__logo .g {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  -webkit-mask: url('../img/web/logo.webp') center / contain no-repeat;
          mask: url('../img/web/logo.webp') center / contain no-repeat;
}
.loader__logo .g1 { background: var(--glitch); mix-blend-mode: screen; animation: glitch-a 1.35s .05s steps(1, end) forwards; }
.loader__logo .g2 { background: #FF2E6E; mix-blend-mode: screen; animation: glitch-b 1.35s .05s steps(1, end) forwards; }
[data-theme="light"] .loader__logo .g { mix-blend-mode: multiply; }
.loader__bar { width: clamp(160px, 22vw, 260px); height: 2px; background: var(--line); overflow: hidden; }
.loader__bar span { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); animation: fill 1.35s .1s var(--ease) forwards; }
.loader.is-done { transform: translateY(-100%); }
.loader.is-done .loader__logo, .loader.is-done .loader__bar { opacity: 0; transform: translateY(-40px); transition: opacity .4s, transform .6s var(--ease-io); }
.is-loading, .is-loading body { overflow: hidden; }
@keyframes fill { 0% { transform: scaleX(0); } 30% { transform: scaleX(.35); } 55% { transform: scaleX(.5); } 100% { transform: scaleX(1); } }
/* the logo flickers on in broken slices, then settles */
@keyframes glitch-main {
  0%   { opacity: 0; }
  8%   { opacity: 1; transform: translate(-6px, 0) skewX(-12deg); clip-path: inset(10% 0 55% 0); }
  12%  { opacity: 0; }
  18%  { opacity: 1; transform: translate(8px, 0); clip-path: inset(48% 0 12% 0); }
  24%  { transform: translate(-3px, 0); clip-path: inset(0 0 70% 0); }
  30%  { transform: none; clip-path: inset(0 0 0 0); }
  38%  { opacity: .4; }
  42%  { opacity: 1; transform: translate(4px, 0) skewX(8deg); clip-path: inset(62% 0 8% 0); }
  48%  { transform: none; clip-path: inset(0 0 0 0); }
  70%  { transform: translate(-5px, 0); clip-path: inset(30% 0 40% 0); }
  74%  { transform: none; clip-path: inset(0 0 0 0); }
  100% { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }
}
@keyframes glitch-a {
  0%   { opacity: 0; }
  8%   { opacity: .9; transform: translate(-14px, 2px); clip-path: inset(12% 0 60% 0); }
  16%  { transform: translate(10px, -2px); clip-path: inset(55% 0 20% 0); }
  24%  { transform: translate(-6px, 0); clip-path: inset(30% 0 45% 0); }
  32%  { opacity: 0; }
  42%  { opacity: .9; transform: translate(12px, 0); clip-path: inset(64% 0 6% 0); }
  50%  { opacity: 0; }
  70%  { opacity: .8; transform: translate(-9px, 1px); clip-path: inset(28% 0 42% 0); }
  76%  { opacity: 0; }
  100% { opacity: 0; }
}
@keyframes glitch-b {
  0%   { opacity: 0; }
  10%  { opacity: .8; transform: translate(12px, -2px); clip-path: inset(40% 0 30% 0); }
  18%  { transform: translate(-10px, 2px); clip-path: inset(5% 0 72% 0); }
  26%  { transform: translate(6px, 0); clip-path: inset(70% 0 4% 0); }
  32%  { opacity: 0; }
  44%  { opacity: .8; transform: translate(-12px, 0); clip-path: inset(15% 0 60% 0); }
  50%  { opacity: 0; }
  72%  { opacity: .7; transform: translate(8px, -1px); clip-path: inset(50% 0 22% 0); }
  76%  { opacity: 0; }
  100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .loader__logo img { opacity: 1; animation: none; }
  .loader__logo .g { display: none; }
  .loader__bar span { animation: none; transform: scaleX(1); }
  .js .loader { transition: opacity .3s; }
  .loader.is-done { transform: none; opacity: 0; }
}

/* ---------- Light mode (toggle in the header) ---------- */
:root[data-theme="light"] {
  --ground: #F4F2EE;
  --ground-2: #E8E5DF;
  --ink: #0E0E0E;
  --ink-soft: #2A2826;
  --muted: #5F5A53;
  --accent: var(--m-lo);
  --accent-fill: var(--m-fill-l);
  --on-accent: var(--m-on-l);
  --paper: #141414;
  --paper-ink: #F2EFEA;
  --paper-muted: #A8A39B;
  --paper-accent: var(--m-hi);
  --line: #C9C3B9;
  --header-bg: rgba(244, 242, 238, .94);
  color-scheme: light;
}
/* ---------- Moods (colour picker in the header) ----------
   hi = accent on dark grounds, lo = accent on light grounds, fill/on = filled bands and buttons.
   #191970 is too dark to read as text on black, so in dark mode it fills and a lighter tint carries the text. */
:root[data-mood="nuit"]   { --m-hi: #8F8FEA; --m-lo: #191970; --m-fill-d: #191970; --m-on-d: #F2EFEA; --m-fill-l: #191970; --m-on-l: #F4F2EE; --glitch: #4A4AFF; }
:root[data-mood="vert"]   { --m-hi: #3DD68C; --m-lo: #17714A; --m-fill-d: #3DD68C; --m-on-d: #0E0E0E; --m-fill-l: #17714A; --m-on-l: #F4F2EE; --glitch: #3DD68C; }
:root[data-mood="orange"] { --m-hi: #F26B3A; --m-lo: #B23F17; --m-fill-d: #F26B3A; --m-on-d: #0E0E0E; --m-fill-l: #B23F17; --m-on-l: #F4F2EE; --glitch: #F26B3A; }
:root[data-mood="jaune"]  { --m-hi: #F5C518; --m-lo: #806300; --m-fill-d: #F5C518; --m-on-d: #0E0E0E; --m-fill-l: #F5C518; --m-on-l: #0E0E0E; --glitch: #F5C518; }
/* areas over photos stay dark in both modes */
.contact, .lightbox {
  --ground: #0E0E0E; --ground-2: #161616; --ink: #F2EFEA; --ink-soft: #D9D5CE; --muted: #A8A39B; --line: #4A463F;
  --accent: var(--m-hi); --accent-fill: var(--m-fill-d); --on-accent: var(--m-on-d);
  color: var(--ink);
}
.selection figcaption, .reel .tag { color: #F2EFEA; }
body, .site-header, .about, .cta-band, .chip, .tile { transition: background-color .4s var(--ease), color .4s var(--ease); }

.theme-toggle, .mood-toggle {
  order: 2; position: relative; z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; color: var(--ink); cursor: pointer;
  display: grid; place-items: center; transition: border-color .3s, color .3s, transform .2s var(--ease);
}
.theme-toggle:hover, .mood-toggle:hover { border-color: var(--accent); color: var(--accent); }
.theme-toggle:active, .mood-toggle:active { transform: scale(.92); }
/* mood picker: a dot of the current colour, opening a row of swatches */
.mood { order: 2; position: relative; }
.mood-toggle .dot { width: 18px; height: 18px; border-radius: 50%; background: var(--m-fill-d); box-shadow: 0 0 0 1.5px var(--m-hi); transition: background-color .4s, box-shadow .4s; }
.mood__menu {
  position: absolute; top: calc(100% + 10px); right: -8px; display: flex; gap: 6px; padding: 8px;
  background: var(--header-bg); border: 1px solid var(--line); border-radius: 999px;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transform: translateY(-6px) scale(.96); transform-origin: top right;
  transition: opacity .25s, transform .35s var(--ease), visibility 0s .35s;
}
.mood.is-open .mood__menu { opacity: 1; visibility: visible; transform: none; transition: opacity .25s, transform .35s var(--ease); }
.swatch { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: pointer; display: grid; place-items: center; }
.swatch span { width: 20px; height: 20px; border-radius: 50%; background: var(--c); transition: transform .3s var(--ease), box-shadow .3s; }
.swatch:hover span { transform: scale(1.15); }
.swatch[aria-checked="true"] span { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.swatch--nuit span { box-shadow: inset 0 0 0 1.5px #8F8FEA; }
.swatch--nuit[aria-checked="true"] span { box-shadow: inset 0 0 0 1.5px #8F8FEA, 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink); }
.theme-toggle svg { grid-area: 1 / 1; transition: transform .5s var(--ease), opacity .3s; }
[data-theme="dark"] .theme-toggle .icon-moon, [data-theme="light"] .theme-toggle .icon-sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
.logo { order: 0; margin-right: auto; }
.nav { order: 1; }
.menu-btn { order: 3; }
@media (min-width: 761px) { .mood { margin-left: 8px; } }
.mood + .theme-toggle { margin-left: -6px; }

/* circle reveal when switching mode (browsers with View Transitions) */
::view-transition-old(root) { animation: none; }
::view-transition-new(root) { animation: theme-reveal .75s var(--ease-io); }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 100%) var(--vt-y, 0)); }
  to { clip-path: circle(150vmax at var(--vt-x, 100%) var(--vt-y, 0)); }
}
