/* ==========================================================================
   Carlos de Sousa Brandão — A Life Remembered
   Design system: warm ivory / parchment / charcoal / muted bronze
   Type: Cormorant Garamond (display, memorial text) + Inter (UI)
   ========================================================================== */

@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: normal; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Cormorant"; font-style: italic; font-weight: 300 700; font-display: swap;
  src: url("../fonts/cormorant-garamond-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("../fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ivory: #F5F1E9;
  --ivory-2: #FAF7F1;
  --parchment: #E9E1D5;
  --parchment-2: #DED3C3;
  --charcoal: #252525;
  --ink: #1E1C1A;
  --night: #1A1816;
  --slate: #737373;
  --slate-2: #5E5A55;
  --bronze: #A38A69;
  --bronze-deep: #826B4E;
  --bronze-light: #C9B48F;
  --white: #FFFFFF;
  --line: rgba(37, 37, 37, .14);
  --line-light: rgba(245, 241, 233, .18);

  --serif: "Cormorant", "Cormorant Garamond", Garamond, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --step--1: clamp(.8rem, .78rem + .1vw, .86rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.1rem);
  --step-1: clamp(1.25rem, 1.15rem + .5vw, 1.5rem);
  --step-2: clamp(1.6rem, 1.4rem + 1vw, 2.2rem);
  --step-3: clamp(2.1rem, 1.7rem + 2vw, 3.3rem);
  --step-4: clamp(2.8rem, 2rem + 4vw, 5.2rem);
  --step-5: clamp(3.2rem, 2rem + 6.4vw, 7.6rem);

  --gutter: clamp(1.25rem, 4vw, 3.5rem);
  --maxw: 1240px;
  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --slow: 1.2s;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; background: var(--ivory); color: var(--charcoal);
  font-family: var(--sans); font-size: var(--step-0); line-height: 1.65; font-weight: 400;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: rgba(163, 138, 105, .55); text-underline-offset: .2em; }
a:hover { text-decoration-color: var(--bronze); }
button { font: inherit; color: inherit; }
::selection { background: rgba(163, 138, 105, .3); }
:focus-visible { outline: 2px solid var(--bronze); outline-offset: 3px; border-radius: 2px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -4rem; z-index: 200; background: var(--charcoal); color: var(--ivory); padding: .6rem 1rem; border-radius: 2px; transition: top .3s; }
.skip-link:focus { top: 1rem; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.08; margin: 0; letter-spacing: -.005em; }
p { margin: 0 0 1.1em; }
.wrap { width: min(100% - 2 * var(--gutter), var(--maxw)); margin-inline: auto; }
.wrap-narrow { width: min(100% - 2 * var(--gutter), 760px); margin-inline: auto; }

.eyebrow {
  font-family: var(--sans); font-size: .72rem; font-weight: 500; letter-spacing: .28em; text-transform: uppercase;
  color: var(--bronze-deep); display: inline-flex; align-items: center; gap: .9rem;
}
.eyebrow::before { content: ""; width: 2.4rem; height: 1px; background: currentColor; opacity: .7; }
.on-dark .eyebrow, .eyebrow.light { color: var(--bronze-light); }

.lede { font-family: var(--serif); font-size: var(--step-1); line-height: 1.5; color: var(--slate-2); }
.serif { font-family: var(--serif); }
.muted { color: var(--slate); }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .8rem; padding: .95rem 1.6rem; border: 1px solid currentColor;
  font-size: .74rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; text-decoration: none;
  background: transparent; cursor: pointer; transition: background .5s var(--ease), color .5s var(--ease), border-color .5s var(--ease);
}
.btn:hover { background: var(--charcoal); color: var(--ivory); border-color: var(--charcoal); }
.on-dark .btn:hover, .btn.light:hover { background: var(--ivory); color: var(--charcoal); border-color: var(--ivory); }
.btn .arrow { width: 1.6rem; height: 1px; background: currentColor; position: relative; transition: width .5s var(--ease); }
.btn .arrow::after { content: ""; position: absolute; right: 0; top: -3px; width: 7px; height: 7px; border-top: 1px solid currentColor; border-right: 1px solid currentColor; transform: rotate(45deg); }
.btn:hover .arrow { width: 2.3rem; }
.text-link { font-size: .74rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; display: inline-flex; gap: .7rem; align-items: center; padding-bottom: .35rem; border-bottom: 1px solid var(--bronze); }
.text-link:hover { color: var(--bronze-deep); }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--header-h);
  display: flex; align-items: center; color: var(--ivory);
  transition: background .6s var(--ease), color .6s var(--ease), box-shadow .6s var(--ease), transform .6s var(--ease);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-header.is-solid, body.page-light .site-header {
  background: rgba(245, 241, 233, .92); color: var(--charcoal);
  -webkit-backdrop-filter: saturate(1.2) blur(14px); backdrop-filter: saturate(1.2) blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.site-header.is-hidden { transform: translateY(-100%); }
.brand { display: inline-flex; align-items: center; gap: .85rem; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; border: 1px solid currentColor; border-radius: 50% 50% 2px 2px; display: grid; place-items: center; font-family: var(--serif); font-size: 1.05rem; font-style: italic; opacity: .9; }
.brand-name { font-family: var(--serif); font-size: 1.2rem; letter-spacing: .02em; line-height: 1.1; }
.brand-name small { display: block; font-family: var(--sans); font-size: .62rem; letter-spacing: .3em; opacity: .7; text-transform: uppercase; margin-top: .15rem; }
.nav { display: flex; gap: clamp(1rem, 2.2vw, 2.2rem); }
.nav a { font-size: .7rem; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; position: relative; padding: .4rem 0; opacity: .86; transition: opacity .3s; }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--bronze); transform: scaleX(0); transform-origin: right; transition: transform .6s var(--ease); }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }
.menu-toggle { display: none; background: none; border: 0; padding: .6rem; margin-right: -.6rem; cursor: pointer; }
.menu-toggle span { display: block; width: 26px; height: 1px; background: currentColor; transition: transform .5s var(--ease), opacity .3s; }
.menu-toggle span + span { margin-top: 7px; }
.menu-open .menu-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
.menu-open .menu-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 99; background: var(--night); color: var(--ivory);
  display: flex; flex-direction: column; justify-content: center; padding: var(--gutter);
  opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s;
}
.menu-open .mobile-menu { opacity: 1; visibility: visible; }
.menu-open .site-header { color: var(--ivory); background: transparent; box-shadow: none; backdrop-filter: none; }
.mobile-menu ol { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.mobile-menu li { counter-increment: m; overflow: hidden; }
.mobile-menu a { display: flex; align-items: baseline; gap: 1rem; font-family: var(--serif); font-size: clamp(2.2rem, 9vw, 3.4rem); line-height: 1.25; text-decoration: none; transform: translateY(110%); transition: transform .9s var(--ease-out); }
.mobile-menu a::before { content: counter(m, upper-roman); font-family: var(--sans); font-size: .7rem; letter-spacing: .2em; color: var(--bronze-light); min-width: 2.2rem; }
.mobile-menu a[aria-current="page"] { color: var(--bronze-light); }
.menu-open .mobile-menu a { transform: none; }
.menu-open .mobile-menu li:nth-child(2) a { transition-delay: .06s; }
.menu-open .mobile-menu li:nth-child(3) a { transition-delay: .12s; }
.menu-open .mobile-menu li:nth-child(4) a { transition-delay: .18s; }
.menu-open .mobile-menu li:nth-child(5) a { transition-delay: .24s; }
.menu-open .mobile-menu li:nth-child(6) a { transition-delay: .3s; }
.mobile-menu .mm-foot { margin-top: 3rem; font-family: var(--serif); font-style: italic; color: var(--bronze-light); font-size: 1.2rem; }
body.menu-open { overflow: hidden; }

@media (max-width: 960px) {
  .nav { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Motion primitives ---------- */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 1.4s var(--ease-out), transform 1.4s var(--ease-out); transition-delay: var(--d, 0s); }
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-36px); }
[data-reveal="right"] { transform: translateX(36px); }
[data-reveal="scale"] { transform: scale(.96); }
[data-reveal].is-in { opacity: 1; transform: none; }
.mask-reveal { clip-path: inset(100% 0 0 0); transition: clip-path 1.8s var(--ease-out); transition-delay: var(--d, 0s); }
.mask-reveal.is-in { clip-path: inset(0 0 0 0); }
.rule-draw { display: block; height: 1px; background: var(--bronze); transform: scaleX(0); transform-origin: left; transition: transform 1.8s var(--ease-out); transition-delay: var(--d, .2s); }
.is-in .rule-draw, .rule-draw.is-in { transform: scaleX(1); }
.split-line { display: block; overflow: hidden; padding-bottom: .06em; }
.split-line > span { display: block; transform: translateY(105%); transition: transform 1.6s var(--ease-out); transition-delay: var(--d, 0s); }
.is-loaded .split-line > span, .is-in .split-line > span { transform: none; }

/* No-JS fallback: show everything */
.no-js [data-reveal], .no-js .mask-reveal { opacity: 1; transform: none; clip-path: none; }
.no-js .split-line > span { transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  [data-reveal], .mask-reveal { opacity: 1; transform: none; clip-path: none; }
  .split-line > span { transform: none; }
}

/* ---------- Home hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh; color: var(--ivory); background: var(--night);
  display: grid; align-items: center; overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -2; }
.hero-bg figure { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity 3s var(--ease); }
.hero-bg figure.is-active { opacity: 1; }
.hero-bg img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); filter: saturate(.6) brightness(.8) blur(3px); }
.hero-bg figure.is-active img { animation: kenburns 16s linear forwards; }
.hero-bg figure:nth-child(2n).is-active img { animation-name: kenburns-alt; }
@keyframes kenburns { from { transform: scale(1.04) translate3d(0, 0, 0); } to { transform: scale(1.16) translate3d(-1.5%, -1%, 0); } }
@keyframes kenburns-alt { from { transform: scale(1.16) translate3d(1.5%, 0, 0); } to { transform: scale(1.04) translate3d(0, -1%, 0); } }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 90% at 78% 45%, rgba(26, 24, 22, .3) 0%, rgba(26, 24, 22, .8) 55%, rgba(26, 24, 22, .95) 100%),
    linear-gradient(90deg, rgba(26, 24, 22, .75) 0%, rgba(26, 24, 22, .2) 60%),
    linear-gradient(180deg, rgba(26, 24, 22, .55) 0%, rgba(26, 24, 22, .15) 30%, rgba(26, 24, 22, .85) 100%); }
.hero-inner { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; padding-block: calc(var(--header-h) + 3rem) 6rem; }
.hero-copy .eyebrow { margin-bottom: 2rem; opacity: 0; transition: opacity 1.6s var(--ease) .3s; }
.is-loaded .hero-copy .eyebrow { opacity: 1; }
.hero-name { font-size: var(--step-5); font-weight: 300; line-height: .95; letter-spacing: -.01em; }
.hero-name .split-line:nth-child(2) > span { --d: .15s; font-style: italic; color: var(--bronze-light); }
.hero-name .split-line:nth-child(3) > span { --d: .3s; }
.hero-years { display: flex; align-items: center; gap: 1.4rem; margin: 2.4rem 0 2rem; font-family: var(--serif); font-size: var(--step-2); letter-spacing: .08em; }
.hero-years .rule-draw { width: clamp(3rem, 8vw, 6rem); --d: .9s; }
.hero-years span { opacity: 0; transition: opacity 1.4s var(--ease) .7s; }
.hero-years span:last-child { transition-delay: 1.3s; }
.is-loaded .hero-years span { opacity: 1; }
.is-loaded .hero-years .rule-draw { transform: scaleX(1); }
.hero-tagline { font-family: var(--serif); font-style: italic; font-size: var(--step-1); line-height: 1.45; max-width: 30ch; color: rgba(245, 241, 233, .82); opacity: 0; transform: translateY(14px); transition: opacity 1.6s var(--ease-out) 1.5s, transform 1.6s var(--ease-out) 1.5s; }
.is-loaded .hero-tagline { opacity: 1; transform: none; }

.arch { position: relative; aspect-ratio: 4 / 5.2; border-radius: 999px 999px 4px 4px; overflow: hidden; background: var(--parchment); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.arch img { width: 100%; height: 100%; object-fit: cover; }
.hero-portrait { justify-self: end; width: min(100%, 400px); position: relative; }
.hero-portrait .arch { clip-path: inset(100% 0 0 0 round 999px 999px 4px 4px); transition: clip-path 2.2s var(--ease-out) .4s; }
.is-loaded .hero-portrait .arch { clip-path: inset(0 0 0 0 round 999px 999px 4px 4px); }
.hero-portrait .arch img { transform: scale(1.18); transition: transform 3.4s var(--ease-out) .4s; }
.is-loaded .hero-portrait .arch img { transform: scale(1); }
.hero-portrait::before { content: ""; position: absolute; inset: -14px; border: 1px solid rgba(201, 180, 143, .45); border-radius: 999px 999px 6px 6px; opacity: 0; transform: scale(.97); transition: opacity 2s var(--ease) 1.6s, transform 2s var(--ease-out) 1.6s; }
.is-loaded .hero-portrait::before { opacity: 1; transform: none; }

.scroll-cue { position: absolute; left: 50%; bottom: 2rem; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .8rem; text-decoration: none; font-size: .62rem; letter-spacing: .32em; text-transform: uppercase; color: rgba(245, 241, 233, .7); opacity: 0; transition: opacity 1.4s var(--ease) 2.2s; }
.is-loaded .scroll-cue { opacity: 1; }
.scroll-cue i { position: relative; width: 1px; height: 54px; background: rgba(245, 241, 233, .25); overflow: hidden; }
.scroll-cue i::after { content: ""; position: absolute; left: 0; top: -40%; width: 1px; height: 40%; background: var(--bronze-light); animation: cue 2.6s var(--ease) infinite; }
@keyframes cue { 0% { top: -40%; } 70%, 100% { top: 100%; } }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: calc(var(--header-h) + 1.5rem); gap: 2.2rem; }
  .hero-portrait { order: -1; justify-self: center; width: min(62vw, 270px); }
  .hero-copy .eyebrow::before { display: none; }
  .hero-years { justify-content: center; margin: 1.6rem 0 1.4rem; }
  .hero-tagline { margin-inline: auto; }
  .scroll-cue { display: none; }
}

/* ---------- Page hero (interior pages) ---------- */
.page-hero { position: relative; min-height: 72vh; min-height: 72svh; display: grid; align-items: end; color: var(--ivory); background: var(--night); overflow: hidden; isolation: isolate; }
.page-hero .bg { position: absolute; inset: -8% 0; z-index: -2; }
.page-hero .bg img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) brightness(.85); animation: settle 3.5s var(--ease-out) both; }
@keyframes settle { from { transform: scale(1.12); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.page-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(26, 24, 22, .45) 0%, rgba(26, 24, 22, .25) 35%, rgba(26, 24, 22, .88) 100%); }
.page-hero .wrap { padding-block: calc(var(--header-h) + 4rem) clamp(3rem, 8vh, 6rem); }
.page-hero h1 { font-size: var(--step-5); font-weight: 300; margin: 1.4rem 0 1.2rem; }
.page-hero h1 em { color: var(--bronze-light); }
.page-hero .lede { color: rgba(245, 241, 233, .82); max-width: 38ch; font-style: italic; }
.page-hero figcaption, .photo-credit { position: absolute; right: var(--gutter); bottom: 1.4rem; font-size: .68rem; letter-spacing: .12em; color: rgba(245, 241, 233, .55); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(5rem, 12vw, 10rem); position: relative; }
.section.tight { padding-block: clamp(3.5rem, 8vw, 6rem); }
.bg-parchment { background: var(--parchment); }
.bg-ivory2 { background: var(--ivory-2); }
.bg-dark { background: var(--night); color: var(--ivory); }
.bg-slate { background: #2B2926; color: var(--ivory); }
.section-head { display: grid; gap: 1.4rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); max-width: 720px; }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.section-head.center .eyebrow::after { content: ""; width: 2.4rem; height: 1px; background: currentColor; opacity: .7; }
.section-head h2 { font-size: var(--step-4); font-weight: 300; }
.section-head h2 em { color: var(--bronze-deep); }
.on-dark .section-head h2 em, .bg-dark .section-head h2 em, .bg-slate .section-head h2 em { color: var(--bronze-light); }
.chapter-no { font-family: var(--serif); font-style: italic; color: var(--bronze); font-size: 1.1rem; letter-spacing: .1em; }

/* Intro */
.intro-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(2.5rem, 7vw, 7rem); align-items: center; }
.intro-figure { position: relative; }
.intro-figure .arch { aspect-ratio: 4 / 5; }
.intro-figure figcaption { margin-top: 1rem; font-size: .78rem; color: var(--slate); letter-spacing: .04em; }
.intro-figure .stamp { position: absolute; right: -1.6rem; bottom: 3.5rem; width: 46%; background: var(--ivory-2); padding: .5rem .5rem 1.6rem; box-shadow: 0 20px 40px -18px rgba(0, 0, 0, .35); transform: rotate(3deg); }
.intro-figure .stamp img { filter: grayscale(1) contrast(1.05); }
.intro-figure .stamp span { position: absolute; left: 0; right: 0; bottom: .35rem; text-align: center; font-family: var(--serif); font-style: italic; font-size: .85rem; color: var(--slate-2); }
.intro-copy h2 { font-size: var(--step-4); font-weight: 300; margin: 1.4rem 0 2rem; }
.intro-copy p { font-family: var(--serif); font-size: var(--step-1); line-height: 1.6; color: #3a3632; }
.intro-copy p:first-of-type::first-letter { float: left; font-size: 4.4em; line-height: .78; padding: .08em .12em 0 0; color: var(--bronze-deep); font-weight: 400; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px solid var(--line); }
.facts dt { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-deep); margin-bottom: .45rem; }
.facts dd { margin: 0; font-family: var(--serif); font-size: 1.15rem; line-height: 1.35; }
@media (max-width: 860px) {
  .intro-grid { grid-template-columns: 1fr; }
  .intro-figure { max-width: 420px; margin-inline: auto; width: 88%; }
  .facts { grid-template-columns: 1fr; gap: 1.1rem; }
}

/* Full-bleed photographic divider */
.bleed { position: relative; min-height: 88vh; display: grid; place-items: center; overflow: hidden; color: var(--ivory); isolation: isolate; text-align: center; }
.bleed .bg { position: absolute; inset: -12% 0; z-index: -2; will-change: transform; }
.bleed .bg img { width: 100%; height: 100%; object-fit: cover; filter: sepia(.18) saturate(.8) brightness(.8); }
.bleed::after { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(80% 70% at 50% 50%, rgba(26, 24, 22, .35), rgba(26, 24, 22, .8)); }
.bleed blockquote { margin: 0; max-width: 24ch; font-family: var(--serif); font-weight: 300; font-size: var(--step-3); line-height: 1.2; }
.bleed blockquote em { color: var(--bronze-light); }
.bleed .cap { margin-top: 2rem; font-size: .7rem; letter-spacing: .26em; text-transform: uppercase; color: rgba(245, 241, 233, .7); }

/* Moments — editorial filmstrip */
.moments-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; flex-wrap: wrap; }
.strip-controls { display: flex; gap: .6rem; }
.icon-btn { width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: transparent; display: grid; place-items: center; cursor: pointer; transition: background .4s, border-color .4s, color .4s; }
.icon-btn:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }
.icon-btn svg { width: 18px; height: 18px; }
.on-dark .icon-btn, .bg-dark .icon-btn { border-color: var(--line-light); }
.strip { display: flex; gap: clamp(1rem, 2.4vw, 2rem); overflow-x: auto; scroll-snap-type: x mandatory; padding: .5rem var(--gutter) 2rem; margin-inline: calc(-1 * var(--gutter)); scrollbar-width: none; cursor: grab; }
.strip::-webkit-scrollbar { display: none; }
.strip.dragging { cursor: grabbing; scroll-snap-type: none; }
.strip.dragging * { pointer-events: none; }
.moment { flex: 0 0 auto; width: clamp(240px, 28vw, 380px); scroll-snap-align: start; margin: 0; }
.moment:nth-child(3n+2) { margin-top: clamp(1.5rem, 4vw, 4rem); }
.moment button { all: unset; display: block; cursor: zoom-in; width: 100%; }
.moment .ph { overflow: hidden; aspect-ratio: 4 / 5; background: var(--parchment-2); }
.moment:nth-child(2n) .ph { aspect-ratio: 1 / 1; }
.moment img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out), filter 1.6s var(--ease-out); filter: saturate(.9); }
.moment button:hover img, .moment button:focus-visible img { transform: scale(1.05); filter: saturate(1); }
.moment figcaption { padding-top: 1rem; font-family: var(--serif); font-size: 1.2rem; line-height: 1.3; }
.moment figcaption small { display: block; font-family: var(--sans); font-size: .66rem; letter-spacing: .22em; text-transform: uppercase; color: var(--bronze-deep); margin-bottom: .3rem; }

/* Timeline preview ribbon */
.ribbon { position: relative; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(118px, 1fr); gap: 0; overflow-x: auto; padding: 2.4rem 0 1rem; scrollbar-width: thin; }
.ribbon::before { content: ""; position: absolute; left: 0; right: 0; top: calc(2.4rem + 7px); height: 1px; background: var(--line); }
.ribbon .line-fill { position: absolute; left: 0; top: calc(2.4rem + 7px); height: 1px; width: 100%; background: var(--bronze); transform: scaleX(0); transform-origin: left; transition: transform 2.6s var(--ease-out) .2s; }
.ribbon.is-in .line-fill { transform: scaleX(1); }
.ribbon a { position: relative; text-decoration: none; padding: 2.2rem 1.4rem 0 0; display: block; }
.ribbon a::before { content: ""; position: absolute; top: 0; left: 0; width: 15px; height: 15px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--bronze); transition: background .4s, transform .4s var(--ease); }
.ribbon a:hover::before { background: var(--bronze); transform: scale(1.25); }
.ribbon .yr { font-family: var(--serif); font-size: var(--step-2); line-height: 1; display: block; color: var(--charcoal); }
.ribbon .ttl { font-size: .86rem; color: var(--slate-2); display: block; margin-top: .55rem; line-height: 1.45; }
.ribbon a { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: calc(var(--i, 0) * 110ms + .3s); }
.ribbon.is-in a { opacity: 1; transform: none; }

/* Travel preview */
.travel-preview { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.place-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-light); }
.place-list li { display: flex; justify-content: space-between; gap: 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line-light); }
.place-list .pn { font-family: var(--serif); font-size: var(--step-1); }
.place-list .pd { font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: var(--bronze-light); white-space: nowrap; }
.stats { display: flex; gap: clamp(1.5rem, 4vw, 3.5rem); margin: 2rem 0 2.6rem; }
.stat b { display: block; font-family: var(--serif); font-weight: 300; font-size: var(--step-4); line-height: 1; color: var(--ivory); }
.stat span { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-light); }
.mini-map { position: relative; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; border: 1px solid var(--line-light); }
.mini-map img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.7) brightness(.8); }
@media (max-width: 860px) { .travel-preview { grid-template-columns: 1fr; } .mini-map { max-width: 360px; margin-inline: auto; width: 80%; } }

/* Video feature */
.video-feature { position: relative; }
.player { position: relative; aspect-ratio: 16 / 9; background: #000; overflow: hidden; box-shadow: 0 50px 100px -40px rgba(0, 0, 0, .7); }
.player video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .poster { position: absolute; inset: 0; border: 0; padding: 0; cursor: pointer; background: #000; display: block; width: 100%; color: var(--ivory); }
.player .poster img { width: 100%; height: 100%; object-fit: cover; opacity: .78; transition: opacity 1s var(--ease), transform 4s var(--ease-out); }
.player .poster:hover img { opacity: .9; transform: scale(1.03); }
.player .poster::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 40%, rgba(0, 0, 0, .65)); }
.play-ring { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: clamp(76px, 9vw, 110px); aspect-ratio: 1; border-radius: 50%; border: 1px solid rgba(245, 241, 233, .7); display: grid; place-items: center; z-index: 2; transition: transform .8s var(--ease-out), background .6s; }
.play-ring::before { content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 1px solid rgba(245, 241, 233, .25); animation: breathe 3.6s var(--ease) infinite; }
@keyframes breathe { 0%, 100% { transform: scale(.94); opacity: .2; } 50% { transform: scale(1.06); opacity: .8; } }
.player .poster:hover .play-ring { transform: translate(-50%, -50%) scale(1.08); background: rgba(245, 241, 233, .12); }
.play-ring svg { width: 26%; margin-left: 6%; }
.poster-meta { position: absolute; left: clamp(1rem, 3vw, 2.4rem); bottom: clamp(1rem, 3vw, 2rem); z-index: 2; text-align: left; }
.poster-meta strong { display: block; font-family: var(--serif); font-weight: 400; font-size: var(--step-2); }
.poster-meta span { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--bronze-light); }

.controls { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: .9rem; padding: 2.4rem clamp(.8rem, 2vw, 1.4rem) clamp(.7rem, 1.6vw, 1rem); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .78)); color: var(--ivory); transition: opacity .6s var(--ease); z-index: 3; }
.player.idle .controls { opacity: 0; }
.player.idle { cursor: none; }
.controls button { background: none; border: 0; padding: .35rem; cursor: pointer; display: grid; place-items: center; color: inherit; opacity: .9; }
.controls button:hover { opacity: 1; }
.controls svg { width: 20px; height: 20px; }
.controls .time { font-size: .74rem; font-variant-numeric: tabular-nums; letter-spacing: .04em; opacity: .85; white-space: nowrap; }
.progress { flex: 1; position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; }
.progress input { width: 100%; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; height: 22px; cursor: pointer; }
.progress input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--bronze-light) var(--p, 0%), rgba(245, 241, 233, .3) var(--p, 0%)); }
.progress input::-moz-range-track { height: 2px; background: rgba(245, 241, 233, .3); }
.progress input::-moz-range-progress { height: 2px; background: var(--bronze-light); }
.progress input::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; border-radius: 50%; background: var(--ivory); margin-top: -5px; border: 0; }
.progress input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--ivory); border: 0; }
.vol { width: 80px; }
@media (max-width: 600px) { .vol { display: none; } }

/* Closing */
.closing { text-align: center; }
.closing .portrait-sm { width: 150px; margin: 0 auto 2.6rem; }
.closing .portrait-sm .arch { aspect-ratio: 4 / 5; }
.closing blockquote { margin: 0 auto; max-width: 30ch; font-family: var(--serif); font-weight: 300; font-size: var(--step-3); line-height: 1.25; }
.closing cite { display: block; margin-top: 1.6rem; font-style: normal; font-size: .72rem; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-deep); }
.closing .sig { margin-top: 3.4rem; font-family: var(--serif); font-size: var(--step-1); }
.closing .sig span { display: block; font-size: .72rem; font-family: var(--sans); letter-spacing: .3em; color: var(--slate); margin-top: .4rem; }
.explore { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin-top: clamp(4rem, 8vw, 6rem); text-align: left; }
.explore a { background: var(--ivory); padding: 1.8rem 1.4rem; text-decoration: none; transition: background .5s var(--ease); display: flex; flex-direction: column; gap: .5rem; min-height: 150px; }
.explore a:hover { background: var(--ivory-2); }
.explore small { font-family: var(--serif); font-style: italic; color: var(--bronze); }
.explore strong { font-family: var(--serif); font-weight: 400; font-size: 1.45rem; line-height: 1.1; }
.explore span { margin-top: auto; font-size: .78rem; color: var(--slate); }
@media (max-width: 960px) { .explore { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .explore { grid-template-columns: 1fr; } .explore a { min-height: 0; } }

/* ---------- Footer ---------- */
.site-footer { background: var(--night); color: rgba(245, 241, 233, .78); padding: clamp(3.5rem, 8vw, 5.5rem) 0 2rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 3rem; align-items: end; }
.footer-name { font-family: var(--serif); font-weight: 300; font-size: var(--step-3); color: var(--ivory); line-height: 1.05; }
.footer-name span { display: block; font-size: .5em; color: var(--bronze-light); margin-top: .5rem; letter-spacing: .06em; }
.footer-nav { display: flex; flex-wrap: wrap; gap: .8rem 1.8rem; justify-content: flex-end; }
.footer-nav a { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; text-decoration: none; }
.footer-nav a:hover { color: var(--bronze-light); }
.footer-base { margin-top: 3.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line-light); display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .74rem; color: rgba(245, 241, 233, .5); }
.footer-base em { font-family: var(--serif); font-size: 1rem; color: rgba(245, 241, 233, .7); }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } .footer-nav { justify-content: flex-start; } }

/* ---------- Placeholders ---------- */
.ph-tag { font-family: var(--sans) !important; font-size: .62rem !important; line-height: 1.4 !important; width: fit-content; display: inline-flex; align-items: center; gap: .5rem; font-family: var(--sans); font-size: .62rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-deep); border: 1px dashed rgba(163, 138, 105, .7); padding: .3rem .65rem; border-radius: 2px; background: rgba(163, 138, 105, .06); }
.ph-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bronze); }
.ph-note { font-size: .86rem; color: var(--slate); font-style: italic; font-family: var(--serif); font-size: 1.05rem; }
.hide-placeholders .ph-tag, .hide-placeholders [data-placeholder="true"] { display: none !important; }
.on-dark .ph-tag, .bg-dark .ph-tag { color: var(--bronze-light); }

/* ---------- Timeline (His Life) ---------- */
.period-nav { position: sticky; top: var(--header-h); z-index: 20; background: rgba(245, 241, 233, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.period-nav .wrap { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-block: .7rem; }
.period-nav .wrap::-webkit-scrollbar { display: none; }
.period-nav a { flex: 0 0 auto; text-decoration: none; padding: .55rem 1rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; border: 1px solid transparent; border-radius: 999px; color: var(--slate-2); transition: all .4s var(--ease); }
.period-nav a span { font-family: var(--serif); font-style: italic; text-transform: none; letter-spacing: .02em; font-size: .95rem; color: var(--bronze-deep); margin-left: .45rem; }
.period-nav a.is-active { border-color: var(--bronze); color: var(--charcoal); background: var(--ivory-2); }
.life-progress { position: absolute; left: 0; bottom: -1px; height: 2px; background: var(--bronze); width: 100%; transform-origin: left; transform: scaleX(var(--p, 0)); }

.period { position: relative; padding-block: clamp(4rem, 9vw, 7rem); }
.period.tone-parchment { background: var(--parchment); }
.period.tone-ivory { background: var(--ivory); }
.period.tone-slate { background: #2B2926; color: var(--ivory); }
.period-head { text-align: center; margin-bottom: clamp(3rem, 7vw, 5rem); }
.period-head .range { font-family: var(--serif); font-style: italic; color: var(--bronze-deep); font-size: var(--step-1); }
.tone-slate .period-head .range { color: var(--bronze-light); }
.period-head h2 { font-size: var(--step-4); font-weight: 300; margin-top: .6rem; }
.period-head .roman { display: block; font-family: var(--serif); font-size: .9rem; letter-spacing: .4em; color: var(--bronze); margin-bottom: 1rem; }

.tl { position: relative; list-style: none; margin: 0; padding: 0; }
.tl::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); transform: translateX(-.5px); }
.tone-slate .tl::before { background: var(--line-light); }
.tl::after { content: ""; position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: var(--bronze); transform: translateX(-.5px) scaleY(var(--fill, 0)); transform-origin: top; }
.tl-item { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(3rem, 8vw, 7rem); align-items: center; margin-bottom: clamp(3.5rem, 8vw, 6rem); }
.tl-item:last-child { margin-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: 50%; top: 50%; width: 13px; height: 13px; border-radius: 50%; background: var(--ivory); border: 1px solid var(--bronze); transform: translate(-50%, -50%) scale(.4); transition: transform 1s var(--ease-out) .3s, background 1s .3s; z-index: 1; }
.tone-parchment .tl-item::before { background: var(--parchment); }
.tone-slate .tl-item::before { background: #2B2926; }
.tl-item.is-in::before { transform: translate(-50%, -50%) scale(1); background: var(--bronze); }
.tl-item:nth-child(even) .tl-media { order: 2; }
.tl-text { max-width: 470px; }
.tl-item:nth-child(odd) .tl-text { justify-self: start; }
.tl-item:nth-child(even) .tl-text { justify-self: end; text-align: right; }
.tl-item:nth-child(even) .tl-text .ph-tag { margin-left: auto; }
.tl-date { font-size: .7rem; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-deep); display: block; margin-bottom: .9rem; }
.tone-slate .tl-date { color: var(--bronze-light); }
.tl-text h3 { font-size: var(--step-3); font-weight: 400; margin-bottom: 1.1rem; }
.tl-text p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.6; color: #3d3935; }
.tone-slate .tl-text p { color: rgba(245, 241, 233, .82); }
.tl-text .src { font-size: .74rem; color: var(--slate); letter-spacing: .02em; margin-top: .9rem; display: block; }
.tone-slate .tl-text .src { color: rgba(245, 241, 233, .5); }
.tl-item.is-placeholder .tl-text h3 { color: var(--slate-2); }
.tl-item.is-placeholder .tl-media .main { outline: 1px dashed rgba(163, 138, 105, .6); outline-offset: 8px; }
.tl-media { position: relative; }
.tl-media .main { display: block; width: 100%; border: 0; padding: 0; background: var(--parchment-2); cursor: zoom-in; overflow: hidden; aspect-ratio: 4 / 3; }
.tl-media .main img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.8s var(--ease-out); }
.tl-media .main:hover img { transform: scale(1.04); }
.tl-media .thumbs { display: flex; gap: .5rem; margin-top: .6rem; }
.tl-item:nth-child(even) .tl-media .thumbs { justify-content: flex-end; }
.tl-media .thumbs button { width: 64px; height: 64px; border: 0; padding: 0; cursor: zoom-in; overflow: hidden; opacity: .8; transition: opacity .3s; background: var(--parchment-2); }
.tl-media .thumbs button:hover { opacity: 1; }
.tl-media .thumbs img { width: 100%; height: 100%; object-fit: cover; }
.tl-media .count { position: absolute; top: .8rem; right: .8rem; background: rgba(26, 24, 22, .7); color: var(--ivory); font-size: .66rem; letter-spacing: .14em; padding: .3rem .6rem; pointer-events: none; }
.tl-empty-media { aspect-ratio: 4 / 3; border: 1px dashed rgba(163, 138, 105, .6); display: grid; place-items: center; text-align: center; padding: 2rem; color: var(--slate); font-family: var(--serif); font-style: italic; }
@media (max-width: 860px) {
  .tl::before, .tl::after { left: 6px; }
  .tl-item { grid-template-columns: 1fr; gap: 1.4rem; padding-left: 2.2rem; }
  .tl-item::before { left: 6px; top: .4rem; }
  .tl-item:nth-child(even) .tl-media { order: 0; }
  .tl-item:nth-child(even) .tl-text { justify-self: start; text-align: left; }
  .tl-item:nth-child(even) .tl-text .ph-tag { margin-left: 0; }
  .tl-item:nth-child(even) .tl-media .thumbs { justify-content: flex-start; }
  .tl-text { max-width: none; }
  .tl-media { order: 2 !important; }
}

/* ---------- Travels ---------- */
.travel-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 0; min-height: 78vh; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.map-wrap { position: relative; min-height: 560px; background: #e8e3da; overflow: hidden; }
#map { position: absolute; inset: 0; }
.map-toolbar { position: absolute; left: 1rem; top: 1rem; z-index: 500; display: flex; gap: .5rem; flex-wrap: wrap; max-width: calc(100% - 2rem); }
.chip { appearance: none; border: 1px solid rgba(37, 37, 37, .16); background: rgba(250, 247, 241, .94); padding: .5rem .9rem; font-size: .66rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; border-radius: 999px; cursor: pointer; transition: all .3s var(--ease); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); color: var(--charcoal); }
.chip:hover { border-color: var(--bronze); }
.chip[aria-pressed="true"] { background: var(--charcoal); color: var(--ivory); border-color: var(--charcoal); }
select.chip { padding-right: 1.8rem; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 14px) 52%, calc(100% - 10px) 52%; background-size: 4px 4px; background-repeat: no-repeat; }
.travel-side { background: var(--ivory-2); border-left: 1px solid var(--line); display: flex; flex-direction: column; max-height: 78vh; min-height: 560px; }
.travel-side header { padding: 1.4rem 1.4rem 1rem; border-bottom: 1px solid var(--line); }
.travel-side header h2 { font-size: 1.6rem; }
.travel-side header p { margin: .3rem 0 0; font-size: .8rem; color: var(--slate); }
.journey-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; }
.journey-list li button { all: unset; box-sizing: border-box; display: grid; grid-template-columns: 56px 1fr; gap: 1rem; align-items: center; width: 100%; padding: .9rem 1.4rem; cursor: pointer; border-bottom: 1px solid var(--line); transition: background .3s; }
.journey-list li button:hover, .journey-list li button[aria-current="true"] { background: var(--parchment); }
.journey-list li button:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }
.journey-list img { width: 56px; height: 56px; object-fit: cover; }
.journey-list .jl-noimg { width: 56px; height: 56px; background: var(--parchment); display: grid; place-items: center; font-family: var(--serif); color: var(--bronze); font-size: 1.4rem; }
.journey-list .jl-name { font-family: var(--serif); font-size: 1.2rem; line-height: 1.15; display: block; }
.journey-list .jl-date { font-size: .66rem; letter-spacing: .16em; text-transform: uppercase; color: var(--bronze-deep); }
.journey-list .jl-country { font-size: .78rem; color: var(--slate); }

.place-card { position: absolute; z-index: 600; right: 1rem; top: 1rem; bottom: 1rem; width: min(400px, calc(100% - 2rem)); background: var(--ivory-2); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .35); display: flex; flex-direction: column; transform: translateX(calc(100% + 2rem)); opacity: 0; visibility: hidden; pointer-events: none; transition: transform .9s var(--ease-out), opacity .6s var(--ease), visibility .9s; overflow: hidden; }
.place-card.open { transform: none; opacity: 1; visibility: visible; pointer-events: auto; }
.place-card .pc-media { position: relative; aspect-ratio: 4 / 3; background: var(--parchment); flex-shrink: 0; overflow: hidden; }
.place-card .pc-media img { width: 100%; height: 100%; object-fit: cover; animation: fadeIn 1s var(--ease); }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.place-card .pc-media button.zoom { position: absolute; inset: 0; border: 0; background: none; cursor: zoom-in; }
.pc-close { position: absolute; top: .8rem; right: .8rem; z-index: 2; width: 38px; height: 38px; border-radius: 50%; border: 0; background: rgba(26, 24, 22, .7); color: var(--ivory); cursor: pointer; display: grid; place-items: center; }
.pc-close svg { width: 16px; height: 16px; }
.pc-thumbs { display: flex; gap: .4rem; padding: .6rem 1.4rem 0; overflow-x: auto; flex-shrink: 0; }
.pc-thumbs button { flex: 0 0 52px; height: 52px; border: 0; padding: 0; cursor: pointer; opacity: .6; transition: opacity .3s; outline-offset: 1px; }
.pc-thumbs button[aria-current="true"] { opacity: 1; outline: 1px solid var(--bronze); }
.pc-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pc-body { padding: 1.2rem 1.4rem 1.6rem; overflow-y: auto; }
.pc-body .kind { font-size: .64rem; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-deep); }
.pc-body h3 { font-size: 2rem; margin: .4rem 0 .2rem; }
.pc-body .country { font-size: .8rem; color: var(--slate); }
.pc-body .summary { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; margin: 1rem 0; }
.pc-visits { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.pc-visits li { padding: .8rem 0; border-bottom: 1px solid var(--line); }
.pc-visits b { font-size: .7rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bronze-deep); font-weight: 500; }
.pc-visits p { margin: .25rem 0 0; font-family: var(--serif); font-size: 1.05rem; }
.pc-src { font-size: .72rem; color: var(--slate); margin-top: 1rem; }

.marker { position: relative; width: 18px; height: 18px; }
.marker i { position: absolute; inset: 3px; border-radius: 50%; background: var(--bronze); border: 2px solid var(--ivory-2); box-shadow: 0 2px 6px rgba(0, 0, 0, .3); transition: transform .4s var(--ease); }
.marker.home i { background: var(--charcoal); }
.marker.birthplace i { background: var(--bronze-deep); }
.marker.birthplace::before, .marker.home::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid var(--bronze); animation: ping 3.2s var(--ease) infinite; }
@keyframes ping { 0% { transform: scale(.6); opacity: .9; } 80%, 100% { transform: scale(1.6); opacity: 0; } }
.marker:hover i, .marker.active i { transform: scale(1.45); }
.marker-label { font-family: var(--serif); font-size: 15px; color: var(--charcoal); background: rgba(250, 247, 241, .92); padding: 2px 8px; border: 0; border-radius: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, .12); }
.leaflet-tooltip.marker-label::before { display: none; }
.journey-path { stroke-dasharray: 6 8; animation: dash 30s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -1000; } }
.leaflet-container { font-family: var(--sans); background: #e8e3da; }
.tiles-base { filter: sepia(.35) saturate(.7) brightness(1.02) contrast(.92); }
.tiles-labels { opacity: .75; }
.leaflet-control-attribution { font-size: 10px; background: rgba(250, 247, 241, .8) !important; }
.leaflet-bar a { background: var(--ivory-2); color: var(--charcoal); }
.map-legend { position: absolute; left: 1rem; bottom: 1.6rem; z-index: 500; background: rgba(250, 247, 241, .94); padding: .7rem .9rem; font-size: .72rem; display: grid; gap: .35rem; border-radius: 2px; }
.map-legend span { display: flex; align-items: center; gap: .5rem; }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--bronze); display: inline-block; border: 1.5px solid #fff; }
.map-legend i.h { background: var(--charcoal); }
.map-legend i.b { background: var(--bronze-deep); }
.map-legend i.p { width: 18px; height: 0; border-radius: 0; border: 0; border-top: 2px dashed var(--bronze-deep); background: none; }
.map-error { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 2rem; font-family: var(--serif); font-size: 1.2rem; color: var(--slate-2); }
@media (max-width: 960px) {
  .travel-layout { grid-template-columns: 1fr; }
  .map-wrap { min-height: 62vh; }
  .travel-side { max-height: none; border-left: 0; border-top: 1px solid var(--line); min-height: 0; }
  .journey-list { overflow: visible; }
  .place-card { position: fixed; left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-height: 82vh; transform: translateY(105%); z-index: 1200; border-radius: 14px 14px 0 0; }
  .place-card.open { transform: none; }
  .map-legend { display: none; }
  .map-toolbar { flex-wrap: nowrap; overflow-x: auto; left: 0; right: 0; top: 0; max-width: none; padding: .7rem; scrollbar-width: none; }
  .map-toolbar .chip { flex: 0 0 auto; }
}

/* ---------- Gallery ---------- */
.album-bar { position: sticky; top: var(--header-h); z-index: 20; background: rgba(245, 241, 233, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.album-bar .wrap { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; padding-block: .8rem; }
.album-bar .wrap::-webkit-scrollbar { display: none; }
.album-bar button { flex: 0 0 auto; border: 1px solid transparent; background: none; padding: .55rem 1.05rem; border-radius: 999px; font-size: .68rem; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; cursor: pointer; color: var(--slate-2); transition: all .4s var(--ease); }
.album-bar button sup { font-family: var(--serif); font-style: italic; letter-spacing: 0; font-size: .85rem; color: var(--bronze-deep); margin-left: .3rem; vertical-align: baseline; }
.album-bar button:hover { color: var(--charcoal); }
.album-bar button[aria-pressed="true"] { border-color: var(--bronze); color: var(--charcoal); background: var(--ivory-2); }

.editorial { display: grid; grid-template-columns: repeat(12, 1fr); grid-auto-rows: clamp(80px, 9vw, 120px); gap: clamp(.6rem, 1.4vw, 1.2rem); }
.editorial figure { margin: 0; position: relative; overflow: hidden; background: var(--parchment-2); }
.editorial figure button { all: unset; cursor: zoom-in; position: absolute; inset: 0; }
.editorial img { width: 100%; height: 100%; object-fit: cover; transition: transform 2s var(--ease-out); }
.editorial figure:hover img { transform: scale(1.04); }
.editorial figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 2.6rem 1.1rem .9rem; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .6)); color: var(--ivory); font-family: var(--serif); font-size: 1.1rem; opacity: 0; transform: translateY(8px); transition: all .7s var(--ease-out); pointer-events: none; }
.editorial figure:hover figcaption, .editorial figure:focus-within figcaption { opacity: 1; transform: none; }
.editorial .e1 { grid-column: 1 / 8; grid-row: span 5; }
.editorial .e2 { grid-column: 8 / 13; grid-row: span 3; }
.editorial .e3 { grid-column: 8 / 13; grid-row: span 2; }
.editorial .e4 { grid-column: 1 / 5; grid-row: span 3; }
.editorial .e5 { grid-column: 5 / 13; grid-row: span 3; }
@media (max-width: 760px) {
  .editorial { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 140px; }
  .editorial .e1 { grid-column: 1 / 3; grid-row: span 2; }
  .editorial .e2, .editorial .e3, .editorial .e4 { grid-column: span 1; grid-row: span 1; }
  .editorial .e5 { grid-column: 1 / 3; grid-row: span 2; }
}

.justified { display: flex; flex-wrap: wrap; gap: var(--jg, 8px); }
.justified .jt { position: relative; margin: 0; overflow: hidden; background: var(--parchment-2); flex: 0 0 auto; opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.justified .jt.is-in { opacity: 1; transform: none; }
.justified .jt button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.justified .jt button:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }
.justified img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.6s var(--ease-out), filter 1s; }
.justified .jt:hover img { transform: scale(1.045); }
.justified .jt .cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 2rem .8rem .6rem; color: var(--ivory); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .62)); font-family: var(--serif); font-size: 1rem; line-height: 1.25; opacity: 0; transition: opacity .6s; pointer-events: none; }
.justified .jt:hover .cap, .justified .jt:focus-within .cap { opacity: 1; }
.live-badge { position: absolute; top: .55rem; left: .55rem; display: inline-flex; align-items: center; gap: .35rem; font-size: .58rem; letter-spacing: .18em; text-transform: uppercase; background: rgba(26, 24, 22, .6); color: var(--ivory); padding: .25rem .5rem; border-radius: 999px; pointer-events: none; }
.live-badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bronze-light); }
.gallery-sentinel { height: 1px; }
.gallery-count { font-size: .78rem; color: var(--slate); letter-spacing: .04em; margin: 0 0 1.4rem; }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 1000; background: #0b0a09; color: var(--ivory); display: grid; grid-template-rows: minmax(0, 1fr); height: 100vh; height: 100dvh; opacity: 0; visibility: hidden; transition: opacity .6s var(--ease), visibility .6s; }
.lb.open { opacity: 1; visibility: visible; }
/* Controls and caption float over the photo and fade when idle */
.lb-top { position: absolute; top: 0; left: 0; right: 0; z-index: 4; display: flex; justify-content: space-between; align-items: center; padding: max(.9rem, env(safe-area-inset-top)) max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-right)) 2.6rem max(clamp(1rem, 3vw, 2rem), env(safe-area-inset-left)); font-size: .74rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(245, 241, 233, .8); background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent); pointer-events: none; transition: opacity .6s var(--ease); }
.lb-top > * { pointer-events: auto; }
.lb-btn { width: 46px; height: 46px; border-radius: 50%; border: 1px solid rgba(245, 241, 233, .25); background: rgba(20, 18, 16, .45); color: var(--ivory); cursor: pointer; display: grid; place-items: center; transition: background .3s, border-color .3s, opacity .6s var(--ease); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lb-btn:hover { background: rgba(245, 241, 233, .14); border-color: rgba(245, 241, 233, .55); }
.lb-btn svg { width: 18px; height: 18px; }
.lb-stage { position: relative; overflow: hidden; touch-action: pan-y; min-height: 0; grid-row: 1; }
.lb-stage figure { position: absolute; inset: 0; margin: 0; padding: clamp(0px, 1vw, 12px); display: grid; place-items: center; transition: opacity .8s var(--ease), transform .8s var(--ease-out); }
.lb-stage figure.out-l { opacity: 0; transform: translateX(-3%) scale(.985); }
.lb-stage figure.out-r { opacity: 0; transform: translateX(3%) scale(.985); }
/* Photo as large as the window allows */
.lb-stage img { display: block; width: auto; height: auto; max-width: calc(100vw - 2 * clamp(0px, 1vw, 12px)); max-height: calc(100vh - 2 * clamp(0px, 1vw, 12px)); max-height: calc(100dvh - 2 * clamp(0px, 1vw, 12px)); object-fit: contain; box-shadow: 0 30px 90px rgba(0, 0, 0, .6); }
.lb-stage .lb-media { position: relative; max-width: 100%; line-height: 0; }
.lb-stage .lb-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); pointer-events: none; }
.lb-stage .lb-media.playing video { opacity: 1; }
.lb-live { position: absolute; left: 50%; bottom: 5.5rem; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .9rem; border-radius: 999px; border: 1px solid rgba(245, 241, 233, .35); background: rgba(26, 24, 22, .6); color: var(--ivory); font-size: .62rem; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; line-height: 1; z-index: 5; transition: opacity .6s var(--ease); }
.lb-live:hover { background: rgba(26, 24, 22, .85); }
.lb-live svg { width: 12px; height: 12px; }
.lb-prev, .lb-next { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; }
.lb-prev { left: max(clamp(.5rem, 2vw, 1.5rem), env(safe-area-inset-left)); }
.lb-next { right: max(clamp(.5rem, 2vw, 1.5rem), env(safe-area-inset-right)); }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; text-align: center; padding: 4.5rem max(clamp(1rem, 4vw, 3rem), env(safe-area-inset-right)) max(1.4rem, env(safe-area-inset-bottom)) max(clamp(1rem, 4vw, 3rem), env(safe-area-inset-left)); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .45) 45%, rgba(0, 0, 0, .75)); text-shadow: 0 1px 10px rgba(0, 0, 0, .7); pointer-events: none; transition: opacity .6s var(--ease); }
.lb-cap:empty { display: none; }
.lb-cap p { font-family: var(--serif); font-size: var(--step-1); margin: 0 auto; max-width: 46ch; }
.lb-cap small { display: block; margin-top: .35rem; font-size: .68rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-light); }
.lb.chrome-off { cursor: none; }
.lb.chrome-off .lb-top, .lb.chrome-off .lb-cap, .lb.chrome-off .lb-prev, .lb.chrome-off .lb-next, .lb.chrome-off .lb-live { opacity: 0; pointer-events: none; }
.lb-spinner { position: absolute; left: 50%; top: 50%; width: 28px; height: 28px; margin: -14px; border: 1px solid rgba(245, 241, 233, .2); border-top-color: var(--bronze-light); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 600px) { .lb-prev, .lb-next { display: none; } .lb-cap p { font-size: 1.1rem; } }

/* ---------- Video page ---------- */
.video-stage { padding-block: clamp(3rem, 7vw, 5rem) clamp(4rem, 9vw, 7rem); }
.video-info { display: grid; grid-template-columns: 1fr auto; gap: 2rem; align-items: start; margin-top: 2rem; }
.video-info h2 { font-size: var(--step-3); font-weight: 300; }
.video-info p { margin-top: .8rem; font-family: var(--serif); font-size: 1.2rem; color: rgba(245, 241, 233, .78); max-width: 60ch; }
.video-info .meta { font-size: .7rem; letter-spacing: .22em; text-transform: uppercase; color: var(--bronze-light); }
.vlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: clamp(1rem, 2.4vw, 2rem); }
.vcard { all: unset; cursor: pointer; display: block; }
.vcard .vt { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.vcard img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: transform 1.6s var(--ease-out), opacity .6s; }
.vcard:hover img, .vcard:focus-visible img { transform: scale(1.05); opacity: 1; }
.vcard .vt .dur { position: absolute; right: .6rem; bottom: .6rem; font-size: .7rem; background: rgba(0, 0, 0, .65); padding: .2rem .5rem; letter-spacing: .06em; }
.vcard .vt .now { position: absolute; left: .6rem; top: .6rem; font-size: .6rem; letter-spacing: .2em; text-transform: uppercase; background: var(--bronze); color: var(--night); padding: .25rem .55rem; display: none; }
.vcard[aria-current="true"] .now { display: block; }
.vcard:focus-visible { outline: 2px solid var(--bronze-light); outline-offset: 4px; }
.vcard h3 { font-size: 1.5rem; margin-top: 1rem; }
.vcard p { margin: .3rem 0 0; font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-light); }
.living-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: clamp(.6rem, 1.4vw, 1rem); }
.living-grid figure { margin: 0; position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--parchment-2); }
.living-grid video, .living-grid img { width: 100%; height: 100%; object-fit: cover; }
.living-grid figcaption { position: absolute; left: 0; right: 0; bottom: 0; padding: 1.6rem .8rem .6rem; color: var(--ivory); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .55)); font-family: var(--serif); font-size: 1rem; }

/* ---------- Legacy ---------- */
.qualities { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.quality { display: grid; grid-template-columns: 42% 1fr; gap: 1.6rem; align-items: center; }
.quality .ph { aspect-ratio: 4 / 5; overflow: hidden; border-radius: 999px 999px 2px 2px; background: var(--parchment-2); }
.quality img { width: 100%; height: 100%; object-fit: cover; transition: transform 2s var(--ease-out); }
.quality:hover img { transform: scale(1.05); }
.quality h3 { font-size: var(--step-2); margin-bottom: .8rem; }
.quality p { font-family: var(--serif); font-size: 1.15rem; line-height: 1.55; color: #3d3935; margin: 0; }
.quality small { display: block; margin-top: .8rem; font-size: .7rem; color: var(--slate); letter-spacing: .04em; }
@media (max-width: 860px) { .qualities { grid-template-columns: 1fr; } }
.favorites { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.favorites div { padding: 1.6rem 1.4rem 1.6rem 0; border-bottom: 1px solid var(--line); }
.favorites dt { font-size: .66rem; letter-spacing: .24em; text-transform: uppercase; color: var(--bronze-deep); margin-bottom: .6rem; }
.favorites dd { margin: 0; font-family: var(--serif); font-size: 1.35rem; line-height: 1.3; }
.favorites .hint { display: block; font-size: .95rem; font-style: italic; color: var(--slate); margin-top: .4rem; }
@media (max-width: 760px) { .favorites { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .favorites { grid-template-columns: 1fr; } }
.saying { text-align: center; }
.saying blockquote { margin: 0 auto; max-width: 26ch; font-family: var(--serif); font-size: var(--step-4); font-weight: 300; line-height: 1.15; font-style: italic; }
.saying .tr { margin-top: 1rem; color: var(--bronze-light); font-family: var(--serif); font-size: var(--step-1); }
.stories { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
.story { display: grid; grid-template-columns: 1fr 2fr; gap: clamp(1.5rem, 5vw, 4rem); padding-top: 2.5rem; border-top: 1px solid var(--line); }
.story h3 { font-size: var(--step-2); }
.story .by { font-size: .72rem; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-deep); margin-top: .8rem; display: block; }
.story p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.65; }
@media (max-width: 760px) { .story { grid-template-columns: 1fr; } }
.messages { columns: 3 280px; column-gap: clamp(1rem, 3vw, 2rem); }
.message { break-inside: avoid; margin: 0 0 clamp(1rem, 3vw, 2rem); padding: 2rem 1.8rem; background: var(--ivory-2); border: 1px solid var(--line); position: relative; }
.message::before { content: "“"; position: absolute; top: .4rem; left: 1.2rem; font-family: var(--serif); font-size: 4rem; color: var(--bronze); opacity: .4; line-height: 1; }
.message p { font-family: var(--serif); font-size: 1.2rem; line-height: 1.55; margin-top: 1rem; }
.message footer { font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--bronze-deep); }
.invite { text-align: center; border: 1px dashed rgba(163, 138, 105, .7); padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 4vw, 3rem); }
.invite h3 { font-size: var(--step-3); font-weight: 300; margin-bottom: 1rem; }
.invite p { font-family: var(--serif); font-size: 1.2rem; color: var(--slate-2); max-width: 48ch; margin: 0 auto 1.6rem; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--night); color: var(--ivory); padding: 2rem; }
.notfound h1 { font-size: var(--step-4); font-weight: 300; margin: 1.4rem 0; }
.notfound p { font-family: var(--serif); font-size: var(--step-1); color: rgba(245, 241, 233, .75); }

/* Print */
@media print {
  .site-header, .mobile-menu, .scroll-cue, .strip-controls, .period-nav, .album-bar, .lb { display: none !important; }
  [data-reveal], .mask-reveal { opacity: 1 !important; transform: none !important; clip-path: none !important; }
  .hero, .page-hero, .bg-dark { background: #fff !important; color: #000 !important; }
}

/* Living photographs (video page): still by default, one gentle play on demand */
.living-grid .lv { all: unset; display: block; position: absolute; inset: 0; cursor: pointer; }
.living-grid .lv:focus-visible { outline: 2px solid var(--bronze); outline-offset: -2px; }
.living-grid .lv video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.living-grid .lv.playing video { opacity: 1; }
.living-grid figcaption { pointer-events: none; }

/* Photo viewer — phone held in landscape: smaller controls, arrows back */
@media (orientation: landscape) and (max-height: 540px) {
  .lb { background: #000; }
  .lb-stage figure { padding: 0; }
  .lb-stage img { max-width: 100vw; max-height: 100vh; max-height: 100dvh; box-shadow: none; }
  .lb-top { padding-bottom: 1.6rem; }
  .lb-cap { padding-top: 2rem; padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
  .lb-cap p { font-size: 1.05rem; }
  .lb-btn { width: 40px; height: 40px; }
  .lb-prev, .lb-next { display: grid; opacity: .8; }
  .lb-live { bottom: 3.4rem; }
  .lb-stage figure.out-l, .lb-stage figure.out-r { transform: none; }
}
.lb:fullscreen { background: #000; }

/* ---------- Family editing ---------- */
button.ph-tag.ph-edit { cursor: pointer; transition: background .3s, border-color .3s, color .3s; }
button.ph-tag.ph-edit::before { display: none; }
button.ph-tag.ph-edit svg { width: 13px; height: 13px; margin-left: .15rem; }
button.ph-tag.ph-edit:hover, button.ph-tag.ph-edit:focus-visible { background: rgba(163, 138, 105, .16); border-style: solid; color: var(--charcoal); }
.hide-placeholders .tl-item button.ph-tag.ph-edit { display: inline-flex !important; }
.edit-pencil { display: inline-grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: none; color: var(--slate); opacity: .38; cursor: pointer; vertical-align: middle; transition: opacity .3s, border-color .3s, color .3s; }
.edit-pencil svg { width: 14px; height: 14px; }
.edit-pencil:hover, .edit-pencil:focus-visible { opacity: 1; border-color: var(--line); color: var(--bronze-deep); }
.bg-dark .edit-pencil, .on-dark .edit-pencil { color: var(--parchment); }
.bg-dark .edit-pencil:hover, .on-dark .edit-pencil:hover { color: var(--bronze-light); border-color: var(--line-light); }
.favorites dt .edit-pencil { width: 22px; height: 22px; margin: -4px 0 0 .2rem; }
.favorites dt .edit-pencil svg { width: 12px; height: 12px; }
.tl-edit { display: block; margin-top: .6rem; }
.message footer .edit-pencil { margin-left: .2rem; }

.ed-modal { position: fixed; inset: 0; z-index: 1100; display: grid; place-items: center; padding: 1rem; opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
.ed-modal.open { opacity: 1; visibility: visible; }
.ed-backdrop { position: absolute; inset: 0; background: rgba(26, 24, 22, .72); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.ed-panel { position: relative; width: min(100%, 560px); max-height: calc(100dvh - 2rem); overflow-y: auto; background: var(--ivory-2); color: var(--charcoal); padding: clamp(1.6rem, 4vw, 2.6rem); box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .6); transform: translateY(16px); transition: transform .6s var(--ease-out); outline: none; }
.ed-modal.open .ed-panel { transform: none; }
.ed-panel h2 { font-size: var(--step-2); margin: .8rem 0 .9rem; }
.ed-x { position: absolute; top: .8rem; right: .8rem; width: 38px; height: 38px; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; color: var(--slate-2); }
.ed-x:hover { background: var(--parchment); }
.ed-x svg { width: 16px; height: 16px; }
.ed-text { font-family: var(--serif); font-size: 1.15rem; line-height: 1.5; color: var(--slate-2); }
.ed-note { font-style: italic; font-size: 1.05rem; }
.ed-form { margin-top: 1rem; }
.ed-field { margin-bottom: 1.1rem; }
.ed-label { display: block; font-size: .66rem; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--bronze-deep); margin-bottom: .45rem; }
.ed-form input[type=text], .ed-form textarea, .ed-code { width: 100%; font: inherit; font-family: var(--serif); font-size: 1.15rem; color: var(--charcoal); background: var(--white); border: 1px solid var(--line); border-radius: 2px; padding: .7rem .85rem; line-height: 1.5; transition: border-color .3s, box-shadow .3s; }
.ed-form textarea { resize: vertical; min-height: 5rem; }
.ed-form input:focus, .ed-form textarea:focus { outline: none; border-color: var(--bronze); box-shadow: 0 0 0 3px rgba(163, 138, 105, .18); }
.ed-code { font-family: var(--sans); font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; padding: .8rem .5rem .8rem 1rem; }
.ed-sub { display: flex; justify-content: space-between; gap: 1rem; margin-top: .3rem; font-size: .74rem; color: var(--slate); }
.ed-cnt { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ed-msg { min-height: 1.4rem; margin: .6rem 0; font-size: .86rem; color: #8a3b2e; }
.ed-msg:empty { min-height: 0; margin: 0; }
.ed-fine { font-size: .76rem; color: var(--slate); margin: .4rem 0 1.2rem; }
.ed-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-top: 1.2rem; }
.ed-link { background: none; border: 0; padding: .4rem 0; cursor: pointer; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--slate-2); border-bottom: 1px solid transparent; }
.ed-link:hover { color: var(--charcoal); border-bottom-color: var(--bronze); }
.ed-lock { margin-left: auto; }
.ed-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ed-wait { font-family: var(--serif); font-style: italic; color: var(--slate); }
.btn:disabled { opacity: .5; cursor: wait; }
.ed-code { -webkit-text-security: disc; text-security: disc; }
