/* ATELIER GLAMMCAKES — v3-atelier
   Light-luxury patisserie couture: ivory · blush · champagne gold.
   Motion: Lenis + GSAP ScrollTrigger (assets/motion.js), sugar-hero canvas. */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-latin-wght-italic.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-500-normal.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --ivory: #fffdfb;
  --paper: #fdf7f2;
  --blush: #f4d9dd;
  --rose: #e7a9b4;
  --champagne: #c9a96a;
  --deep-gold: #a8873e;
  --cocoa: #3a302b;
  --cocoa-soft: rgba(58, 48, 43, .72);
  --marble: #e8e3dc;
  --display: "Fraunces", Georgia, serif;
  --body: "Jost", "Avenir Next", "Segoe UI", sans-serif;
  --ease-premium: cubic-bezier(0.65, 0.05, 0, 1);
  --duration-reveal: 0.75s;
  --section-padding: clamp(7rem, 13vh, 12rem);
  --content-width: 1180px;
  --measure: 62ch;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  margin: 0;
  min-width: 320px;
  overflow-x: clip;
  background: var(--ivory);
  color: var(--cocoa);
  font-family: var(--body);
  font-weight: 400;
  line-height: 1.6;
}

img { display: block; width: 100%; height: auto; }
a { color: inherit; }

::selection { background: var(--blush); color: var(--cocoa); }

.skip-link {
  position: fixed;
  left: 12px;
  top: 12px;
  z-index: 40;
  transform: translateY(-160%);
  padding: 10px 14px;
  background: var(--cocoa);
  color: white;
  transition: transform .3s var(--ease-premium);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 48px);
  transition: background .5s var(--ease-premium), border-color .5s var(--ease-premium), box-shadow .5s var(--ease-premium);
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(255, 253, 251, .9);
  border-bottom-color: rgba(201, 169, 106, .26);
  backdrop-filter: blur(18px);
}
/* over the dark hero, header text turns cream */
.site-header:not(.is-solid) { color: #f6e7cf; text-shadow: 0 1px 12px rgba(0, 0, 0, .35); }
.site-header:not(.is-solid) .brand span { color: #e2bc74; }
.site-header:not(.is-solid) .nav-links a { color: rgba(253, 244, 230, .85); }
.site-header:not(.is-solid) .nav-links a:hover { color: #fff; }
.site-header:not(.is-solid) .language-toggle { border-color: rgba(246, 231, 207, .55); }
.site-header:not(.is-solid) .language-toggle button { color: rgba(253, 244, 230, .85); }
.site-header:not(.is-solid) .language-toggle button.is-active { background: rgba(226, 188, 116, .9); color: #2b211a; }
.brand {
  justify-self: start;
  display: flex;
  align-items: baseline;
  gap: .45rem;
  text-decoration: none;
  font-family: var(--display);
  letter-spacing: .01em;
}
.brand span {
  font-size: .82rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--deep-gold);
  font-family: var(--body);
  font-weight: 500;
}
.brand strong { font-size: 1.3rem; font-weight: 560; }
.nav-links { display: flex; gap: clamp(14px, 2.4vw, 30px); }
.nav-links a {
  position: relative;
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 2px;
  color: var(--cocoa-soft);
  transition: color .3s var(--ease-premium);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--champagne);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s var(--ease-premium);
}
.nav-links a:hover { color: var(--cocoa); }
.nav-links a:hover::after { transform: scaleX(1); }
.language-toggle {
  display: flex;
  border: 1px solid rgba(201, 169, 106, .5);
  border-radius: 999px;
  overflow: hidden;
}
.language-toggle button {
  border: 0;
  background: transparent;
  color: var(--cocoa-soft);
  font: inherit;
  font-size: .82rem;
  letter-spacing: .1em;
  padding: 7px 14px;
  cursor: pointer;
  transition: background .3s, color .3s;
}
.language-toggle button.is-active { background: var(--champagne); color: white; }

/* ---------- buttons ---------- */
.button {
  position: relative;
  display: inline-block;
  padding: 15px 34px;
  border-radius: 999px;
  border: 1px solid var(--champagne);
  font: inherit;
  font-size: .95rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .35s var(--ease-premium), border-color .35s var(--ease-premium);
}
.button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--deep-gold);
  transform: scale(0);
  transition: transform .38s var(--ease-premium);
  border-radius: inherit;
  z-index: -1;
}
.button:hover::after { transform: scale(1.02); }
.button.primary { background: var(--champagne); color: white; }
.button.primary:hover { border-color: var(--deep-gold); }
.button.quiet { background: transparent; color: var(--cocoa); }
.button.quiet:hover { color: white; border-color: var(--deep-gold); }

/* ---------- sugar hero ---------- */
/* Pat 07-14: hero ground is IVORY — the dark ground read as a black band
   between the hero photo and the first section. */
.sugar-hero { position: relative; height: 210vh; background: var(--ivory); }
.sugar-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}
.sugar-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 108%;
  object-fit: cover;
  object-position: 50% 38%;
  will-change: transform;
}
.sugar-veil {
  position: absolute;
  inset: 0;
  /* Pat 07-14 "happens on scroll": the .58 bottom shade painted a dark band
     that slid past as the pin released — bottom now fades to IVORY instead,
     so the hero melts into the page. */
  background:
    radial-gradient(ellipse at 50% 30%, rgba(22, 15, 10, 0) 0%, rgba(22, 15, 10, .30) 78%),
    linear-gradient(180deg, rgba(22, 15, 10, .5) 0%, rgba(22, 15, 10, .12) 34%, rgba(22, 15, 10, .14) 74%, rgba(255, 253, 251, .9) 100%);
}
.sugar-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  mix-blend-mode: screen;
}
.sugar-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 0 clamp(18px, 6vw, 80px);
  color: #fdf4e6;
}
.sugar-copy::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 62% 44% at 50% 46%, rgba(20, 14, 10, .4), transparent 72%);
}
.sugar-copy > * { position: relative; }
.sugar-logo {
  width: min(620px, 82vw);
  filter: drop-shadow(0 4px 26px rgba(0, 0, 0, .55)) drop-shadow(0 1px 6px rgba(0, 0, 0, .5));
  will-change: transform, opacity;
}
.sugar-tagline {
  margin: clamp(18px, 3vh, 30px) 0 0;
  /* Pat 07-14: italic serif made « gâteau » misread as « gato » — clean
     letterspaced sans caps instead, unmistakable at any size. */
  font-family: var(--body);
  font-style: normal;
  font-weight: 400; /* Pat 07-14: finer */
  font-size: clamp(.9rem, 1.7vw, 1.15rem);
  letter-spacing: .32em;
  text-transform: uppercase;
  color: #f6e7cf;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
  will-change: transform, opacity;
}
.sugar-hint {
  margin: clamp(26px, 6vh, 60px) 0 0;
  font-size: .8rem;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: rgba(253, 244, 230, .78);
  animation: hint-float 2.6s ease-in-out infinite;
}
@keyframes hint-float {
  0%, 100% { transform: translateY(0); opacity: .75; }
  50% { transform: translateY(8px); opacity: 1; }
}

/* ---------- shared section chrome ---------- */
section { position: relative; }
.section-head {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 56px);
}
.eyebrow {
  margin: 0 0 1.1rem;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .4em;
  text-transform: uppercase;
  color: var(--deep-gold);
}
h1, h2, h3 {
  font-family: var(--display);
  font-weight: 480;
  line-height: 1.12;
  margin: 0 0 1.4rem;
  letter-spacing: -0.01em;
}
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); max-width: 22ch; }
h2 em, .pull-quote em { font-style: italic; }

/* split-line reveal shells (populated by JS) */
.split-lines .line {
  display: block;
  overflow: hidden;
}
.split-lines .line > span {
  display: block;
  transform: translateY(110%);
}
html.no-motion .split-lines .line > span { transform: none; }

/* ---------- about ---------- */
.about {
  padding: var(--section-padding) 0;
  background:
    radial-gradient(circle at 12% 4%, rgba(244, 217, 221, .5), transparent 26rem),
    var(--ivory);
}
.about .section-head { margin-bottom: clamp(3rem, 7vh, 5.5rem); }
.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 56px);
}
.section-grid.is-reversed { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.about-chapter { margin-bottom: clamp(3.5rem, 8vh, 6rem); }
.section-copy p {
  max-width: var(--measure);
  margin: 0 0 1.35rem;
  font-size: 1.06rem;
  color: var(--cocoa-soft);
}
.about-photo {
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 30px 70px -30px rgba(58, 48, 43, .35);
}
.about-photo img { transform: scale(1.12); will-change: transform; }
.pull-quote {
  max-width: var(--content-width);
  margin: clamp(4rem, 10vh, 7rem) auto;
  padding: 0 clamp(18px, 5vw, 56px);
  font-family: var(--display);
  font-style: italic;
  font-weight: 420;
  font-size: clamp(1.7rem, 4vw, 3rem);
  line-height: 1.25;
  color: var(--deep-gold);
  text-align: center;
}
.about-full {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 clamp(18px, 5vw, 56px);
}
.about-full p { margin: 0 0 1.35rem; font-size: 1.06rem; color: var(--cocoa-soft); }
.about-credo {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.5rem !important;
  color: var(--deep-gold) !important;
  line-height: 1.4;
  margin: 2.4rem 0 !important;
}
.about-signature {
  font-family: var(--display);
  font-style: italic;
  font-size: 2rem;
  color: var(--cocoa);
  margin: 2.6rem 0 0;
}

/* ---------- interludes (full-bleed parallax) ---------- */
.interlude {
  position: relative;
  height: clamp(70vh, 92vh, 92vh);
  overflow: hidden;
}
.interlude-media {
  position: absolute;
  inset: -12% 0;
  will-change: transform;
}
.interlude-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.interlude::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(22, 15, 10, .26), rgba(22, 15, 10, .05) 40%, rgba(22, 15, 10, .45));
}
.interlude-caption {
  position: absolute;
  inset: auto 0 clamp(2.4rem, 8vh, 5rem);
  z-index: 2;
  text-align: center;
  padding: 0 clamp(18px, 6vw, 80px);
}
.interlude-caption p {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 430;
  font-size: clamp(1.5rem, 3.6vw, 2.7rem);
  line-height: 1.3;
  color: #fdf4e6;
  text-shadow: 0 2px 22px rgba(0, 0, 0, .55);
}

/* ---------- créations ---------- */
.creations { padding: var(--section-padding) 0; background: var(--paper); }
.creations .section-head { margin-bottom: clamp(3rem, 7vh, 5rem); }
.creations-signoff {
  max-width: var(--measure);
  color: var(--cocoa-soft);
  font-size: 1.06rem;
  margin: 0;
}
.portfolio-flow {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 clamp(14px, 4vw, 48px);
  display: grid;
  gap: clamp(3.5rem, 9vh, 7rem);
}
.gallery-group { display: grid; gap: clamp(.9rem, 1.6vw, 1.4rem); }
.group-label {
  margin: 0 0 .3rem;
  font-size: .78rem;
  font-weight: 500;
  letter-spacing: .38em;
  text-transform: uppercase;
  color: var(--deep-gold);
}
.group-frames { display: grid; gap: clamp(2.2rem, 4.5vw, 3.6rem); }

/* Stéphanie's law 07-14: each cake = its FULL photo(s), never cropped,
   + one curated close-up square beside them. Rows alternate sides. */
.piece {
  display: grid;
  grid-template-columns: 5fr 3fr;
  gap: clamp(.9rem, 1.6vw, 1.4rem);
  align-items: start;
}
.piece.is-reversed .piece-fulls { order: 2; }
.piece.is-reversed .piece-closeup { order: 1; }
.piece.is-solo { grid-template-columns: minmax(0, 1fr); max-width: 900px; }
.piece-fulls { display: grid; gap: clamp(.9rem, 1.6vw, 1.4rem); }
.piece figure {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: 4px;
  background: var(--marble);
  box-shadow: 0 24px 60px -34px rgba(58, 48, 43, .4);
}
.piece-full img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 1.1s var(--ease-premium);
}
.piece-full:hover img { transform: scale(1.04); }
.piece-closeup {
  aspect-ratio: 1 / 1;
}
.piece-closeup img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (max-width: 720px) {
  .piece { grid-template-columns: minmax(0, 1fr); }
  .piece.is-reversed .piece-fulls { order: 0; }
  .piece.is-reversed .piece-closeup { order: 0; }
}

/* ---------- closing CTA ---------- */
.closing-cta {
  padding: var(--section-padding) clamp(18px, 5vw, 56px);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(244, 217, 221, .55), transparent 30rem),
    var(--ivory);
}
.closing-cta h2 { margin-left: auto; margin-right: auto; }
.closing-cta p:not(.eyebrow) {
  max-width: 46ch;
  margin: 0 auto 2.4rem;
  color: var(--cocoa-soft);
  font-size: 1.06rem;
}

/* ---------- contact ---------- */
.contact {
  display: block;
  padding-top: 0;
  padding-bottom: var(--section-padding);
}
.contact-intro { max-width: 860px; margin: 0 auto; }
.contact-intro > p { color: var(--cocoa-soft); }

/* Stéphanie 07-14: the request story + form live behind this button. */
.request-toggle { margin-top: 1.4rem; }
.request-panel { margin-top: 2.4rem; }
.request-panel.is-open { animation: panel-in .7s var(--ease-premium) both; }
@keyframes panel-in {
  from { opacity: 0; transform: translateY(26px); }
  to { opacity: 1; transform: translateY(0); }
}
.field-note {
  font-size: .8rem;
  letter-spacing: normal;
  text-transform: none;
  color: var(--cocoa-soft);
  opacity: .85;
}

.cake-form { margin-top: 2.6rem; }
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.3rem 1.6rem;
}
.form-grid label, .flavour-field {
  display: grid;
  gap: .45rem;
  font-size: .86rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--cocoa-soft);
}
.form-grid input, .form-grid select, .form-grid textarea {
  border: 1px solid rgba(58, 48, 43, .2);
  border-radius: 3px;
  background: white;
  padding: 13px 14px;
  font: inherit;
  font-size: 1rem;
  color: var(--cocoa);
  letter-spacing: normal;
  text-transform: none;
  transition: border-color .3s;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus {
  outline: none;
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px rgba(201, 169, 106, .18);
}
.flavour-field {
  border: 1px solid rgba(58, 48, 43, .14);
  border-radius: 3px;
  padding: 12px 14px;
  margin: 0;
}
.flavour-field legend { padding: 0 6px; }
.flavour-field label {
  display: flex;
  align-items: center;
  gap: .55rem;
  text-transform: none;
  letter-spacing: normal;
  font-size: 1rem;
  color: var(--cocoa);
}
.flavour-field input { accent-color: var(--champagne); }
.form-wide { grid-column: 1 / -1; }
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.8rem;
}
.form-note { color: var(--cocoa-soft); font-size: .92rem; margin-top: 1rem; }

.good-to-know {
  margin-top: 3.4rem;
  border: 1px solid rgba(201, 169, 106, .38);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(244, 217, 221, .25), rgba(255, 253, 251, .9));
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.good-to-know h3 { font-size: 1.3rem; margin-bottom: 1rem; }
.good-to-know ul { margin: 0; padding-left: 1.1rem; color: var(--cocoa-soft); }
.good-to-know li { margin-bottom: .55rem; }
.gtk-email { margin: 1.2rem 0 0; font-size: 1rem; }
.gtk-email a { color: var(--deep-gold); text-decoration-color: rgba(168, 135, 62, .4); }

/* ---------- calendar modal (kept from v2) ---------- */
.availability-modal {
  border: 0;
  border-radius: 6px;
  padding: 0;
  max-width: min(440px, calc(100vw - 32px));
  width: 100%;
  box-shadow: 0 40px 120px -30px rgba(58, 48, 43, .5);
}
.availability-modal::backdrop { background: rgba(58, 48, 43, .45); backdrop-filter: blur(4px); }
.modal-panel { position: relative; padding: clamp(1.4rem, 4vw, 2.2rem); }
.modal-close {
  position: absolute;
  top: 10px; right: 12px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--cocoa-soft);
}
.availability-panel h3 { font-size: 1.4rem; }
.availability-panel > p { color: var(--cocoa-soft); font-size: .98rem; }
.calendar-shell { margin-top: 1.2rem; }
.calendar-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .7rem;
}
.calendar-controls strong { font-family: var(--display); font-weight: 520; text-transform: capitalize; }
.calendar-controls button {
  border: 1px solid rgba(58, 48, 43, .2);
  background: white;
  border-radius: 999px;
  width: 34px; height: 34px;
  font-size: 1.1rem;
  cursor: pointer;
}
.calendar-weekdays, .calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar-weekdays span {
  text-align: center;
  font-size: .72rem;
  letter-spacing: .1em;
  color: var(--cocoa-soft);
  padding: 4px 0;
}
.calendar-day {
  border: 1px solid transparent;
  background: rgba(232, 227, 220, .4);
  border-radius: 4px;
  padding: 8px 0;
  font: inherit;
  font-size: .9rem;
  cursor: pointer;
}
.calendar-day:hover:not(:disabled) { border-color: var(--champagne); }
.calendar-day.is-full { background: rgba(231, 169, 180, .35); color: rgba(58, 48, 43, .4); cursor: not-allowed; }
.calendar-day.is-selected { background: var(--champagne); color: white; }
.calendar-day.is-muted { background: transparent; color: rgba(58, 48, 43, .3); cursor: default; }
.calendar-legend {
  display: flex;
  gap: 1.2rem;
  margin-top: 1rem;
  font-size: .82rem;
  color: var(--cocoa-soft);
}
.calendar-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.calendar-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.open-dot { background: rgba(232, 227, 220, .9); border: 1px solid rgba(58,48,43,.25); }
.full-dot { background: var(--rose); }
.selected-dot { background: var(--champagne); }

/* ---------- footer film (cinematic finale) ---------- */
.footer-film {
  position: relative;
  height: 280vh; /* long pin: the whole reveal is scrubbed by scroll */
  background: var(--ivory);
}
.footer-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: grid;
}
.footer-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: var(--ivory);
}
.footer-copy {
  position: absolute;
  inset: auto 0 clamp(1.6rem, 6vh, 4rem);
  display: grid;
  justify-items: center;
  gap: 1.4rem;
  text-align: center;
  padding: 0 clamp(18px, 5vw, 56px);
  color: var(--cocoa);
}
.footer-quote {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 430;
  font-size: clamp(1.25rem, 2.8vw, 1.9rem);
  color: var(--cocoa);
}
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(.9rem, 2.6vw, 2.2rem);
}
.footer-links a {
  position: relative;
  text-decoration: none;
  font-size: .88rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(58, 48, 43, .72);
  padding: 6px 2px;
  transition: color .3s var(--ease-premium);
}
.footer-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--champagne);
  transform: scaleX(0);
  transition: transform .35s var(--ease-premium);
}
.footer-links a:hover { color: var(--champagne); }
.footer-links a:hover::after { transform: scaleX(1); }
.build-badge { font-size: .72rem; letter-spacing: .12em; opacity: .45; margin: 0; }

/* ---------- lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: clamp(14px, 4vw, 48px);
  background: rgba(18, 13, 10, .92);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity .32s var(--ease-premium);
  cursor: zoom-out;
}
.lightbox.is-open { opacity: 1; }
/* subtle footer socials (render only when a real URL is configured) */
.footer-links .social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(58, 48, 43, .22);
  color: var(--deep-gold);
  opacity: .75;
  transition: opacity .3s, border-color .3s;
}
.footer-links .social-link:hover { opacity: 1; border-color: var(--deep-gold); }
/* [hidden] alone loses to `display: grid` above — without this the invisible
   overlay shields the whole page from clicks (Stéphanie's dead calendar button). */
.lightbox[hidden] { display: none; }
.lightbox-img {
  max-width: min(1200px, 94vw);
  max-height: 88svh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .8);
  transform: scale(.94);
  transition: transform .32s var(--ease-premium);
}
.lightbox.is-open .lightbox-img { transform: scale(1); }
.lightbox-close {
  position: absolute;
  top: 14px;
  right: 18px;
  border: 0;
  background: transparent;
  color: #f6e7cf;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}
.group-frames figure { cursor: zoom-in; }

/* ---------- reveal primitives ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); }
html.no-motion [data-reveal] { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .section-grid, .section-grid.is-reversed { grid-template-columns: 1fr; }
  .section-grid.is-reversed .about-photo { order: -1; }
  .form-grid { grid-template-columns: 1fr; }
  .group-frames[data-count="5"],
  .group-frames[data-count="6"],
  .group-frames[data-count="7"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .group-frames[data-count="5"] figure:first-child,
  .group-frames[data-count="7"] figure:first-child { grid-column: span 2; grid-row: auto; }
  .group-frames[data-count="5"] figure:first-child img,
  .group-frames[data-count="7"] figure:first-child img { aspect-ratio: 16 / 10; }
}
@media (max-width: 640px) {
  .nav-links { display: none; }
  .site-header { grid-template-columns: 1fr auto; }
  .sugar-hero { height: 180vh; }
  .group-frames[data-count="2"],
  .group-frames[data-count="3"],
  .group-frames[data-count="4"] { grid-template-columns: 1fr; }
  .group-frames[data-count="3"] figure:first-child { grid-row: auto; }
  .group-frames[data-count="3"] figure:first-child img { aspect-ratio: 4 / 3; }
  .group-frames[data-count="3"] figure:not(:first-child) img { aspect-ratio: 4 / 3; }
  .interlude { height: 72vh; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sugar-hero { height: auto; }
  .sugar-sticky { position: relative; height: 100svh; }
  .sugar-hint { animation: none; }
  .group-frames img, .about-photo img { transform: none; transition: none; }
  .footer-film { height: auto; }
  .footer-sticky { position: relative; }
}
@media (max-width: 640px) {
  .footer-film { height: 230vh; }
}
html.no-motion .footer-film { height: auto; }
html.no-motion .footer-sticky { position: relative; }

/* ---------- 2026-07-15 phone pass ---------- */
@media (max-width: 660px) {
  .site-header {
    grid-template-columns: 1fr auto auto;
    row-gap: 2px;
    min-height: 0;
    padding: 10px 16px 8px;
    width: 100%;
    max-width: 100%;
  }
  .brand strong { font-size: 1.08rem; }
  .brand span { font-size: .72rem; }
  .language-toggle { justify-self: end; }
  .nav-links {
    grid-column: 1 / -1;
    justify-content: center;
    gap: 20px;
  }
  .nav-links a { font-size: .78rem; padding: 4px 2px; }
}

/* ---------- footer menu — maison card (2026-07-15) ---------- */
.footer-links {
  gap: clamp(.55rem, 2vw, .9rem);
  max-width: 720px;
}
.footer-links a {
  border: 1px solid rgba(201, 169, 106, .38);
  border-radius: 999px;
  padding: 11px 22px;
  font-size: .8rem;
  letter-spacing: .2em;
  color: var(--cocoa-soft);
  background: rgba(255, 253, 251, .55);
  transition: color .3s var(--ease-premium), border-color .3s var(--ease-premium),
              background .3s var(--ease-premium), transform .3s var(--ease-premium),
              box-shadow .3s var(--ease-premium);
}
.footer-links a::after { display: none; }
.footer-links a:hover {
  color: var(--cocoa);
  border-color: var(--deep-gold);
  background: rgba(255, 253, 251, .92);
  transform: translateY(-2px);
  box-shadow: 0 12px 26px -14px rgba(58, 48, 43, .35);
}
/* featured: the book */
.footer-links a[href="/livre/"] {
  color: #2b211a;
  border-color: transparent;
  background: linear-gradient(120deg, #e2bc74, #c9a96a 55%, #b08d57);
  box-shadow: 0 14px 30px -14px rgba(176, 141, 87, .55);
  font-weight: 500;
}
.footer-links a[href="/livre/"]:hover {
  color: #1d1712;
  transform: translateY(-2px);
  box-shadow: 0 18px 36px -14px rgba(176, 141, 87, .7);
}
.footer-links .social-link { border-radius: 50%; padding: 0; width: 42px; height: 42px; }
@media (max-width: 560px) {
  .footer-links { gap: .5rem; }
  .footer-links a { padding: 10px 16px; font-size: .7rem; letter-spacing: .16em; }
  .footer-links a[href^="mailto"] { letter-spacing: .08em; text-transform: none; }
}

/* phones: Chrome expands the layout viewport for transformed (even clipped)
   images — scale() closeups made innerWidth 446 on a 390 screen. Clipping at
   the root is the one rule that stops it. */
html { overflow-x: clip; }

/* ---------- phone hamburger menu (Pat 2026-07-15) ---------- */
.menu-toggle {
  display: none;
  grid-row: 1;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(201, 169, 106, .5);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 16px;
  height: 1.5px;
  background: var(--deep-gold);
  border-radius: 2px;
  transition: transform .32s var(--ease-premium), opacity .25s;
}
.site-header:not(.is-solid) .menu-toggle { border-color: rgba(246, 231, 207, .55); }
.site-header:not(.is-solid) .menu-toggle span { background: #f6e7cf; }
.menu-toggle.is-open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

.mobile-menu {
  position: fixed;
  top: 64px;
  left: 12px;
  right: 12px;
  z-index: 29;
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 253, 251, .97);
  border: 1px solid rgba(201, 169, 106, .3);
  box-shadow: 0 30px 60px -24px rgba(58, 48, 43, .4);
  backdrop-filter: blur(16px);
  transform-origin: top right;
  animation: menu-in .32s var(--ease-premium);
}
@keyframes menu-in {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.mobile-menu a {
  display: block;
  padding: 14px 18px;
  border-radius: 12px;
  text-decoration: none;
  font-size: .92rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cocoa-soft);
}
.mobile-menu a:active, .mobile-menu a:hover { background: rgba(201, 169, 106, .12); color: var(--cocoa); }
.mobile-menu a[href="/livre/"] {
  color: #2b211a;
  background: linear-gradient(120deg, #e2bc74, #c9a96a 55%, #b08d57);
  font-weight: 500;
}
@media (max-width: 660px) {
  .menu-toggle { display: flex; }
}
@media (min-width: 661px) {
  .mobile-menu { display: none !important; }
}

/* the [hidden] trap again: display:grid above beats the hidden attribute —
   without this the menu is open on arrival (Pat 07-15). */
.mobile-menu[hidden] { display: none !important; }
