/* fix for the width/padding issue */
* {
  box-sizing: border-box;
}

/* snapping container */
html {
  height: 100%;
  overflow: hidden;
}

body {
  height: 100%;
  margin: 0;
  padding: 0;
  background: url('../images/hero.webp') center/cover no-repeat;
  color: white;
  scroll-snap-type: y mandatory;
  overflow-y: scroll;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  font-size: clamp(14px, 1.6vw, 18px); /* global fluid base */
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  z-index: -1;
}

/* force sections to be the exact "snap" size */
section, .split-experience, footer {
  height: 100vh;
  width: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

a {
  color: #c1121f;
  text-decoration: none;
  transition: color 0.3s ease, opacity 0.3s ease;
}

a:hover {
  color: #e63946;
  text-decoration: underline;
}

a:visited {
  color: #a0101a;
}

/* images */
img {
  width: 100%;
  filter: grayscale(100%);
  transition: 0.5s;
}

img:hover {
  filter: grayscale(0%);
  transform: scale(1.03);
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  position: fixed;
  width: 100%;
  z-index: 1000;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(10px);
  box-sizing: border-box;
}

/* logo */
.logo {
  justify-self: start;
  font-weight: bold;
  color: #c1121f;
  font-size: clamp(1.2rem, 4vw, 2rem);
}

.logo span {
  color: #f5f1e8;
}

.logo a {
  margin: 0 10px;
  color: #c1121f;
  text-decoration: none;
  position: relative;
}

.logo a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: #c1121f;
  transition: 0.3s;
}

.logo a:hover::after {
  width: 100%;
}

/* nav */
.nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

.nav a {
  margin: 0 10px;
  color: white;
  text-decoration: none;
  position: relative;
  font-size: clamp(0.75rem, 1.4vw, 1rem);
}

.nav a::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 2px;
  bottom: -4px;
  left: 0;
  background: #c1121f;
  transition: 0.3s;
}

.nav a:hover::after {
  width: 100%;
}

/* language switch */
.lang-switch {
  justify-self: end;
  display: flex;
  gap: 5px;
  flex-shrink: 0;
}

.lang-switch .button {
  display: inline-block;
  cursor: pointer;
  border-radius: 6px;
  transition: transform 0.2s, opacity 0.2s;
}

.lang-switch .button img {
  width: 50px;
  height: auto;
  display: block;
  filter: none;
  transition: transform 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  box-sizing: border-box;
}

.lang-switch .button:hover img {
  transform: scale(1.1);
}

.lang-switch .hidden {
  display: none !important;
}

/* hamburger button — hidden on desktop */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  flex-direction: column;
  gap: 5px;
  justify-self: end;
  z-index: 1100;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: white;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* mobile nav drawer */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.92);
  backdrop-filter: blur(12px);
  z-index: 1050;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav a {
  color: white;
  font-size: clamp(1.4rem, 6vw, 2rem);
  font-family: Georgia, serif;
  text-decoration: none;
  letter-spacing: 2px;
  transition: color 0.2s;
}

.mobile-nav a:hover,
.mobile-nav a:active {
  color: #c1121f;
}

.mobile-nav .mobile-lang {
  display: flex;
  gap: 12px;
  margin-top: 1rem;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  width: 100vw;
  padding: 3rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.3));
}

.hero-title {
  font-size: clamp(2.5rem, 9vw, 7rem);
  font-family: Georgia, serif;
  line-height: 0.1;
  z-index: 1;
}

.hero-title .accent {
  color: #c1121f;
}

.hero-sub {
  font-size: clamp(0.9rem, 2.5vw, 3rem);
  z-index: 1;
  margin-top: 0;
  font-style: italic;
}

/* arrow */
.scroll-indicator {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(22px, 4vw, 32px);
  color: rgba(255,255,255,0.8);
  animation: bounce 1.5s infinite;
  cursor: pointer;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(10px); }
}

/* ==========================================================================
   SPLIT SECTION
   ========================================================================== */
.split-experience {
  display: flex;
  flex-direction: row;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  position: relative;
}

.split-experience::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, transparent 40%, rgba(0,0,0,0.4) 100%);
  pointer-events: none;
  z-index: 3;
}

.side {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  perspective: 1000px;
  transform-style: preserve-3d;
  transition: flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  isolation: isolate;
}

.museum {
  border-right: 2px solid rgba(255, 255, 255, 0.8);
  text-align: right;
  align-items: flex-end;
}

.projects {
  text-align: left;
  align-items: flex-start;
}

.background-target {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
  transition: opacity 0.5s ease;
  will-change: transform;
  transform-style: preserve-3d;
}

.museum-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url('../images/museum.webp');
}

.projects-bg {
  background-image:
    linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)),
    url('../images/participate.webp');
}

.side::before {
  content: '';
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: rgba(15, 15, 15, 0.6);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.museum::before {
  right: 0;
  transform: translateX(100%);
  clip-path: polygon(25% 0%, 100% 0%, 100% 100%, 0% 100%);
}

.projects::before {
  left: 0;
  transform: translateX(-100%);
  clip-path: polygon(0% 0%, 100% 0%, 75% 100%, 0% 100%);
}

.side h2 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  color: #f5f1e8;
  margin: 0;
  text-shadow:
    1px 1px 0px rgba(0, 0, 0, 0.5),
    2px 2px 0px rgba(0, 0, 0, 0.3),
    3px 3px 0px rgba(0, 0, 0, 0.1);
}

.default-content,
.hover-content {
  position: absolute;
  pointer-events: none;
  text-align: center;
  width: auto;
  padding: 0 3rem;
  z-index: 2;
  transition: opacity 0.5s ease;
  will-change: transform;
}

.hover-content {
  opacity: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  transform: translateY(20px);
}

.links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.museum .links { text-align: right; }
.projects .links { text-align: left; }

.links li a {
  display: inline-block;
  position: relative;
  z-index: 20;
  color: #f5f1e8;
  text-decoration: none;
  font-size: clamp(1rem, 2vw, 1.8rem);
  font-weight: bold;
  margin: 15px 0;
  text-transform: uppercase;
  letter-spacing: 3px;
  pointer-events: auto;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* hover interaction */
.side:hover { flex: 4; }
.side:hover::before { transform: translateX(0); }
.side:hover .default-content { opacity: 0; transform: scale(1.3); }
.side:hover .hover-content {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  z-index: 10;
}

.links li a:hover {
  text-shadow:
    1px 1px 0px #111,
    2px 2px 0px #111,
    3px 3px 0px #111;
  transform: translate(-2px, -2px);
}

.split-experience:hover .museum {
  border-right: 2px solid rgba(255, 255, 255, 1);
  transition: border-color 0.3s ease, flex 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   PARALLAX DIVIDER SECTION
   ========================================================================== */
.house {
  height: 100vh;
  width: 100vw;
  background-image: var(--bg2), var(--bg1);
  background-size: contain, cover;
  background-position: center center, center, center;
  background-repeat: no-repeat, no-repeat;
  background-origin: content-box;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
}

/* parallax — disabled on iOS where background-attachment: fixed breaks */
@supports not (-webkit-touch-callout: none) {
  .parallax {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
  }
}

/* ==========================================================================
   WELCOME ABOUT SECTION
   ========================================================================== */
.about {
  padding: 6rem clamp(1.5rem, 8vw, 20rem);
  text-align: center;
  background: rgba(0, 0, 0, 0.5);
}

.about h1, h2 {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 1px;
}

.about h1 {
  font-size: clamp(1.8rem, 5vw, 48px);
  margin-bottom: 20px;
}

.about h2 {
  font-size: clamp(1.4rem, 4vw, 36px);
  margin-bottom: 20px;
}

.about p {
  font-size: clamp(0.9rem, 1.8vw, 18px);
  text-align: center;
  line-height: 1.8;
}

/* ==========================================================================
   EVENTS SECTION
   ========================================================================== */
.events {
  padding: 6rem 2rem;
}

.events-title {
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  margin-bottom: 2rem;
  font-family: Georgia, serif;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.event-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 10px;
}

.event-image {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.6s ease;
}

.event-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2));
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  transition: 0.4s ease;
}

.event-date {
  position: absolute;
  top: 15px;
  left: 15px;
  background: #c1121f;
  padding: 5px 10px;
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  font-weight: bold;
}

.event-overlay h3 {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.4rem);
}

.event-overlay h4 {
  margin-top: 10px;
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: normal;
  color: rgba(255, 255, 255, 0.7);
  opacity: 0;
  transform: translateY(10px);
  transition: 0.4s ease;
}

.event-overlay p {
  opacity: 0;
  transform: translateY(10px);
  transition: 0.4s;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.event-overlay a {
  display: inline-block;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.event-card:hover .event-image { transform: scale(1.1); }

.event-card:hover .event-overlay p,
.event-card:hover .event-overlay h4,
.event-card:hover .event-overlay a {
  opacity: 1;
  transform: translateY(0);
}

.event-overlay a:hover {
  color: #ff4d4d;
  transform: translateY(-2px);
  text-shadow:
    1px 1px 0px rgba(0, 0, 0, 0.5),
    2px 2px 0px rgba(0, 0, 0, 0.3),
    3px 3px 0px rgba(0, 0, 0, 0.1);
}

/* =====================================================================
     CONTACT
======================================================================== */
.contact {
  background: #0a0a0a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  text-align: center;
  gap: 3rem;
}
 
.contact-title {
  font-size: clamp(1.4rem, 4vw, 2.5rem);
  font-family: Georgia, serif;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #f5f1e8;
  margin: 0;
}
 
.contact-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: #c1121f;
  margin: 0.6rem auto 0;
}
 
.contact-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3rem 5rem;
}
 
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  text-align: left;
  max-width: 220px;
}
 
.contact-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  color: #c1121f;
  margin-top: 2px;
}
 
.contact-icon svg {
  width: 100%;
  height: 100%;
}
 
.contact-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
 
.contact-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: #888;
}
 
.contact-text a {
  font-size: clamp(0.85rem, 1.8vw, 1rem);
  color: #f5f1e8;
  text-decoration: none;
  line-height: 1.6;
  transition: color 0.2s;
}
 
.contact-text a:hover {
  color: #c1121f;
}
 
.contact-social p {
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin: 0 0 1rem;
}
 
.contact-social-links {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
}
 
.contact-social-links a {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
 
.contact-social-links a:hover {
  background: #c1121f;
  transform: translateY(-3px);
}
 
.contact-social-links svg {
  width: 28px;
  height: 28px;
  fill: #f5f1e8;
}
 
@media (max-width: 600px) {
  .contact-grid {
    gap: 2rem;
  }
  .contact-item {
    max-width: 100%;
  }
}

/* ==========================================================================
   FOOTER SECTION
   ========================================================================== */
footer {
  background: #111;
  color: #f5f1e8;
  padding: 3rem 2rem;
  font-size: clamp(0.8rem, 1.5vw, 0.9rem);
}

.footer-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5rem;
}

.footer-section h2 {
  margin-bottom: 0.3rem;
  font-family: Georgia, serif;
  font-weight: 500;
  text-align: center;
}

.footer-section p, .footer-section a {
  margin: 0.3rem 0 1rem 0;
  color: #f5f1e8;
  text-decoration: none;
  text-align: center;
}

.footer-section a:hover {
  color: #c1121f;
  text-decoration: underline;
}

/*
.social-links {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 0.5rem;
}

.social-links a {
  display: block;
  width: 24px;
  height: 24px;
}

.social-links svg {
  width: 100%;
  height: 100%;
  fill: #f5f1e8;
  transition: fill 0.3s ease, transform 0.3s ease;
}

.social-links a:hover svg {
  fill: #c1121f;
  transform: scale(1.15);
} */

.footer-bottom {
  text-align: center;
  margin-top: 2rem;
  font-size: clamp(0.7rem, 1.5vw, 0.8rem);
  color: #888;
}

/* text reveal */
.reveal-text span {
  display: inline-block;
  transform: translateY(100%);
  opacity: 0;
  transition: 0.6s ease;
}

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

/* ==========================================================================
   TABLET  (max 768px)
   ========================================================================== */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }
}

/* ==========================================================================
   MOBILE  (max 600px)
   ========================================================================== */
@media (max-width: 600px) {

  /* disable scroll snapping */
  body {
    scroll-snap-type: none;
  }

  section, .split-experience, footer {
    height: auto;
    min-height: 100svh;
    scroll-snap-align: none;
    scroll-snap-stop: unset;
  }

  /* header: logo left, hamburger right, desktop nav hidden */
  .header {
    grid-template-columns: 1fr auto;
    padding: 0.75rem 1.25rem;
    gap: 0;
  }

  .nav {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .lang-switch {
    display: none; /* moved into mobile drawer */
  }

  /* hero */
  .hero {
    padding: 5rem 1.5rem 3rem;
    justify-content: flex-end;
  }

  .hero-title {
    line-height: 1.0;
    margin-bottom: 0.5rem;
  }

  /* split: stacked, content always visible */
  .split-experience {
    flex-direction: column;
    height: auto;
    min-height: unset;
  }

  .side {
    flex: none;
    height: 50svh;
    padding: 2rem 1.5rem;
    perspective: none;
  }

  .museum {
    border-right: none;
    border-bottom: 2px solid rgba(255,255,255,0.5);
    text-align: center;
    align-items: center;
  }

  .projects {
    text-align: center;
    align-items: center;
  }

  /* always show links, never rely on hover */
  .side::before { transform: translateX(0) !important; }
  .side .default-content { opacity: 0 !important; }
  .side .hover-content {
    opacity: 1 !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
    position: relative;
    padding: 0;
  }

  .links li a {
    font-size: clamp(0.85rem, 4vw, 1.1rem);
    margin: 8px 0;
    letter-spacing: 1px;
  }

  /* disable tilt/3d effects */
  .background-target {
    will-change: auto;
    transform: none !important;
  }

  /* about */
  .about {
    padding: 4rem 1.5rem;
    height: auto;
    min-height: unset;
  }

  /* events */
  .events {
    padding: 4rem 1.25rem;
    height: auto;
    min-height: unset;
  }

  .events-grid {
    grid-template-columns: 1fr;
  }

  .event-card {
    height: 320px;
  }

  /* always show event text on mobile — no hover needed */
  .event-overlay p,
  .event-overlay h4,
  .event-overlay a {
    opacity: 1 !important;
    transform: translateY(0) !important;
  }

  .event-card:hover .event-image {
    transform: none; /* disable scale jank on tap */
  }

  /* footer */
  footer {
    height: auto;
    min-height: unset;
    scroll-snap-align: none;
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }

  /* parallax dividers — reduced height on mobile */
  .house {
    min-height: 35svh;
    height: 35svh;
  }

  /* hide scroll arrows on mobile */
  .scroll-indicator {
    display: none;
  }
}
