/* ==========================================================================
   PREMIUM · STEP 2 — Projects as a magazine
   Contents page on the home (this file, top) + the feature article
   (project.html, below). Three families only: Cormorant (serif), Pinyon Script
   (script accents), Jost (small capitals). Hairlines, air, large images.
   ========================================================================== */
:root {
  --mag-paper: #f6f3ea;
  --mag-ink: #241a17;
  --mag-muted: #7a6c63;
  --mag-line: rgb(36 26 23 / 0.14);
  --mag-ease: cubic-bezier(0.16, 1, 0.3, 1);
}
.smallcaps {
  font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase;
}

/* ---------- Contents (home) ---------- */
.mag { background: var(--mag-paper); color: var(--mag-ink); padding-block: clamp(5rem, 12vh, 9rem) clamp(5rem, 12vh, 8rem); }
.mag__masthead {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 1rem;
  padding-bottom: clamp(1.25rem, 3vh, 2rem); border-bottom: 1px solid var(--mag-ink);
}
.mag__kicker, .mag__count { margin: 0; font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.22em; text-transform: uppercase; color: var(--mag-muted); }
.mag__count { text-align: right; }
.mag__title {
  margin: 0; font-family: var(--font-display); font-weight: 300; line-height: 0.85; letter-spacing: -0.02em;
  font-size: clamp(3.4rem, 1.4rem + 7vw, 8.5rem); text-align: center; white-space: nowrap;
}
.mag__title em { font-style: italic; font-weight: 300; }

.mag__body { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(2rem, 5vw, 6rem); margin-top: clamp(2rem, 5vh, 3.5rem); }
.toc { list-style: none; margin: 0; padding: 0; }
.toc__row { border-bottom: 1px solid var(--mag-line); }
.toc__link {
  display: grid; grid-template-columns: 4.2rem minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 1.25rem; align-items: baseline;
  padding: clamp(0.85rem, 1.6vh, 1.2rem) 0; color: inherit; text-decoration: none;
}
.toc__no { grid-row: 1 / 3; font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; color: var(--mag-muted); padding-top: 0.6em; }
.toc__brand {
  font-family: var(--font-display); font-weight: 300; line-height: 1; letter-spacing: -0.01em;
  font-size: clamp(2.1rem, 1.1rem + 2.6vw, 3.9rem);
  transition: transform 1s var(--mag-ease), opacity 0.8s var(--mag-ease);
}
.toc__brand.is-italic { font-style: italic; }
.toc__brand .x { font-style: italic; font-size: 0.7em; color: var(--mag-muted); }
.toc__meta { display: flex; gap: 1.4rem; justify-content: flex-end; font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mag-muted); white-space: nowrap; }
.toc__title { grid-column: 2 / 4; margin-top: 0.35rem; font-family: var(--font-display); font-style: italic; font-size: 1.05rem; color: var(--mag-muted); }
/* the line you point at comes forward; the others step back */
@media (hover: hover) and (pointer: fine) {
  .toc:hover .toc__brand { opacity: 0.38; }
  .toc .toc__link:hover .toc__brand, .toc .toc__link:focus-visible .toc__brand { opacity: 1; transform: translateX(0.6rem); }
}
.toc__link:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

.toc__feature { position: sticky; top: calc(64px + 4vh); align-self: start; margin: 0; }
.toc__frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #e9e4d7; }
.toc__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transform: scale(1.03); transition: opacity 1.2s var(--mag-ease), transform 1.6s var(--mag-ease); }
.toc__frame img.is-on { opacity: 1; transform: scale(1); }
.toc__feature figcaption { margin-top: 0.9rem; font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mag-muted); }

.mag__filter { margin: 1.5rem 0 0; font-family: var(--font-display); font-style: italic; font-size: 1.15rem; color: var(--mag-muted); }
.mag__filter button { font: inherit; color: var(--mag-ink); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; cursor: pointer; }

/* phone cards: hidden on laptop */
.mag__cards { display: none; }

@media (max-width: 899px) {
  .mag__masthead { grid-template-columns: 1fr 1fr; }
  .mag__title { grid-column: 1 / -1; grid-row: 1; text-align: left; }
  .mag__body { grid-template-columns: 1fr; margin-top: 1.5rem; }
  .toc__feature { display: none; }
  .mag__cards {
    display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 0.9rem;
    margin: 1.75rem calc(-1 * var(--gutter)) 0; padding: 0 var(--gutter) 0.5rem;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-width: none; overscroll-behavior-x: contain;
  }
  .mag__cards::-webkit-scrollbar { display: none; }
  .mag-card {
    position: relative; scroll-snap-align: start; aspect-ratio: 4 / 5; overflow: hidden; color: var(--cream); text-decoration: none; background: #2c1c1b;
  }
  .mag-card[hidden] { display: none; }
  .mag-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .mag-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(20 14 12 / 0) 45%, rgb(20 14 12 / 0.72)); }
  .mag-card__text { position: absolute; z-index: 1; left: 1.1rem; right: 1.1rem; bottom: 1.1rem; display: grid; gap: 0.35rem; }
  .mag-card__no { font-family: var(--font-sans); font-size: 0.625rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; opacity: 0.85; }
  .mag-card__brand { font-family: var(--font-display); font-weight: 300; font-size: 2.3rem; line-height: 1; }
  .mag-card__brand.is-italic { font-style: italic; }
  .mag-card__brand .x { font-style: italic; font-size: 0.7em; }
  .mag-card__title { font-family: var(--font-display); font-style: italic; font-size: 1rem; opacity: 0.9; }
  .toc__link { grid-template-columns: 3.4rem minmax(0, 1fr); row-gap: 0.3rem; padding: 0.95rem 0; }
  .toc__no { white-space: nowrap; font-size: 0.625rem; letter-spacing: 0.14em; }
  .toc__brand { font-size: 1.95rem; }
  .toc__meta { grid-column: 2; justify-content: flex-start; font-size: 0.625rem; gap: 1rem; }
  .toc__title { display: none; }
  .toc__no { grid-row: 1; padding-top: 0.55em; }
}
@media (prefers-reduced-motion: reduce) {
  .toc__brand, .toc__frame img { transition: none !important; }
}

/* ==========================================================================
   The feature article (project.html) — reads in 3–4 screens
   ========================================================================== */
.page-feature { background: var(--mag-paper); color: var(--mag-ink); }
.page-feature .nav { background: rgb(246 243 234 / 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); color: var(--mag-ink); }
.page-feature .nav__cta { min-height: 0; padding: 0.35em 0; border-bottom: 1px solid currentColor; border-radius: 0; background: none; }
.ft .smallcaps { color: var(--mag-muted); }
.ft-back { display: inline-block; text-decoration: none; margin-bottom: clamp(1rem, 3vh, 2rem); }

/* 1. hero: full-bleed, the title over the picture(s) */
.ft-hero { position: relative; height: 88svh; min-height: 560px; color: var(--cream); overflow: hidden; background: var(--brown); }
.ft-hero__imgs { position: absolute; inset: 0; display: flex; gap: 4px; }
.ft-hero__imgs figure { margin: 0; flex: var(--ar) 1 0; min-width: 0; }
.ft-hero__imgs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ft-hero::after { content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgb(20 14 12 / 0.18), rgb(20 14 12 / 0) 22%, rgb(20 14 12 / 0) 42%, rgb(20 14 12 / 0.55) 70%, rgb(20 14 12 / 0.82)); }
.ft-hero__text { position: absolute; z-index: 1; left: var(--gutter); right: var(--gutter); bottom: clamp(1.75rem, 6vh, 3.75rem); }
.ft-hero .smallcaps, .ft-hero .ft-brand .x { color: rgb(234 231 211 / 0.88); }
.ft-hero .ft-back:hover { color: var(--cream); }
.ft-issue { margin: 0; }
.ft-brand { margin: 0.3em 0 0; font-family: var(--font-display); font-weight: 300; line-height: 0.86; letter-spacing: -0.025em; font-size: clamp(4rem, 1rem + 9vw, 10.5rem); }
.ft-brand .x { font-style: italic; font-size: 0.6em; }
.ft-title { margin: 0.5rem 0 0; font-family: var(--font-display); font-style: italic; font-weight: 300; font-size: clamp(1.4rem, 1rem + 1.1vw, 2.1rem); }

/* 2. standfirst: key phrase + intro on the left, facts on the right — both full */
.ft-intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 5.5rem); padding-block: clamp(2.25rem, 6vh, 4rem); align-items: start; }
.ft-key { margin: 0 0 1rem; font-family: var(--font-display); font-weight: 600; font-size: clamp(1.9rem, 1.2rem + 1.7vw, 3rem); line-height: 1.08; letter-spacing: -0.01em; }
.ft-lede { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: clamp(1.2rem, 1rem + 0.5vw, 1.5rem); line-height: 1.4; color: #4a3d37; max-width: 46ch; }
.ft-facts { margin: 0; display: grid; gap: 0.7rem; border-top: 1px solid var(--mag-ink); padding-top: 0.9rem; }
.ft-facts div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; }
.ft-facts dt { font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--mag-muted); padding-top: 0.25em; }
.ft-facts dd { margin: 0; font-family: var(--font-display); font-size: 1.12rem; }

/* rows of pictures: same height, edge to edge */
.ft-row { display: flex; gap: clamp(0.6rem, 1vw, 1rem); align-items: flex-start; }
.ft-row + .ft-row { margin-top: clamp(0.6rem, 1vw, 1rem); }
.ft-row .ft-fig { flex: var(--ar) 1 0; min-width: 0; margin: 0; }
.ft-fig img { display: block; width: 100%; height: auto; aspect-ratio: var(--ar); object-fit: cover; }
.ft-fig figcaption { margin-top: 0.5rem; font-family: var(--font-display); font-style: italic; font-size: 0.95rem; color: var(--mag-muted); }

/* 3. the making of */
.ft-process { background: #ece6d8; padding-block: clamp(2.25rem, 6vh, 4rem); }
.ft-process__head { display: flex; justify-content: space-between; align-items: baseline; gap: 2rem; border-bottom: 1px solid var(--mag-ink); padding-bottom: 0.8rem; margin-bottom: clamp(1.25rem, 3vh, 2rem); }
.ft-process__head p { margin: 0; }
.ft-process__head h2 { margin: 0; font-family: var(--font-display); font-weight: 300; font-size: clamp(1.7rem, 1rem + 1.8vw, 3rem); }
.ft-process__head h2 span { color: var(--mag-muted); font-size: 0.7em; }
.ft-process__head .script { font-family: var(--font-script); font-size: 1em; color: var(--mag-ink); }
/* the steps sit on one baseline: labels above, pictures the same height */
.ft-row--steps { align-items: flex-end; }
.ft-process__label { margin: 0 0 0.6rem; font-family: var(--font-display); font-size: 1.35rem; }
.ft-process__label .smallcaps { margin-right: 0.3em; }

/* 4. the dense grid */
.ft-grid { padding-block: clamp(2.25rem, 6vh, 4rem); }
.ft-video { padding-bottom: clamp(2.25rem, 6vh, 4rem); }
.ft-video video { width: 100%; display: block; }

/* 5. next story */
.ft-next { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr); align-items: center; gap: clamp(2rem, 5vw, 5rem); padding: clamp(2.5rem, 7vh, 4.5rem) var(--gutter); background: var(--brown); color: var(--cream); text-decoration: none; }
.ft-next__text { display: grid; gap: 0.7rem; }
.ft-next .smallcaps { color: rgb(234 231 211 / 0.7); }
.ft-next__brand { font-family: var(--font-display); font-style: italic; font-weight: 300; line-height: 0.9; font-size: clamp(3rem, 1rem + 5.5vw, 7rem); transition: transform 1s var(--mag-ease); }
.ft-next__brand .x { font-size: 0.6em; color: rgb(234 231 211 / 0.7); }
.ft-next__title { font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 0.5vw, 1.5rem); }
.ft-next__img { overflow: hidden; aspect-ratio: 3 / 2; max-height: 46svh; }
.ft-next__img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 1.4s var(--mag-ease); }
.ft-next:hover .ft-next__brand { transform: translateX(0.6rem); }
.ft-next:hover .ft-next__img img { transform: scale(1.03); }

/* phone (to be reviewed later): keep it readable */
@media (max-width: 899px) {
  .ft-hero { height: 78svh; }
  .ft-hero__imgs figure:nth-child(3) { display: none; }
  .ft-back { display: none; }
  .ft-brand { font-size: clamp(3.2rem, 1rem + 12vw, 5.5rem); }
  .ft-intro { grid-template-columns: 1fr; }
  .ft-facts div { grid-template-columns: 7rem 1fr; }
  .ft-row { flex-wrap: wrap; }
  .ft-row .ft-fig { flex-basis: 40%; }
  .ft-process__head { flex-direction: column; gap: 0.4rem; }
  .ft-next { grid-template-columns: 1fr; }
  .ft-next__img { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .ft-next__brand, .ft-next__img img { transition: none !important; }
}

/* project pages: the phone tab bar loses its pill too (same as the home) */
@media (max-width: 760px) {
  .page-feature .tabbar a, .page-feature .tabbar a.tabbar__cta { border-radius: 0; background: none; box-shadow: none; }
  .page-feature .tabbar a.tabbar__cta { color: var(--burgundy); text-decoration: underline; text-underline-offset: 0.6em; text-decoration-thickness: 1px; }
}

/* ---------- French key phrase: its English translation underneath ---------- */
.ft-key-tr { margin: -0.4rem 0 1.1rem; font-family: var(--font-sans); font-size: 0.6875rem; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; color: var(--mag-muted); }

/* ---------- Social embeds (reusable) ----------
   Cards in the studio's colours; the real post loads inside on click. */
.ft-social { padding-block: clamp(2.25rem, 6vh, 4rem); }
.ft-social .ft-process__head em { font-style: italic; }
.se-row { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(min(var(--n), 4), minmax(0, 1fr)); gap: clamp(0.75rem, 1.4vw, 1.25rem); align-items: start; }
.se-card { display: grid; gap: 0.6rem; min-width: 0; }
.se-frame { position: relative; border-radius: 14px; overflow: hidden; background: var(--brown); box-shadow: 0 1px 1px rgb(36 26 23 / 0.08), 0 18px 34px -22px rgb(36 26 23 / 0.45); }
.se-ph {
  all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-rows: auto 1fr auto auto; gap: 0.6rem; width: 100%; aspect-ratio: 4 / 5;
  padding: 1.1rem 1.15rem 1.2rem; color: var(--cream);
  background: var(--ph, var(--brown)) radial-gradient(120% 90% at 20% 0%, rgb(255 250 240 / 0.12), rgb(255 250 240 / 0) 60%);
  transition: filter 0.6s var(--mag-ease);
}
.se-card--c0 { --ph: #2c1c1b; } .se-card--c1 { --ph: #5e1420; } .se-card--c2 { --ph: #5f6232; } .se-card--c3 { --ph: #3a2724; }
.se-ph:hover { filter: brightness(1.08); }
.se-ph:focus-visible { outline: 2px solid var(--cream); outline-offset: -6px; }
.se-ph__top { display: flex; justify-content: space-between; }
.se-ph__top .smallcaps { color: rgb(234 231 211 / 0.85); }
.se-ph__glyph { align-self: center; justify-self: center; width: 2.6rem; opacity: 0.75; }
.se-ph__cta { font-family: var(--font-display); font-size: 1.45rem; line-height: 1.1; }
.se-ph__cta span { font-style: italic; color: rgb(234 231 211 / 0.8); }
.se-ph__note { font-size: 0.5625rem; color: rgb(234 231 211 / 0.6); }
.se-frame.is-loading .se-ph { cursor: progress; filter: brightness(0.85); }
.se-frame.is-loading .se-ph__note::after { content: " — loading…"; }
/* the embed, held inside the card: no white border, no fixed minimum width */
.se-frame .instagram-media { margin: 0 !important; min-width: 0 !important; max-width: none !important; width: 100% !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.se-frame.is-loading .instagram-media { position: absolute !important; inset: 0; opacity: 0; pointer-events: none; }
.se-frame.is-loaded { background: #fff; }
.se-fallback { display: grid; align-content: end; gap: 0.5rem; aspect-ratio: 4 / 5; padding: 1.15rem; color: var(--cream); text-decoration: none; background: var(--ph, var(--brown)); }
.se-fallback .smallcaps { color: rgb(234 231 211 / 0.7); }
.se-fallback__cta { font-family: var(--font-display); font-size: 1.4rem; }
.se-link { color: var(--mag-muted); text-decoration: none; font-size: 0.625rem; }
.se-link:hover { color: var(--mag-ink); }
@media (max-width: 899px) {
  .se-row { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 74%; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); margin-inline: calc(-1 * var(--gutter)); padding-inline: var(--gutter); scrollbar-width: none; }
  .se-card { scroll-snap-align: start; }
}

/* ---------- Cover set in the data: the same picture on both sides of the title (not flipped: the label must read) ---------- */
.ft-hero--mirror .ft-hero__imgs { gap: 0; }
.ft-hero--mirror .ft-hero__imgs figure { flex: 0 0 31%; }
.ft-hero--mirror .ft-hero__mid { flex: 1 1 auto; background: radial-gradient(90% 70% at 50% 40%, #1c1a4a, #0b0a24 70%); }
.ft-hero--mirror::after { background: linear-gradient(180deg, rgb(11 10 36 / 0) 55%, rgb(11 10 36 / 0.55)); }
.ft-hero--mirror .ft-hero__text { left: 31%; right: 31%; bottom: auto; top: 50%; transform: translateY(-46%); text-align: center; }
.ft-hero--mirror .ft-brand { font-size: clamp(3.2rem, 1rem + 5.4vw, 7rem); }

/* ---------- Highlight: expectation → reality, on the identity Brown ---------- */
.ft-highlight { background: var(--brown); color: var(--cream); padding-block: clamp(2.25rem, 6vh, 4rem); }
.ft-highlight .ft-process__head { border-bottom-color: rgb(234 231 211 / 0.5); }
.ft-highlight .ft-process__head h2 span { color: rgb(234 231 211 / 0.6); }
.ft-highlight .ft-process__head .script { color: var(--cream); font-size: 1.1em; }
.ft-highlight .smallcaps { color: rgb(234 231 211 / 0.75); }
@media (max-width: 899px) {
  .ft-hero--mirror .ft-hero__imgs figure { flex-basis: 30%; }
  .ft-hero--mirror .ft-hero__text { left: 8%; right: 8%; }
}

/* a very wide drawing in the making-of: shown whole, on white, without crushing its neighbours */
.ft-fig--contain img { object-fit: contain; background: #fff; }

/* ---------- Between pages: a simple, quick cross-fade (no folder) ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: 0.3s; animation-timing-function: ease-out; }
@media (prefers-reduced-motion: reduce) { ::view-transition-old(root), ::view-transition-new(root) { animation: none; } }
.footer__ig { color: inherit; text-decoration: none; }
.footer__ig:hover { text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- Phone review (launch) ---------- */
@media (max-width: 760px) {
  /* the manifesto: on a narrow screen the "exploded" lines read as broken — set them naturally */
  .quote .exploded > span { justify-content: flex-start; gap: 0.28em; }
}
@media (max-width: 760px) {
  /* photo rows: a clean two-column grid; with an odd count the first picture spans the width */
  .ft-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; align-items: end; }
  .ft-row + .ft-row { margin-top: 0.6rem; }
  .ft-row .ft-fig { min-width: 0; }
  .ft-row .ft-fig img { aspect-ratio: 4 / 5; }
  .ft-row > .ft-fig:first-child:nth-last-child(odd) { grid-column: 1 / -1; }
  .ft-row > .ft-fig:first-child:nth-last-child(odd) img { aspect-ratio: 3 / 2; }
  .ft-row .ft-fig--contain img { aspect-ratio: auto; }
  .ft-process__label { font-size: 1.15rem; margin-bottom: 0.35rem; }
  .ft-fig figcaption { font-size: 0.8rem; }
}
@media (max-width: 760px) {
  /* the making-of and the expectation → reality pages keep their own proportions (nothing cut off) */
  .ft-row--steps .ft-fig img, .ft-row--steps > .ft-fig:first-child:nth-last-child(odd) img { aspect-ratio: var(--ar); }
  .ft-highlight .ft-row { grid-template-columns: 1fr; }
  .ft-highlight .ft-row .ft-fig img, .ft-highlight .ft-row > .ft-fig:first-child:nth-last-child(odd) img { aspect-ratio: var(--ar); }
}
@media (max-width: 760px) {
  /* Diptyque on a phone: the candles stay on both sides, the title between them */
  .ft-hero--mirror .ft-hero__imgs figure { flex-basis: 27%; }
  .ft-hero--mirror .ft-hero__imgs figure.is-mirrored { display: block; }
  .ft-hero--mirror .ft-hero__text { left: 4%; right: 4%; }
  .ft-hero--mirror .ft-brand { font-size: clamp(2.6rem, 1rem + 8vw, 3.4rem); }
  .ft-hero--mirror .ft-issue { font-size: 0.5625rem; letter-spacing: 0.16em; }
}
