/* ==========================================================================
   Photo galleries: viewer (hero, toolbar, layouts, lightbox, share)
   Photos are never framed: no borders, mattes or padding around images.
   ========================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Save-image deterrents: no drag, no iOS long-press callout, no selection. */
.gx img, .gx-lb img, .gx-card img { -webkit-user-drag: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.gx-img, .gx-lb-img, .gx-ss-img { pointer-events: none; }

/* ---------- Hero (cover) ---------- */
.gx-hero { position: relative; min-height: min(78vh, 720px); display: flex; align-items: flex-end; color: #F6F2E8; background: #0B0B0B; overflow: hidden; isolation: isolate; }
.gx-hero--empty { min-height: 420px; background: radial-gradient(120% 90% at 20% 0%, #2A2415 0%, #0B0B0B 60%); }
.gx-hero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.04); animation: gx-hero-in 1.6s var(--ease) both; }
@keyframes gx-hero-in { from { transform: scale(1.12); opacity: 0; } to { transform: scale(1.04); opacity: 1; } }
.gx-hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(0,0,0,.25) 0%, rgba(0,0,0,.05) 35%, rgba(0,0,0,.72) 100%); }
.gx-hero-inner { padding-top: 96px; padding-bottom: clamp(36px, 6vw, 72px); }
.gx-back { display: inline-flex; align-items: center; gap: .45rem; font-size: .88rem; color: rgba(246,242,232,.8); margin-bottom: 1.2rem; }
.gx-back .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.gx-back:hover { color: #fff; }
.gx-status-note { display: inline-flex; align-items: center; gap: .5rem; font-size: .82rem; padding: .35rem .8rem; border-radius: 999px; background: rgba(0,0,0,.45); backdrop-filter: blur(8px); margin: 0 0 1rem; }
.gx-hero-meta { margin: 0 0 .7rem; }
.gx-title { font-size: clamp(2.4rem, 7vw, 5.6rem); color: #fff; max-width: 16ch; text-wrap: balance; }
.gx-desc { max-width: 60ch; margin: 1rem 0 0; color: rgba(246,242,232,.85); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.gx-desc:empty { display: none; }
.gx-hero-actions { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.8rem; }

/* ---------- Toolbar (sticky) ---------- */
.gx-bar { position: sticky; top: var(--header-h); z-index: 40; background: var(--header-bg); backdrop-filter: saturate(1.4) blur(16px); -webkit-backdrop-filter: saturate(1.4) blur(16px); border-bottom: 1px solid var(--line); scroll-margin-top: var(--header-h); }
.gx-bar-inner { display: flex; align-items: center; gap: 12px; min-height: 60px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.gx-bar-title { font-family: var(--font-display); font-weight: 750; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 26ch; margin-right: auto; }
.gx-modes { display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); }
.gx-mode { display: inline-flex; align-items: center; gap: .4rem; height: 34px; padding: 0 .8rem; border-radius: 999px; font-size: .82rem; font-weight: 600; color: var(--muted); transition: background .25s var(--ease), color .25s; }
.gx-mode .icon { width: 17px; height: 17px; }
.gx-mode:hover { color: var(--text); }
.gx-mode[aria-selected="true"] { background: var(--text); color: var(--bg); }
.gx-tools { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gx-range { display: inline-flex; align-items: center; gap: .4rem; color: var(--muted); }
.gx-range .icon { width: 16px; height: 16px; }
.gx-range input { width: 86px; accent-color: var(--gold-deep); }
.gx-chip { display: inline-flex; align-items: center; gap: .4rem; height: 34px; padding: 0 .8rem; border-radius: 999px; border: 1px solid var(--line-strong); font-size: .82rem; font-weight: 600; transition: all .25s var(--ease); }
.gx-chip .icon { width: 16px; height: 16px; }
.gx-chip:hover { border-color: var(--text); }
.gx-chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }

/* ---------- Photos ---------- */
.gx-body { padding: clamp(16px, 3vw, 32px) var(--gutter) clamp(40px, 6vw, 80px); max-width: 1800px; margin: 0 auto; }
.gx-photos { --size: 300px; --gap: 10px; position: relative; }
.gx-item { position: relative; margin: 0; overflow: hidden; background: var(--surface-2); border-radius: 6px; container-type: inline-size; }
.gx-item--static { display: inline-block; width: 240px; margin: 4px; }
.gx-link { display: block; position: relative; height: 100%; cursor: zoom-in; -webkit-touch-callout: none; }
.gx-img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease), opacity .5s; opacity: 0; }
.gx-img.is-loaded, .gx-item--static .gx-img { opacity: 1; }
.gx-item:hover .gx-img { transform: scale(1.03); }
.gx-item.is-hidden { display: none; }
.gx-item:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }

/* hover overlay: title + actions */
.gx-over { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; pointer-events: none; opacity: 0; transition: opacity .3s var(--ease); background: linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,0) 60%, rgba(0,0,0,.55) 100%); }
.gx-item:hover .gx-over, .gx-item:focus-within .gx-over, .gx-item.is-fav .gx-over { opacity: 1; }
.gx-item.is-fav:not(:hover) .gx-over { background: none; }
.gx-item.is-fav:not(:hover) .gx-cap, .gx-item.is-fav:not(:hover) .gx-act:not(.gx-act--fav) { opacity: 0; }
.gx-acts { display: flex; justify-content: flex-end; gap: 6px; }
.gx-act { pointer-events: auto; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.92); color: #0B0B0B; box-shadow: 0 4px 14px -4px rgba(0,0,0,.4); transition: transform .25s var(--ease-spring), background .2s, opacity .2s; }
.gx-act .icon { width: 16px; height: 16px; }
.gx-act:hover { transform: scale(1.08); }
.gx-act--fav.is-on { background: var(--red); color: #fff; }
.gx-act--fav.is-on .icon { fill: currentColor; }
.gx-cap { color: #fff; font-size: .86rem; font-weight: 600; text-shadow: 0 1px 8px rgba(0,0,0,.5); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: opacity .2s; }
.gx-photos.no-titles .gx-cap { display: none; }
@media (hover: none) { .gx-over { opacity: 1; background: none; } .gx-cap { display: none; } .gx-act { width: 30px; height: 30px; } }

/* watermark overlay (linked photos only; uploads have it baked in) */
.gx-wm { position: absolute; z-index: 2; pointer-events: none; height: auto; width: calc(var(--s) * 1cqw); opacity: var(--o); }
.gx-wm--top-left { top: calc(var(--m) * 1cqw); left: calc(var(--m) * 1cqw); }
.gx-wm--top-right { top: calc(var(--m) * 1cqw); right: calc(var(--m) * 1cqw); }
.gx-wm--bottom-left { bottom: calc(var(--m) * 1cqw); left: calc(var(--m) * 1cqw); }
.gx-wm--bottom-right { bottom: calc(var(--m) * 1cqw); right: calc(var(--m) * 1cqw); }
.gx-wm--center { top: 50%; left: 50%; transform: translate(-50%, -50%); }

/* layouts */
.gx-photos[data-layout="grid"] { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(var(--size), 100%), 1fr)); gap: var(--gap); }
.gx-photos[data-layout="grid"] .gx-item { aspect-ratio: 1; }
.gx-photos[data-layout="masonry"] { display: flex; gap: var(--gap); align-items: flex-start; }
.gx-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: var(--gap); }
.gx-photos[data-layout="masonry"] .gx-item { aspect-ratio: var(--ar, 1.5); }
.gx-photos[data-layout="justified"] { display: flex; flex-direction: column; gap: var(--gap); }
.gx-row { display: flex; gap: var(--gap); }
.gx-photos[data-layout="justified"] .gx-item { flex: none; }
/* Filmstrip: the full-height horizontal strip (markup and engine shared with /gallery, see gallery-strip.css/js) */
.gx-photos[data-layout="strip"] { display: block; }
.gx-photos[data-layout="strip"] .gx-item--static { display: none; }

/* inline slideshow */
.gx-ss { display: grid; gap: 12px; }
.gx-ss-stage { position: relative; height: min(76vh, 820px); background: #0B0B0B; border-radius: 8px; overflow: hidden; display: grid; place-items: center; }
.gx-ss-frame { position: relative; container-type: inline-size; }
.gx-ss-img { display: block; width: 100%; height: 100%; object-fit: contain; animation: gx-fade .6s var(--ease) both; }
@keyframes gx-fade { from { opacity: 0; } to { opacity: 1; } }
.gx-ss-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(8px); transition: background .2s; z-index: 3; }
.gx-ss-nav:hover { background: rgba(255,255,255,.25); }
.gx-ss-nav--prev { left: 14px; } .gx-ss-nav--next { right: 14px; }
.gx-ss-nav--prev .icon { transform: rotate(180deg); }
.gx-ss-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; display: flex; align-items: center; gap: 12px; padding: 14px 18px; color: #fff; background: linear-gradient(0deg, rgba(0,0,0,.6), transparent); }
.gx-ss-bar strong { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-ss-bar button { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); }
.gx-ss-bar .gx-ss-count { font-family: var(--font-mono); font-size: .78rem; opacity: .8; }
.gx-ss-progress { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--gold); z-index: 4; width: 0; }
.gx-ss-progress.is-running { animation: gx-progress var(--dur, 5s) linear forwards; }
@keyframes gx-progress { to { width: 100%; } }
.gx-thumbs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.gx-thumbs::-webkit-scrollbar { display: none; }
.gx-thumb { flex: none; width: 76px; height: 56px; border-radius: 4px; overflow: hidden; opacity: .5; transition: opacity .25s, transform .25s var(--ease); position: relative; }
.gx-thumb img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.gx-thumb:hover { opacity: .85; }
.gx-thumb.is-active { opacity: 1; box-shadow: 0 0 0 2px var(--gold); }

.gx-empty { display: grid; justify-items: center; text-align: center; gap: .5rem; padding: clamp(40px, 8vw, 90px) 20px; border: 1.5px dashed var(--line-strong); border-radius: var(--radius-lg); }
.gx-empty-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent-text); margin-bottom: .5rem; }

/* ---------- Credit footer (every gallery) ---------- */
.gx-credit { display: flex; justify-content: center; align-items: center; gap: .35rem; padding: 28px 0 36px; margin-top: 12px; border-top: 1px solid var(--line); font-size: .82rem; color: var(--muted); letter-spacing: .02em; }
.gx-credit a { font-weight: 700; color: var(--text); }
.gx-credit a:hover { color: var(--accent-text); }

/* ---------- Lightbox / fullscreen (dark, edge-to-edge photos) ---------- */
.gx-lb { position: fixed; inset: 0; z-index: 300; background: #070707; color: #F6F2E8; display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: 1fr auto; opacity: 0; transition: opacity .35s var(--ease); }
.gx-lb.is-open { opacity: 1; }
.gx-lb[hidden] { display: none; }
.gx-lb-top { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 10px 14px; min-height: 58px; transition: opacity .4s; }
.gx-lb-count { font-family: var(--font-mono); font-size: .78rem; color: #A8A295; min-width: 64px; }
.gx-lb-title { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gx-lb-btn { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #F6F2E8; transition: background .2s; position: relative; }
.gx-lb-btn .icon { width: 19px; height: 19px; }
.gx-lb-btn:hover, .gx-lb-btn[aria-pressed="true"] { background: rgba(255,255,255,.12); }
.gx-lb-btn--fav.is-on { color: #FF5A6E; }
.gx-lb-btn--fav.is-on .icon { fill: currentColor; }
.gx-lb-sep { width: 1px; height: 22px; background: rgba(255,255,255,.14); }
.gx-lb-stage { position: relative; overflow: hidden; display: grid; place-items: center; touch-action: pan-y pinch-zoom; }
.gx-lb-frame { position: relative; container-type: inline-size; transition: transform .45s var(--ease); cursor: zoom-in; }
.gx-lb-frame.is-zoomed { cursor: zoom-out; }
.gx-lb-img { display: block; width: 100%; height: 100%; object-fit: contain; animation: gx-fade .45s var(--ease) both; }
.gx-lb-shield { position: absolute; inset: 0; z-index: 3; }
.gx-lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 4; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(255,255,255,.08); transition: background .2s, opacity .3s; }
.gx-lb-nav:hover { background: rgba(255,255,255,.2); }
.gx-lb-nav--prev { left: 16px; } .gx-lb-nav--next { right: 16px; }
.gx-lb-nav--prev .icon { transform: rotate(180deg); }
.gx-lb-nav[disabled] { opacity: 0; pointer-events: none; }
.gx-lb-bottom { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; padding: 8px 14px 12px; min-width: 0; transition: opacity .4s; }
.gx-lb-bottom .gx-thumbs { flex: 1; }
.gx-lb-bottom .gx-thumb { width: 64px; height: 46px; }
.gx-lb-credit { flex: none; font-size: .72rem; color: #8C877C; white-space: nowrap; }
.gx-lb-credit a { color: #F6F2E8; font-weight: 700; }
.gx-lb-progress { position: absolute; top: 0; left: 0; height: 2px; background: var(--gold); width: 0; z-index: 5; }
.gx-lb-progress.is-running { animation: gx-progress var(--dur, 5s) linear forwards; }
.gx-lb.is-idle .gx-lb-top, .gx-lb.is-idle .gx-lb-bottom, .gx-lb.is-idle .gx-lb-nav { opacity: 0; }
.gx-lb.is-idle { cursor: none; }

/* info panel */
.gx-lb-info { grid-row: 2; grid-column: 2; width: 0; overflow: hidden; transition: width .4s var(--ease); background: #111110; }
.gx-lb.show-info .gx-lb-info { width: min(340px, 86vw); }
.gx-lb-info-in { width: min(340px, 86vw); padding: 22px; display: grid; gap: 14px; align-content: start; height: 100%; overflow-y: auto; }
.gx-lb-info h2 { font-family: var(--font-display); font-size: 1.35rem; letter-spacing: -.02em; margin: 0; line-height: 1.15; }
.gx-lb-info p { margin: 0; color: #CFC9BC; font-size: .92rem; }
.gx-lb-info .gx-lb-meta { font-family: var(--font-mono); font-size: .72rem; color: #8C877C; letter-spacing: .04em; }
.gx-exif { display: flex; flex-wrap: wrap; gap: 6px; }
.gx-exif span, .gx-tag { font-size: .76rem; padding: .3rem .6rem; border-radius: 999px; background: rgba(255,255,255,.08); color: #E8E2D4; }
.gx-lb-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.gx-lb-actions .btn { --bh: 38px; }

/* ---------- Share popover ---------- */
.gx-share { position: fixed; z-index: 320; width: 300px; max-width: calc(100vw - 24px); padding: 16px; border-radius: 18px; background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); border: 1px solid var(--line); animation: gx-pop .3s var(--ease-spring) both; }
@keyframes gx-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } }
.gx-share h3 { margin: 0 0 12px; font-size: .95rem; text-align: center; }
.gx-share-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 4px; }
.gx-share-grid a, .gx-share-grid button { display: grid; justify-items: center; gap: 6px; font-size: .7rem; color: var(--muted); }
.gx-share-grid i { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-style: normal; font-weight: 800; font-size: .95rem; transition: transform .25s var(--ease-spring); }
.gx-share-grid a:hover i, .gx-share-grid button:hover i { transform: scale(1.08); }
.gx-share-grid svg { width: 20px; height: 20px; }
.gx-share-url { display: flex; gap: 6px; margin-top: 14px; }
.gx-share-url input { flex: 1; min-width: 0; height: 38px; padding: 0 .7rem; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--bg-alt); font-size: .8rem; }
.gx-share-url button { height: 38px; padding: 0 .9rem; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; font-size: .82rem; }
.gx-lb .gx-share, .gx-share.is-dark { background: #1A1916; color: #F6F2E8; border-color: rgba(255,255,255,.1); }
.gx-lb ~ .gx-share.is-dark .gx-share-url input, .gx-share.is-dark .gx-share-url input { background: #0F0F0E; border-color: rgba(255,255,255,.15); color: #F6F2E8; }
.gx-share.is-dark .gx-share-url button { background: var(--gold); color: #111; }

/* ---------- Index cards ---------- */
.gx-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: clamp(16px, 2.4vw, 28px); margin-bottom: 20px; }
.gx-cards--drafts { margin: 12px 0 48px; }
.gx-card { display: grid; gap: 12px; }
.gx-card-media { position: relative; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: var(--surface-2); display: grid; place-items: center; }
.gx-card-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.gx-card:hover .gx-card-media img { transform: scale(1.05); }
.gx-card-mark { font-size: 4rem; color: var(--accent-text); }
.gx-card-count { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .65rem; border-radius: 999px; background: rgba(0,0,0,.6); color: #fff; font-size: .76rem; font-weight: 600; backdrop-filter: blur(6px); }
.gx-card-count .icon { width: 14px; height: 14px; }
.gx-card-body { display: grid; gap: 2px; }
.gx-card-title { font-family: var(--font-display); font-size: 1.2rem; letter-spacing: -.02em; }

@media (max-width: 860px) {
  .gx-mode span, .gx-chip[data-gx-fullscreen] span { display: none; }
  .gx-mode { padding: 0 .65rem; }
  .gx-bar-title { display: none; }
  .gx-bar-inner { justify-content: space-between; }
  .gx-range input { width: 64px; }
  .gx-lb-nav { width: 42px; height: 42px; }
  .gx-lb-nav--prev { left: 6px; } .gx-lb-nav--next { right: 6px; }
  .gx-lb-credit { display: none; }
  .gx-lb.show-info .gx-lb-info { position: absolute; right: 0; top: 58px; bottom: 0; z-index: 6; }
}
@media (max-width: 520px) {
  .gx-range:nth-of-type(2) { display: none; }
  .gx-lb-btn { width: 36px; height: 36px; }
  .gx-lb-sep { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gx-hero-img, .gx-lb-img, .gx-ss-img { animation: none; }
  .gx-img, .gx-lb-frame { transition: none; }
}


/* ==========================================================================
   Client gallery: full-screen cover, access form, floating view switcher
   ========================================================================== */
/* The header keeps its full height on these pages, so the cover and strip fill exactly the rest of the screen. */
.page-cgx .site-header.is-scrolled { --header-h: 72px; }
.page-cgx .scroll-progress { display: none; }

/* ---------- Cover ---------- */
.cg-cover { position: relative; height: calc(100vh - var(--header-h)); height: calc(100svh - var(--header-h)); min-height: 460px; display: grid; place-items: center; overflow: hidden; isolation: isolate; text-align: center; color: #F6F2E8; background: #0B0B0B; }
.cg-cover--empty { background: radial-gradient(120% 90% at 20% 0%, #2A2415 0%, #0B0B0B 60%); }
.cg-cover-media { position: absolute; inset: -4%; z-index: -2; transform: scale(1.08); will-change: transform; }
.cg-cover-img { width: 100%; height: 100%; object-fit: cover; display: block; animation: cg-cover-in 2.2s var(--ease) both; }
@keyframes cg-cover-in { from { opacity: 0; transform: scale(1.12); filter: blur(8px); } }
.cg-cover-shade { position: absolute; inset: 0; z-index: -1; background: radial-gradient(90% 70% at 50% 55%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.55) 100%), linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,0) 30%, rgba(0,0,0,.55) 100%); }
.cg-cover-inner { width: min(100% - 2 * var(--gutter), 980px); display: grid; justify-items: center; will-change: transform, opacity; }
.cg-back { position: absolute; top: 20px; left: var(--gutter); z-index: 2; display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem .45rem .7rem; border-radius: 999px; font-size: .85rem; color: rgba(246,242,232,.9); background: rgba(0,0,0,.28); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); transition: background .25s, gap .3s var(--ease); }
.cg-back .icon { width: 16px; height: 16px; transform: rotate(180deg); }
.cg-back:hover { background: rgba(0,0,0,.5); gap: .7rem; color: #fff; }
.cg-meta { margin: 0 0 1.1rem; padding: .4rem .95rem; border-radius: 999px; background: rgba(0,0,0,.38); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.cg-title { font-size: clamp(2.6rem, 8vw, 6.4rem); color: #fff; line-height: .98; max-width: 16ch; text-wrap: balance; margin: 0; text-shadow: 0 10px 40px rgba(0,0,0,.25); }
.cg-word { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .06em; }
.cg-word > span { display: inline-block; transform: translateY(105%); transition: transform 1.1s var(--ease) calc(var(--w) * 80ms + 200ms); }
.cg-cover.is-in .cg-word > span { transform: none; }
.cg-desc { max-width: 58ch; margin: 1.1rem 0 0; color: rgba(246,242,232,.86); font-size: clamp(1rem, 1.4vw, 1.15rem); }
.cg-desc:empty { display: none; }
.cg-meta, .cg-desc, .cg-actions, .cg-cover .gx-status-note { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.cg-cover.is-in .cg-meta { opacity: 1; transform: none; transition-delay: .15s; }
.cg-cover.is-in .cg-desc { opacity: 1; transform: none; transition-delay: .55s; }
.cg-cover.is-in .cg-actions, .cg-cover.is-in .gx-status-note { opacity: 1; transform: none; transition-delay: .7s; }
.cg-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .8rem; margin-top: 2rem; }
.cg-open { box-shadow: 0 18px 40px -18px rgba(212,175,55,.7); }
.cg-open-arrow { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: -.5rem; border-radius: 50%; background: rgba(0,0,0,.12); transition: transform .35s var(--ease-spring); }
.cg-open-arrow .icon { width: 15px; height: 15px; transform: rotate(90deg); }
.cg-open:hover .cg-open-arrow { transform: translateY(3px); }
body:not(.has-access) .cg-open-arrow .icon { transform: none; }
body:not(.has-access) .cg-open:hover .cg-open-arrow { transform: translateX(4px); }
.cg-scroll { position: absolute; left: 50%; bottom: 26px; width: 30px; height: 48px; margin-left: -15px; border-radius: 16px; border: 2px solid rgba(255,255,255,.55); opacity: 0; transition: opacity 1s 1.2s, border-color .2s; }
.cg-cover.is-in .cg-scroll { opacity: 1; }
.cg-scroll:hover { border-color: #fff; }
.cg-scroll span { position: absolute; left: 50%; top: 9px; width: 4px; height: 9px; margin-left: -2px; border-radius: 2px; background: #fff; animation: cg-wheel 1.8s var(--ease) infinite; }
@keyframes cg-wheel { 0% { opacity: 0; transform: translateY(-4px); } 30% { opacity: 1; } 80%, 100% { opacity: 0; transform: translateY(14px); } }

/* ---------- Access form ---------- */
html.cg-gate-open { overflow: hidden; }
.cg-gate { border: 0; padding: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; display: grid; place-items: center; overflow: auto; }
.cg-gate:not([open]) { display: none; }
.cg-gate::backdrop { background: rgba(8,8,8,.55); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); animation: cg-fade .35s var(--ease) backwards; }
.cg-gate.is-closing::backdrop { opacity: 0; transition: opacity .22s; }
@keyframes cg-fade { from { opacity: 0; } }
.cg-gate-card { position: relative; width: min(440px, calc(100% - 32px)); margin: 72px auto 32px; padding: 46px 30px 24px; border-radius: 24px; background: var(--surface); color: var(--text); box-shadow: 0 40px 90px -30px rgba(0,0,0,.55), 0 10px 30px -14px rgba(0,0,0,.3); display: grid; gap: 12px; text-align: left; animation: cg-pop .5s var(--ease-spring) backwards; }
.cg-gate.is-closing .cg-gate-card { opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .2s, transform .22s var(--ease); }
@keyframes cg-pop { from { opacity: 0; transform: translateY(24px) scale(.95); } }
.cg-gate-x { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background .2s, color .2s, transform .3s var(--ease-spring); }
.cg-gate-x:hover { background: var(--surface-2); color: var(--text); transform: rotate(90deg); }
.cg-gate-x .icon { width: 18px; height: 18px; }
.cg-gate-thumb { position: absolute; top: -34px; left: 30px; width: 68px; height: 68px; border-radius: 18px; overflow: hidden; border: 4px solid var(--surface); box-shadow: 0 12px 26px -12px rgba(0,0,0,.5); transform: rotate(-4deg); animation: cg-thumb .7s .15s var(--ease-spring) backwards; }
@keyframes cg-thumb { from { opacity: 0; transform: translateY(14px) rotate(-12deg) scale(.8); } }
.cg-gate-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cg-gate-eyebrow { display: inline-flex; align-items: center; gap: .4rem; margin: 0; }
.cg-gate-eyebrow .icon { width: 14px; height: 14px; }
.cg-gate-card h2 { margin: 0; line-height: 1.15; }
.cg-gate-lead { margin: 0 0 6px; font-size: .95rem; }
.cg-field { position: relative; display: block; }
.cg-field input { width: 100%; height: 58px; padding: 22px 16px 6px; border-radius: 14px; border: 1.5px solid var(--line-strong); background: var(--bg); color: var(--text); font: inherit; font-size: 1rem; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.cg-field span { position: absolute; left: 17px; top: 18px; color: var(--muted); font-size: 1rem; pointer-events: none; transform-origin: left top; transition: transform .22s var(--ease), color .2s; }
.cg-field input:focus + span, .cg-field input:not(:placeholder-shown) + span { transform: translateY(-10px) scale(.76); }
.cg-field input:focus { border-color: var(--gold); box-shadow: 0 0 0 4px var(--spot); }
.cg-field input:focus + span { color: var(--accent-text); }
.cg-field::after { content: ""; position: absolute; right: 16px; top: 20px; width: 18px; height: 18px; border-radius: 50%; background: #2E9E5B url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat; transform: scale(0); transition: transform .35s var(--ease-spring); }
.cg-field.is-valid::after { transform: scale(1); }
.cg-field.is-invalid input { border-color: var(--red); }
.cg-field.is-invalid input:focus { box-shadow: 0 0 0 4px rgba(215,38,61,.15); }
.cg-field em { display: block; min-height: 0; font-style: normal; font-size: .8rem; color: var(--red); padding: 0 4px; max-height: 0; overflow: hidden; transition: max-height .25s var(--ease), padding .25s; }
.cg-field.is-invalid em:not(:empty) { max-height: 40px; padding: 6px 4px 0; }
.cg-gate-submit { position: relative; width: 100%; margin-top: 6px; overflow: hidden; transition: background .3s, transform .2s; }
.cg-gate-submit:active { transform: scale(.98); }
.cg-spinner, .cg-check { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .2s; }
.cg-check { place-items: center start; padding-left: 22px; }
.cg-spinner::before { content: ""; width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.35); border-top-color: #fff; animation: cg-spin .7s linear infinite; }
@keyframes cg-spin { to { transform: rotate(360deg); } }
.cg-check svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; }
.cg-submit-label { transition: opacity .2s, transform .3s var(--ease); }
.is-busy .cg-submit-label { opacity: 0; }
.is-busy .cg-spinner { opacity: 1; }
.is-done .cg-gate-submit { background: #2E9E5B; border-color: #2E9E5B; color: #fff; }
.is-done .cg-check { opacity: 1; }
.is-done .cg-check svg { animation: cg-draw .5s .05s var(--ease) forwards; }
.is-done .cg-submit-label { transform: translateX(14px); }
@keyframes cg-draw { to { stroke-dashoffset: 0; } }
.cg-gate-note { font-size: .78rem; margin: 2px 0 0; text-align: center; }
.cg-gate-note [data-cg-status]:not(:empty) { display: block; margin-top: 6px; font-weight: 600; color: var(--text); }

/* ---------- Photos section + floating view switcher ---------- */
.cg-gallery { position: relative; scroll-margin-top: var(--header-h); }
.gx--client.is-strip .gx-body { padding: 0; max-width: none; }
.gx--client.is-strip .gx-credit { border-top: 0; }
.gx--client:not(.is-strip) .gx-body { padding-top: 76px; }
.cg-views-dock { position: sticky; top: calc(var(--header-h) + 14px); z-index: 30; height: 0; display: flex; justify-content: center; pointer-events: none; }
.cg-views { pointer-events: none; display: flex; align-items: center; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(246,242,232,.9); color: #5B574F; border: 1px solid rgba(11,11,11,.08); box-shadow: 0 18px 40px -20px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.06); backdrop-filter: blur(16px) saturate(1.4); -webkit-backdrop-filter: blur(16px) saturate(1.4); opacity: 0; transform: translateY(-14px) scale(.96); transition: opacity .35s var(--ease), transform .45s var(--ease); max-width: calc(100vw - 24px); overflow-x: auto; scrollbar-width: none; }
.cg-views::-webkit-scrollbar { display: none; }
.cg-views.is-on, .cg-views:focus-within { opacity: 1; transform: none; pointer-events: auto; }
[data-theme="dark"] .cg-views { background: rgba(28,27,24,.88); color: #A8A295; border-color: rgba(255,255,255,.08); }
.cg-modes { position: relative; display: flex; gap: 2px; }
.cg-mode { position: relative; z-index: 1; display: inline-flex; align-items: center; gap: .45rem; height: 40px; padding: 0 1rem; border-radius: 999px; font-size: .9rem; font-weight: 600; color: inherit; white-space: nowrap; transition: color .25s; }
.cg-mode .icon { width: 18px; height: 18px; transition: transform .35s var(--ease-spring); }
.cg-mode:hover { color: var(--text); }
.cg-mode:hover .icon { transform: scale(1.12); }
.cg-mode[aria-selected="true"] { color: #0B0B0B; }
[data-theme="dark"] .cg-mode[aria-selected="true"] { color: #F6F2E8; }
.cg-mode-ink { position: absolute; z-index: 0; top: 0; bottom: 0; left: 0; width: var(--w, 0); transform: translateX(var(--x, 0)); border-radius: 999px; background: #fff; box-shadow: 0 2px 10px -2px rgba(0,0,0,.15); opacity: 0; transition: transform .45s var(--ease), width .45s var(--ease), opacity .2s; }
.cg-mode-ink.is-ready { opacity: 1; }
[data-theme="dark"] .cg-mode-ink { background: #34322B; }
.cg-size { display: none; align-items: center; gap: .35rem; padding: 0 .4rem 0 .6rem; }
.cg-views[data-layout="masonry"] .cg-size, .cg-views[data-layout="grid"] .cg-size, .cg-views[data-layout="justified"] .cg-size { display: inline-flex; animation: cg-fade .3s var(--ease); }
.cg-size .icon { width: 15px; height: 15px; }
.cg-size input { width: 84px; accent-color: var(--gold-deep); }
.cg-sep { width: 1px; height: 22px; background: currentColor; opacity: .2; margin: 0 2px; flex: none; }
.cg-tool { display: inline-flex; align-items: center; gap: .3rem; height: 40px; min-width: 40px; padding: 0 .65rem; border-radius: 999px; color: inherit; font: 600 .85rem/1 var(--font-body); transition: background .2s, color .2s; }
.cg-tool:hover { background: rgba(11,11,11,.06); color: var(--text); }
.cg-tool .icon { width: 18px; height: 18px; }
.cg-tool[aria-pressed="true"] { color: var(--red); }
.cg-tool[data-gx-favs] span:empty, .cg-tool[data-gx-favs] span:not(:empty) { font-family: var(--font-mono); font-size: .78rem; }

/* Strip tiles in client galleries: favorite + title on hover */
.hs--client .hs-link { position: relative; container-type: inline-size; }
.gx-sfav { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transform: scale(.8); transition: opacity .25s, transform .3s var(--ease-spring), background .2s, color .2s; }
.gx-sfav .icon { width: 19px; height: 19px; }
.gx-sitem:hover .gx-sfav, .gx-sfav:focus-visible, .gx-sfav.is-on { opacity: 1; transform: none; }
.gx-sfav.is-on { color: #fff; background: var(--red); }
.gx-sfav.is-on .icon { fill: currentColor; }
.gx-scap { position: absolute; left: 0; right: 0; bottom: 0; z-index: 1; padding: 40px 18px 16px; color: #fff; font-weight: 600; font-size: .92rem; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .4s var(--ease); pointer-events: none; }
.gx-sitem:hover .gx-scap { opacity: 1; transform: none; }
@media (hover: none) { .gx-sfav { opacity: .9; transform: none; } }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .38s; }

@media (max-width: 720px) {
  .cg-mode span { display: none; }
  .cg-mode { padding: 0 .8rem; }
  .cg-size input { width: 64px; }
  .cg-back { top: 12px; }
  .cg-gate-card { padding: 44px 20px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .cg-cover-img, .cg-gate-card, .cg-gate-thumb, .cg-scroll span { animation: none; }
  .cg-word > span, .cg-meta, .cg-desc, .cg-actions, .cg-cover .gx-status-note { transform: none; opacity: 1; transition: none; }
}
