* { box-sizing: border-box; }
:root {
  --navy: #101d49;
  --gold: #c69b32;
  --burgundy: #781b25;
  --ink: #242424;
  --paper: #fffdf8;
}
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
}
.site-header {
  text-align: center;
  padding: 28px 18px 22px;
  background: linear-gradient(180deg, #fff 0%, #fffdf8 100%);
}
.logo-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 118px;
  height: 118px;
  margin: 0 auto 10px;
  border-radius: 50%;
  transition: transform .2s ease;
}
.logo-link:hover { transform: scale(1.04); }
.logo-link img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.site-header h1 {
  margin: 4px 0 8px;
  color: var(--navy);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 1.2px;
}
.site-header p {
  margin: 0;
  color: #666;
  font-size: 15px;
  line-height: 1.5;
}
.gold-rule {
  display: block;
  width: min(150px, 35vw);
  height: 3px;
  margin: 17px auto 0;
  background: var(--gold);
  border-radius: 10px;
}
.gallery-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 22px auto 54px;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}
.gallery-card {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(198,155,50,.55);
  border-radius: 9px;
  background: #eee;
  box-shadow: 0 4px 14px rgba(20, 25, 45, .10);
  cursor: pointer;
}
.gallery-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.gallery-card:hover img, .gallery-card:focus-visible img { transform: scale(1.045); }
.image-overlay {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  justify-content: center;
  padding: 28px 12px 13px;
  color: white;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .3px;
  background: linear-gradient(transparent, rgba(7, 13, 34, .72));
  opacity: 0;
  transition: opacity .25s ease;
}
.gallery-card:hover .image-overlay, .gallery-card:focus-visible .image-overlay { opacity: 1; }
.gallery-card:focus-visible, button:focus-visible, .logo-link:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}
.site-footer {
  padding: 18px 12px;
  text-align: center;
  color: #eee;
  background: var(--navy);
  font-size: 13px;
}
.site-footer p { margin: 0; }

.lightbox {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 64px 72px 54px;
  background: rgba(5, 8, 20, .94);
}
.lightbox.is-open { display: flex; }
.lightbox-figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(1100px, 100%);
  max-height: 100%;
  margin: 0;
}
.lightbox-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - 145px);
  width: auto;
  height: auto;
  object-fit: contain;
  border: 2px solid rgba(255,255,255,.16);
  border-radius: 4px;
  box-shadow: 0 12px 45px rgba(0,0,0,.4);
}
.lightbox-figure figcaption {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  font-size: 14px;
}
.lightbox-close, .lightbox-nav {
  position: absolute;
  display: grid;
  place-items: center;
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(198,155,50,.85); }
.lightbox-close {
  top: 18px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 34px;
  line-height: 1;
}
.lightbox-nav {
  top: 50%;
  width: 48px;
  height: 58px;
  border-radius: 7px;
  font-size: 23px;
  transform: translateY(-50%);
}
.lightbox-prev { left: 18px; }
.lightbox-next { right: 18px; }
.lightbox-count {
  position: absolute;
  bottom: 18px;
  left: 0;
  right: 0;
  color: #ddd;
  text-align: center;
  font-size: 13px;
}
body.no-scroll { overflow: hidden; }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
  .gallery-wrap { width: min(760px, calc(100% - 32px)); }
}
@media (max-width: 560px) {
  .site-header { padding: 20px 14px 18px; }
  .logo-link { width: 92px; height: 92px; }
  .site-header p { font-size: 13px; }
  .gallery-wrap { width: calc(100% - 26px); margin: 15px auto 35px; }
  .gallery-grid { grid-template-columns: 1fr; gap: 15px; }
  .gallery-card { aspect-ratio: 4 / 3; }
  .image-overlay { opacity: 1; }
  .lightbox { padding: 62px 12px 58px; }
  .lightbox-figure img { max-height: calc(100vh - 160px); }
  .lightbox-close { top: 10px; right: 12px; width: 42px; height: 42px; }
  .lightbox-nav { width: 40px; height: 48px; font-size: 19px; }
  .lightbox-prev { left: 7px; }
  .lightbox-next { right: 7px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
