/* ==========================================================================
   COORS BANQUET BOTTLE CAP SITE
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

@font-face {
  font-family: 'Brewhouse';
  src: url('assets/fonts/Brewhouse.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@import url('https://fonts.googleapis.com/css2?family=UnifrakturMaguntia&display=swap');

/* --------------------------------------------------------------------------
   CSS CUSTOM PROPERTIES
   -------------------------------------------------------------------------- */
:root {
  --color-bg: #AE122A;
  --color-bg-alt: #0A0A0A;
  --color-primary: #AE122A;
  --color-secondary: #C4A35A;
  --color-text: #FAF7F2;
  --color-text-dark: #0A0A0A;
  --color-text-muted: rgba(250, 247, 242, 0.7);
  --color-border: #FAF7F2;
  --color-border-light: rgba(250, 247, 242, 0.4);

  --font-display: 'Brewhouse', 'UnifrakturMaguntia', cursive;
  --font-body: 'Playfair Display', Georgia, serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;
  --space-2xl: 12rem;

  --nav-width: 46px;
  --content-max-width: 1200px;
  --cap-image-size: 320px;
  --hero-margin: 24px;
  --hero-border-width: 14px;

  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s ease;
  --transition-slow: 0.6s ease;
}

/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg-alt);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  height: 100vh;
}

/* Custom scrollbar */
.main-content::-webkit-scrollbar { width: 8px; }
.main-content::-webkit-scrollbar-track { background: transparent; }
.main-content::-webkit-scrollbar-thumb {
  background: var(--color-primary);
  border-radius: 2px;
  min-height: 40px;
}
.main-content::-webkit-scrollbar-thumb:active {
  background: var(--color-text);
}

.main-content.scrollbar-on-red::-webkit-scrollbar-thumb {
  background: var(--color-text);
}
.main-content.scrollbar-on-red::-webkit-scrollbar-thumb:active {
  background: var(--color-primary);
}

.main-content.is-scrollbar-active::-webkit-scrollbar { width: 12px; }

img { max-width: 100%; height: auto; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

h1, h2, h3 { font-family: var(--font-body); font-weight: 400; line-height: 1.2; }

/* --------------------------------------------------------------------------
   LAYOUT
   -------------------------------------------------------------------------- */
.site-wrapper { display: flex; height: 100vh; overflow: hidden; }
.main-content {
  flex: 1;
  margin-left: var(--nav-width);
  overflow-y: auto;
  scroll-snap-type: y mandatory;
  height: 100vh;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--color-primary) transparent;
}

.section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
  position: relative;
  scroll-snap-align: start;
}

.section--red { background-color: var(--color-bg); }
.section--black { background-color: var(--color-bg-alt); }

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

.section__content.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cap-section .section__content {
  transform: none;
  transition: opacity 0.3s ease;
}

.cap-section .section__content.is-visible {
  opacity: 1;
  transform: none;
}

/* --------------------------------------------------------------------------
   SIDE NAVIGATION
   -------------------------------------------------------------------------- */
.side-nav {
  position: fixed;
  left: 0;
  top: 0;
  width: var(--nav-width);
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background-color: #B52A3E;
  z-index: 100;
  overflow: hidden;
}

.side-nav__numbers {
  flex: 1;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  padding-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.side-nav__numbers::-webkit-scrollbar { display: none; }

.side-nav__header {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 0 6px;
  gap: 0;
  background-color: #B52A3E;
  z-index: 2;
  position: relative;
}

.side-nav__footer {
  flex-shrink: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 12px;
  background-color: #B52A3E;
}

.side-nav__item {
  font-family: var(--font-body);
  font-size: 18px;
  color: var(--color-text);
  text-decoration: none;
  padding: 4px 2px;
  transition: opacity 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.45s cubic-bezier(0.16, 1, 0.3, 1),
              font-weight 0.3s ease;
  letter-spacing: -0.02em;
  opacity: 0.25;
  text-align: center;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
}

.side-nav__item:hover { opacity: 0.7; }
.side-nav__item.is-active { opacity: 1; font-weight: 600; }
.side-nav__item.is-near { opacity: 0.45; }

.side-nav__icon {
  width: 18px;
  height: 18px;
  display: block;
}

.side-nav__shuffle {
  cursor: pointer;
  border: none;
  background: none;
}

.side-nav__header .side-nav__item {
  padding: 10px 2px;
}

.side-nav__divider {
  width: 60%;
  height: 1px;
  background-color: rgba(250, 247, 242, 0.25);
  margin: 6px auto;
  flex-shrink: 0;
}

/* --- Mobile nav toggle arrow (hidden on desktop) --- */
.nav-toggle {
  display: none;
  position: fixed;
  top: calc(var(--hero-margin) + var(--hero-border-width) + 6px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 101;
  width: 36px;
  height: 20px;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text);
  opacity: 0.5;
  transition: opacity 0.2s ease, top 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

.nav-toggle:hover,
.nav-toggle:active {
  opacity: 0.8;
}

.nav-toggle__arrow {
  width: 16px;
  height: 10px;
  display: block;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-toggle.is-nav-open {
  top: 54px;
}

.nav-toggle.is-nav-open .nav-toggle__arrow {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   HERO SECTION
   -------------------------------------------------------------------------- */
.hero {
  background-color: var(--color-bg);
  text-align: center;
  flex-direction: column;
  padding: var(--hero-margin);
}

.hero__frame {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: calc(100vw - var(--nav-width) - (var(--hero-margin) * 2));
  height: calc(100vh - (var(--hero-margin) * 2));
  padding: clamp(24px, 5vh, 80px);
  overflow: hidden;
}

.hero__frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border: var(--hero-border-width) solid var(--color-border);
  pointer-events: none;
}

.hero .hero__eyebrow {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.2s, transform 0.8s ease 0.2s;
}

.hero .hero__title-img {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 1s ease 0.5s, transform 1s ease 0.5s;
}

.hero .hero__tagline {
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s ease 0.8s, transform 0.8s ease 0.8s;
}

.hero .section__content.is-visible .hero__eyebrow,
.hero .section__content.is-visible .hero__title-img,
.hero .section__content.is-visible .hero__tagline {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero__eyebrow {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, min(5.2vw, 5.5vh), 4.55rem);
  color: var(--color-text);
  margin-bottom: clamp(0.5rem, 2vh, 2rem);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 4rem);
  flex-shrink: 0;
}

.hero__eyebrow::after {
  content: '';
  width: clamp(80px, 20vw, 325px);
  height: clamp(3px, 0.5vh, 5px);
  background-color: var(--color-border);
}

.hero__title-img {
  max-width: 900px;
  width: 80%;
  height: auto;
  max-height: 35vh;
  object-fit: contain;
  margin: clamp(0.5rem, 2vh, 2rem) 0;
  flex-shrink: 1;
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, min(5.2vw, 5.5vh), 4.55rem);
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 4rem);
  flex-shrink: 0;
}

.hero__tagline::before {
  content: '';
  width: clamp(80px, 20vw, 325px);
  height: clamp(3px, 0.5vh, 5px);
  background-color: var(--color-border);
}

/* --------------------------------------------------------------------------
   GRID SECTION
   -------------------------------------------------------------------------- */
.grid-section { padding: var(--space-xl) var(--space-lg); flex-direction: column; }
.grid-section--red { background-color: var(--color-bg); }
.grid-section--black { background-color: var(--color-bg-alt); }
.grid-section__frame { position: relative; padding: var(--space-lg); max-width: 900px; width: 100%; }

.grid-caps {
  display: grid;
  grid-template-columns: repeat(10, 1fr);
  gap: 8px;
  max-width: 800px;
  margin: 0 auto;
}

.grid-caps__item {
  aspect-ratio: 1;
  border-radius: 50%;
  overflow: hidden;
  transition: transform var(--transition-fast);
  cursor: pointer;
  perspective: 600px;
}
.grid-caps__item:hover { transform: scale(1.15); z-index: 1; }
.grid-caps__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-style: preserve-3d;
  backface-visibility: hidden;
}

/* Grid cap flip animation
   TODO: Replace with 3D coin-flip animation (arc up, rotate, fall back down) */
.grid-caps__item.is-flipping img {
  animation: gridCapFlip 1.2s ease-in-out forwards;
}

@keyframes gridCapFlip {
  0%   { transform: rotateY(0deg) scale(1); }
  40%  { transform: rotateY(90deg) scale(0.92); }
  50%  { transform: rotateY(90deg) scale(0.92); }
  100% { transform: rotateY(0deg) scale(1); }
}

.grid-flip-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background-color: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-fast);
  margin-bottom: var(--space-sm);
}
.grid-flip-btn:hover {
  background-color: var(--color-text);
  color: var(--color-bg-alt);
  border-color: var(--color-text);
}
.grid-flip-btn__icon {
  width: 16px;
  height: 16px;
  transition: transform var(--transition-fast);
}
.grid-flip-btn:hover .grid-flip-btn__icon { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   BOTTLE CAP SECTION
   -------------------------------------------------------------------------- */
.cap-section { padding: var(--space-xl) var(--space-lg); }
.cap-section--red { background-color: var(--color-bg); }
.cap-section--black { background-color: var(--color-bg-alt); }

.cap-section__inner {
  display: grid;
  grid-template-columns: auto auto;
  gap: var(--space-xl);
  max-width: var(--content-max-width);
  justify-content: center;
  align-items: center;
}

.cap-section__image-wrapper {
  position: relative;
  width: var(--cap-image-size);
  height: var(--cap-image-size);
  flex-shrink: 0;
  cursor: pointer;
  perspective: 800px;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.6s ease 0.1s, transform 0.6s ease 0.1s;
}

.section__content.is-visible .cap-section__image-wrapper {
  opacity: 1;
  transform: scale(1);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.7s ease-in-out;
}

.cap-section__image-wrapper.is-flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.cap-section__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  transition: transform 0.3s ease;
}

.cap-section__image-wrapper:hover .cap-section__image {
  transform: scale(1.05);
}

.cap-section__content {
  max-width: 500px;
  height: var(--cap-image-size);
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease 0.25s;
}

.section__content.is-visible .cap-section__content {
  opacity: 1;
}

.cap-section__fact {
  font-family: var(--font-body);
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--color-text);
  font-weight: 400;
  font-style: italic;
  flex: 1;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.cap-section__fact.is-fading-out {
  opacity: 0;
  transform: translateX(-20px);
}

.cap-section__fact.is-fading-in {
  opacity: 0;
  transform: translateX(20px);
}

.flip-btn {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background-color: transparent;
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  letter-spacing: 0.05em;
  border: 1px solid var(--color-border-light);
  transition: all var(--transition-fast);
}
.flip-btn:hover { background-color: var(--color-text); color: var(--color-bg-alt); border-color: var(--color-text); }
.flip-btn:focus { outline: 2px solid var(--color-secondary); outline-offset: 2px; }
.flip-btn__icon { width: 16px; height: 16px; transition: transform var(--transition-fast); }
.flip-btn:hover .flip-btn__icon { transform: rotate(180deg); }

/* --------------------------------------------------------------------------
   LIGHTBOX
   -------------------------------------------------------------------------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.lightbox.is-active {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
}

.lightbox__overlay {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color var(--transition-medium);
  cursor: pointer;
}

.lightbox.is-active .lightbox__overlay {
  background-color: rgba(0, 0, 0, 0.92);
}

.lightbox__content {
  position: fixed;
  z-index: 1;
  pointer-events: none;
  background: none;
  border: none;
  outline: none;
  box-shadow: none;
  transition: top 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              left 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              width 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              height 0.5s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.3s ease;
}

.lightbox.is-active .lightbox__content {
  pointer-events: auto;
}

.lightbox.is-closing .lightbox__overlay {
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
}

.lightbox.is-closing .lightbox__content {
  visibility: hidden;
}

.lightbox__image-container {
  width: 100%;
  height: 100%;
  cursor: zoom-in;
  overflow: visible;
}

.lightbox__image-container.is-zoomed {
  cursor: none;
  touch-action: none;
}

.lightbox__image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.15s ease-out, opacity 0.12s ease;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
  border: none;
  outline: none;
  box-shadow: none;
  background: none;
}

.lightbox__image:not([src]),
.lightbox__image[src=''] {
  visibility: hidden;
}

.lightbox__image-container.is-touching .lightbox__image {
  transition: none;
}

.lightbox__close {
  position: fixed;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text);
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-medium);
  z-index: 2;
}

.lightbox.is-active .lightbox__close { opacity: 0.7; }
.lightbox__close:hover { opacity: 1; }

.lightbox__arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--color-text);
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition-medium);
  padding: 0;
}

.lightbox__arrow svg {
  width: 28px;
  height: 28px;
}

.lightbox.is-active .lightbox__arrow { opacity: 0.5; }
.lightbox__arrow:hover { opacity: 1; }

.lightbox__arrow--left { left: 20px; }
.lightbox__arrow--right { right: 20px; }

.lightbox__zoom-hint {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity var(--transition-medium);
  z-index: 2;
  pointer-events: none;
}

.lightbox.is-active .lightbox__zoom-hint { opacity: 0.5; }
.lightbox.is-active .lightbox__zoom-hint.is-hidden { opacity: 0; }

/* --------------------------------------------------------------------------
   SITE FOOTNOTE
   -------------------------------------------------------------------------- */
.site-footnote {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--color-text);
  opacity: 0;
  text-decoration: none;
  z-index: 50;
  transition: opacity var(--transition-medium);
  white-space: nowrap;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
}
.site-footnote.is-visible {
  opacity: 0.5;
  pointer-events: auto;
  transition: opacity 0.6s ease;
}

.site-footnote.is-lightbox-open,
.site-footnote.is-lightbox-closing {
  opacity: 0 !important;
  pointer-events: none;
  transition: opacity 0.1s ease;
}
.site-footnote:hover {
  opacity: 0.8;
}

/* Lion glyphs flanking the footnote text */
.footnote-lion {
  display: inline-block;
  height: 0.875rem;
  width: auto;
  vertical-align: middle;
  opacity: 0.5;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
  filter: brightness(0) invert(1);
  cursor: pointer;
}

.footnote-lion--left {
  margin-right: 0.5em;
}

.footnote-lion--right {
  margin-left: 0.5em;
  transform: scaleX(-1);
}

.site-footnote:hover .footnote-lion {
  opacity: 0.9;
}

.footnote-lion--right:hover {
  transform: scaleX(-1) scale(1.1);
}

.footnote-lion--left:hover {
  transform: scale(1.1);
}

/* --------------------------------------------------------------------------
   LOADING SCREEN
   -------------------------------------------------------------------------- */
.loading-screen {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background-color: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.loading-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-screen__icon {
  width: 80px;
  height: auto;
  animation: bottleShake 1.8s ease-in-out infinite;
}

@keyframes bottleShake {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  8%   { transform: translate(-3px, 1px) rotate(-1.2deg); }
  16%  { transform: translate(4px, -1px) rotate(1.5deg); }
  24%  { transform: translate(-2px, 2px) rotate(-0.8deg); }
  32%  { transform: translate(3px, -2px) rotate(1deg); }
  40%  { transform: translate(-4px, 1px) rotate(-1.5deg); }
  48%  { transform: translate(2px, -1px) rotate(0.8deg); }
  56%  { transform: translate(-3px, 2px) rotate(-1.2deg); }
  64%  { transform: translate(4px, 0px) rotate(1.3deg); }
  72%  { transform: translate(-2px, -2px) rotate(-1deg); }
  80%  { transform: translate(3px, 1px) rotate(0.7deg); }
  88%  { transform: translate(-1px, -1px) rotate(-0.5deg); }
}

/* --------------------------------------------------------------------------
   404 PAGE
   -------------------------------------------------------------------------- */
.page-404 { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: var(--space-lg); }
.page-404--red { background-color: var(--color-bg); }
.page-404--black { background-color: var(--color-bg-alt); }
.page-404__content { max-width: 500px; }
.page-404__title { font-family: var(--font-display); font-size: clamp(5rem, 15vw, 10rem); color: var(--color-text); line-height: 1; margin-bottom: var(--space-sm); }
.page-404__subtitle { font-family: var(--font-body); font-size: 1.125rem; color: var(--color-text-muted); font-style: italic; }
.page-404__link { display: inline-block; margin-top: var(--space-lg); font-family: var(--font-body); font-size: 0.875rem; color: var(--color-text); text-decoration: none; border-bottom: 1px solid var(--color-border-light); padding-bottom: 4px; transition: all var(--transition-fast); }
.page-404__link:hover { color: var(--color-secondary); border-color: var(--color-secondary); }

/* --------------------------------------------------------------------------
   RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  :root { --cap-image-size: 280px; --hero-margin: 20px; --hero-border-width: 10px; }
  .cap-section__inner { gap: var(--space-lg); }
  .cap-section__fact { font-size: 1.25rem; }
  .hero__title-img { max-width: 650px; }
}

@media (max-width: 768px) {
  :root {
    --nav-width: 0px;
    --nav-height: 48px;
    --cap-image-size: 250px;
    --hero-margin: 16px;
    --hero-border-width: 8px;
  }

  .side-nav {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: auto;
    width: 100%;
    height: var(--nav-height);
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 12px 0 0;
    gap: 0;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  }

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

  .side-nav__numbers,
  .side-nav__footer {
    display: contents;
  }

  .side-nav__header {
    flex-direction: row;
    width: auto;
    height: var(--nav-height);
    padding: 0 0 0 4px;
    gap: 0;
    flex-shrink: 0;
    position: sticky;
    left: 0;
    z-index: 3;
    align-items: center;
  }

  .side-nav__header .side-nav__item {
    padding: 0 12px;
    height: var(--nav-height);
    min-width: 40px;
    width: auto;
  }

  .side-nav__header .side-nav__divider {
    width: 1px;
    min-height: 24px;
    height: 24px;
    margin: 0 6px;
    flex-shrink: 0;
    background-color: rgba(250, 247, 242, 0.25);
  }

  .side-nav.is-open {
    transform: translateY(0);
  }

  .side-nav__item {
    font-size: 16px;
    padding: 0 14px;
    height: var(--nav-height);
    min-width: 44px;
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .side-nav__icon {
    width: 20px;
    height: 20px;
  }

  .side-nav__divider {
    width: 1px;
    height: 24px;
    margin: 0 4px;
    flex-shrink: 0;
  }

  .nav-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
    margin-top: 0;
    height: 100vh;
  }

  .cap-section__inner {
    grid-template-columns: 1fr;
    text-align: center;
    justify-items: center;
  }

  .cap-section__content {
    max-width: 100%;
    height: auto;
    min-height: 160px;
    position: relative;
    padding-bottom: 60px;
  }

  .cap-section__content .flip-btn {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
  }

  .cap-section__image-wrapper {
    transition: opacity 0.4s ease 0.05s, transform 0.4s ease 0.05s;
  }

  .cap-section__content {
    transition: opacity 0.35s ease 0.15s;
  }

  .cap-section__fact.is-fading-out {
    opacity: 0;
    transform: none;
  }

  .cap-section__fact.is-fading-in {
    opacity: 0;
    transform: none;
  }

  .hero__frame {
    width: calc(100vw - (var(--hero-margin) * 2));
  }
  .hero__title-img { max-width: 450px; width: 85%; }

  .grid-caps { grid-template-columns: repeat(5, 1fr); }

  .lightbox__close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 2rem; }
  .lightbox__zoom-hint { font-size: 0.75rem; bottom: 20px; }
  .lightbox__image-container { touch-action: manipulation; }
  .lightbox__image-container.is-zoomed { touch-action: none; }

  .lightbox__arrow { width: 36px; height: 36px; }
  .lightbox__arrow svg { width: 22px; height: 22px; }
  .lightbox__arrow--left { left: 10px; }
  .lightbox__arrow--right { right: 10px; }
}

@media (max-width: 480px) {
  :root { --cap-image-size: 200px; --space-lg: 2rem; --space-xl: 4rem; --hero-margin: 12px; --hero-border-width: 6px; }
  .cap-section__fact { font-size: 1.125rem; }
  .hero__title-img { max-width: 300px; }
  .side-nav__item { font-size: 15px; padding: 0 12px; }
}
