/* ==========================================
   Google Fonts & global styles
========================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body { overflow-x: hidden; }

body {
  background: #000;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

.font-instrument { font-family: "Instrument Serif", serif; }
.font-comfortaa { font-family: "Comfortaa", sans-serif; }

/* ==========================================
   Navbar
========================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 50;
  background: transparent;
  transition: background-color 500ms, backdrop-filter 500ms, -webkit-backdrop-filter 500ms;
}

.nav.scrolled {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75rem;
}

.nav-col--left { justify-self: start; min-width: 0; }
.nav-col--center { justify-self: center; }
.nav-col--right { justify-self: end; }

/* ==========================================
   Brand typography
========================================== */
.logo {
  color: #fff;
  font-size: clamp(0.85rem, 3.2vw, calc(1.5rem - 4px));
  text-decoration: none;
  z-index: 50;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-audiowide {
  font-family: "Audiowide", sans-serif;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.nav-mounted .logo {
  opacity: 1;
  transform: translateY(0);
}

.nav-pill {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-family: inherit;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1), background-color 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-mounted .nav-pill {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 200ms, 200ms, 0ms;
}

.nav-pill:hover,
.nav-pill:focus-visible {
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

/* ==========================================
   Navigation icons
========================================== */
.nav-icons {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  z-index: 50;
}

.nav-flower,
.nav-icon-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  color: rgba(255, 255, 255, 0.9);
  border: none;
  background: transparent;
  cursor: pointer;
  text-decoration: none;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1), color 250ms ease, transform 250ms ease;
}

.nav-mounted .nav-flower,
.nav-mounted .nav-icon-btn {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 400ms;
}

.nav-icon-btn:hover,
.nav-icon-btn:focus-visible {
  color: #fff;
  outline: none;
  transform: translateY(-2px);
}

.nav-icon-btn svg {
  width: 27px;
  height: 27px;
}

.nav-flower svg {
  width: 21px;
  height: 21px;
}

.nav-flower:hover {
  color: #fff;
}

.hamburger {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  width: 2.5rem;
  height: 2.5rem;
  z-index: 50;
  position: relative;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-1rem);
  transition: opacity 700ms cubic-bezier(0.16, 1, 0.3, 1), transform 700ms cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-mounted .hamburger {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 200ms;
}

.hamburger span {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: #fff;
  transition: transform 500ms cubic-bezier(0.76, 0, 0.24, 1);
}

.hamburger.open span:first-child { transform: rotate(45deg) translateY(4px); }
.hamburger.open span:last-child { transform: rotate(-45deg) translateY(-4px); }

.hamburger:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

/* ==========================================
   Navigation overlay
========================================== */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 700ms cubic-bezier(0.76, 0, 0.24, 1), visibility 700ms cubic-bezier(0.76, 0, 0.24, 1);
}

.overlay.open {
  opacity: 1;
  visibility: visible;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: max(5.5rem, calc(4rem + env(safe-area-inset-top))) 1.5rem max(2.5rem, env(safe-area-inset-bottom));
}

.overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 52rem);
  margin: auto 0;
  transform: translateY(-2.5rem);
}

.overlay-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
}

.overlay-links a,
.overlay-link {
  color: #fff;
  font-family: "Comfortaa", sans-serif;
  font-weight: 500;
  font-size: clamp(1.85rem, 5.5vw, 3.25rem);
  text-decoration: none;
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 600ms cubic-bezier(0.76, 0, 0.24, 1), transform 600ms cubic-bezier(0.76, 0, 0.24, 1), color 600ms cubic-bezier(0.76, 0, 0.24, 1);
}

.overlay-links a:hover { opacity: 0.65; }

.overlay.open .overlay-links a {
  opacity: 1;
  transform: translateY(0);
}

.overlay.open .overlay-links a:nth-child(1) { transition-delay: 150ms; }
.overlay.open .overlay-links a:nth-child(2) { transition-delay: 230ms; }
.overlay.open .overlay-links a:nth-child(3) { transition-delay: 310ms; }

.overlay-about {
  margin-top: clamp(2.25rem, 5vw, 2.75rem);
  max-width: min(100%, 42rem);
  text-align: center;
  font-family: "Comfortaa", sans-serif;
  font-weight: 400;
  font-size: clamp(0.8rem, 2.2vw, 1.05rem);
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.88);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 650ms cubic-bezier(0.76, 0, 0.24, 1), transform 650ms cubic-bezier(0.76, 0, 0.24, 1);
}

.overlay.open .overlay-about {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 390ms;
}

/* ==========================================
   Hero & background video
========================================== */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
}

.hero-video-wrap {
  position: absolute;
  inset: 0;
  transform: scale(1.05);
  opacity: 0;
  transition: transform 1400ms cubic-bezier(0.16, 1, 0.3, 1), opacity 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mounted .hero-video-wrap {
  transform: scale(1);
  opacity: 1;
}

.hero-video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-headline {
  position: relative;
  z-index: 10;
  width: 100%;
  margin: 0;
  padding: calc(5.25rem + env(safe-area-inset-top)) 1.25rem 0;
  text-align: center;
  font-family: "Comfortaa", sans-serif;
  color: #fff;
  font-weight: 600;
  font-size: clamp(1.25rem, 4.8vw, calc(2.5rem - 3px));
  line-height: 1.25;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  opacity: 0;
  transform: translateY(1.25rem);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  flex-shrink: 0;
  pointer-events: none;
}

.hero-mounted .hero-headline {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 350ms;
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 0 1.25rem calc(3.5rem + env(safe-area-inset-bottom));
  max-width: min(100%, 52rem);
  margin: auto 0 0;
  width: 100%;
}

.hero-description {
  font-family: "Comfortaa", sans-serif;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
  font-size: clamp(0.8rem, 2.4vw, calc(1.1rem - 2px));
  line-height: 1.65;
  margin: 0 auto 1.5rem;
  max-width: min(100%, 50rem);
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-mounted .hero-description {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 550ms;
}

/* ==========================================
   Main CTA
========================================== */
.cta {
  display: inline-block;
  padding: 0.875rem 2rem;
  background: #fff;
  color: #000;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25;
  text-decoration: none;
  border: none;
  border-radius: 9999px;
  cursor: pointer;
  font-family: inherit;
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 900ms cubic-bezier(0.16, 1, 0.3, 1), transform 900ms cubic-bezier(0.16, 1, 0.3, 1), background-color 250ms ease, box-shadow 250ms ease;
}

.hero-mounted .cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 800ms, 800ms, 0ms, 0ms;
}

.cta:hover {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
}

.cta:active { transform: translateY(1px); }
.hero-mounted .cta:active { transform: translateY(1px); }

.cta:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 3px;
}

/* ==========================================
   Shared modal styles
========================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  padding-top: max(1rem, env(safe-area-inset-top));
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  background: rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms ease, visibility 300ms ease;
}

.modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop[hidden] {
  display: none !important;
}

.modal-backdrop.is-open:not([hidden]) {
  display: flex;
}

.glass-modal {
  position: relative;
  width: min(100%, 500px);
  max-height: min(92vh, 92svh);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1.75rem 1.5rem 1.5rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(32px) saturate(140%);
  -webkit-backdrop-filter: blur(32px) saturate(140%);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.95);
  transform: scale(0.96) translateY(12px);
  opacity: 0;
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1), opacity 320ms ease;
}

.modal-backdrop.is-open .glass-modal {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.95);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(12px);
  transition: background 200ms ease, transform 200ms ease;
}

.modal-close:hover { background: rgba(255, 255, 255, 0.22); }
.modal-close:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }

.modal-title {
  font-family: "Instrument Serif", serif;
  font-size: clamp(1.6rem, 4.5vw, 2rem);
  font-weight: 400;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  padding-right: 2.5rem;
  text-align: left;
}

/* ==========================================
   Contact modal & forms
========================================== */
.glass-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.form-field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  color: rgba(255, 255, 255, 0.88);
}

.form-field input,
.form-field textarea {
  width: 100%;
  padding: 0.78rem 0.9rem;
  font-size: 16px;
  font-family: inherit;
  color: rgba(255, 255, 255, 0.96);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.form-field textarea {
  min-height: 110px;
  resize: vertical;
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: rgba(255, 255, 255, 0.45);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-color: rgba(125, 169, 244, 0.95);
  box-shadow: 0 0 0 3px rgba(125, 169, 244, 0.25);
  background: rgba(255, 255, 255, 0.14);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: rgba(220, 38, 38, 0.75);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.82rem;
  line-height: 1.35;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.88);
}

.checkbox-label input {
  width: auto;
  margin-top: 0.2rem;
  accent-color: #5b9fff;
}

.field-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.75rem;
  color: #fca5a5;
  min-height: 1rem;
}

.form-note {
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.submit-btn {
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.9rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background: linear-gradient(180deg, #a8d4ff 0%, #7eb8f4 100%);
  color: #10233a;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(88, 147, 214, 0.28);
  transition: transform 200ms ease, box-shadow 200ms ease, filter 200ms ease;
}

.submit-btn:hover {
  filter: brightness(1.03);
  box-shadow: 0 14px 28px rgba(88, 147, 214, 0.34);
}

.submit-btn:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

.submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

/* ==========================================
   Authentication modal
========================================== */
.glass-modal--auth .modal-title {
  margin-top: 0.25rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  padding: 0.35rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  margin-bottom: 1rem;
}

.auth-tab {
  border: none;
  border-radius: 9999px;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  background: transparent;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, box-shadow 200ms ease;
}

.auth-tab.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.auth-tab:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.auth-panel[hidden] { display: none; }

.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 2.75rem;
}

.toggle-password {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2rem;
  height: 2rem;
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:focus-visible {
  outline: 2px solid #3b82f6;
  border-radius: 6px;
}

.auth-switch {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.78);
}

.link-btn {
  border: none;
  background: none;
  color: #93c5fd;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.link-btn:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.auth-status {
  font-size: 0.84rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 0.65rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

/* ==========================================
   Responsive media queries
========================================== */
@media (min-width: 768px) {
  .nav-inner {
    padding: 0 2.5rem;
    height: 5rem;
  }

  .nav-pill { display: flex; }
  .nav-flower,
  .nav-icon-btn { display: flex; }
  .hamburger { display: none; }

  .overlay-inner {
    transform: translateY(-4.375rem);
  }

  .overlay-links a,
  .overlay-link { font-size: clamp(2.5rem, 4.5vw, 3.25rem); }

  .hero-headline {
    padding-top: calc(6.25rem + env(safe-area-inset-top));
    font-size: clamp(1.65rem, 3.5vw, calc(2.625rem - 3px));
  }

  .hero-content { padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)); }

  .hero-description {
    font-size: clamp(0.95rem, 1.6vw, calc(1.125rem - 2px));
    margin-bottom: 1.75rem;
  }

  .cta { font-size: 1rem; }
}

@media (min-width: 1024px) {
  .hero-headline { font-size: clamp(2rem, 2.8vw, calc(2.625rem - 3px)); }
}

@media (max-width: 389px) {
  .nav-flower { display: none !important; }

  .nav-icons { gap: 0.35rem; }
}

@media (max-width: 767px) {
  .nav-inner {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand actions";
  }

  .nav-col--left { grid-area: brand; }
  .nav-col--center { display: none; }
  .nav-col--right {
    grid-area: actions;
    justify-self: end;
  }

  .nav-icon-btn { display: flex; }
}

/* ==========================================
   Accessibility & reduced motion
========================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .hero-video-wrap,
  .hero-headline,
  .hero-description,
  .cta,
  .overlay-about,
  .logo,
  .nav-pill,
  .nav-flower,
  .nav-icon-btn,
  .hamburger {
    opacity: 1 !important;
    transform: none !important;
  }
}