/* ═══════════════════════════════════════════════
   Hudson School Gala 2026 — Shared Design System
   ═══════════════════════════════════════════════ */

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

/*
  FONT NOTE:
  This design calls for "Ivy Mode" (display) and "Stenciletta Solid" (body).
  To use them, add .woff2 files to a /fonts folder and uncomment the @font-face rules below.
  Currently using Playfair Display and DM Sans as fallbacks from Google Fonts.

  @font-face {
    font-family: 'Ivy Mode';
    src: url('fonts/IvyMode-Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
  }
  @font-face {
    font-family: 'Stenciletta Solid';
    src: url('fonts/StencilettaSolid.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
  }
*/

:root {
  --gold: #EDAB00;
  --gold-dark: #D49A00;
  --black: #000000;
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --gray-light: #F0F0F0;
  --gray-muted: #666666;
  --text-dark: #1A1A1A;
  --font-display: 'Ivy Mode', 'Playfair Display', Georgia, serif;
  --font-body: 'Stenciletta Solid', 'DM Sans', 'Inter', -apple-system, sans-serif;
  --font-ui: 'Inter', 'DM Sans', -apple-system, sans-serif;
  --nav-height: 48px;
}

html { height: 100%; }

body {
  font-family: var(--font-body);
  color: var(--text-dark);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ─── Navigation Bar ─── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--black);
  min-height: var(--nav-height);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: none;
}

.nav-inner {
  justify-content: center;
}

.nav-links {
  display: flex;
  align-items: center;
  width: 50%;
  justify-content: space-between;
  flex-wrap: wrap;
}

.nav-link {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  padding: 12px 14px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.nav-link:hover {
  color: var(--white);
}

.nav-link.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px 4px;
  z-index: 101;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ─── Page Layout ─── */
.page-wrapper {
  display: flex;
  min-height: calc(100vh - var(--nav-height));
}

/* ─── Left Panel ─── */
.left-panel {
  width: 50%;
  background: var(--gold);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.left-content {
  position: relative;
  z-index: 2;
  padding: 48px 40px 48px 48px;
  overflow-y: auto;
  flex: 1;
  max-width: 62%;
}

/* ─── Decorative GALA Letters ─── */
.gala-deco {
  position: absolute;
  top: -3%;
  right: -6%;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
}

.gala-deco .letter {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--black);
  display: block;
  line-height: 0.82;
  font-size: clamp(160px, 20vw, 340px);
}

.gala-deco .letter-g { margin-right: -5%; }
.gala-deco .letter-a1 { margin-left: 10%; }
.gala-deco .letter-l { margin-right: 0; }
.gala-deco .letter-a2 { margin-left: 10%; }

/* ─── Logo ─── */
.logo {
  width: 144px;
  height: 144px;
  border-radius: 50%;
  margin-bottom: 32px;
}

/* ─── Invite Text ─── */
.invite-intro {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  font-weight: 600;
  color: var(--black);
  margin-bottom: 12px;
  line-height: 1.5;
}

.invite-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 700;
  color: var(--black);
  line-height: 1.05;
  margin-bottom: 24px;
}

.accent-line {
  border: none;
  height: 3px;
  background: var(--black);
  width: 80px;
  margin: 20px 0;
}

.event-details {
  margin-bottom: 4px;
}

.event-details p {
  font-family: var(--font-body);
  font-size: clamp(0.9rem, 1.6vw, 1.05rem);
  font-weight: 600;
  color: var(--black);
  line-height: 1.5;
}

.event-time {
  margin-top: 12px;
}

.tagline {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.6vw, 1.1rem);
  font-weight: 500;
  color: var(--black);
}

/* ─── Right Panel ─── */
.right-panel {
  width: 50%;
  background: var(--white);
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--nav-height));
  position: sticky;
  top: var(--nav-height);
}

.form-header {
  padding: 48px 40px 24px;
  border-bottom: 1px solid var(--gray-light);
}

.form-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.8rem);
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.form-header p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-muted);
  line-height: 1.5;
}

.form-container {
  flex: 1;
  padding: 24px 40px 40px;
  overflow-y: auto;
}

/* Blackbaud form container */
.bb-form-wrapper {
  min-height: 500px;
}

.bb-form-wrapper iframe {
  width: 100% !important;
  max-width: 100% !important;
  border: none;
}

/* Form placeholder (shown until embed loads) */
.form-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  border: 2px dashed var(--gray-light);
  border-radius: 12px;
  padding: 40px;
  text-align: center;
}

.form-placeholder .spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--gray-light);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

.form-placeholder p {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--gray-muted);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive: Tablet / Stacked ─── */
@media (max-width: 960px) {
  .page-wrapper {
    flex-direction: column;
  }

  .left-panel {
    width: 100%;
    min-height: auto;
  }

  .left-content {
    max-width: 60%;
    padding: 40px 24px 40px 24px;
  }

  .gala-deco {
    right: 2%;
    top: 0;
  }

  .gala-deco .letter {
    font-size: clamp(100px, 18vw, 220px);
  }

  .right-panel {
    width: 100%;
    height: auto;
    position: relative;
    top: auto;
  }

  .form-header {
    padding: 32px 24px 20px;
  }

  .form-container {
    padding: 20px 24px 40px;
  }
}

/* ─── Responsive: Mobile Nav ─── */
@media (max-width: 768px) {
  .nav-inner {
    padding: 0 8px;
  }

  .nav-links {
    width: 100%;
    justify-content: space-around;
  }

  .nav-link {
    font-size: 0.78rem;
    padding: 12px 10px;
  }
}

/* ─── Responsive: Small Mobile ─── */
@media (max-width: 600px) {
  .left-content {
    padding: 32px 20px;
    max-width: 55%;
  }

  .gala-deco {
    right: 0;
    top: 2%;
  }

  .gala-deco .letter {
    font-size: clamp(80px, 22vw, 160px);
  }

  .logo {
    width: 112px;
    height: 112px;
    margin-bottom: 24px;
  }

  .form-header {
    padding: 28px 20px 16px;
  }

  .form-container {
    padding: 16px 20px 32px;
  }
}
