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

:root {
  --color-bg: #efeadf;
  --color-white: #fcfefe;
  --color-gray-900: #171717;
  --color-gray-600: #525252;
  --color-gray-500: #737373;
  --color-gray-400: #a1a1a1;
  --color-gray-200: #e5e5e5;
  --color-primary-500: #408983;
  --color-avatar-bg: #e9e1cf;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 30px;
}

html {
  font-family: 'Inter', sans-serif;
  color: var(--color-gray-900);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

/* ===== Header ===== */
.header {
  padding: clamp(32px, 5vw, 40px) clamp(16px, 4vw, 40px) 0;
  position: relative;
  z-index: 2;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.logo {
  height: clamp(22px, 2.2vw, 18px);
  width: auto;
  display: block;
}

.header-cta {
  position: absolute;
  right: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-600);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s ease;
}

.header-cta span {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.header-cta:hover {
  color: var(--color-gray-900);
}

/* ===== Hero ===== */
.hero {
  display: flex;
  justify-content: center;
  padding: clamp(28px, 5vw, 56px) clamp(16px, 4vw, 32px) 36px;
  position: relative;
  z-index: 2;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-width: 976px;
  width: 100%;
  text-align: center;
}

/* Social proof */
.social-proof {
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatars {
  display: flex;
  align-items: center;
  padding-right: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-bg);
  object-fit: cover;
  margin-right: -12px;
  position: relative;
}

.avatar:nth-child(1) { z-index: 5; }
.avatar:nth-child(2) { z-index: 4; }
.avatar:nth-child(3) { z-index: 3; }
.avatar:nth-child(4) { z-index: 2; }
.avatar:nth-child(5) { z-index: 1; }

.avatar-count {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-avatar-bg);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-gray-900);
}

.social-proof-text {
  font-size: clamp(13px, 1.5vw, 14px);
  color: var(--color-gray-900);
  white-space: nowrap;
}

/* Headline */
.headline {
  font-family: 'Bespoke Serif', serif;
  font-weight: 700;
  font-size: clamp(32px, 7vw, 72px);
  line-height: 1.1;
  letter-spacing: clamp(-0.6px, -0.1vw, -1.44px);
  text-wrap: balance;
  color: var(--color-gray-900);
}

.subheadline {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(16px, 2.2vw, 20px);
  font-weight: 400;
  line-height: 1.5;
  color: var(--color-gray-500);
  max-width: 650px;
}

/* CTA Button */
.btn-waitlist {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--color-white);
  border: none;
  border-radius: var(--radius-lg);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-gray-900);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-waitlist:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.btn-icon {
  width: 20px;
  height: 20px;
}

/* ===== Gallery ===== */
.gallery {
  width: 100%;
  overflow: hidden;
}

.gallery-track {
  display: flex;
  gap: 0.5%;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  padding: 0;
}

.gallery-item {
  flex: 1 1 0;
  min-width: 0;
  border-radius: clamp(11px, 1.1vw, 16px) clamp(11px, 1.1vw, 16px) 0 0;
  overflow: hidden;
  background: white;
  position: relative;
}

/* Use aspect-ratio + max-height to keep proportional heights that scale */
.gallery-item:nth-child(1) { max-height: 260px; aspect-ratio: 320 / 260; }
.gallery-item:nth-child(2) { max-height: 350px; aspect-ratio: 320 / 350; }
.gallery-item:nth-child(3) { max-height: 410px; aspect-ratio: 320 / 410; }
.gallery-item:nth-child(4) { max-height: 370px; aspect-ratio: 320 / 370; }
.gallery-item:nth-child(5) { max-height: 325px; aspect-ratio: 320 / 325; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(234, 227, 217, 0.3);
  pointer-events: none;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-bg);
  padding: 32px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1440px;
  margin: 0 auto;
  font-size: 12px;
  color: var(--color-gray-400);
  letter-spacing: 0.01em;
}

.footer-link {
  color: var(--color-gray-400);
  text-decoration: none;
}

.footer-link:hover {
  text-decoration: underline;
  color: var(--color-gray-600);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(36px);
  -webkit-backdrop-filter: blur(36px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 36px;
  width: 550px;
  max-width: calc(100vw - 32px);
  padding: 0 16px;
}

.modal-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(252, 254, 254, 0.2);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  z-index: 101;
  transition: background 0.15s ease;
}

.modal-close:hover {
  background: rgba(252, 254, 254, 0.4);
}

.modal-close img {
  width: 24px;
  height: 24px;
}

.modal-symbol {
  width: 68px;
  height: 25px;
  filter: brightness(0) invert(1);
}

.modal-title {
  font-family: 'Bespoke Serif', serif;
  font-weight: 700;
  font-size: 30px;
  line-height: 1.25;
  text-align: center;
  color: var(--color-white);
}

.modal-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  line-height: 1.5;
  letter-spacing: -0.54px;
  color: #d4d4d4;
  text-align: center;
  margin-top: -24px;
}

.modal-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-input-group {
  display: flex;
  align-items: center;
  background: var(--color-gray-600);
  border-radius: var(--radius-lg);
  padding: 8px 8px 8px 24px;
  gap: 10px;
}

.email-input {
  flex: 1;
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--color-white);
  background: transparent;
  min-width: 0;
}

.email-input::placeholder {
  color: #d4d4d4;
}

.btn-submit {
  flex-shrink: 0;
  height: 56px;
  padding: 10px 24px;
  background: var(--color-primary-500);
  color: var(--color-white);
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}

.btn-submit:hover {
  background: #367a74;
}

.checkbox-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  cursor: pointer;
}

.checkbox {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-sm);
  background: var(--color-white);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  position: relative;
}

.checkbox:checked::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 3px;
  width: 6px;
  height: 12px;
  border: solid var(--color-primary-500);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-label {
  font-size: 12px;
  font-weight: 300;
  line-height: 1.5;
  color: #d4d4d4;
}

.checkbox-label strong {
  font-weight: 500;
  color: #d4d4d4;
}

/* Form error */
.form-error {
  font-size: 14px;
  color: #f87171;
  text-align: center;
  min-height: 20px;
}

.form-error:empty {
  display: none;
}

/* Success state */
.modal-success {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  text-align: center;
  animation: fadeInUp 0.4s ease;
}

.modal-success.active {
  display: flex;
}

.modal-success .modal-title {
  font-family: 'Bespoke Serif', serif;
  font-weight: 700;
  font-size: 30px;
  color: var(--color-white);
}

.modal-success .modal-subtitle {
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  font-size: 18px;
  color: #d4d4d4;
  margin-top: -12px;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary-500);
  color: var(--color-white);
  font-size: 36px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
}

/* ===== Hero Actions ===== */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.cta-info {
  font-size: 14px;
  font-style: italic;
  color: var(--color-gray-600);
  margin-top: -14px;
}

.event-link {
  font-size: 14px;
  color: var(--color-gray-600);
  text-decoration: none;
  transition: color 0.15s ease;
}

.event-link:hover {
  color: var(--color-gray-900);
}

/* Desktop: show in header, hide below button */
.event-link-desktop {
  display: inline;
}

.event-link-mobile {
  display: none;
}

/* ===== Event Drawer ===== */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.drawer-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: 736px;
  max-width: 100%;
  height: 100%;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.drawer-overlay.active .drawer {
  transform: translateX(0);
}

.drawer-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin: 24px;
  border-radius: 20px;
  background: rgba(252, 254, 254, 0.85);
  backdrop-filter: blur(35px);
  -webkit-backdrop-filter: blur(35px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.drawer-header {
  display: flex;
  justify-content: flex-end;
  padding: 24px;
  flex-shrink: 0;
}

.drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(252, 254, 254, 0.7);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

.drawer-close:hover {
  background: rgba(252, 254, 254, 1);
}

.drawer-close img {
  width: 20px;
  height: 20px;
}

.drawer-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.drawer-event-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-title {
  font-family: 'Bespoke Serif', serif;
  font-weight: 700;
  font-size: 48px;
  line-height: 1.1;
  letter-spacing: -0.96px;
  color: var(--color-gray-900);
}

.event-meta {
  display: flex;
  gap: 48px;
}

.event-meta-item {
  display: flex;
  gap: 8px;
  align-items: center;
}

.event-meta-icon {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #d4d4d4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.event-meta-icon img {
  width: 24px;
  height: 24px;
}

.event-date-badge {
  padding: 0;
}

.date-month {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-gray-500);
  background: #d4d4d4;
  width: 100%;
  text-align: center;
  padding: 4px 0;
}

.date-day {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-gray-900);
  background: #fafafa;
  width: 100%;
  text-align: center;
  padding: 4px 0;
}

.event-meta-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.event-meta-label {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-gray-900);
}

.event-meta-sublabel {
  font-size: 14px;
  color: var(--color-gray-500);
}

.drawer-section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-gray-900);
  margin-bottom: 8px;
}

.drawer-section-body {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-gray-600);
}

.drawer-section-body p {
  margin-bottom: 12px;
}

.drawer-section-body ul {
  padding-left: 24px;
  margin-bottom: 12px;
}

.drawer-section-body li {
  margin-bottom: 4px;
}

.drawer-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.drawer-photo {
  width: 100%;
  aspect-ratio: 315 / 240;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.drawer-divider {
  border: none;
  border-top: 1px solid #d4d4d4;
  margin: 0;
}

.drawer-map img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  margin-top: 24px;
  display: block;
}

.drawer-footer {
  padding: 24px;
  flex-shrink: 0;
}

.drawer-cta {
  width: 100%;
  height: 60px;
  border: none;
  border-radius: 999px;
  background: var(--color-gray-900);
  color: var(--color-white);
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: background 0.15s ease;
}

.drawer-cta:hover {
  background: #333;
}

/* Event signup modal - additional fields */
.event-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.event-input {
  width: 100%;
  height: 56px;
  padding: 8px 24px;
  background: var(--color-gray-600);
  border-radius: var(--radius-md);
  font-size: 20px;
  color: var(--color-white);
  border: none;
  outline: none;
  font-family: 'Inter', sans-serif;
  font-weight: 300;
}

.event-input::placeholder {
  color: #d4d4d4;
}

.btn-submit-full {
  width: 100%;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Tablet (≤ 834px) ===== */
@media (max-width: 834px) {
  .header-inner {
    justify-content: flex-start;
  }

  .logo {
    height: 16px;
  }

  .subheadline {
    max-width: 770px;
  }

  .btn-waitlist {
    padding: 16px 24px;
    height: 56px;
  }

  .gallery-item:first-child,
  .gallery-item:last-child {
    display: none;
  }
}

/* ===== Mobile (≤ 480px) ===== */
@media (max-width: 480px) {
  .hero-content {
    align-items: center;
    text-align: center;
    gap: 24px;
  }

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

  .event-link-desktop {
    display: none;
  }

  .event-link-mobile {
    display: inline;
  }

  .headline br {
    display: none;
  }

  .subheadline {
    max-width: 358px;
  }

  .btn-waitlist {
    width: 220px;
    height: 56px;
    padding: 16px 24px;
    justify-content: center;
  }

  /* Gallery: show 3 center images, taller on mobile */
  .gallery {
    margin-left: -4px;
    margin-right: -4px;
    width: calc(100% + 8px);
  }

  .gallery-item:first-child,
  .gallery-item:last-child {
    display: none;
  }

  .gallery-item:nth-child(2) { aspect-ratio: 3 / 4; }
  .gallery-item:nth-child(3) { aspect-ratio: 3 / 4.5; }
  .gallery-item:nth-child(4) { aspect-ratio: 3 / 4; }

  /* Footer mobile: two rows, centered */
  .footer {
    padding: 24px 16px;
  }

  .footer-inner {
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 4px 16px;
    text-align: center;
  }

  .footer-inner span:last-child,
  .footer-inner a:last-of-type {
    flex-basis: 100%;
    text-align: center;
  }

  /* Modal mobile */
  .modal {
    width: 100%;
    max-width: 100%;
    padding: 0 16px;
    gap: 24px;
  }

  .modal-subtitle {
    font-size: 16px;
    margin-top: -12px;
  }

  .email-input-group {
    flex-direction: column;
    padding: 0;
    background: transparent;
    gap: 12px;
  }

  .email-input {
    width: 100%;
    height: 56px;
    padding: 8px 24px;
    background: var(--color-gray-600);
    border-radius: var(--radius-md);
    font-size: 20px;
  }

  .btn-submit {
    width: 100%;
  }

  .success-icon {
    width: 56px;
    height: 56px;
    font-size: 28px;
  }

  /* Drawer mobile: full screen */
  .drawer {
    width: 100%;
  }

  .drawer-panel {
    margin: 16px;
  }

  .drawer-title {
    font-size: 36px;
  }

  .event-meta {
    flex-direction: column;
    gap: 16px;
  }

  .drawer-photos {
    grid-template-columns: 1fr;
  }
}
