/* ============================================================
   Archion — public site. Hybrid: light body, dark hero + footer.
   Brand: red #a41e25, Cabin, near-black #0d0a0b. Photo-forward.
   ============================================================ */
:root {
  --red: #a41e25;
  --ink: #1a1416;
  --muted: #6b5f5d;
  --line: rgba(0,0,0,.10);
  --bg: #ffffff;
  --bg-soft: #faf8f7;
  --dark: #0d0a0b;
  --dark-soft: #15100f;
  --font: 'Cabin', system-ui, -apple-system, sans-serif;
  --maxw: 1280px;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scrollbar-gutter: stable; }
body { font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
@media (max-width: 600px) { .wrap { padding: 0 18px; } }

/* ── Header ── */
.hdr { position: fixed; top: 0; left: 0; right: 0; z-index: 50; transition: background .25s, box-shadow .25s; }
.hdr::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 130px; background: linear-gradient(180deg, rgba(13,10,11,.5), rgba(13,10,11,0)); pointer-events: none; transition: opacity .3s; }
.hdr.is-solid::before { opacity: 0; }
.hdr__in { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; height: 72px; max-width: var(--maxw); margin: 0 auto; padding: 0 28px; }
.hdr__brand { display: flex; align-items: center; gap: 10px; color: #fff; }
.hdr__mk { display: block; }
.hdr__sq { fill: var(--ink); transition: fill .25s; }
.hdr.is-solid .hdr__sq { fill: var(--ink); }
.hdr__name { font-size: 20px; font-weight: 700; letter-spacing: .08em; }
.hdr.is-solid .hdr__brand { color: var(--ink); }
.hdr nav { display: flex; gap: 30px; align-items: center; }
.hdr nav a { font-size: 14px; font-weight: 600; letter-spacing: .02em; color: #fff; opacity: .9; }
.hdr nav a:hover { opacity: 1; color: #fff; }
.hdr nav a.is-cta { background: var(--red); color: #fff; padding: 9px 18px; border-radius: 4px; opacity: 1; }
/* solid state (scrolled / non-hero pages) */
.hdr.is-solid, .hdr.menu-open { background: #fff; box-shadow: 0 1px 0 var(--line); }
.hdr.menu-open::before { opacity: 0; }
.hdr.menu-open .hdr__brand { color: var(--ink); }
.hdr.menu-open .hdr__sq { fill: var(--ink); }
.hdr.is-solid .hdr__logo--light { display: none; }
.hdr.is-solid .hdr__logo--dark { display: block; }
.hdr.is-solid nav a { color: var(--ink); opacity: .85; }
.hdr.is-solid nav a:hover { color: var(--red); }
.hdr.is-solid nav a.is-cta { color: #fff; }
.hdr__burger { display: none; }
@media (max-width: 820px) {
  .hdr nav { position: fixed; inset: 72px 0 auto 0; background: #fff; flex-direction: column; gap: 0; padding: 8px 0 16px; box-shadow: 0 10px 30px rgba(0,0,0,.12); transform: translateY(-130%); visibility: hidden; transition: transform .25s, visibility 0s .25s; }
  .hdr nav.open { transform: translateY(0); visibility: visible; transition: transform .25s; }
  .hdr nav a { color: var(--ink) !important; width: 100%; padding: 14px 28px; opacity: 1; }
  .hdr nav a.is-cta { margin: 8px 28px 0; width: auto; text-align: center; }
  .hdr__burger { display: flex; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
  .hdr__burger span { width: 24px; height: 2px; background: #fff; transition: background .2s; }
  .hdr.is-solid .hdr__burger span, .hdr.menu-open .hdr__burger span { background: var(--ink); }
}

/* ── Hero ── */
.hero { position: relative; height: 92vh; height: 92svh; min-height: 560px; background: var(--dark); overflow: hidden; }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s ease; }
.hero__img.is-on { opacity: 1; }
.hero__vid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; opacity: 0; transition: opacity 1.2s ease; }
.hero__vid.is-on { opacity: 1; }
.hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.45) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.7) 100%); z-index: 1; }
.hero__cap { position: absolute; left: 0; right: 0; bottom: 48px; z-index: 2; color: #fff; }
.hero__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #fff; margin-bottom: 14px; display: inline-flex; align-items: center; gap: 10px; }
.hero__eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--red); display: inline-block; }
.hero__name { font-size: clamp(26px, 4vw, 46px); font-weight: 700; letter-spacing: -.5px; line-height: 1.1; max-width: 18ch; }
.hero__loc { font-size: 15px; opacity: .85; margin-top: 8px; }
.hero { cursor: pointer; }
.hero__cap { display: block; text-decoration: none; }
.hero__cue { display: inline-flex; align-items: center; gap: 7px; margin-top: 16px; font-size: 13px; font-weight: 700; letter-spacing: .04em; color: #fff; }
.hero__cue span { color: var(--red); transition: transform .15s; }
.hero:hover .hero__cue span { transform: translateX(5px); }
.hero__dots { position: absolute; right: 28px; bottom: 52px; z-index: 2; display: flex; gap: 8px; }
.hero__dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.4); border: 0; cursor: pointer; padding: 0; }
.hero__dot.is-on { background: var(--red); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.practice__h { font-size: 19px; font-weight: 700; letter-spacing: -.2px; margin: 36px 0 10px; }

/* ── Section scaffolding ── */
.sec { padding: 90px 0; }
.sec--soft { background: var(--bg-soft); }
.sec--dark { background: var(--dark); color: #ece5e3; }
.sec--dark .sec__eyebrow { color: #d9594f; }
.sec--dark .sec__title { color: #f5efed; }
.sec--dark .sec__lead { color: #b3a7a4; }
.sec--dark .practice__h { color: #f5efed; }
.sec--dark .btn { color: #fff; }
.sec--dark .btn .arr { color: #d9594f; }
.sec--dark .member__name { color: #f0eae8; }
.sec--dark .member__pos { color: #d9594f; }
.sec__eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.sec__title { font-size: clamp(24px, 3vw, 34px); font-weight: 700; letter-spacing: -.4px; line-height: 1.15; }
.sec__lead { font-size: 17px; color: var(--muted); max-width: 64ch; line-height: 1.7; margin-top: 16px; }
.sec__lead + .sec__lead { margin-top: 14px; }

/* ── Sector grid ── */
.sectors { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 34px; }
@media (max-width: 900px) { .sectors { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .sectors { grid-template-columns: 1fr; } }
.sector { position: relative; aspect-ratio: 4/3; overflow: hidden; border-radius: 6px; display: block; background: var(--dark); }
.sector img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.sector:hover img { transform: scale(1.05); }
.sector::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.6)); }
.sector__label { position: absolute; left: 18px; bottom: 16px; z-index: 1; color: #fff; }
.sector__label b { display: block; font-size: 19px; font-weight: 700; }
.sector__label span { font-size: 13px; opacity: .85; }

/* ── Project grid / cards ── */
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px 18px; margin-top: 34px; }
@media (max-width: 900px) { .grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.card { display: block; }
.card__img { aspect-ratio: 4/3; overflow: hidden; border-radius: 6px; background: var(--bg-soft); }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card__img img { transform: scale(1.04); }
.card__sector { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 12px 0 4px; }
.card__name { font-size: 16px; font-weight: 700; line-height: 1.3; }
.card__loc { font-size: 13px; color: var(--muted); margin-top: 3px; }

/* ── Filter chips ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.chip { font-size: 13px; font-weight: 600; padding: 8px 16px; border-radius: 100px; border: 1px solid var(--line); background: #fff; color: var(--muted); cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--muted); color: var(--ink); }
.chip.is-on { background: var(--red); border-color: var(--red); color: #fff; }

/* ── Practice ── */
.practice__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 820px) { .practice__grid { grid-template-columns: 1fr; gap: 28px; } }
.btn { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--red); margin-top: 22px; }
.btn .arr { transition: transform .15s; }
.btn:hover .arr { transform: translateX(4px); }

/* ── Project detail ── */
.pj-hero { aspect-ratio: 16/9; max-height: 72vh; border-radius: 8px; overflow: hidden; position: relative; background: var(--dark); margin-top: 10px; }
.pj-hero img { width: 100%; height: 100%; object-fit: cover; }
.pj-head { padding: 48px 0 0; }
.pj-head__sector { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.pj-head__name { font-size: clamp(26px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.5px; margin: 8px 0; line-height: 1.12; }
.pj-meta { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 10px; color: var(--muted); font-size: 15px; }
.pj-meta b { color: var(--ink); font-weight: 600; }
.pj-body { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; padding: 44px 0; }
@media (max-width: 820px) { .pj-body { grid-template-columns: 1fr; gap: 28px; } }
.pj-prose p { font-size: 16px; color: #3a3230; line-height: 1.8; margin-bottom: 16px; }
.pj-prose h3 { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin: 26px 0 8px; }
.pj-side { font-size: 14px; color: var(--muted); line-height: 1.7; }
.pj-side h4 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 6px; }
.pj-gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding-bottom: 60px; }
@media (max-width: 600px) { .pj-gallery { grid-template-columns: 1fr; } }
.pj-gallery img { width: 100%; border-radius: 6px; }
.pj-gallery .span2 { grid-column: 1 / -1; }
.back { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 30px 0; }
.back:hover { color: var(--red); }

/* ── Team ── */
.team-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; max-width: 760px; }
@media (max-width: 820px) { .team-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .team-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
.team-lead { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; margin-top: 30px; max-width: 560px; }
.team-lead + .team-grid { margin-top: 30px; }
.member__img { aspect-ratio: 3/4; overflow: hidden; border-radius: 6px; background: var(--ink); }
.member__img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.03); transition: transform .6s cubic-bezier(.16,1,.3,1), filter .4s ease; }
.member:hover .member__img img { transform: scale(1.04); filter: grayscale(.5) contrast(1.03); }
.member--lead .member__img { aspect-ratio: 4/5; }
.member--lead .member__name { font-size: 20px; }
.member__name { font-size: 17px; font-weight: 700; margin-top: 14px; }
.member__pos { font-size: 13px; color: var(--red); font-weight: 600; letter-spacing: .02em; }

/* ── Footer ── */
.ftr { background: var(--dark); color: #cfc7c5; padding: 64px 0 36px; }
.ftr__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
@media (max-width: 760px) { .ftr__grid { grid-template-columns: 1fr; gap: 28px; } }
.ftr__logo { height: 48px; width: auto; margin-bottom: 16px; }
.ftr h5 { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; margin-bottom: 14px; }
.ftr a { color: #cfc7c5; }
.ftr a:hover { color: #fff; }
.ftr p, .ftr a { font-size: 14px; line-height: 1.8; }
.ftr__social { display: flex; gap: 16px; margin-top: 12px; }
.ftr__social a { font-size: 13px; font-weight: 600; }
.ftr__bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 44px; padding-top: 22px; font-size: 12px; color: #8a807e; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

/* iOS auto-zoom guard */
@media (max-width: 768px) { input, select, textarea { font-size: 16px; } }

/* ── Loader (triangle) ── */
.loader { position: fixed; inset: 0; z-index: 9999; background: #0d0a0b; display: flex; align-items: center; justify-content: center; transition: transform .9s cubic-bezier(.16,1,.3,1); }
.loader.is-done { transform: translateY(-101%); }
.loader__in { display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loader__tri { animation: triIn 1s cubic-bezier(.16,1,.3,1) both; }
.loader__name { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: .34em; padding-left: .34em; animation: ldFade .8s cubic-bezier(.16,1,.3,1) .4s both; }
.loader__bar { width: 70px; height: 2px; background: rgba(255,255,255,.16); overflow: hidden; }
.loader__bar i { display: block; height: 100%; background: var(--red); transform: translateX(-100%); animation: ldBar 1.05s cubic-bezier(.16,1,.3,1) .3s forwards; }
@keyframes triIn { 0% { opacity: 0; transform: scale(.55); clip-path: inset(100% 0 0 0); } 55% { clip-path: inset(0 0 0 0); } 100% { opacity: 1; transform: scale(1); } }
@keyframes ldFade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ldBar { to { transform: translateX(0); } }

/* ── Scroll reveal ── */
html:not(.js) .reveal, html:not(.js) .rv-img { opacity: 1 !important; transform: none !important; clip-path: none !important; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s cubic-bezier(.16,1,.3,1), transform .9s cubic-bezier(.16,1,.3,1); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.rv-img { opacity: 0; transform: scale(1.04) translateY(26px); transition: opacity 1s cubic-bezier(.16,1,.3,1), transform 1.2s cubic-bezier(.16,1,.3,1); will-change: opacity, transform; }
.rv-img.in { opacity: 1; transform: none; }
.pj2__vid { position: relative; width: 100%; border-radius: 6px; overflow: hidden; background: var(--ink); }
.pj2__vid video { width: 100%; display: block; }
.pj2__vidtag { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #fff; background: rgba(164,30,37,.92); padding: 5px 10px; border-radius: 3px; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .reveal, .rv-img { opacity: 1; transform: none; transition: none; clip-path: none; } .loader__tri, .loader__name, .loader__bar i { animation: none; } }

/* ── Project detail: sticky info + scrolling media (Yazdani-style) ── */
.pj2 { display: grid; grid-template-columns: 360px 1fr; gap: 60px; padding-top: 34px; padding-bottom: 80px; align-items: start; }
.pj2__info { position: sticky; top: 100px; }
.pj2__sector { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.pj2__name { font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; letter-spacing: -.4px; margin: 10px 0 16px; line-height: 1.12; }
.pj2__meta { display: flex; flex-direction: column; gap: 10px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 18px; font-size: 14px; }
.pj2__meta div { display: flex; justify-content: space-between; gap: 16px; }
.pj2__meta span { color: var(--muted); }
.pj2__meta b { font-weight: 600; text-align: right; }
.pj2__desc p { font-size: 15px; color: #3a3230; line-height: 1.8; margin-bottom: 14px; }
.pj2__sub { margin-top: 20px; }
.pj2__sub h4 { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink); margin-bottom: 5px; }
.pj2__sub p { font-size: 13px; color: var(--muted); line-height: 1.7; margin-bottom: 14px; }
.pj2__media img { width: 100%; border-radius: 6px; margin-bottom: 18px; display: block; }
@media (max-width: 900px) { .pj2 { grid-template-columns: 1fr; gap: 24px; padding-top: 22px; } .pj2__info { position: static; } }

/* ── Mobile refinements ── */
@media (max-width: 600px) {
  .hero { aspect-ratio: 4 / 3; height: auto; min-height: 0; }
  .hero__cap { bottom: 34px; }
  .sec { padding: 58px 0; }
  .pj-hero { aspect-ratio: 4/3; max-height: none; }
  .hdr__in { height: 62px; }
  .hdr nav { top: 62px; }
  .hero__dots { bottom: 36px; right: 18px; }
  .hero__name { font-size: 26px; }
}

/* ── Projects map (/projects) ── */
.pm-head { padding: 88px 0 18px; }
.pm-head .wrap { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.pm-search { display: flex; align-items: center; gap: 10px; }
.pm-q { border: 1px solid var(--line); border-radius: 6px; padding: 9px 13px; font: inherit; font-size: 14px; min-width: 220px; background: #fff; color: var(--ink); }
.pm-q:focus { outline: none; border-color: var(--red); }
.pm-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.pm-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.pm-chip { font: inherit; font-size: 13px; font-weight: 600; padding: 7px 15px; border-radius: 30px; border: 1px solid var(--line); background: #fff; color: var(--ink); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.pm-chip:hover { border-color: var(--red); color: var(--red); }
.pm-chip.is-on { background: var(--red); border-color: var(--red); color: #fff; }

.pm { display: grid; grid-template-columns: 340px 1fr; height: 78vh; min-height: 520px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.pm.is-listonly { grid-template-columns: 1fr; }
.pm.is-listonly .pm-mapwrap { display: none; }

.pm-side { overflow-y: auto; background: #100c0d; border-right: 1px solid rgba(255,255,255,.08); -webkit-overflow-scrolling: touch; }
.pm-group__h { position: sticky; top: 0; background: #100c0d; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #9a8d8b; padding: 14px 20px 8px; z-index: 1; border-bottom: 1px solid rgba(255,255,255,.07); }
.pm-group.is-hidden { display: none; }
.pm-row { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: center; padding: 11px 20px; cursor: pointer; border-bottom: 1px solid rgba(255,255,255,.06); transition: background .12s; }
.pm-row:hover { background: rgba(255,255,255,.045); }
.pm-row.is-active { background: rgba(164,30,37,.2); box-shadow: inset 3px 0 0 var(--red); }
.pm-row.is-hidden { display: none; }
.pm-row__img { width: 56px; height: 44px; border-radius: 4px; overflow: hidden; background: var(--ink); flex: none; }
.pm-row__img img { width: 100%; height: 100%; object-fit: cover; }
.pm-row__name { font-size: 13.5px; font-weight: 600; line-height: 1.25; color: #f0eae8; }
.pm-row__loc { font-size: 12px; color: #9a8d8b; margin-top: 2px; }
.pm-empty { padding: 30px 20px; color: #9a8d8b; font-size: 14px; }

.pm-mapwrap { position: relative; background: #0d0a0b; height: 78vh; min-height: 520px; }
.pm-map { width: 100%; height: 100%; }
.pm-map .maplibregl-ctrl-group { background: rgba(20,14,15,.9); }
.pm-map .maplibregl-ctrl-group button + button { border-top-color: rgba(255,255,255,.12); }
.pm-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; background: #0d0a0b; transition: opacity .4s; z-index: 2; }
.pm-loading span { color: #9a8d8b; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; }
.pm-loading-tri { filter: drop-shadow(0 0 12px rgba(164,30,37,.55)); animation: pmLoadPulse 1.2s ease-in-out infinite; }
@keyframes pmLoadPulse { 0%, 100% { transform: scale(.88) translateY(0); opacity: .55; } 50% { transform: scale(1.06) translateY(-3px); opacity: 1; } }
.pm-loading.is-hidden { opacity: 0; pointer-events: none; }

/* Pins — glowing dot, coloured by sector via --pin */
.pm-pin { width: 18px; height: 18px; cursor: pointer; background: none; border: 0; padding: 0; --pin: #a41e25; }
.pm-pin.is-hidden { display: none; }
@keyframes pmFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.pm-pin-tri { display: block; width: 17px; height: 17px; background: var(--pin); clip-path: polygon(100% 0, 100% 100%, 0 100%); filter: drop-shadow(0 3px 4px rgba(0,0,0,.8)) drop-shadow(0 0 7px var(--pin)); transform-origin: bottom right; animation: pmFloat 2.6s ease-in-out infinite; }
.pm-pin:hover .pm-pin-tri, .pm-pin.is-active .pm-pin-tri { animation: none; transform: translateY(-3px) scale(1.6); filter: drop-shadow(0 7px 9px rgba(0,0,0,.85)) drop-shadow(0 0 15px var(--pin)); }
@media (prefers-reduced-motion: reduce) { .pm-pin-tri { animation: none; } }

/* Detail card — overlay bottom-right of the map */
.pm-card { position: absolute; right: 16px; bottom: 16px; z-index: 5; width: min(320px, calc(100% - 32px)); background: #14100f; border: 1px solid #2c2422; border-radius: 12px; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,.5); transform: translateY(14px); opacity: 0; transition: opacity .22s, transform .22s; }
.pm-card.is-open { transform: translateY(0); opacity: 1; }
.pm-card-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.pm-card-img { display: block; aspect-ratio: 16/10; background: #0d0a0b; }
.pm-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-card-body { padding: 14px 16px 16px; }
.pm-card-sector { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: #d9594f; }
.pm-card-name { font-size: 17px; font-weight: 700; color: #f5efed; margin: 5px 0 6px; line-height: 1.2; }
.pm-card-meta { font-size: 12.5px; color: #b3a7a4; }
.pm-card-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 12px; font-size: 13px; font-weight: 700; color: #fff; }
.pm-card-link span { color: var(--red); transition: transform .15s; }
.pm-card-link:hover span { transform: translateX(4px); }

.pm-sheet-btn { display: none; }

@media (max-width: 820px) {
  .pm-head { padding: 78px 0 14px; }
  .pm-chips { display: none; }
  .pm-page { display: flex; flex-direction: column; height: 100svh; }
  .pm-page ~ .ftr { display: none; }
  .pm { display: block; flex: 1; min-height: 0; height: auto; }
  .pm-mapwrap { height: 100%; min-height: 0; }
  .pm-side { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; max-height: 82vh; border-right: 0; border-top: 1px solid var(--line); border-radius: 16px 16px 0 0; box-shadow: 0 -14px 36px rgba(0,0,0,.32); transform: translateY(calc(100% - 66px - env(safe-area-inset-bottom, 0px))); transition: transform .32s cubic-bezier(.22,1,.36,1); }
  .pm.sheet-open .pm-side { transform: translateY(0); }
  /* sticky so the handle stays put even when the list scrolls (e.g. selecting a far-down project) */
  .pm-sheet-btn { position: sticky; top: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; height: 66px; padding-bottom: env(safe-area-inset-bottom, 0px); box-sizing: content-box; border: 0; border-bottom: 1px solid rgba(255,255,255,.08); background: #100c0d; font: inherit; font-size: 15.5px; font-weight: 700; letter-spacing: .02em; color: #f0eae8; cursor: pointer; }
  .pm-sheet-btn::before { content: ""; position: absolute; top: 10px; left: 50%; transform: translateX(-50%); width: 46px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.32); }
  .pm-sheet-chev { transition: transform .25s; }
  .pm.sheet-open .pm-sheet-chev { transform: rotate(180deg); }
  .pm-card { bottom: calc(82px + env(safe-area-inset-bottom, 0px)); }
}

/* ── Scrollbars ── */
.pm-side { scrollbar-width: thin; scrollbar-color: #4a3633 #100c0d; }
.pm-side::-webkit-scrollbar { width: 10px; }
.pm-side::-webkit-scrollbar-track { background: #100c0d; }
.pm-side::-webkit-scrollbar-thumb { background: #3d2d2b; border-radius: 8px; border: 2px solid #100c0d; }
.pm-side::-webkit-scrollbar-thumb:hover { background: #5a3f3c; }
/* page scrollbar — subtle, brand-tinted */
html { scrollbar-width: thin; scrollbar-color: #cdbfbb #f3eeec; }
body::-webkit-scrollbar { width: 12px; }
body::-webkit-scrollbar-track { background: #f3eeec; }
body::-webkit-scrollbar-thumb { background: #c9b9b5; border-radius: 8px; border: 3px solid #f3eeec; }
body::-webkit-scrollbar-thumb:hover { background: var(--red); }
