:root {
  --bg-deep: #0d0b09;
  --bg-card: #1a1714;
  --cream: #f5efe6;
  --gold: #c9a227;
  --gold-dim: rgba(201, 162, 39, 0.4);
  --copper: #b87333;
  --text-primary: #f5efe6;
  --text-secondary: rgba(245, 239, 230, 0.6);
  --text-muted: rgba(245, 239, 230, 0.3);
  --column-count: 4;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Instrument Sans", sans-serif;
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(
      ellipse 80% 50% at 20% 20%,
      rgba(201, 162, 39, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 60% 40% at 80% 80%,
      rgba(184, 115, 51, 0.02) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 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");
  opacity: 0.03;
  pointer-events: none;
  z-index: 1;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 48px;
  background: linear-gradient(
    to bottom,
    var(--bg-deep) 0%,
    var(--bg-deep) 60%,
    transparent 100%
  );
  display:flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.4rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

.header a {
  color: var(--gold);
}

.header-subtitle {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 4px 0 0;
}

.gallery-wrapper {
  max-width: 1600px;
  margin: 0 auto;
  padding: 120px 40px 80px;
  position: relative;
  z-index: 2;
}

.gallery {
  column-count: var(--num-cols);
  column-gap: 24px;
}

.card {
  break-inside: avoid;
  margin-bottom: 24px;
  background: var(--bg-card);
  border: 1px solid rgba(245, 239, 230, 0.06);
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: rgba(201, 162, 39, 0.3);
}

.image-frame {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: var(--bg-card);
}

.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: contrast(1.05);
  transition:
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.4s ease;
}

.image-frame.loading {
  animation: none;
  background: var(--bg-card);
}

.card:hover .image-frame img {
  transform: scale(1.05);
  filter: saturate(1.1) contrast(1.1);
}

.image-frame .vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    transparent 40%,
    rgba(13, 11, 9, 0.4) 100%
  );
  pointer-events: none;
  z-index: 1;
}

.card-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.card-info > p {
 font-size: 30px
}

.country {
  font-family: "Cormorant Garamond", serif;
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.dish {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
  display: inline-block;
  position: relative;
}

.dish::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.dish:hover {
  color: var(--gold);
}

.dish:hover::after {
  width: 100%;
}

.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 3px;
  height: 0%;
  background: linear-gradient(to bottom, var(--gold), var(--copper));
  z-index: 1000;
  transition: height 0.1s linear;
}

.image-frame.loading {
  aspect-ratio: 4 / 3;
  background: linear-gradient(
    90deg,
    var(--bg-card) 0%,
    rgba(245, 239, 230, 0.03) 50%,
    var(--bg-card) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.sort-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.sort-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.toggle-container {
  position: relative;
  width: 180px;
  height: 36px;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(245, 239, 230, 0.08);
  border: 1px solid rgba(245, 239, 230, 0.15);
  transition: all 0.3s ease;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
}

.toggle-slider::before {
  content: "";
  position: absolute;
  height: 32px;
  width: 90px;
  left: 0px;
  bottom: 0px;
  background: var(--gold-dim);
  border: 1px solid var(--gold);
  transition: transform 0.3s ease;
  border-radius: 16px;
  z-index: 0;
}

.toggle-input:checked + .toggle-slider::before {
  transform: translateX(86px);
}

.toggle-option {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s ease;
  z-index: 1;
  position: relative;
  user-select: none;
}

.toggle-input:not(:checked) + .toggle-slider .toggle-option.left,
.toggle-input:checked + .toggle-slider .toggle-option.right {
  color: var(--gold);
}

.toggle-input:not(:checked) + .toggle-slider .toggle-option.right,
.toggle-input:checked + .toggle-slider .toggle-option.left {
  color: var(--text-secondary);
}


@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Responsive */
@media (max-width: 1400px) {
  .gallery {
    column-count: 3;
  }
}

@media (max-width: 1000px) {
  .gallery {
    column-count: 2;
  }

  .gallery-wrapper {
    padding: 110px 24px 60px;
  }
}

@media (max-width: 600px) {
  .gallery {
    column-count: 1;
  }

  .header {
    padding: 20px 24px;
  }

  .gallery-wrapper {
    padding: 100px 16px 40px;
  }

  .card-info {
    padding: 14px 16px 18px;
  }
}
