/* Glass Gallery — front-end styles. Glass variables (--gg-blur/--gg-sat/--gg-tint) are injected inline from the Customizer. */
:root {
  --gg-blur: 20px; --gg-sat: 1.54; --gg-tint: 0.544;
  --gg-radius: 22px; --gg-radius-sm: 14px;
  --gg-bg: #f5f5f7; --gg-fg: #1d1d1f; --gg-muted: #6e6e73; --gg-accent: #0a66c2;
  --gg-glass-rgb: 255 255 255; --gg-glass-solid: #ffffff;
  --gg-edge: rgb(255 255 255 / .75); --gg-edge-soft: rgb(255 255 255 / .35);
  --gg-shadow: 0 12px 40px rgb(0 0 0 / .10), 0 1px 2px rgb(0 0 0 / .05);
  --gg-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, "Segoe UI", Roboto, Inter, Arial, sans-serif;
  --gg-gutter: clamp(16px, 4vw, 40px); --gg-wide: 1280px; --gg-narrow: 760px;
  --gg-ease: cubic-bezier(.2, .8, .2, 1); --gg-dur: .45s;
}
@media (prefers-color-scheme: dark) {
  :root {
    --gg-bg: #000; --gg-fg: #f5f5f7; --gg-muted: #a1a1a6; --gg-accent: #6cb4ff;
    --gg-glass-rgb: 24 24 27; --gg-glass-solid: #1c1c1e;
    --gg-edge: rgb(255 255 255 / .18); --gg-edge-soft: rgb(255 255 255 / .08);
    --gg-shadow: 0 16px 48px rgb(0 0 0 / .55), 0 1px 2px rgb(0 0 0 / .4);
  }
}
@media (prefers-reduced-motion: reduce) { :root { --gg-dur: 0s; } *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; scroll-behavior: auto !important; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--gg-bg); color: var(--gg-fg); font: 400 1.0625rem/1.55 var(--gg-font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gg-accent); }
:focus-visible { outline: 2px solid var(--gg-accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, h4 { font-weight: 600; line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; }
.gg-title { font-size: clamp(2rem, 5vw, 3.25rem); margin: 0 0 .35em; }
.gg-muted { color: var(--gg-muted); }
.gg-wrap { max-width: var(--gg-narrow); margin-inline: auto; padding-inline: var(--gg-gutter); }
.gg-wrap-wide { max-width: var(--gg-wide); margin-inline: auto; padding-inline: var(--gg-gutter); }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); white-space: nowrap; }
.skip-link:focus { position: fixed; left: 16px; top: 16px; z-index: 1000; width: auto; height: auto; clip: auto; clip-path: none; padding: .6em 1em; background: var(--gg-glass-solid); border-radius: 999px; }

/* ---------- Glass ---------- */
.gg-glass {
  position: relative;
  background: rgb(var(--gg-glass-rgb) / var(--gg-tint));
  -webkit-backdrop-filter: blur(var(--gg-blur)) saturate(var(--gg-sat));
  backdrop-filter: blur(var(--gg-blur)) saturate(var(--gg-sat));
  border-radius: var(--gg-radius);
  box-shadow: inset 0 1px 0 var(--gg-edge), inset 0 0 0 1px var(--gg-edge-soft), var(--gg-shadow);
}
.gg-glass::before { /* specular highlight along the top edge */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgb(255 255 255 / .35), rgb(255 255 255 / 0) 38%);
  mask: linear-gradient(#000, transparent 60%); -webkit-mask: linear-gradient(#000, transparent 60%);
  opacity: .9;
}
@media (prefers-color-scheme: dark) { .gg-glass::before { opacity: .35; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .gg-glass { background: rgb(var(--gg-glass-rgb) / .94); }
  .gg-lb__bd { background: rgb(var(--gg-glass-rgb) / .96) !important; }
}

/* ---------- Floating nav ---------- */
.gg-nav {
  position: fixed; top: max(12px, env(safe-area-inset-top)); left: 50%; transform: translateX(-50%);
  width: min(calc(100% - 2 * max(12px, env(safe-area-inset-left))), var(--gg-wide));
  z-index: 100; display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: .5rem .6rem .5rem 1rem; min-height: 56px;
}
.gg-nav__brand { display: flex; align-items: center; min-width: 0; }
.gg-nav__brand img { height: 32px; width: auto; }
.gg-nav__name { font-weight: 600; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gg-menu { list-style: none; margin: 0; padding: 0; display: flex; gap: .25rem; }
.gg-menu a { display: block; padding: .5rem .85rem; border-radius: 999px; font-size: .95rem; font-weight: 500; transition: background var(--gg-dur) var(--gg-ease); }
.gg-menu a:hover, .gg-menu .current-menu-item > a, .gg-menu .current_page_item > a { background: rgb(var(--gg-glass-rgb) / .55); color: var(--gg-fg); }
.gg-nav__toggle { display: none; appearance: none; border: 0; background: transparent; width: 44px; height: 44px; border-radius: 999px; cursor: pointer; color: inherit; }
.gg-nav__burger { position: relative; display: block; width: 20px; height: 14px; margin: auto; }
.gg-nav__burger i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform var(--gg-dur) var(--gg-ease), top var(--gg-dur) var(--gg-ease); }
.gg-nav__burger i:first-child { top: 0; } .gg-nav__burger i:last-child { top: 12px; }
.gg-nav__toggle[aria-expanded="true"] .gg-nav__burger i:first-child { top: 6px; transform: rotate(45deg); }
.gg-nav__toggle[aria-expanded="true"] .gg-nav__burger i:last-child { top: 6px; transform: rotate(-45deg); }
.gg-nav__panel { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
.gg-nav__panel::before { display: none; }
@media (max-width: 760px) {
  .gg-nav__toggle { display: inline-flex; }
  .gg-nav__panel {
    position: absolute; top: calc(100% + 8px); left: 0; right: 0; padding: .5rem;
    background: rgb(var(--gg-glass-rgb) / var(--gg-tint)); -webkit-backdrop-filter: blur(var(--gg-blur)) saturate(var(--gg-sat)); backdrop-filter: blur(var(--gg-blur)) saturate(var(--gg-sat));
    box-shadow: inset 0 1px 0 var(--gg-edge), inset 0 0 0 1px var(--gg-edge-soft), var(--gg-shadow);
    opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top center; visibility: hidden;
    transition: opacity var(--gg-dur) var(--gg-ease), transform var(--gg-dur) var(--gg-ease), visibility 0s linear var(--gg-dur);
  }
  .gg-nav__panel::before { display: block; }
  .gg-nav.is-open .gg-nav__panel { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
  .gg-menu { flex-direction: column; gap: 0; }
  .gg-menu a { padding: .8rem 1rem; font-size: 1.05rem; }
}

/* ---------- Layout ---------- */
.gg-main { padding-top: calc(56px + max(12px, env(safe-area-inset-top)) + clamp(2rem, 6vw, 5rem)); padding-bottom: clamp(3rem, 8vw, 6rem); min-height: 60vh; }
.gg-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; max-width: var(--gg-wide); margin: 0 auto; padding: 2rem var(--gg-gutter) max(2rem, env(safe-area-inset-bottom)); color: var(--gg-muted); font-size: .875rem; }
.gg-socials { display: flex; gap: .25rem; }
.gg-social { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 999px; color: var(--gg-muted); transition: background var(--gg-dur) var(--gg-ease), color var(--gg-dur) var(--gg-ease); }
.gg-social:hover { background: rgb(var(--gg-glass-rgb) / .6); color: var(--gg-fg); }
.gg-social svg { width: 20px; height: 20px; }
.gg-pill { display: inline-block; padding: .65rem 1.2rem; border-radius: 999px; font-weight: 500; font-size: .95rem; }
.gg-pill:hover { color: var(--gg-fg); }
.gg-more { text-align: center; margin-top: 2.5rem; }

/* ---------- Images & grids ---------- */
.gg-item { margin: 0; position: relative; border-radius: var(--gg-radius-sm); overflow: hidden; background: var(--gg-ph, #8a8a8e); }
.gg-item .gg-img { width: 100%; height: 100%; object-fit: cover; transition: opacity .6s var(--gg-ease); -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.js .gg-item .gg-img[loading="lazy"]:not(.is-loaded) { opacity: 0; }
.gg-thumb { display: block; width: 100%; height: 100%; padding: 0; margin: 0; border: 0; background: transparent; cursor: zoom-in; color: inherit; }
.gg-thumb::after { content: ""; position: absolute; inset: 0; } /* transparent shield */
.gg-thumb:hover .gg-img { transform: scale(1.015); }
.gg-thumb .gg-img { transition: opacity .6s var(--gg-ease), transform .8s var(--gg-ease); }
.gg-grid { display: grid; gap: clamp(10px, 1.6vw, 20px); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gg-cols-1 { grid-template-columns: minmax(0, 1fr); }
.gg-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gg-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1000px) { .gg-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .gg-cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gg-grid, .gg-cols-2, .gg-cols-3, .gg-cols-4 { grid-template-columns: minmax(0, 1fr); } }
.gg-caption { margin: .6rem 0 0; font-size: .8125rem; color: var(--gg-muted); line-height: 1.4; }

/* Single gallery */
.gg-gallery__head { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.gg-body { color: var(--gg-fg); }
.gg-gallery__cover { max-width: var(--gg-wide); margin: 0 auto clamp(1.25rem, 3vw, 2.5rem); padding-inline: var(--gg-gutter); }
.gg-gallery__cover .gg-caption { text-align: center; }
.gg-cover { border-radius: var(--gg-radius); }
.gg-pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: clamp(2rem, 5vw, 4rem); font-size: .9rem; color: var(--gg-muted); }
.gg-pager a:hover { color: var(--gg-fg); }
.gg-pager__all { margin-inline: auto; }

/* Archive cards */
.gg-archive__head { margin-bottom: clamp(1.5rem, 4vw, 3rem); }
.gg-archive-grid { display: grid; gap: clamp(14px, 2vw, 28px); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gg-card { display: block; }
.gg-card__media { aspect-ratio: 4 / 3 !important; border-radius: var(--gg-radius); }
.gg-card__media .gg-img { transition: opacity .6s var(--gg-ease), transform .9s var(--gg-ease); }
.gg-card:hover .gg-card__media .gg-img { transform: scale(1.03); }
.gg-card__empty { background: rgb(var(--gg-glass-rgb) / .5); }
.gg-card__title { font-size: 1.05rem; margin: .8rem 0 .1rem; letter-spacing: -.01em; }
.gg-card__meta { font-size: .8125rem; color: var(--gg-muted); }
.gg-card:hover { color: inherit; }
.gg-archive-grid--quiet .gg-card__title, .gg-archive-grid--quiet .gg-card__meta { display: none; }
.gg-pagination { margin-top: 3rem; text-align: center; }
.gg-pagination .page-numbers { display: inline-block; min-width: 2.4rem; padding: .5rem .6rem; border-radius: 999px; }
.gg-pagination .current { background: rgb(var(--gg-glass-rgb) / .8); box-shadow: inset 0 0 0 1px var(--gg-edge-soft); }

/* Pages & posts: constrained content with wide/full escapes */
.entry-content > *:not(.alignwide):not(.alignfull):not(.gg-hero) { max-width: var(--gg-narrow); margin-inline: auto; padding-inline: var(--gg-gutter); }
.entry-content > .alignwide { max-width: var(--gg-wide); margin-inline: auto; padding-inline: var(--gg-gutter); }
.entry-content > .alignfull, .entry-content > .gg-hero { max-width: none; margin-inline: 0; }
.entry-content > * + * { margin-top: 1.5rem; }
.entry-content .wp-block-group > * { padding-inline: 0; }
.entry-content .wp-block-image img { border-radius: var(--gg-radius-sm); }
.entry-content .wp-block-button__link { border-radius: 999px; padding: .7rem 1.3rem; background: var(--gg-fg); color: var(--gg-bg); }
.entry-content .is-style-outline .wp-block-button__link { background: transparent; color: inherit; border: 1px solid var(--gg-edge-soft); }
.wp-block-button.gg-glass { border-radius: 999px; }
.wp-block-button.gg-glass::before { display: none; }
.gg-meta { margin-top: -.5rem; }
.gg-404 { text-align: center; padding-block: 10vh; }

/* ---------- Blocks ---------- */
.gg-feature { margin-inline: auto; }
.gg-feature--full { max-width: none; }
.gg-feature--full .gg-item { border-radius: 0; }
.gg-feature .gg-caption { text-align: center; }
.gg-photo-pair .gg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 600px) { .gg-photo-pair .gg-grid { grid-template-columns: minmax(0, 1fr); } }
.gg-hero { position: relative; height: var(--gg-hero-h, 80svh); min-height: 320px; overflow: hidden; background: var(--gg-ph, #222); display: grid; place-items: end start; }
.gg-hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; -webkit-user-select: none; user-select: none; }
.gg-hero__card { position: relative; margin: clamp(1rem, 4vw, 3rem); padding: 1.1rem 1.5rem; max-width: min(92%, 640px); }
.gg-hero__title { margin: 0; font-size: clamp(1.75rem, 4.5vw, 3rem); }
.gg-hero__sub { margin: .25rem 0 0; color: var(--gg-muted); font-size: 1rem; }
.gg-page:first-child .gg-hero, .entry-content > .gg-hero:first-child { margin-top: calc(-1 * (56px + max(12px, env(safe-area-inset-top)) + clamp(2rem, 6vw, 5rem))); }

/* ---------- Lightbox ---------- */
.gg-lb { position: fixed; inset: 0; z-index: 1000; display: none; }
.gg-lb.is-active { display: block; }
.gg-lb__bd {
  position: absolute; inset: 0; background: rgb(var(--gg-glass-rgb) / 0);
  -webkit-backdrop-filter: blur(0px) saturate(1); backdrop-filter: blur(0px) saturate(1);
  transition: background .55s var(--gg-ease), -webkit-backdrop-filter .55s var(--gg-ease), backdrop-filter .55s var(--gg-ease);
}
.gg-lb.is-open .gg-lb__bd {
  background: rgb(var(--gg-glass-rgb) / calc(var(--gg-tint) + .2));
  -webkit-backdrop-filter: blur(calc(var(--gg-blur) * 1.6)) saturate(var(--gg-sat)); backdrop-filter: blur(calc(var(--gg-blur) * 1.6)) saturate(var(--gg-sat));
}
.gg-lb__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 56px 16px 72px; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: pan-y; }
.gg-lb__fig { position: relative; margin: 0; max-width: 100%; max-height: 100%; display: grid; place-items: center; transform-origin: top left; will-change: transform, opacity; }
.gg-lb__img { max-width: calc(100vw - 32px); max-height: calc(100svh - 128px); width: auto; height: auto; border-radius: 10px; box-shadow: 0 30px 80px rgb(0 0 0 / .35); pointer-events: none; -webkit-user-select: none; user-select: none; }
.gg-lb__shield { position: absolute; inset: 0; background: transparent; }
.gg-lb__cap { position: absolute; left: 16px; right: 16px; bottom: max(20px, env(safe-area-inset-bottom)); text-align: center; font-size: .8125rem; color: var(--gg-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: 0; transition: opacity .3s var(--gg-ease) .2s; }
.gg-lb.is-open .gg-lb__cap { opacity: 1; }
.gg-lb__btn { position: absolute; z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 999px; display: grid; place-items: center; cursor: pointer; color: var(--gg-fg); opacity: 0; transition: opacity .3s var(--gg-ease) .15s, transform .3s var(--gg-ease); }
.gg-lb.is-open .gg-lb__btn { opacity: 1; }
.gg-lb__btn:hover { transform: scale(1.06); }
.gg-lb__btn svg { width: 18px; height: 18px; }
.gg-lb__close { top: max(14px, env(safe-area-inset-top)); right: 14px; width: 36px; height: 36px; }
.gg-lb__prev { left: 14px; top: 50%; translate: 0 -50%; }
.gg-lb__next { right: 14px; top: 50%; translate: 0 -50%; }
.gg-lb__btn[disabled] { opacity: .25; pointer-events: none; }
@media (max-width: 760px) { .gg-lb__prev, .gg-lb__next { display: none; } }
.gg-lb-lock { overflow: hidden; }
