/* --- DESIGN SYSTEM & VARIABLES --- */
:root {
  --color-bg: #000000; /* Universal background color */
  --color-text: #ece7e8;
  --color-accent: #8b1a1a;
  
  --glass-bg: rgba(236, 231, 232, 0.03);
  --glass-border: rgba(236, 231, 232, 0.12);
  --glass-vibrant: rgba(236, 231, 232, 0.2);
  
  --font-display: 'DeValencia', serif;
  --font-body: Georgia, serif;
  
  /* Unified Motion Identity - Out-Expo */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
}



/* --- SELECTION COLOR (Polish) --- */
::selection {
  background: var(--color-accent);
  color: var(--color-text);
}



/* --- FONTS --- */
@font-face {
  font-family: 'DeValencia';
  src: url('../assets/fonts/DeValencia.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}



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



html {
  scroll-behavior: smooth;
  background-color: #000000; /* Fallback */
  overflow-x: hidden; /* Ensure no horizontal scroll */
  background-color: var(--color-bg);
}



body {
  background-color: #000000;
  background-color: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-display);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}



/* Ensure all major sections default to the brand background */
section, .section-padding, .contact-section {
  background-color: #000000;
  background-color: var(--color-bg);
}



/* --- TYPOGRAPHY UTILITIES --- */
.responsive-h2 {
  font-family: var(--font-display); 
  font-size: clamp(3rem, 7vw, 6rem); 
  text-transform: uppercase; 
  letter-spacing: 0.3em; 
  line-height: 0.9; 
  margin-bottom: 80px;
  transform: scaleY(1.3);
  transform-origin: left;
}



.responsive-p {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.3rem);
  line-height: 1.9; /* Curation Look: Higher info air */
  opacity: 0.7;
}



/* --- SIGNATURE STYLE --- */
.signature-text {
  font-family: 'Brush Script MT', 'Lucida Handwriting', cursive;
  font-size: 2.5rem;
  color: var(--color-text);
  transform: rotate(-4deg);
  display: inline-block;
  margin-top: 10px;
}



/* --- HEADER DESKTOP --- */
.header {
  position: fixed;
  top: 15px;
  left: 50%;
  transform: translateX(-50%) translateY(0) translateZ(0);
  width: 90%;
  max-width: 1400px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: rgba(10, 10, 10, 0.6);
  backdrop-filter: blur(25px) saturate(180%);
  -webkit-backdrop-filter: blur(25px) saturate(180%);
  border-radius: 60px; /* Squircel appearance */
  border: 0.5px solid var(--glass-border);
  z-index: 9999;
  will-change: transform, opacity;
  transition: transform 1.2s var(--ease-out), opacity 0.8s var(--ease-out);
}



.header-hidden {
  transform: translateX(-50%) translateY(-150%) translateZ(0);
  opacity: 0;
  pointer-events: none;
}



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



.nav-links {
  display: flex;
  gap: 35px;
}



.nav-links a {
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  font-size: 1.1rem;
  letter-spacing: 0.2em;
  transition: opacity 0.3s ease;
}



.nav-links a:hover {
  opacity: 0.7;
}



/* --- MOBILE MENU --- */
.hamburger {
  display: none;
  cursor: pointer;
  font-size: 2rem;
  color: var(--color-text);
}



#menu-toggle { display: none; }



/* --- HERO (HOME) --- */
.hero {
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  background: var(--color-bg);
  overflow: hidden;
  text-align: center;
  padding: 0 5%;
}



.hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, var(--color-bg) 100%);
  z-index: 1;
  pointer-events: none;
}



.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #000;
  z-index: 0;
}



.mobile-video { display: none; }



@media (max-width: 768px) {
  .desktop-video { display: none; }
  .mobile-video { display: block; }
}



.hero h1 {
  position: relative;
  z-index: 2;
  color: var(--color-text);
  visibility: visible;
  font-size: clamp(2.5rem, 12vw, 14rem);
  transform: scaleY(1.45);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  line-height: 0.8;
  opacity: 1;
  animation: diffuseEntrance 2.5s var(--ease-out) forwards;
}




/* --- PROJECT HERO (EVENTS) --- */
.project-hero {
  height: 100vh;
  width: 100%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  isolation: isolate;
  overflow: hidden;
}



.title-container {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  transform: translateY(-8vh);
  width: 100%;
  padding: 0 5%;
}



.city-label {
  color: var(--color-accent);
  font-size: clamp(1.8rem, 7vw, 6rem);
  text-transform: uppercase;
  letter-spacing: 0.5em;
  z-index: 2;
  margin-bottom: 50px;
}



.project-hero h1 {
  font-size: clamp(2.5rem, 12vw, 9rem);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transform: scaleY(1.5);
  line-height: 0.9;
  opacity: 0;
  animation: diffuseEntrance 2.5s var(--ease-out) forwards;
}



/* Generic Hero Header (Subpages) */
.section-padding > h1.responsive-h2:first-child,
.contact-section > h1:first-child {
  opacity: 0;
  animation: diffuseEntrance 2.5s var(--ease-out) forwards;
}



/* --- HERO TEXT ENTRANCE (Diffusion Effect) --- */
@keyframes diffuseEntrance {
  0% {
    opacity: 0;
    filter: blur(15px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
  }
}



/* --- SECTIONS --- */
.section-padding {
  padding: clamp(60px, 10vw, 150px) 8% clamp(60px, 10vw, 100px) 8%;
}



.contact-section {
  padding: 180px 10% 100px 10%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}



.contact-container {
  display: flex;
  flex-wrap: wrap;
  gap: 80px;
  justify-content: space-between;
}



.contact-info { flex: 1; min-width: 300px; }



/* --- COMPONENTS --- */



/* Glass Panel */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--glass-border);
  border-radius: 60px; /* Increased for Squircel look */
  padding: 50px 40px;
  box-shadow: none;
  display: flex !important;
  flex-direction: column !important;
  min-height: 200px;
  height: auto;
  transition: transform 0.5s var(--ease-ios), 
              background 0.4s ease, 
              border-color 0.4s ease,
              box-shadow 0.4s ease;
  will-change: transform;
}



.glass-panel:hover {
  transform: scale(1.02) !important;
  border-color: var(--glass-vibrant);
  background: rgba(236, 231, 232, 0.06);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}



/* Liquid Scroll Effect: Elements contract while moving */
body.is-scrolling .glass-panel,
body.is-scrolling .radical-card {
  transform: scale(0.98) translateY(2px) translateZ(0);
  transition: transform 0.8s var(--ease-out);
}



/* Buttons */
.cta-button {
  display: inline-block;
  padding: 15px 40px;
  border: 0.5px solid var(--glass-border);
  color: var(--color-text);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-radius: 100px; /* Full Squircel pill */
  font-family: var(--font-display);
  font-size: 1.2rem;
  transition: all 0.4s var(--ease-ios);
  background: rgba(236, 231, 232, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  cursor: pointer;
}



.cta-button:hover {
  background: var(--color-text);
  color: var(--color-bg);
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(236, 231, 232, 0.2);
}



/* --- CUSTOM CHECKBOXES --- */
.checkbox-group {
  margin-bottom: 35px;
  text-align: left;
}



.checkbox-container {
  display: flex;
  align-items: center;
  position: relative;
  padding-left: 38px;
  margin-bottom: 18px;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 1rem;
  user-select: none;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}



.checkbox-container:hover {
  opacity: 1;
}



/* Hide default checkbox */
.checkbox-container input {
  position: absolute !important;
  opacity: 0 !important;
  cursor: pointer;
  height: 0 !important;
  width: 0 !important;
  margin: 0 !important;
}



/* Custom checkbox box */
.checkmark {
  position: absolute;
  top: -1px;
  left: 0;
  height: 24px;
  width: 24px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(236, 231, 232, 0.2);
  border-radius: 10px; /* Smoother squircel checkbox */
  transition: all 0.3s var(--ease-out);
}



.checkbox-container:hover input ~ .checkmark {
  border-color: rgba(236, 231, 232, 0.5);
}



.checkbox-container input:checked ~ .checkmark {
  border-color: var(--color-accent);
  background: rgba(139, 26, 26, 0.15);
}



/* The tick icon */
.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 8px;
  top: 4px;
  width: 6px;
  height: 11px;
  border: solid var(--color-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}



.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}



.checkbox-container input:focus-visible ~ .checkmark {
  box-shadow: 0 0 15px rgba(139, 26, 26, 0.3);
  border-color: var(--color-accent);
}



/* --- COOKIE BANNER --- */
.cookie-banner {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(150%);
  width: 90%;
  max-width: 550px;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(40px) saturate(200%);
  -webkit-backdrop-filter: blur(40px) saturate(200%);
  border: 0.5px solid var(--glass-border);
  border-radius: 50px; /* Squircel banner */
  padding: 30px;
  z-index: 10001;
  display: flex;
  flex-direction: column;
  gap: 20px;
  transition: transform 0.8s var(--ease-out);
}



.cookie-banner.active {
  transform: translateX(-50%) translateY(0);
}



.cookie-banner p {
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text);
  opacity: 0.9;
}



.cookie-buttons {
  display: flex;
  gap: 15px;
  justify-content: flex-end;
}



.cookie-btn {
  padding: 12px 30px;
  font-family: var(--font-display);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.3s ease;
  background: var(--color-text);
  color: var(--color-bg);
  border-radius: 80px;
  border: none;
}



.cookie-btn:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}



/* --- FOOTER (Header Style) --- */
.footer {
  width: 95%;
  max-width: 1400px;
  margin: 0 auto 30px auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 40px 60px;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 60px;
  border: 1px solid rgba(236, 231, 232, 0.1);
  position: relative;
  z-index: 10;
}



.footer p, .footer-links a {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text);
  opacity: 0.6;
  text-decoration: none;
  transition: opacity 0.3s ease;
}



.footer-links {
  display: flex;
  gap: 25px;
}



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



/* Scroll Arrow */
.scroll-arrow {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 60px;
  cursor: pointer;
  z-index: 10;
}



/* Modal */
.modal-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: #000000;
  background: rgba(0, 0, 0, 0.9);
  z-index: 10000; display: none; justify-content: center; align-items: center;
  opacity: 0; transition: opacity 0.3s ease;
}



.modal-overlay.active { display: flex; opacity: 1; }



.modal-content {
  background: rgba(15, 15, 15, 0.8); 
  backdrop-filter: blur(30px) saturate(150%);
  -webkit-backdrop-filter: blur(30px) saturate(150%);
  border: 0.5px solid var(--glass-border);
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  padding: 60px; max-width: 500px; width: 90%; text-align: center;
  position: relative; transform: translateY(20px); transition: transform 0.3s ease;
}



.modal-overlay.active .modal-content { transform: translateY(0); }



.close-modal {
  position: absolute; top: 20px; right: 20px; color: var(--color-text);
  font-size: 1.5rem; cursor: pointer; background: none; border: none;
}



.newsletter-form input,
.newsletter-form textarea {
  width: 100%; padding: 15px; background: rgba(236, 231, 232, 0.05);
  border: 0.5px solid rgba(236, 231, 232, 0.15); 
  border-radius: 30px; /* Squircel inputs */
  color: var(--color-text);
  font-family: var(--font-body); font-size: 1rem; margin-bottom: 20px; outline: none;
  resize: vertical;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}



.newsletter-form button {
  width: 100%; padding: 15px; background: var(--color-text); color: var(--color-bg); border-radius: 80px;
  border: none; font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 0.1em; font-size: 1.1rem; cursor: pointer; transition: opacity 0.3s;
}



.newsletter-form button:hover { opacity: 0.8; }



.newsletter-form input:focus,
.newsletter-form textarea:focus {
  border-color: var(--color-accent);
  box-shadow: 0 0 15px rgba(139, 26, 26, 0.2); /* Soft glow focus */
  background-color: rgba(236, 231, 232, 0.12); /* Slightly brighter background on focus */
}



/* --- RADICAL EVENT STRUCTURE LAYOUT --- */
.structure-radical {
  margin-top: 100px;
  display: flex;
  flex-direction: column;
  gap: 60px; /* Slightly reduced gap between items */
}



.structure-item-radical {
  position: relative;
  display: flex;
  width: 100%;
}



.structure-item-radical:nth-child(even) {
  justify-content: flex-end;
}



.radical-index {
  font-family: var(--font-display);
  font-size: clamp(5rem, 15vw, 11rem); /* Reduced slightly to prevent clipping */
  line-height: 0.8;
  color: rgba(139, 26, 26, 0.1); /* Very faint fallback color */
  -webkit-text-fill-color: transparent; 
  -webkit-text-stroke: 2px var(--color-accent); 
  opacity: 0.9;
  flex-shrink: 0;
  user-select: none;
  display: block;
  pointer-events: none;
  min-width: 1.2em; /* Ensures the element has width even if font hasn't loaded */
  text-align: center;
}



.radical-content h4 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  margin-bottom: 20px;
  text-transform: uppercase;
  color: var(--color-text); /* Revert to default text color for headings */
}



.radical-content.glass-panel {
  flex: 0 1 100%;
  max-width: 900px;
  display: flex !important; /* Force flex for horizontal layout */
  flex-direction: row; /* Ensure number and text are side-by-side */
  align-items: center; 
  gap: clamp(20px, 5vw, 60px);
  position: relative;
  overflow: visible;
}



.radical-text-wrapper {
    flex: 1; /* Allow text wrapper to take remaining space */
    position: relative; /* For z-index */
    z-index: 2; /* Ensure text is above the number */
}



.structure-item-radical:nth-child(even) .radical-content.glass-panel {
  flex-direction: row-reverse; /* Reverse order for even items */
}



.structure-item-radical:nth-child(even) .radical-text-wrapper {
    text-align: right; /* Align text right for even items */
}



/* --- ANIMATIONS --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  will-change: opacity, transform;
}



.reveal.active {
  opacity: 1;
  transform: translateY(0);
}



/* --- UTILITIES --- */
.flex-wrap-responsive {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: clamp(40px, 5vw, 80px);
}



/* --- MOBILE OPTIMIERUNG (768px) --- */
@media (max-width: 768px) {
  .header {
    width: 92% !important;
    padding: 12px 25px !important;
    top: 10px !important;
    border-radius: 50px !important;
  }



  .logo img {
    height: 45px !important;
  }



  .hamburger {
    display: block;
  }



  .nav-links {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.85); 
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(236, 231, 232, 0.1);
    border-radius: 50px;
    flex-direction: column;
    align-items: center;
    padding: 30px 0;
    gap: 0;
    opacity: 0;
    transform: translateY(-10px) scale(0.96);
    transform-origin: top;
    transition: opacity 0.3s ease, transform 0.6s var(--ease-ios);
    pointer-events: none;
  }



  #menu-toggle:checked ~ .nav-links {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
  }



  .nav-links a {
    font-size: 1.5rem !important;
    padding: 15px 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(236, 231, 232, 0.05);
    opacity: 0;
    transform: translateY(15px);
    transition: transform 0.6s var(--ease-ios), opacity 0.4s ease;
  }



  #menu-toggle:checked ~ .nav-links a {
    opacity: 1;
    transform: translateY(0);
  }



  /* Staggered entrance for links */
  #menu-toggle:checked ~ .nav-links a:nth-child(1) { transition-delay: 0.05s; }
  #menu-toggle:checked ~ .nav-links a:nth-child(2) { transition-delay: 0.10s; }
  #menu-toggle:checked ~ .nav-links a:nth-child(3) { transition-delay: 0.15s; }
  #menu-toggle:checked ~ .nav-links a:nth-child(4) { transition-delay: 0.20s; }



  /* Radical Structure Mobile Adjustments */
  .structure-radical {
    gap: 30px;
    margin-top: 60px;
  }

  .structure-item-radical,
  .structure-item-radical:nth-child(even) {
    width: 100%;
    justify-content: stretch !important;
    align-self: stretch !important;
  }

  .radical-card,
  .structure-item-radical:nth-child(even) .radical-card {
    width: 100%;
    max-width: 100%;
    padding: 32px 22px !important;
    gap: 18px !important;
    border-radius: 36px !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    text-align: left !important;
    overflow: hidden;
  }

  .radical-index {
    font-size: clamp(3.5rem, 16vw, 5.5rem) !important;
    line-height: 0.9;
    margin-bottom: 4px;
    min-width: 0;
  }

  .radical-text,
  .structure-item-radical:nth-child(even) .radical-text {
    width: 100%;
    max-width: 100%;
    text-align: left !important;
  }

  .radical-text h4 {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    letter-spacing: 0.12em;
    margin-bottom: 16px;
    word-break: break-word;
    overflow-wrap: break-word;
  }

  .radical-text p {
    font-size: 1rem;
    line-height: 1.55;
    overflow-wrap: break-word;
  }



  .footer {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }



  .hero h1, .project-hero h1 {
    font-size: clamp(2rem, 10vw, 8rem); /* Slightly smaller base to ensure fit */
    letter-spacing: 0.02em; /* Reduced spacing to save horizontal real estate */
    transform: scaleY(1.2); 
    max-width: 100%;
    white-space: normal; /* Allow text to wrap */
    word-break: break-word; /* Break long words */
  }



  .city-label {
    letter-spacing: 0.2em; /* Verhindert das Herausragen von 'Vienna' */
    margin-bottom: 20px;
  }



  .section-padding, .contact-section {
    padding-top: 140px !important;
    justify-content: flex-start !important;
  }
}