:root {
  --page-bg: #f7f5f1;
  --surface: #ffffff;
  --text: #222222;
  --soft: #5f5f5f;
  --accent: #9f1016;
  --dark: #171717;
  --yellow: #e7eb00;
  --pill-dark: rgba(14, 32, 36, 0.82);
  --content-max: 1400px;
  --page-gutter: clamp(16px, 2.5vw, 32px);
  --section-inline: max(var(--page-gutter), calc((100vw - var(--content-max)) / 2 + var(--page-gutter)));
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--page-bg);
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.gallery-page {
  min-height: 100vh;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 0.95rem var(--section-inline);
  background: rgba(247, 245, 241, 0.94);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.brand-pill {
  display: inline-flex;
  align-items: center;
  width: 160px;
  height: 56px;
  padding: 0 0.6rem;
  border-radius: 999px;
  background: #ffffff;
  flex-shrink: 0;
}

.top-logo {
  width: 140px;
  height: 50px;
}

.main-nav {
  flex: none;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: min(800px, calc(100% - 420px));
  max-width: 800px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(1rem, 2vw, 3rem);
  border-radius: 999px;
  padding: 0 1.2rem;
  background: var(--pill-dark);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(8px);
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.main-nav a {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.97rem;
  font-weight: 500;
  transition: color 220ms ease;
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--yellow);
}

.talk-btn {
  flex-shrink: 0;
  width: 196px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0d0d0d;
  background: #ffffff;
  font-weight: 600;
  position: relative;
  z-index: 2;
  transition:
    background-color 220ms ease,
    color 220ms ease,
    transform 220ms ease,
    box-shadow 220ms ease;
}

.talk-btn:hover,
.talk-btn:focus-visible {
  background: var(--yellow);
  color: #111111;
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(17, 17, 17, 0.14);
}

.nav-toggle {
  display: none;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(15, 32, 36, 0.75);
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

.nav-toggle span {
  width: 22px;
  height: 2px;
  background: #ffffff;
  border-radius: 999px;
  transition: transform 240ms ease, opacity 240ms ease;
}

.topbar.menu-open .nav-toggle span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.topbar.menu-open .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.topbar.menu-open .nav-toggle span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.section-pad {
  padding: 4rem var(--section-inline);
}

.gallery-hero {
  position: relative;
  min-height: 470px;
  display: flex;
  align-items: center;
  padding: 3rem var(--section-inline);
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.66) 0%, rgba(0, 0, 0, 0.34) 52%, rgba(0, 0, 0, 0.54) 100%),
    url("./img/13.jpg") center center / cover no-repeat;
}

.hero-overlay {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding-left: 3rem;
  color: #ffffff;
}

.hero-kicker {
  margin: 0 0 0.7rem;
  color: rgba(255, 233, 172, 0.96);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.gallery-hero h1 {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.4rem, 5.8vw, 4.6rem);
  line-height: 1.02;
}

.gallery-hero p {
  margin: 1rem 0 0;
  max-width: 58ch;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.72;
}

.hero-cta {
  margin-top: 1.2rem;
  min-height: 48px;
  padding: 0.78rem 1.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  color: #111111;
  font-weight: 700;
}

.social-rail {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.social-rail a {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #ffe900;
  color: var(--accent);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.16);
}

.gallery-intro {
  padding-top: 2.7rem;
  padding-bottom: 2.7rem;
}

.gallery-intro-shell {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  border-radius: 26px;
  border: 1px solid rgba(159, 16, 22, 0.12);
  background:
    radial-gradient(circle at 8% 18%, rgba(255, 214, 10, 0.2), transparent 36%),
    radial-gradient(circle at 90% 80%, rgba(159, 16, 22, 0.08), transparent 34%),
    #ffffff;
  padding: 1.5rem 1.3rem;
  text-align: center;
}

.gallery-intro-shell h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3.5vw, 2.8rem);
}

.gallery-intro-shell p {
  margin: 0.8rem auto 0;
  max-width: 68ch;
  color: var(--soft);
  line-height: 1.72;
}

.gallery-chips {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
}

.gallery-filter-btn {
  border: 0;
  min-height: 38px;
  padding: 0.5rem 0.92rem;
  border-radius: 999px;
  border: 1px solid rgba(159, 16, 22, 0.18);
  background: rgba(255, 255, 255, 0.9);
  color: #2a2a2a;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  font: inherit;
  cursor: pointer;
  transition: transform 220ms ease, background-color 220ms ease, border-color 220ms ease;
}

.gallery-filter-btn.is-active {
  background: linear-gradient(135deg, #9f1016, #bc2732);
  border-color: rgba(159, 16, 22, 0.46);
  color: #ffffff;
}

.gallery-filter-btn:hover {
  transform: translateY(-2px);
}

.gallery-mosaic-band {
  padding-top: 1.15rem;
}

.gallery-mosaic {
  width: min(var(--content-max), 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.9rem;
  grid-auto-rows: 182px;
}

.gallery-item {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(159, 16, 22, 0.08);
  box-shadow: 0 16px 30px rgba(88, 66, 24, 0.12);
  cursor: zoom-in;
}

.gallery-item.is-hidden {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.gallery-item span {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  padding: 0.36rem 0.65rem;
  border-radius: 999px;
  background: rgba(8, 10, 12, 0.7);
  color: #ffffff;
  font-size: 0.8rem;
  letter-spacing: 0.03em;
}

.gallery-item.span-2 {
  grid-column: span 2;
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-focus-band {
  padding-top: 2rem;
}

.gallery-focus-wrap {
  width: min(var(--content-max), 90%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(250px, 1fr);
  gap: 0.9rem;
  align-items: stretch;
}

.focus-main {
  margin: 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(159, 16, 22, 0.1);
  cursor: zoom-in;
}

.focus-main img {
  width: 100%;
  min-height: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.focus-side {
  display: grid;
  grid-template-rows: 1fr 1fr auto;
  gap: 0.9rem;
}

.focus-thumb {
  margin: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(159, 16, 22, 0.1);
  cursor: zoom-in;
}

.focus-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 160px;
  transition: transform 520ms ease;
}

.focus-copy {
  border-radius: 20px;
  border: 1px solid rgba(159, 16, 22, 0.14);
  background: #ffffff;
  padding: 1rem;
}

.focus-copy h3 {
  margin: 0;
  font-size: 1.35rem;
}

.focus-copy p {
  margin: 0.65rem 0 0;
  color: var(--soft);
  line-height: 1.66;
}

.focus-copy a {
  margin-top: 0.95rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 999px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(2, 4, 8, 0.82);
  backdrop-filter: blur(10px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
  z-index: 140;
}

.gallery-lightbox.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-figure {
  margin: 0;
  justify-self: center;
  width: min(1040px, 100%);
  max-height: calc(100vh - 3.2rem);
}

.lightbox-figure img {
  width: 100%;
  max-height: calc(100vh - 8rem);
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
}

.lightbox-figure figcaption {
  margin-top: 0.72rem;
  color: #f4f4f4;
  text-align: center;
  font-size: 0.95rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1.1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-nav {
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
  font-size: 1rem;
  display: grid;
  place-items: center;
  cursor: pointer;
}

.lightbox-nav.prev {
  justify-self: start;
}

.lightbox-nav.next {
  justify-self: end;
}

.modal-open {
  overflow: hidden;
}

.footer {
  background: #1f1f1f;
  padding: 80px var(--section-inline);
  color: #ffffff;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 40px;
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
}

.footer .f-col img {
  width: 160px;
  margin-bottom: 0.9rem;
  filter: brightness(0) invert(1);
}

.footer .f-col h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
}

.footer h4 {
  margin-bottom: 10px;
  font-size: 22px;
}

.footer p {
  font-size: 16px;
  margin: 8px 0;
  color: rgba(255, 255, 255, 0.78);
  cursor: pointer;
}

.footer p:hover {
  color: #ffffff;
}

.copyright {
  text-align: center;
  margin-top: 40px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
  width: 100%;
  max-width: var(--content-max);
  margin-left: auto;
  margin-right: auto;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 760ms ease,
    transform 760ms cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img,
  .focus-main:hover img,
  .focus-thumb:hover img {
    transform: scale(1.06);
  }

  .hero-cta:hover,
  .focus-copy a:hover,
  .lightbox-close:hover,
  .lightbox-nav:hover {
    transform: translateY(-3px);
  }
}

@media (max-width: 1100px) {
  .gallery-mosaic {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-focus-wrap {
    grid-template-columns: 1fr;
  }

  .focus-side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }

  .focus-copy {
    grid-column: 1 / -1;
  }

  .footer-container {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .main-nav {
    position: absolute;
    top: calc(100% + 0.6rem);
    left: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.8rem;
    border-radius: 18px;
    width: auto;
    max-width: none;
    height: auto;
    justify-content: flex-start;
    background: rgba(15, 32, 36, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 20px 38px rgba(0, 0, 0, 0.18);
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transform: translateY(-10px);
    transition:
      max-height 260ms ease,
      opacity 220ms ease,
      transform 260ms ease;
  }

  .topbar.menu-open .main-nav {
    max-height: 320px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }

  .main-nav a {
    padding: 0.8rem 0.9rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
  }

  .main-nav a.active {
    color: #101010;
    background: var(--yellow);
  }

  .talk-btn {
    display: none;
  }

  .topbar {
    padding: 0.85rem 1rem;
  }

  .gallery-hero {
    min-height: 370px;
    padding: 2rem 1.2rem;
  }

  .hero-overlay {
    padding-left: 0;
  }

  .social-rail {
    left: 0.75rem;
  }

  .section-pad,
  .footer {
    padding-inline: 1.2rem;
  }

  .gallery-mosaic {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 168px;
  }

  .gallery-lightbox {
    grid-template-columns: 1fr;
    gap: 0.6rem;
  }

  .lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }

  .lightbox-nav.prev {
    left: 0.7rem;
  }

  .lightbox-nav.next {
    right: 0.7rem;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

@media (max-width: 620px) {
  .brand-pill {
    width: 144px;
    height: 52px;
    padding: 0 0.45rem;
  }

  .top-logo {
    width: 118px;
    height: 42px;
  }

  .main-nav {
    left: 0.85rem;
    right: 0.85rem;
    padding: 0.65rem;
    border-radius: 14px;
  }

  .main-nav a {
    font-size: 0.95rem;
    white-space: normal;
  }

  .gallery-hero {
    min-height: 320px;
    padding: 1.5rem 1rem 1.8rem;
  }

  .gallery-hero h1 {
    font-size: clamp(2rem, 11vw, 3rem);
  }

  .social-rail {
    top: auto;
    bottom: 1rem;
    transform: none;
    flex-direction: row;
  }

  .gallery-filter-btn {
    font-size: 0.83rem;
    min-height: 36px;
    padding: 0.46rem 0.75rem;
  }

  .section-pad {
    padding: 3rem 1rem;
  }

  .gallery-intro-shell {
    padding: 1.1rem 0.9rem;
    border-radius: 20px;
  }

  .gallery-mosaic {
    grid-template-columns: 1fr;
    grid-auto-rows: 210px;
    gap: 0.75rem;
  }

  .gallery-item.span-2,
  .gallery-item.wide {
    grid-column: auto;
  }

  .gallery-item.tall {
    grid-row: auto;
  }

  .focus-side {
    grid-template-columns: 1fr;
  }

  .focus-copy {
    padding: 0.88rem;
  }

  .gallery-lightbox {
    padding: 0.75rem;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
    top: 0.7rem;
    right: 0.7rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
  }

  .lightbox-figure img {
    max-height: calc(100vh - 10rem);
    border-radius: 12px;
  }

  .footer {
    padding: 44px 16px 24px;
  }

  .footer h4 {
    font-size: 1.1rem;
  }

  .footer p,
  .copyright {
    font-size: 0.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .gallery-item img,
  .focus-main img,
  .focus-thumb img,
  .hero-cta,
  .focus-copy a,
  .lightbox-close,
  .lightbox-nav,
  .talk-btn,
  .main-nav {
    transition: none;
    animation: none;
    transform: none;
  }

  .reveal {
    opacity: 1;
  }
}
