/* ==========================================================================
   ITFoK 2026 DIGITAL FESTIVAL PLATFORM
   Curatorial Premise: "IMAGINING JUSTICE: From Unrest to Accountability"
   Design Style: The Dramatic Theatrical Broadsheet (Biennale & Poster Aesthetic)
   Derived from Google Stitch MCP Design System (Elevated Arts Edition)
   ========================================================================== */

:root {
  /* Colors: Master Theatrical Stage Noir Palette */
  --bg-pitch: #0a0b0d;              /* Deep Velvet Stage Pitch / Black Box */
  --surface-dim: #111215;           /* Ambient Ground Substrate */
  --surface-low: #17181c;           /* Curatorial Card Surface */
  --surface-container: #1e2025;     /* Level 2 Module Surface */
  --surface-high: #272930;          /* Raised Stage Panel */
  --surface-highest: #32353e;       /* Highlight Surface */
  
  --primary-red: #d93829;           /* Insurrection Red / Curatorial Accent */
  --primary-red-hover: #b81f15;
  --primary-tint: #ffb4a8;          /* Light Red Tint */
  --primary-dark: #690001;          /* On-Primary Dark */
  
  --secondary-ochre: #fabc4d;       /* Footlight Ochre / Halogen Glow */
  --secondary-dark: #bd8718;        /* Ochre Dark / Container */
  --secondary-deep: #432c00;
  
  --newsprint-bone: #f5f2e9;        /* Newsprint Ivory / Editorial Bone */
  --text-main: #e2e1dc;             /* Literary Reading Text */
  --text-muted: #9497a7;            /* Secondary Inscription / Stage Notes */
  --border-hairline: #2b2d37;       /* Theatrical Rule Line */
  --border-light: #444754;
  
  --color-success: #10b981;
  --color-error: #ff4d4d;
  --color-sold-out: #e11d48;

  /* Artistic Typography (Option A: The Dramatic Theatrical Broadsheet) */
  --font-display: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-editorial: 'Newsreader', 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-malayalam: 'Anek Malayalam', 'Gayathri', 'Manjari', sans-serif;
  --font-mono: 'Space Mono', 'JetBrains Mono', monospace;

  /* Spacing Rhythm */
  --space-xs: 0.25rem;  /* 4px */
  --space-sm: 0.5rem;   /* 8px */
  --space-md: 1rem;     /* 16px */
  --space-lg: 1.5rem;   /* 24px */
  --space-xl: 2.5rem;   /* 40px */
  --space-2xl: 4rem;    /* 64px */

  --radius-global: 0px;
}

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

html {
  font-family: var(--font-body);
  background-color: var(--bg-pitch);
  color: var(--text-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  line-height: 1.55;
  background-color: var(--bg-pitch);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

/* Tactile Print & Film Grain Overlay for Theatrical Depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.032;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  z-index: 99999;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-pitch);
}
::-webkit-scrollbar-thumb {
  background: var(--surface-highest);
  border: 1px solid var(--border-hairline);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--primary-red);
}

/* Selection */
::selection {
  background: var(--primary-red);
  color: var(--newsprint-bone);
}

/* Typographic Hierarchy Classes */
.font-display-hero {
  font-family: var(--font-display);
  font-size: clamp(3.25rem, 7.5vw, 6.75rem);
  font-weight: 400;
  line-height: 0.94;
  letter-spacing: -0.015em;
}

.font-headline-xl {
  font-family: var(--font-display);
  font-size: clamp(2.35rem, 4.8vw, 4.25rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.font-headline-lg {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.2vw, 2.75rem);
  font-weight: 400;
  line-height: 1.12;
}

.font-headline-md {
  font-family: var(--font-serif);
  font-size: clamp(1.3rem, 2.2vw, 1.9rem);
  font-weight: 600;
  line-height: 1.25;
}

.font-headline-sm {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.font-body-lg {
  font-family: var(--font-editorial);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.7;
}

.font-body-md {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.6;
}

.font-body-sm {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 400;
  line-height: 1.5;
}

.font-editorial-quote {
  font-family: var(--font-editorial);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.65;
}

.font-label-caps {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.font-label-mono {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 400;
  line-height: 1.15rem;
  letter-spacing: 0.02em;
}

.font-malayalam {
  font-family: var(--font-malayalam);
  font-feature-settings: "liga" 1;
}

.font-serif-italic {
  font-family: var(--font-display);
  font-style: italic;
}

/* Curatorial Drop Cap */
.curatorial-dropcap::first-letter {
  font-family: var(--font-display);
  font-size: 3.75rem;
  float: left;
  line-height: 0.78;
  padding-right: 0.6rem;
  padding-top: 0.2rem;
  color: var(--secondary-ochre);
}

/* Stage Chiaroscuro & Footlight Glow */
.stage-spotlight-hero {
  background: 
    radial-gradient(circle at 18% 22%, rgba(250, 188, 77, 0.13) 0%, transparent 45%),
    radial-gradient(circle at 82% 38%, rgba(217, 56, 41, 0.16) 0%, transparent 50%),
    var(--surface-dim);
}

.theatrical-glow-red {
  box-shadow: 0 0 40px -8px rgba(217, 56, 41, 0.22);
}

.theatrical-glow-ochre {
  box-shadow: 0 0 40px -8px rgba(250, 188, 77, 0.18);
}

/* Structural Hairlines & Borders */
.border-broadsheet {
  border: 1px solid var(--border-hairline);
}
.border-broadsheet-t {
  border-top: 1px solid var(--border-hairline);
}
.border-broadsheet-b {
  border-bottom: 1px solid var(--border-hairline);
}
.border-broadsheet-l {
  border-left: 1px solid var(--border-hairline);
}
.border-broadsheet-r {
  border-right: 1px solid var(--border-hairline);
}
.border-accent-red {
  border: 1px solid var(--primary-red) !important;
}
.border-accent-ochre {
  border: 1px solid var(--secondary-ochre) !important;
}

/* Broadside Grid Matrix Overlay */
.broadsheet-grid {
  display: grid;
  gap: var(--space-md);
}

/* Buttons: Refined Theatrical Broadsheet */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.5rem;
  min-height: 48px; /* Accessible touch target */
  background-color: var(--primary-red);
  color: var(--newsprint-bone);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  border: 1px solid var(--primary-red);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-primary:hover {
  background-color: var(--newsprint-bone);
  color: var(--bg-pitch);
  border-color: var(--newsprint-bone);
  box-shadow: 0 4px 20px rgba(217, 56, 41, 0.25);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  background-color: var(--surface-low);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--border-hairline);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-secondary:hover {
  border-color: var(--secondary-ochre);
  color: var(--secondary-ochre);
  background-color: var(--surface-container);
}

.btn-ochre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  background-color: var(--secondary-ochre);
  color: var(--bg-pitch);
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  border: 1px solid var(--secondary-ochre);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-ochre:hover {
  background-color: var(--newsprint-bone);
  color: var(--bg-pitch);
  border-color: var(--newsprint-bone);
}
.btn-secondary:hover {
  border-color: var(--secondary-ochre);
  color: var(--secondary-ochre);
  background-color: var(--surface-container);
}

.btn-ochre {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.75rem 1.25rem;
  min-height: 48px;
  background-color: var(--secondary-ochre);
  color: var(--bg-pitch);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid var(--secondary-ochre);
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn-ochre:hover {
  background-color: var(--newsprint-bone);
  color: var(--bg-pitch);
  border-color: var(--newsprint-bone);
}

/* Badges & Chips */
.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2rem 0.5rem;
  background-color: var(--surface-container);
  border: 1px solid var(--border-hairline);
  color: var(--newsprint-bone);
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.badge-red {
  background-color: var(--primary-red);
  color: var(--newsprint-bone);
  border: 1px solid var(--primary-red);
}

.badge-ochre {
  background-color: var(--secondary-ochre);
  color: var(--bg-pitch);
  border: 1px solid var(--secondary-ochre);
}

.badge-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background-color: var(--primary-red);
  color: var(--newsprint-bone);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.5rem;
  text-transform: uppercase;
}

.badge-live-dot {
  width: 6px;
  height: 6px;
  background-color: var(--newsprint-bone);
  display: inline-block;
  animation: pulse-dot 1.5s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

/* Marquee Ticker */
@keyframes marquee {
  0% { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

.animate-marquee {
  display: inline-flex;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
}
.animate-marquee:hover {
  animation-play-state: paused;
}

/* Interactive Card Effects */
.stage-card {
  background-color: var(--surface-low);
  border: 1px solid var(--border-hairline);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}
.stage-card:hover {
  border-color: var(--primary-red);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.8), 0 0 24px -6px rgba(217, 56, 41, 0.2);
}

.stage-card-ochre:hover {
  border-color: var(--secondary-ochre);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -10px rgba(0, 0, 0, 0.8), 0 0 24px -6px rgba(250, 188, 77, 0.2);
}

/* Ticket Stub Notched Pass (Voucher) */
.ticket-voucher {
  background: var(--surface-low);
  border: 1px solid var(--border-hairline);
  position: relative;
  overflow: hidden;
}

.ticket-notch-l {
  position: absolute;
  left: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-color: var(--bg-pitch);
  border: 1px solid var(--border-hairline);
  transform: translateY(-50%) rotate(45deg);
}

.ticket-notch-r {
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background-color: var(--bg-pitch);
  border: 1px solid var(--border-hairline);
  transform: translateY(-50%) rotate(45deg);
}

.ticket-divider-dash {
  border-top: 2px dashed var(--border-hairline);
  margin: 1.25rem 0;
}

/* Soundwave Animation */
@keyframes soundwave {
  0%, 100% { height: 4px; }
  50% { height: 16px; }
}
.soundwave-bar {
  animation: soundwave 1.2s ease-in-out infinite;
}
.soundwave-bar:nth-child(2) { animation-delay: 0.2s; }
.soundwave-bar:nth-child(3) { animation-delay: 0.4s; }
.soundwave-bar:nth-child(4) { animation-delay: 0.6s; }
.soundwave-bar:nth-child(5) { animation-delay: 0.8s; }

/* Modal Backdrop & Dialog */
.itfok-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(11, 12, 14, 0.94);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}
.itfok-modal-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.itfok-modal-container {
  background-color: var(--surface-low);
  border: 1px solid var(--border-hairline);
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.9);
  transform: translateY(20px);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.itfok-modal-backdrop.active .itfok-modal-container {
  transform: translateY(0);
}

/* Toast Container */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}
.itfok-toast {
  pointer-events: auto;
  background-color: var(--surface-high);
  border-left: 4px solid var(--primary-red);
  border-top: 1px solid var(--border-hairline);
  border-right: 1px solid var(--border-hairline);
  border-bottom: 1px solid var(--border-hairline);
  color: var(--text-main);
  padding: 0.875rem 1.25rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.7);
  animation: slideToast 0.25s ease-out;
}
@keyframes slideToast {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Interactive Map Blueprint Styling */
.map-building {
  cursor: pointer;
  transition: fill 0.2s, stroke 0.2s;
}
.map-building:hover, .map-building.active {
  fill: var(--primary-red) !important;
  fill-opacity: 0.6 !important;
  stroke: var(--newsprint-bone) !important;
  stroke-width: 1.5 !important;
}

/* Print Styles for Box Office Voucher */
@media print {
  body * {
    visibility: hidden;
  }
  #printable-voucher, #printable-voucher * {
    visibility: visible;
  }
  #printable-voucher {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
    padding: 20px;
  }
  .no-print {
    display: none !important;
  }
}
