/* ═══ SELF-HOSTED FONTS ═══ */
@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/bodoni-moda-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/bodoni-moda-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Bodoni Moda';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/bodoni-moda-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Bodoni Moda';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/bodoni-moda-latin-400-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/barlow-condensed-latin-300-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/barlow-condensed-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Barlow Condensed';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-600-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-latin-400-italic.woff2') format('woff2');
}

:root {
  --bg-primary: #f5f2eb;
  --bg-secondary: #eeeae4;
  --bg-card: #e7e3dc;
  --bg-nav: rgba(245, 242, 235, 0.55);
  --bg-mobile-menu: rgba(245, 242, 235, 0.92);
  --text-primary: #1a1917;
  --text-secondary: #524e45;
  --text-muted: #8a847a;
  --accent: #c23a32;
  --accent-bright: #d94a42;
  --accent-dim: #a03028;
  --accent-deep: #9b2e24;
  --cream: #1a1917;
  --border-subtle: rgba(26, 25, 23, 0.08);
  --grain-opacity: 0.018;
  --glow-opacity: 0.055;
  --serif: 'Bodoni Moda', Georgia, serif;
  --sans: 'Barlow Condensed', system-ui, sans-serif;
  --editorial: 'Cormorant Garamond', Georgia, serif;
}

/* Force dark mode when user toggles */
html[data-theme="dark"] {
  --bg-primary: #181816;
  --bg-secondary: #1e1d1a;
  --bg-card: #242320;
  --bg-nav: rgba(24, 24, 22, 0.55);
  --bg-mobile-menu: rgba(24, 24, 22, 0.92);
  --text-primary: #e8e4dc;
  --text-secondary: #a8a296;
  --text-muted: #5e5a54;
  --accent: #c23a32;
  --accent-bright: #d94a42;
  --accent-dim: #8b2e28;
  --accent-deep: #9b2e24;
  --cream: #f0ebe2;
  --border-subtle: rgba(238, 232, 220, 0.06);
  --grain-opacity: 0.025;
  --glow-opacity: 0.05;
}

html[data-theme="dark"] .logo-dark {
  display: block !important;
}

html[data-theme="dark"] .logo-light {
  display: none !important;
}

/* Force light mode when user toggles (overrides system dark preference) */
html[data-theme="light"] {
  --bg-primary: #f5f2eb;
  --bg-secondary: #eeeae4;
  --bg-card: #e7e3dc;
  --bg-nav: rgba(245, 242, 235, 0.55);
  --bg-mobile-menu: rgba(245, 242, 235, 0.92);
  --text-primary: #1a1917;
  --text-secondary: #524e45;
  --text-muted: #8a847a;
  --accent: #c23a32;
  --accent-bright: #d94a42;
  --accent-dim: #a03028;
  --accent-deep: #9b2e24;
  --cream: #1a1917;
  --border-subtle: rgba(26, 25, 23, 0.08);
  --grain-opacity: 0.018;
}

html[data-theme="light"] .logo-dark {
  display: none !important;
}

html[data-theme="light"] .logo-light {
  display: block !important;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg-primary: #181816;
    --bg-secondary: #1e1d1a;
    --bg-card: #242320;
    --bg-nav: rgba(24, 24, 22, 0.55);
    --bg-mobile-menu: rgba(24, 24, 22, 0.92);
    --text-primary: #e8e4dc;
    --text-secondary: #a8a296;
    --text-muted: #5e5a54;
    --accent: #c23a32;
    --accent-bright: #d94a42;
    --accent-dim: #8b2e28;
    --accent-deep: #9b2e24;
    --cream: #f0ebe2;
    --border-subtle: rgba(238, 232, 220, 0.06);
    --grain-opacity: 0.025;
    --glow-opacity: 0.05;
  }

  :root:not([data-theme="light"]) .logo-dark {
    display: block;
  }

  :root:not([data-theme="light"]) .logo-light {
    display: none;
  }
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
  overflow-x: hidden;
  max-width: 100vw;
}

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

body {
  font-family: var(--sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: var(--grain-opacity);
  transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px;
}

main {
  flex: 1;
}

body.gallery-page main {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
  touch-action: manipulation;
}

button {
  touch-action: manipulation;
  cursor: pointer;
  background: none;
  border: none;
  font-family: inherit;
}

/* ═══ Navigation ═══ */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  padding: 1.5rem 3rem;
  padding-top: max(1.5rem, env(safe-area-inset-top, 1.5rem));
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease;
  border-bottom: 1px solid transparent;
}

nav.scrolled {
  background: var(--bg-nav);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border-bottom: 1px solid var(--border-subtle);
  transform: translateZ(0);
}

/* Solid nav background when mobile menu is open */
nav.menu-open {
  z-index: 1003;
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}

/* Hide nav during homepage intro */
nav.intro-active {
  opacity: 0;
  pointer-events: none;
}

nav.intro-done {
  opacity: 1;
  transition: opacity 0.6s ease 0.3s;
}

.logo-dark {
  display: none;
}

.logo-light {
  display: block;
}

.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.nav-logo-img {
  height: 24px;
  width: auto;
  transition: opacity 0.3s;
}

@media (hover: hover) {
  .nav-logo:hover .nav-logo-img {
    opacity: 0.7;
  }
}

.nav-star {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 2px;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.nav-star svg {
  width: 22px;
  height: 22px;
  fill: var(--accent);
  transition: transform 0.3s ease-out;
}

.nav-star:active svg {
  transform: scale(0.85);
}

@keyframes star-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.nav-star.spinning svg {
  animation: star-spin 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links>li {
  position: relative;
}

.nav-links>li>a {
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.nav-links>li>a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.nav-links>li>a.active {
  color: var(--text-primary);
}

@media (hover: hover) {
  .nav-links>li>a:hover {
    color: var(--text-primary);
  }
}

/* Trim the underline by one letter-spacing unit so it ends at the last
   glyph instead of overshooting into the trailing tracking. */
.nav-links>li>a.active::after {
  width: calc(100% - 0.14em);
}

@media (hover: hover) {
  .nav-links>li>a:hover::after {
    width: calc(100% - 0.14em);
  }
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 50%;
  background: var(--bg-nav);
  backdrop-filter: blur(40px) saturate(1.4);
  -webkit-backdrop-filter: blur(40px) saturate(1.4);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 0.35rem;
  width: max-content;
  min-width: 100%;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-4px);
  transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.nav-dropdown::before {
  content: "";
  position: absolute;
  top: -6px;
  left: 0;
  right: 0;
  height: 6px;
}

html[data-theme="dark"] .nav-dropdown {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.nav-dropdown-wrap.open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

@media (hover: hover) {
  .nav-dropdown-wrap:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
  }
}

.nav-dropdown a {
  display: block;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.2s, background 0.2s;
}

@media (hover: hover) {
  .nav-dropdown a:hover {
    color: var(--text-primary);
    background: var(--bg-card);
  }
}

.nav-dropdown a.active {
  color: var(--accent);
  background: var(--bg-card);
}

/* ═══ Mobile Navigation Defaults ═══ */
.menu-toggle {
  display: none;
}

.mobile-menu {
  display: none;
}

/* ═══ Shared Section Styles ═══ */
section {
  padding: 8rem 3rem;
}

.section-label {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--accent);
  clip-path: polygon(1% 47%, 34% 34%, 42% 0%, 64% 27%, 99% 24%, 80% 54%, 94% 87%, 59% 77%, 33% 100%, 31% 65%);
  opacity: 0.7;
}

.section-heading {
  font-family: var(--serif);
  font-size: clamp(2rem, 3.5vw, 3rem);
  font-weight: 500;
  color: var(--cream);
  line-height: 1.18;
  margin-bottom: 1.5rem;
}

.divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(to right, var(--text-muted), transparent 60%);
  opacity: 0.12;
}

/* ═══ Footer ═══ */
footer {
  padding: 3rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
}

.footer-address {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.footer-right {
  display: flex;
  gap: 2rem;
}

.footer-right a {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-primary);
  transition: color 0.3s;
}

@media (hover: hover) {
  .footer-right a:hover {
    color: var(--accent);
  }
}

.footer-copyright {
  text-align: center;
  padding: 1.5rem 3rem;
  font-size: 0.68rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

/* ═══ Modal ═══ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transform: translateZ(0);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 1.5rem;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(12px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
  position: relative;
  opacity: 0;
}

.modal-overlay.active .modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.modal-header {
  padding: 2rem 2.5rem 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-header h2 {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0 0 0.25rem;
}

.modal-header p {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
  margin: 0;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .modal-close:hover {
    background: var(--bg-secondary);
    color: var(--cream);
  }
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 2rem 2.5rem;
}

.modal-contact-info {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.modal-contact-box {
  flex: 1;
  padding: 1rem 1.25rem;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  text-decoration: none;
  color: var(--cream);
  transition: border-color 0.2s ease;
  position: relative;
  overflow: hidden;
}

.modal-contact-box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--accent);
  border-radius: 10px 10px 0 0;
  transition: width 0.3s ease;
}

@media (hover: hover) {
  .modal-contact-box:hover {
    border-color: var(--accent);
  }

  .modal-contact-box:hover::before {
    width: 100%;
  }
}

.modal-contact-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.modal-contact-value {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--cream);
}

.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-group.full {
  flex: 1 1 100%;
}

.form-label {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-bottom: 0.4rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.form-group:focus-within .form-label {
  color: var(--accent);
  transform: translateX(2px);
}

.form-input,
.form-textarea {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  color: var(--text-primary);
  background: var(--bg-secondary);
  transition: border-color 0.2s ease;
  outline: none;
}

.form-input:focus,
.form-textarea:focus {
  border-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--text-muted);
}

.form-textarea {
  resize: vertical;
  min-height: 100px;
}

.form-submit {
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0ebe2;
  padding: 0.85rem 2.5rem;
  background: var(--accent-deep);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  margin-top: 0.5rem;
  width: 100%;
}

@media (hover: hover) {
  .form-submit:hover {
    background: var(--accent);
    transform: translateY(-1px);
  }
}

.form-success {
  text-align: center;
  padding: 2rem 0;
  display: none;
}

.form-success-star {
  width: 36px;
  height: 36px;
  fill: var(--accent);
  animation: success-spin 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes success-spin {
  from {
    transform: rotate(0deg) scale(0.5);
    opacity: 0;
  }

  50% {
    transform: rotate(200deg) scale(1.15);
    opacity: 1;
  }

  to {
    transform: rotate(360deg) scale(1);
    opacity: 1;
  }
}

.form-success h3 {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--cream);
  margin: 0.75rem 0 0.5rem;
}

.form-success p {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--text-secondary);
}

/* ═══ Reveal Animations ═══ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal.reveal-left {
  transform: translateX(-30px);
}

.reveal.reveal-left.visible {
  transform: translateX(0);
}

.reveal.reveal-scale {
  transform: scale(0.88);
}

.reveal.reveal-scale.visible {
  transform: scale(1);
}

.reveal.reveal-flip {
  transform: translateY(60px);
  opacity: 0;
  transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease;
}

.reveal.reveal-flip.visible {
  transform: translateY(0);
  opacity: 1;
}

.reveal.reveal-flip:nth-child(1) {
  transition-delay: 0s;
}

.reveal.reveal-flip:nth-child(2) {
  transition-delay: 0.15s;
}

.reveal.reveal-flip:nth-child(3) {
  transition-delay: 0.3s;
}

.stagger-children .reveal:nth-child(1) {
  transition-delay: 0s;
}

.stagger-children .reveal:nth-child(2) {
  transition-delay: 0.1s;
}

.stagger-children .reveal:nth-child(3) {
  transition-delay: 0.2s;
}

.stagger-children .reveal:nth-child(4) {
  transition-delay: 0.25s;
}

.stagger-children .reveal:nth-child(5) {
  transition-delay: 0.3s;
}

@media (min-width: 601px) and (max-width: 1024px) {
  .modal {
    max-height: 88vh;
  }

  .modal-header,
  .modal-body {
    padding: 1.5rem 2rem;
  }

  .modal-contact-info {
    margin-bottom: 1.25rem;
  }

  .form-textarea {
    min-height: 80px;
  }

  .form-row {
    margin-bottom: 0.75rem;
  }

  .form-submit {
    margin-top: 0.25rem;
  }
}

@media (max-width: 1024px) {
  section {
    padding: 6rem 2rem;
  }

  footer {
    padding: 3rem 2rem;
  }
}

@media (max-width: 600px) {

  .modal-header,
  .modal-body {
    padding: 1.25rem;
  }

  .modal-contact-info {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .modal-header h2 {
    font-size: 1.4rem;
  }

  .modal-header {
    padding-bottom: 1rem;
  }

  .form-textarea {
    min-height: 70px;
  }

  .form-submit {
    margin-top: 0.25rem;
  }
}

/* ═══ Gallery Layout ═══ */
.gallery {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  min-height: 0;
  padding-top: 72px;
  overflow: hidden;
}

body.gallery-page>footer,
body.gallery-page>.footer-copyright {
  display: none;
}

.gallery-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0;
  flex-shrink: 0;
  max-width: 1100px;
  margin: 0.75rem auto 0;
  width: 100%;
}

.gallery-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.gallery-subtitle {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.player-wrapper {
  position: relative;
  width: 100%;
  max-width: 1100px;
  aspect-ratio: 16/9;
  background: var(--bg-primary);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] .player-wrapper {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.3);
}

.player-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.gallery-info {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 0;
  flex-shrink: 0;
  max-width: 1100px;
  margin: 1rem auto 0;
  width: 100%;
}

.gallery-info-left {
  display: flex;
  flex-direction: column;
}

.gallery-info-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}

.gallery-client {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.gallery-title-text {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--cream);
}

.gallery-view-all {
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s;
  white-space: nowrap;
  text-decoration: none;
}

.gallery-view-all::after {
  content: '↗';
  display: inline-block;
  margin-left: 0.4em;
  font-size: 1.35em;
  transition: transform 0.3s ease;
  animation: galleryNudgeArrow 1.2s ease-in-out 1.5s 1 forwards;
}

@media (hover: hover) {
  .gallery-view-all:hover {
    color: var(--accent);
  }

  .gallery-view-all:hover::after {
    animation: none;
    transform: translate(3px, -3px);
  }
}

@keyframes galleryNudgeArrow {
  0%, 100% { transform: translate(0, 0); }
  40% { transform: translate(4px, -4px); }
  70% { transform: translate(1px, -1px); }
}

.gallery-counter {
  font-size: 0.72rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  padding-bottom: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--text-muted) transparent;
  max-width: 1100px;
  margin: 1rem auto 0;
  width: 100%;
  cursor: grab;
}

.gallery-thumbs:active {
  cursor: grabbing;
}

.gallery-thumbs::-webkit-scrollbar {
  height: 3px;
}

.gallery-thumbs::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

.gallery-thumb {
  flex: 0 0 auto;
  width: 220px;
  background: none;
  cursor: pointer;
  position: relative;
  border-radius: 3px;
  overflow: hidden;
  border: 2px solid transparent;
  padding: 0;
  transition: border-color 0.3s, opacity 0.3s;
  opacity: 0.6;
}

.gallery-thumb.active {
  opacity: 1;
  border-color: var(--accent);
}

@media (hover: hover) {
  .gallery-thumb:hover {
    opacity: 1;
  }
}

.gallery-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

@media (hover: hover) {
  .gallery-thumb:hover img {
    transform: scale(1.04);
  }
}

.thumb-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.6rem 0.4rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent);
  font-family: var(--sans);
  font-size: 0.58rem;
  font-weight: 400;
  text-align: left;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ccc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-loading {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.player-loading.active {
  opacity: 1;
  pointer-events: auto;
}

.loading-star {
  width: 28px;
  height: 28px;
  animation: none;
  opacity: 0.7;
}

@keyframes loading-spin-cw {
  0% {
    transform: rotate(0deg);
  }

  70% {
    transform: rotate(380deg);
  }

  85% {
    transform: rotate(355deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

@keyframes loading-spin-ccw {
  0% {
    transform: rotate(0deg);
  }

  70% {
    transform: rotate(-380deg);
  }

  85% {
    transform: rotate(-355deg);
  }

  100% {
    transform: rotate(-360deg);
  }
}

.player-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 1196px;
  margin: 0.75rem auto 0;
  width: 100%;
  padding: 0;
  flex-shrink: 0;
}

.player-nav-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  color: var(--accent);
}

@media (hover: hover) {
  .player-nav-arrow:hover {
    background: var(--accent);
    color: #fff;
  }
}

.player-nav-arrow svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

.player-nav .player-wrapper {
  flex: 1;
  min-width: 0;
}

@media (max-width: 1200px) {

  .gallery-header,
  .player-nav,
  .gallery-info,
  .gallery-thumbs {
    padding-left: 3rem;
    padding-right: 3rem;
  }
}

@media (max-width: 1199px) and (min-width: 769px) {
  .nav-links>li>a {
    font-size: 0.95rem;
  }

  body.gallery-page {
    overflow: hidden !important;
    min-height: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    overscroll-behavior: none;
  }

  .gallery {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    padding-top: 44px;
    padding-bottom: 0;
    justify-content: flex-start;
  }

  .gallery-header {
    display: none;
  }

  .player-nav {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0.5rem;
  }

  .player-wrapper {
    max-height: 100%;
    max-width: none;
  }

  .player-nav-arrow {
    align-self: center;
  }

  .gallery-info {
    margin: 0.15rem auto 0;
    flex-shrink: 0;
    padding-bottom: 0.35rem;
  }

  .gallery-thumbs {
    display: none !important;
  }

  .gallery-header,
  .player-nav,
  .gallery-info {
    padding-left: 2rem;
    padding-right: 2rem;
  }

  .player-nav-arrow {
    width: 44px;
    height: 44px;
    border-color: var(--accent);
    color: var(--accent);
  }

  .player-nav-arrow svg {
    width: 20px;
    height: 20px;
  }

  @media (hover: hover) {
    .player-nav-arrow:hover {
      background: var(--accent);
      color: #fff;
      border-color: var(--accent);
    }
  }

  nav {
    padding: 1rem 2rem;
    padding-top: max(1rem, env(safe-area-inset-top, 1rem));
  }
}

@media (max-width: 768px) {
  nav {
    padding: 1rem 1.5rem;
    padding-top: max(1rem, env(safe-area-inset-top, 1rem));
  }

  section {
    padding: 5rem 1.5rem;
  }

  footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    padding: 2.5rem 1.5rem;
  }

  .footer-left {
    display: none;
  }

  .footer-right {
    justify-content: center;
  }

  .nav-links {
    display: none; /* Hide desktop nav */
  }

  .menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    position: relative;
    z-index: 1001;
    background: transparent;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
  }

  @media (hover: hover) {
    .menu-toggle:hover {
      background: var(--bg-secondary);
    }
  }

  .menu-toggle-box {
    width: 24px;
    height: 24px;
    display: inline-block;
    position: relative;
  }

  .menu-toggle-inner {
    display: block;
    top: 50%;
    margin-top: -1px;
  }

  .menu-toggle-inner,
  .menu-toggle-inner::before,
  .menu-toggle-inner::after {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    position: absolute;
    transition: transform 0.25s ease, opacity 0.25s ease, top 0.25s ease, bottom 0.25s ease;
    border-radius: 2px;
  }

  .menu-toggle-inner::before,
  .menu-toggle-inner::after {
    content: "";
    display: block;
  }

  .menu-toggle-inner::before {
    top: -8px;
  }

  .menu-toggle-inner::after {
    bottom: -8px;
  }

  .menu-toggle.is-active .menu-toggle-inner {
    transform: rotate(45deg);
  }

  .menu-toggle.is-active .menu-toggle-inner::before {
    top: 0;
    opacity: 0;
  }

  .menu-toggle.is-active .menu-toggle-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
  }

  .mobile-menu {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    z-index: 1002;
    background: var(--bg-mobile-menu);
    backdrop-filter: blur(40px) saturate(1.6);
    -webkit-backdrop-filter: blur(40px) saturate(1.6);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.4s;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  .mobile-menu.is-active {
    opacity: 1;
    visibility: visible;
  }

  .mobile-menu-inner {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    min-height: 100%;
    padding: 6rem 2.5rem 4rem;
    padding-bottom: max(4rem, env(safe-area-inset-bottom, 4rem));
  }

  .mobile-menu-links {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    transform: translateY(20px);
    transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  }

  .mobile-menu.is-active .mobile-menu-links {
    transform: translateY(0);
  }

  .mobile-link {
    font-family: var(--sans);
    font-size: 1.5rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-primary);
    transition: color 0.3s;
  }

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

  @media (hover: hover) {
    .mobile-link:hover {
      color: var(--accent);
    }
  }

  .mobile-sublinks {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding-left: 0.5rem;
    margin-top: -0.5rem;
  }

  .mobile-sublink {
    font-family: var(--sans);
    font-size: 1rem;
    font-weight: 300;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.3s;
  }

  .mobile-sublink.active {
    color: var(--text-primary);
  }

  @media (hover: hover) {
    .mobile-sublink:hover {
      color: var(--text-primary);
    }
  }

  .gallery-header,
  .player-nav,
  .gallery-info,
  .gallery-thumbs {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  .player-nav-arrow {
    display: none;
  }

  .player-nav {
    display: block;
    flex: 1 1 auto;
    min-height: 0;
  }

  .player-wrapper {
    height: auto;
    max-width: none;
  }

  .gallery-header {
    flex-direction: column;
    gap: 0.15rem;
    flex-shrink: 0;
    margin-top: 0.75rem;
  }

  .gallery-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.15rem;
    flex-shrink: 0;
    margin-top: 0.5rem;
  }

  .gallery-info-right {
    align-items: flex-start;
  }

  .gallery-title-text {
    font-size: 1.1rem;
  }

  .gallery-counter {
    text-align: left;
  }

  .gallery {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    justify-content: flex-start;
    padding-top: calc(68px + env(safe-area-inset-top, 0px));
    padding-bottom: 0.5rem;
  }

  .gallery-thumbs {
    margin-top: 0.35rem;
    flex-shrink: 0;
    padding-right: 2.5rem;
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }

  .gallery-thumb {
    width: 150px;
  }

  .thumb-label {
    font-size: 0.65rem;
    padding: 0.6rem 0.6rem 0.4rem;
  }

  body.gallery-page {
    overflow: hidden !important;
    min-height: 0 !important;
    height: 100vh !important;
    height: 100dvh !important;
    overscroll-behavior: none;
  }

  .gallery-title {
    font-size: 1.1rem;
  }
}

/* ═══ View Transitions (MPA) ═══ */
@view-transition {
  navigation: auto;
}

nav {
  view-transition-name: main-nav;
}

::view-transition-group(main-nav) {
  animation: none;
}

::view-transition-old(main-nav) {
  display: none;
}

::view-transition-new(main-nav) {
  animation: none;
}

::view-transition-old(root) {
  animation: 0.25s ease-in both vt-fade-out;
}

::view-transition-new(root) {
  animation: 0.4s ease-out 0.15s both vt-slide-in;
}

/* Gallery-to-gallery: text cross-dissolve */
::view-transition-old(gallery-header),
::view-transition-old(gallery-info) {
  animation: 0.35s ease-in both vt-text-out;
}

::view-transition-new(gallery-header),
::view-transition-new(gallery-info) {
  animation: 0.4s ease-out 0.2s both vt-text-in;
}

/* Gallery-to-gallery: thumbnail strip slides horizontally */
::view-transition-old(gallery-thumbs) {
  animation: 0.3s ease-in both vt-thumbs-out;
}

::view-transition-new(gallery-thumbs) {
  animation: 0.35s ease-out 0.15s both vt-thumbs-in;
}

@keyframes vt-fade-out {
  to {
    opacity: 0;
    transform: translateY(-6px);
  }
}

@keyframes vt-slide-in {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
}

@keyframes vt-text-out {
  to {
    opacity: 0;
  }
}

@keyframes vt-text-in {
  from {
    opacity: 0;
  }
}

@keyframes vt-thumbs-out {
  to {
    opacity: 0;
    transform: translateX(-40px);
  }
}

@keyframes vt-thumbs-in {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
}