/* Phase 1: scoped gallery and shared chrome. Original content styles stay in styles.css. */
:root { --elcs-navy:var(--color-navy); --elcs-royal:var(--color-royal); --elcs-gold:var(--color-gold); --elcs-ink:var(--color-ink); --elcs-muted:var(--color-muted); }
[hidden] { display:none !important; }
.elcs-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; }
:where(a,button,summary,input,select,textarea):focus-visible { outline:3px solid #bd8c2e; outline-offset:5px; }
.elcs-skip { position:fixed; top:8px; left:16px; z-index:20000; padding:12px 18px; background:white; color:var(--elcs-navy); transform:translateY(-180%); }
.elcs-skip:focus { transform:none; }
.elcs-header.navbar { background:#fff; color:var(--elcs-navy); height:auto; min-height:88px; padding:16px clamp(16px,2.5vw,40px); gap:20px; border-bottom:1px solid #dfe5ed; box-shadow:0 4px 20px #10274808; }
.elcs-header .logo { color:var(--elcs-navy); flex-shrink:1; min-width:0; }
.elcs-header .logo img { width:48px; height:48px; flex:none; }
.elcs-header .logo span { display:block; white-space:normal; font-size:.82rem; line-height:1.4; }
.elcs-header nav { gap:0; }
.elcs-header nav a { color:var(--elcs-navy); font-size:.76rem; padding:10px 8px; }
.elcs-header nav a:hover,.elcs-header nav a.active { color:var(--elcs-royal); background:#f0f4fa; }
.elcs-header nav a.active::after { background:var(--elcs-gold); height:2px; bottom:3px; }
.elcs-header nav .portal-btn { background:var(--elcs-navy) !important; color:#fff !important; font-size:.72rem !important; margin-left:5px; padding:10px 9px; }
.elcs-header nav .portal-btn:hover { background:var(--elcs-royal) !important; }
.elcs-header .menu-toggle { color:var(--elcs-navy); width:44px; height:44px; flex:none; padding:0; align-items:center; justify-content:center; }
.elcs-header .menu-toggle:hover { background:#edf2f9; }
.elcs-footer { background:var(--elcs-navy); }
.elcs-footer .footer-inner { gap:48px; }
.elcs-footer .logo span { display:block; white-space:normal; line-height:1.4; }
.elcs-footer .footer-brand p,.elcs-footer .footer-col p,.elcs-footer .footer-col a,.elcs-footer .footer-bottom p { color:#d6dfeb; }
.elcs-footer .footer-col h2 { font-size:.88rem; color:#e6c889; margin-bottom:18px; }
.elcs-footer .footer-col a { min-height:32px; overflow-wrap:anywhere; }
.elcs-footer .footer-col a:hover { color:#e6c889; }
/* Without JavaScript navigation remains expanded and content stays readable. */
.reveal,.reveal-left,.reveal-right { opacity:1; transform:none; }
@media (max-width:1250px) {
  .elcs-header.navbar { flex-wrap:wrap; min-height:80px; padding:14px 20px; gap:0; }
  .elcs-header .logo { margin-right:auto; max-width:calc(100% - 56px); }
  .elcs-header .logo span { display:block; font-size:.84rem; }
  .elcs-header nav { position:static; display:flex; flex-basis:100%; flex-direction:column; align-items:stretch; width:100%; max-height:none; background:white; border-radius:0; box-shadow:none; padding:14px 0 0; gap:4px; }
  .elcs-header nav a { font-size:.9rem; padding:12px 14px; min-height:44px; }
  .elcs-header nav a.active::after { display:none; }
  .elcs-header nav a.active { border-left:3px solid var(--elcs-gold); }
  .elcs-header nav .portal-btn { margin:4px 0 0; text-align:center; }
  .elcs-header.is-enhanced .menu-toggle { display:flex; }
  .elcs-header.is-enhanced nav { display:none; max-height:calc(100dvh - 95px); overflow-y:auto; }
  .elcs-header.is-enhanced nav.active { display:flex; }
}
@media (max-width:380px) {
  .elcs-header.navbar { padding:12px; }
  .elcs-header .logo { gap:8px; }
  .elcs-header .logo span { font-size:.73rem; }
  .elcs-header .logo img { width:40px; height:40px; }
}
.elcs-gallery-page { background:#fff; color:var(--elcs-ink); overflow-x:visible; }
.elcs-gallery-hero { max-width:1280px; margin:0 auto; padding:80px 32px 58px; display:flex; gap:48px; align-items:end; justify-content:space-between; border-bottom:1px solid #dde4ec; }
.elcs-eyebrow { font-size:.72rem; font-weight:600; letter-spacing:.15em; text-transform:uppercase; color:#7e6028; margin-bottom:14px; }
.elcs-gallery-hero h1 { max-width:850px; color:var(--elcs-navy); font-family:var(--font-display); font-size:clamp(2.4rem,5vw,4.2rem); letter-spacing:-.035em; font-weight:400; line-height:1.15; }
.elcs-gallery-hero > div > p:last-child { max-width:650px; margin-top:22px; color:var(--elcs-muted); font-size:1rem; }
.elcs-hero-note { border-left:2px solid var(--elcs-gold); padding-left:20px; font-size:.85rem; color:var(--elcs-muted); white-space:nowrap; }
.elcs-gallery-wrap { max-width:1280px; margin:0 auto; padding:48px 32px 88px; }
.elcs-album-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:36px; }
.elcs-album-card { display:block; overflow:hidden; background:white; border:1px solid #dce3ec; border-radius:14px; transition:box-shadow .2s,transform .2s; }
.elcs-album-card:hover { box-shadow:0 16px 36px #10274812; transform:translateY(-3px); }
.elcs-album-cover { position:relative; aspect-ratio:16/10; overflow:hidden; background:#f1f4f8; }
.elcs-album-cover > img { width:100%; height:100%; object-fit:cover; }
.elcs-album-number { position:absolute; top:18px; left:18px; background:#fff; color:var(--elcs-navy); border-radius:30px; min-width:36px; padding:6px 10px; text-align:center; font-size:.72rem; font-weight:600; }
.elcs-cover-empty { height:100%; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:24px; color:var(--elcs-navy); background:#f4f6fa; border-bottom:1px solid #e2e7ef; }
.elcs-cover-empty span { color:#80612b; letter-spacing:.22em; font-size:.65rem; margin-bottom:18px; }
.elcs-cover-empty strong { font-size:clamp(1rem,2vw,1.4rem); font-weight:500; }
.elcs-album-body { padding:28px; }
.elcs-album-body h2 { font-family:var(--font-display); font-weight:400; font-size:1.8rem; color:var(--elcs-navy); letter-spacing:-.02em; margin-bottom:12px; }
.elcs-album-body > p:not(.elcs-eyebrow) { color:var(--elcs-muted); font-size:.88rem; }
.elcs-album-link { display:flex; justify-content:space-between; margin-top:28px; padding-top:18px; border-top:1px solid #e3e8ee; color:var(--elcs-royal); font-weight:600; font-size:.8rem; }
.elcs-gallery-toolbar { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:34px; }
.elcs-back,.elcs-text-link { color:var(--elcs-royal); font-weight:600; font-size:.85rem; display:inline-flex; align-items:center; min-height:44px; }
.elcs-photo-count { font-size:.85rem; color:var(--elcs-muted); }
.elcs-photo-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; }
.elcs-photo { min-width:0; margin:0; }
.elcs-photo-link { position:relative; display:block; border-radius:10px; overflow:hidden; background:#edf1f6; aspect-ratio:4/3; }
.elcs-photo-link img { width:100%; height:100%; object-fit:cover; transition:transform .3s; }
.elcs-photo-link:hover img { transform:scale(1.025); }
.elcs-photo-action { position:absolute; bottom:12px; left:12px; padding:7px 10px; border-radius:5px; background:#102748e8; color:white; font-size:.68rem; }
.elcs-photo figcaption { padding:12px 2px 0; font-size:.79rem; color:var(--elcs-muted); }
.elcs-load-more { display:block; margin:34px auto 0; min-height:48px; padding:12px 28px; background:var(--elcs-navy); color:white; border:0; border-radius:6px; font:inherit; cursor:pointer; }
.elcs-pagination-status { text-align:center; font-size:.8rem; margin-top:16px; }
.elcs-empty { text-align:center; padding:80px 24px; border:1px solid #e0e6ef; border-radius:12px; background:#f8fafc; }
.elcs-empty h2 { color:var(--elcs-navy); margin-bottom:18px; }
.elcs-empty > p:not(.elcs-eyebrow) { max-width:490px; margin:0 auto 24px; color:var(--elcs-muted); }
.elcs-legacy { margin-top:54px; padding-top:26px; border-top:1px solid #dce3ec; }
.elcs-legacy summary { cursor:pointer; min-height:44px; color:var(--elcs-navy); font-weight:600; }
.elcs-legacy summary span { font-weight:400; font-size:.82rem; }
.elcs-legacy > p { margin:12px 0 28px; }
.elcs-noscript { max-width:1000px; margin:0 auto 40px; padding:16px; }
.elcs-image-failed img { visibility:hidden; }
.elcs-image-failed::after { content:'Photograph unavailable'; position:absolute; inset:0; display:flex; align-items:center; justify-content:center; color:var(--elcs-muted); background:#edf1f6; font-size:.85rem; }
.elcs-viewer { position:fixed; inset:0; width:100vw; max-width:none; height:100dvh; max-height:none; margin:0; border:0; padding:0; background:#081425; color:white; overflow:auto; }
.elcs-viewer[open] { display:grid; grid-template-rows:auto minmax(0,1fr) auto; }
.elcs-viewer::backdrop { background:#081425; }
.elcs-viewer:fullscreen { width:100%; height:100%; }
.elcs-viewer-top { display:flex; align-items:center; gap:12px; padding:16px 24px; }
.elcs-viewer-top > span { margin-right:auto; font-size:.85rem; }
.elcs-viewer button,.elcs-viewer-top a { display:inline-flex; justify-content:center; align-items:center; min-width:48px; min-height:48px; border:1px solid #ffffff50; border-radius:6px; padding:10px 14px; background:#ffffff0d; color:white; font:inherit; font-size:.85rem; cursor:pointer; }
.elcs-viewer button:disabled { opacity:.4; cursor:default; }
.elcs-viewer button:hover:not(:disabled),.elcs-viewer-top a:hover { background:#ffffff20; }
.elcs-viewer-stage { display:grid; grid-template-columns:56px minmax(0,1fr) 56px; align-items:center; gap:14px; padding:0 24px; min-height:0; }
.elcs-viewer-media { position:relative; height:100%; min-height:140px; display:flex; align-items:center; justify-content:center; touch-action:pan-y pinch-zoom; }
.elcs-viewer-media img { width:100%; height:100%; object-fit:contain; min-height:0; }
.elcs-viewer-media p { position:absolute; padding:20px; text-align:center; color:#e3e9f3; }
.elcs-viewer-bottom { padding:18px 80px 24px; text-align:center; }
.elcs-viewer-bottom p { color:white; font-size:.9rem; }
.elcs-viewer-bottom #viewer-help { color:#c3cedc; font-size:.72rem; margin-top:8px; }
@media (max-width:700px) {
  .elcs-gallery-hero { padding:42px 20px 32px; }
  .elcs-hero-note { display:none; }
  .elcs-gallery-wrap { padding:28px 20px 56px; }
  .elcs-album-grid { grid-template-columns:1fr; gap:24px; }
  .elcs-album-body { padding:22px; }
  .elcs-photo-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px 12px; }
  .elcs-photo-action { font-size:.6rem; bottom:6px; left:6px; padding:6px; }
  .elcs-photo figcaption { font-size:.72rem; }
  .elcs-viewer-top { padding:10px; gap:8px; flex-wrap:wrap; }
  .elcs-viewer-top button,.elcs-viewer-top a { padding:8px 10px; font-size:.74rem; }
  .elcs-viewer-stage { grid-template-columns:1fr 1fr; grid-template-rows:minmax(0,1fr) auto; gap:8px; padding:0 12px; }
  .elcs-viewer-media { grid-column:1 / -1; grid-row:1; }
  #viewer-prev { grid-column:1; grid-row:2; justify-self:start; }
  #viewer-next { grid-column:2; grid-row:2; justify-self:end; }
  .elcs-viewer-bottom { padding:14px 18px 24px; }
  .elcs-empty { padding:48px 20px; }
}
@media (prefers-reduced-motion:reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; scroll-behavior:auto !important; }
}
