/* ============================================
   O-FEST — International Festival of Experimental Art
   Main stylesheet
   ============================================ */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Onest:wght@300;400;500;700;900&display=swap');

/* ---------- Design tokens ---------- */
:root {
  /* Colors */
  --color-bg: #060003;
  --color-cinder: #0d0a12;
  --color-red: #e50a00;
  --color-whisper: #f0eef5;
  --color-blue-light: #86e7ff;
  --color-blue-mid: #368dfa;
  --color-blue-deep: #1a0a75;
  --color-smoky: #5a556b;

  --color-whisper-85: rgba(240, 238, 245, 0.85);
  --color-whisper-70: rgba(240, 238, 245, 0.7);
  --color-whisper-65: rgba(240, 238, 245, 0.65);
  --color-whisper-60: rgba(240, 238, 245, 0.6);
  --color-whisper-55: rgba(240, 238, 245, 0.55);
  --color-whisper-50: rgba(240, 238, 245, 0.5);
  --color-whisper-45: rgba(240, 238, 245, 0.45);
  --color-whisper-40: rgba(240, 238, 245, 0.4);
  --color-whisper-35: rgba(240, 238, 245, 0.35);
  --color-whisper-30: rgba(240, 238, 245, 0.3);
  --color-whisper-25: rgba(240, 238, 245, 0.25);
  --color-whisper-08: rgba(240, 238, 245, 0.08);
  --color-whisper-06: rgba(240, 238, 245, 0.06);
  --color-whisper-04: rgba(240, 238, 245, 0.04);
  --color-whisper-02: rgba(240, 238, 245, 0.02);

  --color-red-45: #e50a00;
  --color-red-20: rgba(229, 10, 0, 0.2);
  --color-red-15: rgba(229, 10, 0, 0.15);
  --color-red-08: rgba(229, 10, 0, 0.08);
  --color-red-06: rgba(229, 10, 0, 0.06);
  --color-red-04: rgba(229, 10, 0, 0.04);

  --color-cyan-20: rgba(134, 231, 255, 0.2);
  --color-cyan-12: rgba(134, 231, 255, 0.12);
  --color-cyan-10: rgba(134, 231, 255, 0.1);

  --color-white-30: rgba(255, 255, 255, 0.3);
  --color-white-08: rgba(255, 255, 255, 0.08);
  --color-white-06: rgba(255, 255, 255, 0.06);

  /* Fonts */
  --font-mono: 'Space Mono', monospace;
  --font-sans: 'Onest', sans-serif;

  /* Layout */
  --container-max: 1200px;
  --header-height: 72px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--color-bg);
  color: var(--color-whisper);
  font-family: var(--font-sans);
  font-weight: 400;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Film-grain noise overlay — recreates the brand's "screen artifact" texture
   using an inline SVG feTurbulence filter, no external image required.
   Kept deliberately faint: it should read as film grain sitting on
   top of the image, not as a haze over the type. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix in='t' type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.2' intercept='-0.6'/%3E%3CfeFuncG type='linear' slope='2.2' intercept='-0.6'/%3E%3CfeFuncB type='linear' slope='2.2' intercept='-0.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.section-label span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 2.4px;
  text-transform: uppercase;
  color: var(--color-red);
  white-space: nowrap;
}

.section-label .line {
  height: 1px;
  width: 80px;
  background: var(--color-red);
  opacity: 0.4;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 2.42px;
  text-transform: uppercase;
  color: var(--color-red);
}

/* ---------- Navigation ---------- */
.main-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1002;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  background: linear-gradient(to bottom, rgba(6,0,3,0.85), transparent);
  backdrop-filter: blur(6px);
  gap: 24px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.22px;
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.nav-logo .o { color: var(--color-red); }
.nav-logo .fest { color: var(--color-whisper); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.54px;
  text-transform: uppercase;
  color: var(--color-whisper-55);
  transition: color 0.2s ease;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--color-whisper);
}

.nav-lang {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
  position: relative;
  z-index: 1002;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13.3px;
  padding: 6px 11px;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.2);
  background: rgba(6,0,3,0.6);
  color: var(--color-smoky);
  cursor: pointer;
}

.lang-btn.active {
  border-color: var(--color-red);
  background: rgba(229,10,0,0.12);
  color: var(--color-whisper);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  z-index: 1002;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--color-whisper);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-cinder);
  border-top: 1px solid var(--color-red-20);
  padding: 81px 0 40px;
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 40px;
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.footer-top {
  display: flex;
  gap: 60px;
  justify-content: center;
}

.footer-brand {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.footer-logo {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 28px;
}

.footer-logo .o { color: var(--color-red); }
.footer-logo .fest { color: var(--color-whisper); }

.footer-tagline {
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 22.4px;
  color: var(--color-whisper-45);
}

.footer-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-col h4 {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--color-red);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col ul a {
  font-family: var(--font-sans);
  font-size: 14px;
  color: var(--color-whisper-50);
  transition: color 0.2s ease;
}

.footer-col ul a:hover {
  color: var(--color-whisper);
}

.footer-contact-email {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--color-whisper);
  border-bottom: 1px solid rgba(229,10,0,0.4);
  padding-bottom: 3px;
  display: inline-block;
  width: fit-content;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--color-white-06);
  padding-top: 41px;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p,
.footer-socials a {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 1.1px;
  color: var(--color-whisper-25);
}

.footer-socials {
  display: flex;
  gap: 20px;
}

.footer-socials a {
  text-transform: uppercase;
  color: var(--color-whisper-30);
  transition: color 0.2s ease;
}

.footer-socials a:hover {
  color: var(--color-whisper);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1.82px;
  text-transform: uppercase;
  padding: 18px 48px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  opacity: 0.9;
}

.btn-primary {
  background: var(--color-red);
  color: var(--color-whisper);
  border: none;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--color-whisper-30);
  color: var(--color-whisper);
  font-size: 12px;
  letter-spacing: 1.68px;
  padding: 17px 41px;
}

/* ---------- Page hero (sub-pages) ---------- */
.page-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 200px 40px 81px;
  border-bottom: 1px solid var(--color-red-15);
  overflow: hidden;
  background: var(--color-bg);
}

/* A single jagged band along the bottom edge — the same hard-edged
   comb language as the main hero, scaled down to a quiet accent
   rather than a full-bleed treatment. */
.page-hero::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 50%;
  background: linear-gradient(0deg, var(--color-red-15) 0%, transparent 100%);
  clip-path: polygon(0% 100%, 0.0% 33.0%, 3.1% 94.3%, 6.2% 34.3%, 9.4% 99.5%, 12.5% 46.3%, 15.6% 97.5%, 18.8% 48.8%, 21.9% 99.2%, 25.0% 62.3%, 28.1% 97.3%, 31.2% 61.2%, 34.4% 97.3%, 37.5% 69.0%, 40.6% 99.5%, 43.8% 41.6%, 46.9% 97.5%, 50.0% 49.5%, 53.1% 95.6%, 56.2% 55.6%, 59.4% 99.7%, 62.5% 38.7%, 65.6% 96.5%, 68.8% 43.7%, 71.9% 96.3%, 75.0% 31.2%, 78.1% 97.8%, 81.2% 39.6%, 84.4% 97.8%, 87.5% 47.1%, 90.6% 96.0%, 93.8% 57.4%, 96.9% 99.5%, 100.0% 51.0%, 100% 100%);
}

.page-hero::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  background: linear-gradient(0deg, rgba(54,141,250,0.18) 0%, transparent 100%);
  clip-path: polygon(0% 100%, 0.0% 20.0%, 4.5% 88.0%, 9.1% 15.0%, 13.6% 92.0%, 18.2% 30.0%, 22.7% 95.0%, 27.3% 18.0%, 31.8% 90.0%, 36.4% 35.0%, 40.9% 96.0%, 45.5% 22.0%, 50.0% 92.0%, 54.5% 28.0%, 59.1% 95.0%, 63.6% 19.0%, 68.2% 90.0%, 72.7% 32.0%, 77.3% 94.0%, 81.8% 17.0%, 86.4% 92.0%, 90.9% 26.0%, 95.5% 96.0%, 100.0% 20.0%, 100% 100%);
}

.page-hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--container-max);
  width: 100%;
}

.page-hero-title {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: clamp(40px, 6.5vw, 84px);
  line-height: 0.95;
  letter-spacing: -2px;
  text-transform: uppercase;
  color: var(--color-whisper);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ---------- Principle strip ----------
   Three parallel facts about the festival — not a sequence, so no
   numbered markers. A full-width band per fact, in the spirit of the
   brand's hairline-rule / mono-label reference sheets, instead of the
   glass-card SaaS pattern. The accent bar on the left is a tag, not a
   step counter. */
.principle-strip {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: 40px;
  padding: 36px 0;
  border-top: 1px solid var(--color-white-08);
}

.principle-strip:last-child {
  border-bottom: 1px solid var(--color-white-08);
}

.principle-strip::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--color-red);
}

.principle-strip.cyan::before { background: var(--color-blue-light); }
.principle-strip.red::before { background: var(--color-red); }

.principle-tag {
  flex-shrink: 0;
  width: 168px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 28px;
}

.principle-tag-label {
  font-family: var(--font-mono);
  font-size: 9px;
  letter-spacing: 1.98px;
  text-transform: uppercase;
  color: var(--color-whisper-35);
}

.principle-tag-title {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 16px;
  color: var(--color-whisper);
}

.principle-strip-body {
  flex: 1;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 25px;
  color: var(--color-whisper-55);
  padding-top: 1px;
}

.principle-strip-body strong {
  color: var(--color-whisper-85);
  font-weight: 500;
}

/* ---------- Grain layer (stronger noise for hero/page-hero) ---------- */
.grain-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.6;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch' result='t'/%3E%3CfeColorMatrix in='t' type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.4' intercept='-0.65'/%3E%3CfeFuncG type='linear' slope='2.4' intercept='-0.65'/%3E%3CfeFuncB type='linear' slope='2.4' intercept='-0.65'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

/* ---------- Cursor (subtle desktop touch) ---------- */
.custom-cursor {
  position: fixed;
  width: 12px;
  height: 12px;
  border-radius: 6px;
  background: var(--color-red);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  .custom-cursor { display: block; }
  * { cursor: none !important; }
}

/* ---------- Responsive base ---------- */
@media (max-width: 1024px) {
  .main-nav {
    padding: 18px 20px;
  }
  .nav-right {
    gap: 16px;
  }
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    height: 100vh;
    width: min(320px, 80vw);
    background: var(--color-cinder);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 28px;
    padding: 40px;
    transition: right 0.3s ease;
    border-left: 1px solid var(--color-red-20);
    z-index: 1001;
  }
  .nav-links.open {
    right: 0;
  }
  .nav-toggle {
    display: flex;
  }
  .footer-top {
    flex-direction: column;
    gap: 48px;
  }
}

@media (max-width: 640px) {
  .container { padding: 0 20px; }
  .page-hero { padding: 160px 20px 60px; }
  .footer-inner { padding: 0 20px; }
}

@media (max-width: 400px) {
  .nav-logo { font-size: 18px; }
  .nav-right { gap: 10px; }
  .lang-btn { padding: 5px 8px; font-size: 11px; }
  .nav-toggle { padding: 6px; }
}
