/* ════════════════════════════════════════════════════════════════════════
   /projects/ — page-specific overrides on top of /shared/{tokens,base,nav-strong}.css
   Brand: Embassy Garden Ledger — parchment + ink + antique gold.
   No cards, no containers, side-anchored type, massive display.
   ════════════════════════════════════════════════════════════════════════ */

html, body { background: var(--paper); overflow-x: hidden; max-width: 100%; }
img, picture, video, svg, canvas { max-width: 100%; height: auto; display: block; }
h1, h2, h3, p { overflow-wrap: break-word; hyphens: auto; }

main { overflow-x: clip; }

/* ── Top-bar — REMOVED. Use canonical .pub-header from /shared/nav-strong.css.
 * Sam: nav must be identical on every public page. The old .proj-nav rules
 * drifted — stripped 2026-05-09 (no brand image except on landing). */

/* ── Index — masthead ─────────────────────────────────────────────────── */
.idx-mast {
  display: grid;
  /* 2026-05-10 — Sam fix: widen heading column so "in Vientiane." fits one row. */
  grid-template-columns: minmax(0, 0.62fr) minmax(0, 0.38fr);
  gap: clamp(2rem, 5vw, 4rem);
  padding: clamp(3.5rem, 7vw, 6.5rem) var(--outer) clamp(2.4rem, 4.5vw, 4rem);
  align-items: end;
  border-bottom: 1px solid var(--rule);
}
.idx-mast .eyebrow { display: block; margin-bottom: clamp(1.4rem, 3vw, 2.4rem); }
.idx-mast h1 {
  font-family: var(--font-display);
  font-weight: 400;
  /* 2026-05-10 — Sam fix: cap so "Vientiane." fits one row on desktop. */
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.96;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  max-width: 18ch;
  text-wrap: balance;
}
.idx-mast h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.idx-mast .lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--dark);
  max-width: 46ch;
  margin: 0;
  align-self: end;
}

@media (max-width: 900px) {
  .idx-mast { grid-template-columns: 1fr; gap: 2rem; }
}

/* 2026-05-10 — mobile override (Sam fix): allow section title to wrap on small screens. */
@media (max-width: 720px) {
  .idx-mast h1 { font-size: clamp(40px, 9vw, 60px); }
  .idx-section-head .idx-section-title,
  .idx-close .idx-section-title {
    font-size: clamp(28px, 6.5vw, 40px);
    white-space: normal;
  }
}

/* ── Index — ledger spine + entries ───────────────────────────────────── */
.idx-list {
  position: relative;
  padding: clamp(2rem, 5vw, 4rem) var(--outer) clamp(5rem, 9vw, 9rem);
}
.idx-list::before {
  /* Vertical ledger spine */
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--outer) + 4.4rem);
  width: 1px;
  background: var(--rule);
}
@media (max-width: 900px) {
  .idx-list::before { display: none; }
}

.idx-entry {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 0.46fr) minmax(0, 0.54fr);
  gap: clamp(1rem, 2.4vw, 2.4rem);
  align-items: stretch;
  padding: clamp(1.8rem, 3.2vw, 3.2rem) 0;
  border-top: 1px solid var(--rule);
}
.idx-entry .idx-text { justify-content: center; }
.idx-entry:first-of-type { border-top: 0; }
.idx-entry:last-of-type  { border-bottom: 1px solid var(--rule); }

.idx-entry .idx-num {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--light);
  align-self: start;
  padding-top: 0.6rem;
}

.idx-entry .idx-text {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: clamp(0.9rem, 1.6vw, 1.4rem);
}
.idx-entry .idx-place {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.idx-entry .idx-name {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(28px, 3.6vw, 56px);
  line-height: 1;
  letter-spacing: -0.008em;
  color: var(--ink);
  margin: 0;
}
.idx-entry .idx-name em { font-style: italic; color: var(--accent); font-weight: 400; }
.idx-entry .idx-desc {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(15px, 1.4vw, 18px);
  line-height: 1.5;
  color: var(--dark);
  max-width: 44ch;
  margin: 0.5rem 0 0;
}
.idx-entry .idx-read {
  display: inline-block;
  margin-top: clamp(0.8rem, 1.6vw, 1.4rem);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  border-bottom: 1px solid var(--gold);
  padding-bottom: 2px;
  transition: color 240ms ease;
}
.idx-entry:hover .idx-read { color: var(--accent); }

.idx-entry .idx-photo {
  align-self: stretch;
  width: 100%;
  aspect-ratio: 3 / 2;
  max-height: 360px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
  filter: saturate(0.86) contrast(1.04);
  transition: filter 400ms cubic-bezier(.2,.6,.2,1);
}
.idx-entry:hover .idx-photo { filter: saturate(0.94) contrast(1.06); }

.idx-entry-link { display: contents; color: inherit; }
.idx-entry-link:hover { text-decoration: none; }

@media (max-width: 900px) {
  .idx-entry { grid-template-columns: 2.4rem 1fr; gap: 1.2rem; padding: 2.4rem 0; }
  .idx-entry .idx-photo {
    grid-column: 1 / -1;
    grid-row: 2;
    aspect-ratio: 16 / 10;
    max-height: none;
    margin-top: 1.2rem;
  }
  .idx-entry .idx-text { grid-column: 2; grid-row: 1; }
}

/* 2026-05-10 — phone (≤480) tightening: kill orphaned col-1 num column,
   stack cleanly, prevent name-overflow on 375px iPhone SE. */
@media (max-width: 480px) {
  .idx-list { padding: 1.4rem var(--outer) clamp(3rem, 8vw, 5rem); }
  .idx-entry {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 2rem 0;
  }
  .idx-entry .idx-num {
    grid-column: 1;
    grid-row: 1;
    padding-top: 0;
    margin-bottom: 0.2rem;
  }
  .idx-entry .idx-text { grid-column: 1; grid-row: 2; }
  .idx-entry .idx-photo {
    grid-column: 1;
    grid-row: 3;
    aspect-ratio: 4 / 3;
    margin-top: 0.8rem;
  }
  .idx-entry .idx-name { font-size: clamp(28px, 8.4vw, 42px); }
  .idx-entry .idx-desc { font-size: clamp(14px, 4.2vw, 16px); max-width: none; }
  .idx-mast { padding: clamp(2.4rem, 7vw, 4rem) var(--outer) clamp(1.6rem, 5vw, 2.4rem); }
  .idx-section-head { padding: clamp(2.6rem, 7vw, 4rem) var(--outer) clamp(1rem, 3vw, 1.4rem); }
  .idx-close { padding: clamp(3rem, 8vw, 5rem) var(--outer) clamp(3.5rem, 9vw, 6rem); }
  .proj-meta { padding: clamp(1.6rem, 5vw, 3rem) var(--outer); gap: 1.2rem; }
  .proj-mast { padding: clamp(2.4rem, 7vw, 5rem) var(--outer) clamp(1.4rem, 4vw, 2.4rem); }
  .proj-narrative { padding: clamp(2.4rem, 7vw, 5rem) var(--outer); }
  .proj-narrative .nar-body p { font-size: clamp(16px, 4.4vw, 19px); }
}

/* 375 — iPhone SE last-mile: keep h1 / h2 in bounds */
@media (max-width: 380px) {
  .idx-mast h1 { font-size: clamp(34px, 10.6vw, 56px); }
  .idx-section-head .idx-section-title,
  .idx-close .idx-section-title { font-size: clamp(32px, 10.4vw, 56px); }
  .proj-mast h1 { font-size: clamp(40px, 13vw, 72px); }
}

/* ── Detail — hero ─────────────────────────────────────────────────────── */
.proj-hero {
  width: 100%;
  height: clamp(60vh, 80vh, 90vh);
  background-size: cover;
  background-position: center;
  filter: saturate(0.88) contrast(1.04);
}

.proj-mast {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(4rem, 8vw, 8rem) var(--outer) clamp(2rem, 4vw, 4rem);
  align-items: end;
  border-bottom: 1px solid var(--rule);
}
.proj-mast .eyebrow {
  display: block;
  margin-bottom: clamp(1.2rem, 2.4vw, 2rem);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.proj-mast h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(56px, 9vw, 160px);
  line-height: 0.92;
  letter-spacing: -0.012em;
  color: var(--ink);
  margin: 0;
  max-width: 14ch;
}
.proj-mast h1 em { font-style: italic; color: var(--accent); font-weight: 400; }
.proj-mast .proj-tag {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.4;
  color: var(--dark);
  margin: 0;
  max-width: 36ch;
  align-self: end;
}

@media (max-width: 900px) {
  .proj-mast { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ── Detail — meta ledger ─────────────────────────────────────────────── */
.proj-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 3rem);
  padding: clamp(2.5rem, 5vw, 4.5rem) var(--outer);
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.proj-meta > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.proj-meta .meta-key {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  line-height: 1.2;
}
.proj-meta .meta-val {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.15;
  color: var(--ink);
}

@media (max-width: 1024px) {
  .proj-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }
}
@media (max-width: 560px) {
  .proj-meta { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
}

/* ── Detail — narrative ───────────────────────────────────────────────── */
.proj-narrative {
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(4rem, 8vw, 8rem) var(--outer);
  align-items: start;
  border-bottom: 1px solid var(--rule);
}
.proj-narrative .nar-head {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  position: sticky;
  top: calc(var(--topbar-h) + 2rem);
}
.proj-narrative .nar-body p {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 1.6rem;
  max-width: 60ch;
}
.proj-narrative .nar-body p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--accent);
  font-size: 2.4em;
  line-height: 0.9;
  float: left;
  padding: 0.18em 0.16em 0 0;
}

@media (max-width: 900px) {
  .proj-narrative { grid-template-columns: 1fr; gap: 1rem; }
  .proj-narrative .nar-head { position: static; }
}

/* ── Detail — gallery ─────────────────────────────────────────────────── */
.proj-gallery {
  padding: clamp(4rem, 8vw, 8rem) 0;
  border-bottom: 1px solid var(--rule);
}
.proj-gallery .g-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 var(--outer) clamp(2.4rem, 4vw, 4rem);
}
.proj-gallery .g-head .eyebrow,
.proj-gallery .g-head .g-count {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.proj-gallery .g-head .eyebrow { color: var(--accent); }
.proj-gallery .g-head .g-count { color: var(--light); }

.proj-gallery .g-list {
  display: flex;
  flex-direction: column;
  gap: clamp(2.4rem, 5vw, 5rem);
}
.proj-gallery .g-item {
  display: block;
  margin: 0;
  width: 82vw;
  max-width: 1480px;
}
.proj-gallery .g-item:nth-child(odd)  { margin-left: auto;  margin-right: 0; }
.proj-gallery .g-item:nth-child(even) { margin-left: 0;     margin-right: auto; }

.proj-gallery .g-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--rule, rgba(0,0,0,0.04));
}
.proj-gallery .g-item.is-tall .g-frame { aspect-ratio: 3 / 4; }
.proj-gallery .g-item.is-wide .g-frame { aspect-ratio: 3 / 2; }

.proj-gallery .g-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  filter: saturate(0.9) contrast(1.03);
  transition: transform 400ms cubic-bezier(.2,.6,.2,1), filter 400ms ease;
}
.proj-gallery .g-item:hover .g-frame img {
  transform: scale(1.02);
  filter: saturate(1) contrast(1.05);
}

.proj-gallery .g-cap {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--subtle);
  padding: 0.9rem 0 0;
}
.proj-gallery .g-item:nth-child(odd)  .g-cap { padding-right: var(--outer); text-align: right; }
.proj-gallery .g-item:nth-child(even) .g-cap { padding-left: 0; }

@media (max-width: 720px) {
  .proj-gallery .g-item { width: 100%; padding: 0 var(--outer); }
  .proj-gallery .g-item:nth-child(odd)  .g-cap,
  .proj-gallery .g-item:nth-child(even) .g-cap { padding: 0.9rem 0 0; text-align: left; }
}

/* ── Detail — next-project link ───────────────────────────────────────── */
.proj-next {
  padding: clamp(5rem, 9vw, 9rem) var(--outer);
  display: grid;
  grid-template-columns: minmax(0, 0.34fr) minmax(0, 0.66fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: end;
  border-top: 1px solid var(--rule);
}
.proj-next .next-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.proj-next a.next-link {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 80px);
  line-height: 0.96;
  color: var(--ink);
  letter-spacing: -0.01em;
  display: inline-block;
  transition: color 240ms ease;
}
.proj-next a.next-link em { font-style: italic; color: var(--accent); }
.proj-next a.next-link:hover { color: var(--accent); text-decoration: none; }
.proj-next a.next-link .icon {
  margin-left: 0.3em;
  width: 0.8em;
  height: 0.8em;
  color: var(--accent);
  vertical-align: -0.06em;
}

@media (max-width: 900px) {
  .proj-next { grid-template-columns: 1fr; gap: 1rem; }
}

/* ── Section heads — Completed / Ongoing ──────────────────────────────── */
.idx-section-head {
  display: grid;
  /* 2026-05-10 — give the title column more room so "Delivered & handed over." stays on one row. */
  grid-template-columns: minmax(0, 0.32fr) minmax(0, 0.68fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(4rem, 7vw, 7rem) var(--outer) clamp(1.4rem, 2.4vw, 2rem);
  align-items: end;
  border-bottom: 1px solid var(--rule);
}
.idx-section-head .eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.idx-section-head .idx-section-title {
  font-family: var(--font-display);
  font-weight: 400;
  /* 2026-05-10 — Sam fix: cap at 64px so "Delivered & handed over." fits one row. */
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  align-self: end;
  /* Order matters: text-wrap goes first because `white-space` shorthand can reset it. */
  text-wrap: balance;
  white-space: nowrap;
}
.idx-section-head .idx-section-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
@media (max-width: 900px) {
  .idx-section-head { grid-template-columns: 1fr; gap: 1.2rem; }
}

/* ── Deferred (ongoing-no-photo-yet) entry ────────────────────────────── */
.idx-entry-deferred {
  opacity: 0.92;
}
.idx-entry-deferred .idx-read-locked {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--subtle);
  display: inline-block;
  padding-top: 0.6rem;
  border-top: 1px solid var(--rule);
}
.idx-photo-placeholder {
  background:
    repeating-linear-gradient(
      135deg,
      rgba(139, 105, 20, 0.045) 0,
      rgba(139, 105, 20, 0.045) 8px,
      rgba(139, 105, 20, 0.085) 8px,
      rgba(139, 105, 20, 0.085) 16px
    ),
    var(--paper);
  border: 1px solid var(--rule);
}

/* ── Close-out — Inquire ──────────────────────────────────────────────── */
.idx-close {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 0.58fr);
  gap: clamp(2rem, 6vw, 6rem);
  padding: clamp(5rem, 9vw, 9rem) var(--outer) clamp(6rem, 10vw, 10rem);
  align-items: end;
  border-top: 1px solid var(--rule);
}
.idx-close .eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}
.idx-close .idx-section-title {
  font-family: var(--font-display);
  font-weight: 400;
  /* 2026-05-10 — match section-head scale; allow wrap since this title is short and column-1 is narrow. */
  font-size: clamp(36px, 5.5vw, 64px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  align-self: end;
  grid-column: 1;
  text-wrap: balance;
}
.idx-close .idx-section-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 400;
}
.idx-close-lede {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(16px, 1.6vw, 22px);
  line-height: 1.4;
  color: var(--dark);
  max-width: 46ch;
  margin: 0;
  align-self: end;
  grid-column: 2;
  grid-row: 1 / 3;
}
.idx-close-cta {
  grid-column: 1;
  margin: clamp(1.2rem, 2vw, 1.8rem) 0 0;
}
.idx-close-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding: 0.4rem 0;
}
.idx-close-link:hover { color: var(--accent); }
@media (max-width: 900px) {
  .idx-close { grid-template-columns: 1fr; gap: 1.2rem; }
  .idx-close-lede { grid-column: 1; grid-row: auto; }
  .idx-close-cta { grid-column: 1; }
}
