:root {
  --text: #f5f0e8;
  --muted: rgba(245, 240, 232, 0.65);
  --line: rgba(255, 255, 255, 0.12);
  --accent: #d2a76d;
  --max: 1240px;
  --side-width: min(320px, 84vw);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 171, 72, 0.24), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(155, 146, 255, 0.18), transparent 28%),
    linear-gradient(180deg, #090909 0%, #101010 38%, #070707 100%);
  color: var(--text);
}

body.menu-open,
body.lightbox-open { overflow: hidden; }

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.08;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 4px 4px, 4px 4px;
  mix-blend-mode: soft-light;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 42px);
}

.brand-logo {
  display: block;
  width: clamp(200px, 24vw, 290px);
  min-width: 200px;
  height: auto;
}

.menu-toggle {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(12px);
  display: grid;
  place-items: center;
  gap: 4px;
  cursor: pointer;
}

.menu-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  display: block;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .menu-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .menu-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.eyebrow,
.section-kicker,
.side-menu__nav a,
.gallery-card__tag {
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.menu-brand {
  display: inline-flex;
  align-items: center;
  width: min(220px, 100%);
  max-width: 220px;
  margin-bottom: 8px;
}

.menu-brand img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.side-menu {
  position: fixed;
  inset: 0 0 0 auto;
  width: var(--side-width);
  z-index: 28;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  background:
    linear-gradient(180deg, rgba(8, 8, 8, 0.98), rgba(20, 20, 20, 0.96)),
    linear-gradient(135deg, rgba(210, 167, 109, 0.12), rgba(155, 146, 255, 0.08));
  border-left: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

body.menu-open .side-menu { transform: translateX(0); }

.side-menu__inner {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 110px 34px 28px;
}

.side-menu__nav { display: grid; gap: 14px; }
.side-menu__nav a { color: var(--text); text-decoration: none; font-size: clamp(1.4rem, 3vw, 2rem); }
.side-menu__footer p { color: var(--muted); line-height: 1.7; }

.socials {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
}

.social-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  color: rgba(255, 255, 255, 0.88);
  text-decoration: none;
  transition: border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.social-icon svg {
  width: 19px;
  height: 19px;
  display: block;
}

.social-icon:hover,
.social-icon:focus-visible {
  border-color: rgba(255, 255, 255, 0.34);
  color: #fff;
  transform: translateY(-2px);
}

.social-icon:active {
  border-color: rgba(210, 167, 109, 0.34);
  color: var(--accent);
  background: rgba(210, 167, 109, 0.08);
}

.section {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 118px 0 96px;
  position: relative;
  z-index: 1;
}

.section-heading {
  display: grid;
  gap: 14px;
  margin-bottom: 38px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  color: var(--muted);
  text-decoration: none;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 0.3s ease, transform 0.3s ease;
}

.back-link:hover,
.back-link:focus-visible {
  color: var(--accent);
  transform: translateX(-2px);
}

.back-link:active {
  color: var(--accent);
}

.section-heading h1 {
  margin: 0;
  font-family: "Barlow Condensed", sans-serif;
  font-weight: 700;
  line-height: 0.9;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 9vw, 6.5rem);
  max-width: 760px;
}

.section-kicker,
.gallery-card__content small { color: var(--muted); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.gallery-card {
  position: relative;
  min-height: 320px;
  padding: 0;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  color: var(--text);
  text-align: left;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.35s ease, transform 0.35s ease, box-shadow 0.35s ease;
}

.gallery-card--large {
  grid-column: span 2;
  grid-row: span 2;
  min-height: 662px;
}

body.layout-top-right .gallery-card--large {
  grid-column: 2 / span 2;
  grid-row: 1 / span 2;
}

body.layout-bottom-left .gallery-card--large {
  grid-column: 1 / span 2;
  grid-row: 2 / span 2;
}

body.layout-bottom-right .gallery-card--large {
  grid-column: 2 / span 2;
  grid-row: 2 / span 2;
}

body.layout-feature-last .gallery-card--large {
  grid-column: 2 / span 2;
  grid-row: 2 / span 2;
}

body.layout-feature-last .gallery-card--large {
  order: 6;
}

body.layout-wide-top .gallery-card--large {
  grid-column: 1 / span 3;
  grid-row: 1;
  min-height: 430px;
}

.gallery-card__image,
.gallery-card__image::after {
  position: absolute;
  inset: 0;
}

.gallery-card__image {
  background-position: center;
  background-size: cover;
  filter: grayscale(0) blur(0);
  transform: scale(1.02);
  transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery-card__image::after {
  content: "";
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.8)),
    linear-gradient(135deg, rgba(210, 167, 109, 0.12), rgba(255, 255, 255, 0.05));
}

.gallery-card:hover .gallery-card__image,
.gallery-card:focus-visible .gallery-card__image {
  transform: scale(1.06);
  filter: grayscale(1) blur(3px);
}

.gallery-card:hover,
.gallery-card:focus-visible {
  border-color: rgba(210, 167, 109, 0.34);
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
}

.gallery-card:active {
  border-color: rgba(210, 167, 109, 0.34);
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.16);
}

.gallery-card__content {
  position: relative;
  z-index: 1;
  display: flex;
  height: 100%;
  flex-direction: column;
  justify-content: end;
  gap: 8px;
  padding: 22px;
}

.gallery-card__content strong {
  font-size: 1.6rem;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.gallery-card:hover .gallery-card__content strong,
.gallery-card:focus-visible .gallery-card__content strong {
  color: var(--accent);
}

.gallery-card__tag {
  transition: color 0.3s ease;
}

.gallery-card:hover .gallery-card__tag,
.gallery-card:focus-visible .gallery-card__tag {
  color: rgba(210, 167, 109, 0.92);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.82);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__dialog {
  position: relative;
  width: min(1100px, 100%);
}

.lightbox__image {
  width: 100%;
  max-height: 78vh;
  object-fit: contain;
  display: block;
  border: 1px solid var(--line);
  background: #111;
}

.lightbox__title {
  margin: 14px 0 0;
  color: var(--text);
  text-align: center;
  font-family: "Barlow Condensed", sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.lightbox__close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 2rem;
  cursor: pointer;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.8rem;
  cursor: pointer;
  z-index: 2;
}

.lightbox__nav--prev { left: -78px; }
.lightbox__nav--next { right: -78px; }

@media (max-width: 980px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .gallery-card--large { grid-column: span 2; }
  body.layout-top-right .gallery-card--large,
  body.layout-bottom-left .gallery-card--large,
  body.layout-bottom-right .gallery-card--large,
  body.layout-feature-last .gallery-card--large,
  body.layout-wide-top .gallery-card--large {
    grid-column: span 2;
    grid-row: span 2;
    order: 0;
    min-height: 662px;
  }

  .lightbox__nav--prev { left: 12px; }
  .lightbox__nav--next { right: 12px; }
}

@media (max-width: 720px) {
  .topbar { padding-inline: 16px; }
  .brand-logo { width: clamp(200px, 56vw, 240px); }
  .section {
    width: min(var(--max), calc(100% - 20px));
    padding-top: 108px;
  }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-card--large {
    grid-column: auto;
    grid-row: auto;
    min-height: 320px;
  }
  body.layout-top-right .gallery-card--large,
  body.layout-bottom-left .gallery-card--large,
  body.layout-bottom-right .gallery-card--large,
  body.layout-feature-last .gallery-card--large,
  body.layout-wide-top .gallery-card--large {
    grid-column: auto;
    grid-row: auto;
    order: 0;
    min-height: 320px;
  }

  .lightbox__nav {
    width: 48px;
    height: 48px;
    font-size: 1.5rem;
  }

  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}
