/* Inner pages — builds on styles.css */

/* Masthead: white card, same family as the home hero */
.masthead { padding: 0 10px; }
.mast-card { position: relative; isolation: isolate; overflow: hidden; display: grid; grid-template-columns: 1.1fr .9fr; align-items: end; gap: clamp(24px, 4vw, 64px); min-height: min(82svh, 820px); padding: 128px var(--pad) 0; background: #fff; color: var(--k); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.mast-card .hero-dots { -webkit-mask-image: radial-gradient(ellipse 50% 70% at 75% 70%, #000 15%, transparent 75%); mask-image: radial-gradient(ellipse 50% 70% at 75% 70%, #000 15%, transparent 75%); }
.mast-card .hero-glow { left: 72%; width: min(900px, 80vw); }
.mast-copy { align-self: center; padding-bottom: clamp(32px, 5vw, 64px); }
.mast-copy h1 { font-size: clamp(34px, 4.4vw, 64px); margin: 4px 0 22px; }
.mast-copy > p:not(.eyebrow) { max-width: 520px; font-size: 17px; color: var(--muted-light); }
.mast-copy .actions { margin-top: 30px; }
.mast-card .eyebrow, .paper .eyebrow { color: #8a6510; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; font-size: 14px; color: var(--muted-light); }
.crumbs a { display: inline-flex; align-items: center; min-height: 32px; padding: 0 12px; border-radius: 99px; background: #0c0c0b0d; color: var(--k); font-weight: 500; }
.crumbs a:hover { background: var(--y); }
.crumbs span[aria-current] { font-weight: 700; color: var(--k); }
.mast-art { position: relative; align-self: end; justify-self: center; width: min(100%, 520px); aspect-ratio: 1 / 1.02; }
.mast-art .arch { height: 100%; }
.mast-art .arch img { object-position: 50% 40%; transform: none; }
.mast-art .chip { left: -28px; bottom: 56px; }
.mast-art .chip-b { left: auto; right: -20px; bottom: auto; top: 30%; }
.mast-art .spark { right: -10px; top: 6%; font-size: 44px; }
.mast-card--solo { grid-template-columns: 1fr; align-items: center; min-height: 0; padding-bottom: clamp(40px, 5vw, 64px); }
.mast-card--solo .chip-inline { position: static; display: inline-flex; margin-top: 22px; }

/* Shared bits */
.btn-line-light { border-color: var(--k); color: var(--k); }
.btn-line-light:hover { background: var(--k); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips li, .chips span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line); font-size: 12px; font-weight: 500; color: var(--muted); }
.mast-card .chips li { border-color: #0c0c0b1f; color: var(--muted-light); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.split-photo { position: relative; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; }
.split-photo img { width: 100%; height: 100%; object-fit: cover; }
.split-photo figcaption { position: absolute; left: 14px; right: 14px; bottom: 14px; padding: 14px 18px; border-radius: 16px; background: #0c0c0bd9; backdrop-filter: blur(8px); font-size: 14px; }
.split-copy > p:not(.eyebrow):not(.fine) { color: var(--muted); margin: 18px 0 28px; max-width: 540px; }
.note { display: flex; gap: 10px; margin-top: 24px; max-width: 760px; }
.note span { color: var(--y); }

/* About: stat card in leader panel */
.stat-card { display: flex; gap: 20px; align-items: center; margin: 24px 0; padding: 20px 22px; border-radius: 18px; background: var(--y); color: var(--k); }
.stat-card strong { flex: none; font-size: clamp(26px, 2.6vw, 34px); }
.stat-card p { font-size: 16px; line-height: 1.5; color: #2f2a1c; }

/* About / Gallery: badge portraits */
.badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.badge { border-radius: var(--r-md); overflow: hidden; background: #000; border: 1px solid var(--line); transition: transform .3s, border-color .3s; }
.badge:hover { transform: translateY(-4px); border-color: var(--y); }
.badge img { width: 100%; height: auto; aspect-ratio: 1.19; object-fit: cover; }
.badge div { padding: 14px 18px 18px; }
.badge h3 { font-family: var(--display); font-size: 16px; font-weight: 700; }
.badge p { font-size: 12px; letter-spacing: .12em; color: var(--muted); }
.badge-lead { grid-column: span 1; display: flex; flex-direction: column; justify-content: space-between; padding: 22px; background: var(--y); color: var(--k); border: 0; }
.badge-lead h3 { font-size: clamp(20px, 2vw, 26px); line-height: 1.15; }
.badge-lead p { color: #2f2a1c; font-size: 14px; letter-spacing: 0; }
.badge-lead mark { background: var(--k); color: var(--y); }
.trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 14px; }
.trio li { padding: 26px; border-radius: var(--r-md); background: var(--k3); border: 1px solid var(--line); }
.trio span { display: block; font-size: 12px; font-weight: 700; letter-spacing: .18em; color: var(--y); margin-bottom: 14px; }
.trio h3 { font-family: var(--display); font-size: 18px; font-weight: 700; line-height: 1.25; margin-bottom: 10px; }
.trio p { color: var(--muted); font-size: 16px; }

/* About: achievement */
.achieve { position: relative; border-radius: var(--r-lg); overflow: hidden; min-height: 520px; display: flex; align-items: flex-end; }
.achieve > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.achieve::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, #0c0c0bf5 0%, #0c0c0bcc 40%, #0c0c0b30 75%), linear-gradient(0deg, #0c0c0bcc, transparent 50%); }
.achieve-copy { position: relative; z-index: 1; max-width: 560px; padding: clamp(28px, 5vw, 64px); }
.achieve-copy > p:not(.eyebrow) { color: #d6d4ca; margin: 18px 0 28px; }
.achieve figcaption { position: absolute; z-index: 1; right: 20px; top: 20px; padding: 8px 14px; border-radius: 99px; background: var(--y); color: var(--k); font-size: 12px; font-weight: 700; }

/* Program: focus cards */
.focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.focus { position: relative; padding: clamp(24px, 3vw, 36px); border-radius: var(--r-md); background: var(--k3); border: 1px solid var(--line); overflow: hidden; transition: border-color .3s, transform .3s; }
.focus:hover { border-color: #f2c14e66; transform: translateY(-3px); }
.focus-num { position: absolute; right: 18px; top: 4px; font-family: var(--display); font-weight: 800; font-size: 88px; line-height: 1; color: transparent; -webkit-text-stroke: 1.2px #f2c14e55; }
.focus h3 { font-family: var(--display); font-size: 20px; font-weight: 700; margin: 0 0 12px; max-width: 75%; }
.focus p { color: var(--muted); margin-bottom: 20px; max-width: 460px; }
.focus .chips { margin-top: auto; }

/* Program: FAQ */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(28px, 5vw, 72px); align-items: start; }
.faq-list { display: grid; gap: 12px; }
.faq details { border-radius: 20px; background: var(--k2); border: 1px solid var(--line); transition: border-color .25s, background-color .25s; }
.faq details[open] { background: var(--text); color: var(--k); border-color: var(--text); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 64px; padding: 16px 22px; font-weight: 700; font-size: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--y); color: var(--k); font-size: 20px; font-weight: 500; transition: transform .3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 22px 22px; color: var(--muted-light); }

/* Gallery: portrait marquee */
.marquee { overflow: hidden; padding: clamp(36px, 5vw, 56px) 0 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 14px; width: max-content; animation: slide 40s linear infinite; }
.marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee .badge { width: 220px; flex: none; }
@keyframes slide { to { transform: translateX(calc(-50% - 7px)); } }

/* Gallery + Blog: filter bar */
.filter-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pills button { min-height: 44px; padding: 0 18px; border-radius: 99px; border: 1px solid var(--line); background: transparent; font-size: 14px; font-weight: 500; transition: background-color .2s, color .2s, border-color .2s; }
.pills button:hover { border-color: #ffffff66; }
.pills button[aria-pressed="true"] { background: var(--y); color: var(--k); border-color: var(--y); font-weight: 700; }
.count { font-size: 14px; color: var(--muted); }
.count b { color: var(--text); }
.search { position: relative; flex: 1; max-width: 420px; }
.search input { width: 100%; min-height: 52px; padding: 0 20px 0 48px; border-radius: 99px; border: 1px solid var(--line); background: var(--k2); color: var(--text); font: inherit; }
.search input::placeholder { color: var(--muted); }
.search input:focus-visible { outline: 2px solid var(--y); outline-offset: 2px; }
.search::before { content: '⌕'; position: absolute; left: 18px; top: 50%; translate: 0 -52%; font-size: 20px; color: var(--y); }

/* Gallery: masonry */
.masonry { columns: 3 300px; column-gap: 14px; }
.g-item { break-inside: avoid; margin-bottom: 14px; }
.g-item button { position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: var(--r-md); overflow: hidden; background: var(--k2); text-align: left; }
.g-item img { width: 100%; height: auto; transition: transform .8s; }
.g-item button:hover img, .g-item button:focus-visible img { transform: scale(1.04); }
.g-item .g-cap { position: absolute; left: 10px; right: 10px; bottom: 10px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #0c0c0bdb; backdrop-filter: blur(8px); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s; }
.g-item button:hover .g-cap, .g-item button:focus-visible .g-cap { opacity: 1; transform: none; }
.g-cap b { display: block; font-size: 14px; line-height: 1.3; }
.g-cap small { font-size: 12px; color: var(--y); font-weight: 700; letter-spacing: .08em; }
.g-cap i { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--y); color: var(--k); font-style: normal; }
@media (hover: none) { .g-item .g-cap { opacity: 1; transform: none; } }

/* Gallery: lightbox */
.lightbox { width: min(1100px, 94vw); max-height: 94vh; padding: 0; border: 0; border-radius: var(--r-md); background: var(--k2); color: var(--text); overflow: hidden; }
.lightbox::backdrop { background: #000000d9; backdrop-filter: blur(6px); }
.lightbox figure { display: grid; grid-template-rows: 1fr auto; max-height: 94vh; }
.lightbox img { width: 100%; max-height: calc(94vh - 84px); object-fit: contain; background: #000; }
.lightbox figcaption { display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 22px; }
.lightbox figcaption p { flex: 1; font-weight: 500; }
.lightbox [data-pos] { font-size: 12px; color: var(--muted); letter-spacing: .1em; }
.lightbox button { width: 48px; height: 48px; flex: none; border-radius: 50%; border: 1px solid var(--line); background: transparent; font-size: 18px; }
.lightbox button:hover { background: var(--y); color: var(--k); }
.lightbox [data-close] { background: var(--y); color: var(--k); border: 0; }

/* Blog index */
.blog-grid .post[hidden] { display: none; }
.blog-index { grid-template-columns: repeat(2, 1fr); }
.post-featured { grid-column: 1 / -1; display: grid; grid-template-columns: 1.15fr 1fr; grid-template-rows: auto auto auto 1fr; gap: 0 32px; padding: 12px; }
.post-featured .post-img { grid-row: 1 / -1; aspect-ratio: auto; min-height: 340px; margin: 0; }
.post-featured .meta { padding-top: 24px; }
.post-featured h3 { font-size: clamp(22px, 2.4vw, 32px); }
.post-featured .more { align-self: end; padding-bottom: 16px; }
.empty { text-align: center; padding: 56px 20px; border-radius: var(--r-md); border: 1px dashed var(--line); margin-top: 18px; }
.empty h3 { font-family: var(--display); font-size: 20px; margin-bottom: 8px; }
.empty p { color: var(--muted); margin-bottom: 20px; }

/* Article */
.article-head { padding: 0 10px; }
.article-head .mast-card { display: block; min-height: 0; padding-bottom: clamp(40px, 5vw, 64px); text-align: center; }
.article-head .crumbs { justify-content: center; }
.article-head h1 { font-size: clamp(30px, 4.2vw, 58px); max-width: 980px; margin: 6px auto 20px; }
.article-head .deck { max-width: 680px; margin: 0 auto 22px; font-size: 18px; color: var(--muted-light); }
.article-head .meta-line { display: inline-flex; flex-wrap: wrap; justify-content: center; gap: 8px 14px; padding: 10px 18px; border-radius: 99px; background: #0c0c0b0d; font-size: 14px; color: var(--k); }
.article-head .meta-line span { color: #8a6510; }
.article-cover { width: min(1100px, calc(100% - 2 * var(--pad))); margin: clamp(-8px, -1vw, 0px) auto 0; padding-top: clamp(32px, 4vw, 48px); }
.article-cover img { width: 100%; height: auto; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--r-lg); }
.article-cover figcaption { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.article-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; width: min(1100px, calc(100% - 2 * var(--pad))); margin: clamp(40px, 5vw, 64px) auto 0; }
.toc { position: sticky; top: 104px; padding: 22px; border-radius: var(--r-md); background: var(--k2); border: 1px solid var(--line); }
.toc .eyebrow { margin-bottom: 12px; }
.toc nav { display: grid; gap: 2px; margin-bottom: 18px; counter-reset: toc; }
.toc nav a { counter-increment: toc; display: grid; grid-template-columns: 28px 1fr; gap: 6px; padding: 10px 10px; border-radius: 12px; font-size: 14px; line-height: 1.4; color: var(--muted); transition: background-color .2s, color .2s; }
.toc nav a::before { content: counter(toc, decimal-leading-zero); font-family: var(--display); font-size: 12px; color: var(--y); padding-top: 2px; }
.toc nav a:hover { color: var(--text); background: #ffffff0a; }
.toc nav a[aria-current] { color: var(--k); background: var(--y); }
.toc nav a[aria-current]::before { color: var(--k); }
.toc .more { font-size: 14px; font-weight: 700; color: var(--y); }
.paper { padding: clamp(28px, 5vw, 64px); border-radius: var(--r-lg); background: #fbfaf6; color: #23231f; font-size: 18px; line-height: 1.8; }
.paper .intro { font-size: 21px; line-height: 1.6; color: var(--k); padding-bottom: 28px; margin-bottom: 8px; border-bottom: 1px solid #0c0c0b1a; }
.paper section { padding-top: 28px; scroll-margin-top: 14px; }
.paper h2 { font-family: var(--display); font-weight: 700; font-size: clamp(22px, 2.2vw, 28px); letter-spacing: -.02em; line-height: 1.25; color: var(--k); margin-bottom: 14px; }
.paper p + p { margin-top: 16px; }
.paper ul, .paper ol { margin: 16px 0; padding-left: 22px; list-style: disc; }
.paper ol { list-style: decimal; }
.paper li + li { margin-top: 8px; }
.paper a { color: #7a5a0e; text-decoration: underline; text-decoration-thickness: 2px; text-decoration-color: var(--y); text-underline-offset: 3px; }
.paper strong { color: var(--k); }
.sources { margin-top: 36px; padding: 22px; border-radius: 18px; background: #0c0c0b08; border: 1px solid #0c0c0b14; }
.sources h2 { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .2em; margin-bottom: 8px; }
.sources a { display: block; font-size: 15px; padding: 4px 0; }
.next-box { margin-top: 28px; padding: clamp(24px, 4vw, 40px); border-radius: var(--r-md); background: var(--k); color: var(--text); }
.next-box h2 { color: #fff; font-size: clamp(24px, 2.6vw, 34px); font-weight: 800; }
.next-box h2 em { font-style: normal; color: var(--y); }
.next-box p:not(.eyebrow) { color: var(--muted); font-size: 16px; margin: 14px 0 24px; }
.next-box p a { color: var(--y); text-decoration-color: #f2c14e80; }
.next-box .btn { text-decoration: none; color: var(--k); }

/* 404 */
.lost .mast-card { min-height: max(100svh, 620px); display: grid; place-items: center; text-align: center; padding-bottom: 80px; grid-template-columns: 1fr; }
.lost .lost-num { font-family: var(--display); font-weight: 800; font-size: clamp(110px, 22vw, 300px); line-height: .95; letter-spacing: -.05em; color: transparent; -webkit-text-stroke: 2px var(--k); margin: 0 0 12px; max-width: none; }
.lost-num mark { background: none; padding: 0; color: var(--y); -webkit-text-stroke: 2px var(--k); }
.lost h1 { font-size: clamp(28px, 4vw, 52px); margin: 18px 0 14px; }
.lost p { color: var(--muted-light); max-width: 460px; margin: 0 auto 28px; }
.lost .actions { justify-content: center; }

/* Responsive */
@media (max-width: 1080px) {
  .badges { grid-template-columns: repeat(3, 1fr); }
  .post-featured { display: flex; padding: 12px 12px 24px; }
  .post-featured .post-img { min-height: 0; aspect-ratio: 16 / 10; margin-bottom: 18px; }
}
@media (max-width: 860px) {
  .mast-card { grid-template-columns: 1fr; padding-top: 112px; min-height: 0; }
  .mast-copy { padding-bottom: 8px; }
  .mast-art { width: min(100%, 420px); }
  .mast-art .chip { left: -4px; }
  .mast-art .chip-b { display: none; }
  .split, .faq, .article-layout, .blog-index { grid-template-columns: 1fr; }
  .focus-grid, .trio { grid-template-columns: 1fr; }
  .badges { grid-template-columns: repeat(2, 1fr); }
  .toc { position: static; }
  .paper { font-size: 17px; }
  .paper .intro { font-size: 19px; }
  .achieve { min-height: 560px; }
  .achieve::after { background: linear-gradient(0deg, #0c0c0bf5 0%, #0c0c0bcc 50%, #0c0c0b30 85%); }
  .search { max-width: none; flex-basis: 100%; }
}
@media (max-width: 520px) {
  .badges { grid-template-columns: 1fr 1fr; gap: 10px; }
  .badge div { padding: 10px 12px 14px; }
  .badge h3 { font-size: 14px; }
  .marquee .badge { width: 170px; }
  .lightbox figcaption { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .marquee { overflow-x: auto; }
  .marquee .badge[aria-hidden="true"] { display: none; }
}

/* Contrast + touch-target fixes */
.next-box .eyebrow { color: var(--y); }
.crumbs a { min-height: 44px; padding: 0 14px; }
.post .more, .toc .more { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 900px), (pointer: coarse) {
  .toc nav a { min-height: 44px; align-items: center; }
  .sources a { display: flex; align-items: center; min-height: 44px; }
}
