@font-face {
  font-family: 'Inter';
  src: url('/public/fonts/Inter-Light.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/public/fonts/Inter-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/public/fonts/Inter-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('/public/fonts/Inter-ExtraBold.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --color-red: #E0004D;
  --color-dark: #0A0A0A;
  --color-grey-dark: #333333;
  --color-grey: #666666;
  --color-grey-light: #E0E0E0;
  --color-grey-bg: #F8F8F8;
  --color-white: #FFFFFF;
  
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  
  --font-display: 56px;
  --font-h2: 36px;
  --font-h3: 24px;
  --font-body: 18px;
  --font-small: 14px;
  
  --transition-fast: 200ms ease-out;
  --transition-medium: 300ms ease-out;
}

@media (max-width: 768px) {
  :root {
    --font-display: 40px;
    --font-h2: 28px;
    --font-h3: 20px;
    --font-body: 16px;
  }
}

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

html {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-dark);
  background: var(--color-white);
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
}

h1 {
  font-size: var(--font-display);
  font-weight: 800;
  line-height: 1.1;
}

h2 {
  font-size: var(--font-h2);
  line-height: 1.2;
}

h3 {
  font-size: var(--font-h3);
  line-height: 1.3;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-3);
}

.header {
  background: var(--color-white);
  border-bottom: 1px solid var(--color-grey-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-2) 0;
  gap: var(--space-3);
}

.logo {
  flex-shrink: 0;
}

.logo img {
  height: 96px;
  width: auto;
  display: block;
}

.nav {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  flex: 1;
  justify-content: center;
  position: relative;
}

.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--color-red);
  transition: left 300ms cubic-bezier(0.4, 0, 0.2, 1),
              width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.nav-link {
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: relative;
  display: inline-block;
  white-space: nowrap;
}

.nav-link-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-red);
  border-radius: 4px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 450ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 0;
}

.nav-link.hover-active .nav-link-bg {
  transform: scaleX(1);
}

.nav-link-text {
  position: relative;
  display: inline-flex;
  align-items: center;
  perspective: 600px;
  z-index: 1;
}

.nav-link-char {
  display: inline-block;
  transform-origin: center center;
  transition: transform 400ms ease-in-out,
              color 200ms linear;
}

.nav-link-char.space {
  transform: none;
}

.nav-link.hover-active .nav-link-char:not(.space) {
  transform: rotateY(360deg);
  color: var(--color-white);
}

.nav-link.active .nav-link-bg {
  transform: scaleX(1);
}

.nav-link.active .nav-link-char {
  color: var(--color-white);
}

.lang-switcher {
  flex-shrink: 0;
  position: relative;
  display: inline-flex;
  background: var(--color-grey-bg);
  border-radius: 20px;
  padding: 4px;
}

.lang-link {
  position: relative;
  z-index: 1;
  padding: 6px 16px;
  font-size: var(--font-small);
  font-weight: 600;
  color: var(--color-grey);
  border-radius: 16px;
  transition: color var(--transition-fast);
  cursor: pointer;
}

.lang-link.active {
  color: var(--color-white);
}

.lang-switcher::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: var(--color-red);
  border-radius: 16px;
  transition: transform var(--transition-fast);
  z-index: 0;
}

.lang-switcher[data-lang="en"]::before {
  transform: translateX(100%);
}

.lang-link span {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-1);
  position: relative;
  width: 32px;
  height: 32px;
  justify-content: center;
  align-items: center;
}

.hamburger span {
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1),
              opacity 200ms ease-out;
  position: absolute;
}

.hamburger span:nth-child(1) {
  top: 10px;
}

.hamburger span:nth-child(2) {
  top: 15px;
}

.hamburger span:nth-child(3) {
  top: 20px;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translateY(5px);
}

.hamburger.open span:nth-child(2) {
  opacity: 0;
}

.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translateY(-5px);
}

@media (max-width: 768px) {
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 280px;
    background: var(--color-white);
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    padding: var(--space-8) var(--space-3);
    transform: translateX(-100%);
    transition: transform var(--transition-medium);
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.1);
  }
  
  .nav.open {
    transform: translateX(0);
  }
  
  .nav.open .nav-link {
    animation: slideInNav 300ms cubic-bezier(0.4, 0, 0.2, 1) backwards;
  }
  
  .nav.open .nav-link:nth-child(1) { animation-delay: 0ms; }
  .nav.open .nav-link:nth-child(2) { animation-delay: 60ms; }
  .nav.open .nav-link:nth-child(3) { animation-delay: 120ms; }
  .nav.open .nav-link:nth-child(4) { animation-delay: 180ms; }
  .nav.open .nav-link:nth-child(5) { animation-delay: 240ms; }
  .nav.open .nav-link:nth-child(6) { animation-delay: 300ms; }
  .nav.open .nav-link:nth-child(7) { animation-delay: 360ms; }
  .nav.open .nav-link:nth-child(8) { animation-delay: 420ms; }
  
  @keyframes slideInNav {
    from {
      opacity: 0;
      transform: translateX(-20px);
    }
    to {
      opacity: 1;
      transform: translateX(0);
    }
  }
  
  .nav-link {
    padding: var(--space-2);
    text-align: left;
  }
  
  .nav-indicator {
    display: none;
  }
  
  .hamburger {
    display: flex;
  }
  
  .logo img {
    height: 72px;
  }
}

.footer {
  background: var(--color-dark);
  color: var(--color-white);
  margin-top: var(--space-12);
  flex-shrink: 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-6);
  padding: var(--space-8) 0 var(--space-4) 0;
}

.footer-logo img {
  height: 64px;
  width: auto;
  margin-bottom: var(--space-2);
}

.footer-section h4 {
  font-size: var(--font-small);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-2);
  opacity: 0.6;
}

.footer-section p,
.footer-section a {
  font-size: var(--font-small);
  line-height: 1.5;
  color: var(--color-white);
  opacity: 0.8;
}

.footer-section a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid var(--color-grey-dark);
  padding: var(--space-3) 0;
  text-align: center;
  font-size: var(--font-small);
  opacity: 0.6;
}

.block-title {
  font-size: var(--font-h2);
  font-weight: 800;
  margin: var(--space-8) 0 var(--space-4) 0;
  padding-bottom: var(--space-2);
  border-bottom: 3px solid var(--color-dark);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.block-title:first-child {
  margin-top: var(--space-4);
}

.hero-festival {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
  margin-bottom: var(--space-4);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--space-4);
  transition: box-shadow var(--transition-fast);
}

.hero-festival:hover {
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

.hero-festival-logo {
  background: var(--color-grey-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  min-height: 300px;
}

.hero-festival-logo img {
  max-width: 100%;
  max-height: 300px;
  object-fit: contain;
}

.hero-festival-logo .monogram {
  font-size: 96px;
  font-weight: 800;
  color: var(--color-dark);
  opacity: 0.08;
}

.hero-festival-content {
  padding: var(--space-4) var(--space-4) var(--space-4) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.badge {
  display: inline-block;
  background: var(--color-red);
  color: var(--color-white);
  padding: 6px var(--space-2);
  border-radius: 4px;
  font-size: var(--font-small);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  align-self: flex-start;
}

.hero-festival-meta {
  font-size: var(--font-small);
  color: var(--color-grey);
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  background: var(--color-dark);
  color: var(--color-white);
  padding: var(--space-2) var(--space-4);
  border-radius: 4px;
  font-size: var(--font-small);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: background var(--transition-fast);
  align-self: flex-start;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background: var(--color-grey-dark);
}

.btn-red {
  background: var(--color-red);
}

.btn-red:hover {
  filter: brightness(0.85);
}

.festivals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}

.festival-card {
  background: var(--color-white);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  display: flex;
  flex-direction: column;
}

.festival-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.festival-card-logo {
  background: var(--color-grey-bg);
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-2);
}

.festival-card-logo img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.festival-card-logo .monogram {
  font-size: 48px;
  font-weight: 800;
  color: var(--color-dark);
  opacity: 0.06;
}

.festival-card-content {
  padding: var(--space-3);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.festival-card-meta {
  font-size: var(--font-small);
  color: var(--color-grey);
  line-height: 1.5;
}

.meta-date,
.meta-venue {
  display: inline-block;
  font-size: var(--font-small);
  color: var(--color-grey);
}

.meta-date::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.meta-venue::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 6px;
  vertical-align: -2px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23666666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'%3E%3C/path%3E%3Ccircle cx='12' cy='10' r='3'%3E%3C/circle%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.meta-separator {
  color: var(--color-grey);
  margin: 0 6px;
}

.festival-card-content p {
  flex: 1;
  color: var(--color-grey);
  line-height: 1.6;
}

.festival-card-link {
  color: var(--color-dark);
  font-weight: 600;
  font-size: var(--font-small);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.festival-card-link:hover {
  color: var(--color-red);
}

.news-card {
  background: var(--color-white);
  border-radius: 8px;
  padding: var(--space-4);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: var(--space-2);
  border-left: 4px solid var(--color-red);
}

.news-card h3 {
  margin-bottom: var(--space-1);
}

.news-card-meta {
  font-size: var(--font-small);
  color: var(--color-grey);
  margin-bottom: var(--space-2);
}

.news-card p {
  color: var(--color-grey);
  line-height: 1.6;
  margin-bottom: var(--space-2);
}

.news-card-link {
  color: var(--color-dark);
  font-weight: 600;
  font-size: var(--font-small);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-card-link:hover {
  color: var(--color-red);
}

@media (max-width: 768px) {
  .hero-festival {
    grid-template-columns: 1fr;
  }
  
  .hero-festival-content {
    padding: var(--space-3);
  }
  
  .hero-festival-logo {
    min-height: 200px;
  }
  
  .festivals-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .festival-card:hover {
    transform: none;
  }
  
  .nav-link-char,
  .nav-link-bg {
    transition: none !important;
  }
  
  .nav-link.hover-active .nav-link-char:not(.space) {
    transform: none;
    color: var(--color-white);
  }
  
  .nav-link.hover-active .nav-link-bg {
    transform: scaleX(1);
  }
  
  .nav-indicator {
    transition: none !important;
  }
  
  .hamburger span {
    transition: none !important;
  }
  
  .nav.open .nav-link {
    animation: none !important;
  }
}

:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 2px;
}
