/* The River House Group: lodge photo galleries (/arroyo-pescado/gallery, /river-house/gallery, /southland/gallery).
   Each page sets its lodge palette with --g-paper, --g-paper-2, --g-ink, --g-accent and --g-dark on <body>. */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500&family=Roboto+Condensed:wght@300;400;500&display=swap');

:root { --g-serif: "Cormorant Garamond", Georgia, serif; --g-sans: "Roboto Condensed", "Arial Narrow", sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--g-paper); color: var(--g-ink); font-family: var(--g-sans); font-weight: 300; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }

.g-head { padding: calc(var(--rhg-nav-h, 56px) + clamp(56px, 8vw, 110px)) max(24px, 6vw) clamp(36px, 4vw, 54px); text-align: center; }
.g-hero { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: clamp(520px, 74vh, 780px); padding-bottom: clamp(56px, 6vw, 84px); overflow: hidden; isolation: isolate; color: #fffdf8; background: var(--g-dark); }
.g-hero-img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.g-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(12,12,10,.55), rgba(12,12,10,.22) 40%, rgba(12,12,10,.62)); }
.g-hero .g-kicker { color: #e0b07f; }
.g-hero h1, .g-hero p { text-shadow: 0 2px 22px rgba(0,0,0,.35); }
.g-hero .g-back { gap: 10px; min-height: 44px; padding: 11px 20px; border: 1px solid rgba(255,253,248,.8); background: rgba(20,20,18,.42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); transition: background .25s ease, color .25s ease; }
.g-hero .g-back:hover, .g-hero .g-back:focus-visible { background: #fffdf8; color: var(--g-ink); outline: none; }
.g-kicker { display: block; margin-bottom: 18px; color: var(--g-accent); text-transform: uppercase; letter-spacing: .16em; font-size: 13px; font-weight: 400; }
.g-head h1 { margin: 0; font-family: var(--g-serif); font-weight: 400; font-size: clamp(56px, 8vw, 112px); line-height: .92; }
.g-head p { max-width: 620px; margin: 24px auto 0; font-family: var(--g-serif); font-size: clamp(21px, 1.9vw, 26px); line-height: 1.32; }
.g-back { display: inline-flex; align-items: center; gap: 8px; margin-top: 30px; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

.g-tabs { position: sticky; top: var(--rhg-nav-h, 56px); z-index: 50; display: flex; justify-content: center; gap: clamp(18px, 3vw, 44px); padding: 16px 24px; overflow-x: auto; scrollbar-width: none; background: color-mix(in srgb, var(--g-paper) 94%, transparent); backdrop-filter: blur(8px); border-top: 1px solid color-mix(in srgb, var(--g-ink) 16%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--g-ink) 16%, transparent); }
.g-tabs::-webkit-scrollbar { display: none; }
.g-tabs a { flex: 0 0 auto; padding: 4px 0; text-decoration: none; text-transform: uppercase; letter-spacing: .13em; font-size: 12px; font-weight: 400; border-bottom: 1px solid transparent; transition: color .2s ease, border-color .2s ease; }
.g-tabs a sup { margin-left: 4px; color: var(--g-accent); font-size: 10px; letter-spacing: .04em; }
.g-tabs .g-tab-back { display: inline-flex; align-items: center; gap: 8px; margin-right: clamp(4px, 1vw, 14px); padding-right: clamp(18px, 3vw, 44px); border-right: 1px solid color-mix(in srgb, var(--g-ink) 22%, transparent); border-bottom-color: transparent; color: var(--g-accent); }
.g-tabs .g-tab-back:hover { border-bottom-color: transparent; color: var(--g-ink); }
.g-tabs a:hover, .g-tabs a.is-active { color: var(--g-accent); border-bottom-color: currentColor; }

.g-section { max-width: 1680px; margin: 0 auto; padding: clamp(56px, 7vw, 96px) max(16px, 4vw) 0; scroll-margin-top: calc(var(--rhg-nav-h, 56px) + 56px); }
.g-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin: 0 0 28px; padding-bottom: 16px; border-bottom: 1px solid color-mix(in srgb, var(--g-ink) 18%, transparent); }
.g-section-head h2 { margin: 0; font-family: var(--g-serif); font-weight: 400; font-size: clamp(38px, 4.2vw, 58px); line-height: 1; }
.g-section-head span { color: color-mix(in srgb, var(--g-ink) 62%, transparent); text-transform: uppercase; letter-spacing: .13em; font-size: 12px; white-space: nowrap; }

.g-grid { columns: 3 320px; column-gap: 12px; }
.g-item { display: block; margin: 0 0 12px; overflow: hidden; break-inside: avoid; background: var(--g-paper-2); cursor: zoom-in; }
.g-item img { width: 100%; height: auto; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .4s ease; }
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.035); }
.g-item:focus-visible { outline: 2px solid var(--g-accent); outline-offset: 3px; }

.g-foot { margin-top: clamp(80px, 9vw, 130px); padding: 64px max(24px, 6vw) 40px; background: var(--g-dark); color: #fffdf8; text-align: center; }
.g-foot h2 { margin: 0 0 26px; font-family: var(--g-serif); font-weight: 400; font-size: clamp(34px, 3.6vw, 50px); line-height: 1.05; }
.g-foot-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px 30px; }
.g-foot-links a { text-transform: uppercase; letter-spacing: .13em; font-size: 12px; text-decoration: none; border-bottom: 1px solid rgba(255,253,248,.5); padding-bottom: 3px; }
.g-foot-links a[aria-current] { color: #e0b07f; border-color: currentColor; }
.g-foot small { display: block; margin-top: 48px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.2); opacity: .7; font-size: 12px; letter-spacing: .04em; }

/* Lightbox */
.g-lightbox { width: 100vw; max-width: none; height: 100vh; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; background: #0e0d0b; color: #fffdf8; overflow: hidden; }
.g-lightbox::backdrop { background: rgba(14,13,11,.97); }
.g-lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.g-lb-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: calc(14px + env(safe-area-inset-top, 0px)) max(16px, 3vw) 10px; font-size: 12px; letter-spacing: .13em; text-transform: uppercase; }
.g-lb-stage { position: relative; display: grid; place-items: center; min-height: 0; padding: 0 clamp(8px, 6vw, 96px); touch-action: pan-y; }
.g-lb-stage img { max-width: 100%; max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; transition: opacity .25s ease; }
.g-lb-stage img.is-loading { opacity: .35; }
.g-lb-caption { padding: 12px max(16px, 3vw) calc(18px + env(safe-area-inset-bottom, 0px)); text-align: center; font-family: var(--g-serif); font-size: 20px; }
.g-lb-btn { display: grid; place-items: center; width: 46px; height: 46px; padding: 0; border: 1px solid rgba(255,253,248,.45); border-radius: 50%; background: rgba(20,20,18,.4); color: #fffdf8; cursor: pointer; transition: background .2s ease, border-color .2s ease; }
.g-lb-btn:hover, .g-lb-btn:focus-visible { background: rgba(255,253,248,.12); border-color: #fffdf8; outline: none; }
.g-lb-prev, .g-lb-next { position: absolute; top: 50%; transform: translateY(-50%); }
.g-lb-prev { left: max(10px, 2vw); }
.g-lb-next { right: max(10px, 2vw); }

@media (max-width: 700px) {
  .g-grid { columns: 2; column-gap: 8px; }
  .g-item { margin-bottom: 8px; }
  .g-tabs { justify-content: flex-start; }
  .g-section-head { flex-direction: column; gap: 8px; }
  .g-lb-prev, .g-lb-next { top: auto; bottom: 8px; transform: none; }
  .g-lb-stage { padding: 0 0 64px; }
  .g-lb-stage img { max-height: calc(100dvh - 200px); }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .g-item img, .g-lb-stage img { transition: none; } }
