/* ═══════════════════════════════════════════════
   MAKE PARTIES FUN AGAIN — Apple / iMessage Design
   ═══════════════════════════════════════════════ */

/* ── TOKENS ── */
:root {
  --green: #34C759;
  --green-dk: #2db84d;
  --blue: #007AFF;
  --blue-dk: #0063d1;
  --bg: #ffffff;
  --bg2: #f2f2f7;
  --t1: #1c1c1e;
  --t2: #8e8e93;
  --t3: #aeaeb2;
  --bdr: #e5e5ea;
  --recv: #e5e5ea;
  --shadow-s: 0 1px 3px rgba(0,0,0,.06);
  --shadow-m: 0 4px 16px rgba(0,0,0,.08);
  --shadow-l: 0 8px 32px rgba(0,0,0,.1);
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg); color: var(--t1); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ═══ NAV ═══ */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 0 24px; height: 54px;
  display: flex; align-items: center; justify-content: space-between;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(255,255,255,.82);
  border-bottom: .5px solid rgba(0,0,0,.1);
}
.nav-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-logo-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; color: #fff;
}
.nav-logo-text { font-weight: 700; font-size: 17px; color: var(--t1); letter-spacing: -.3px; }
.nav-links { display: flex; gap: 4px; align-items: center; }
.nav-links a {
  color: var(--t2); text-decoration: none; font-size: 15px;
  font-weight: 500; padding: 7px 14px; border-radius: 20px; transition: all .2s;
}
.nav-links a:hover { color: var(--t1); background: var(--bg2); }
.nav-cta { background: var(--blue) !important; color: #fff !important; font-weight: 600 !important; }
.nav-cta:hover { background: var(--blue-dk) !important; }
.nav-mob {
  display: none; background: none; border: none; color: var(--blue);
  font-size: 24px; cursor: pointer;
}

/* ═══ HERO ═══ */
.hero {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; padding: 100px 20px 60px;
}
.hero-content { text-align: center; max-width: 680px; }

/* ── iMessage Window (Hero) ── */
.imessage-window {
  background: var(--bg); border-radius: 24px;
  border: .5px solid var(--bdr); box-shadow: var(--shadow-l);
  max-width: 400px; margin: 0 auto 48px; overflow: hidden;
}
.imessage-topbar {
  background: var(--bg2); border-bottom: .5px solid var(--bdr);
  padding: 12px 16px; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.imessage-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--green), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #fff;
}
.imessage-name { font-size: 15px; font-weight: 600; }
.imessage-body { padding: 16px; display: flex; flex-direction: column; gap: 6px; }

/* ── Authentic iMessage Bubbles ── */
.bubble-time {
  font-size: 11px; color: var(--t3); text-align: center;
  padding: 8px 0 4px; opacity: 0; animation: fadeIn .4s ease .1s forwards;
}
.read-receipt {
  font-size: 11px; color: var(--t3); text-align: right; padding-right: 8px;
  margin-top: -2px; opacity: 0; animation: fadeIn .3s ease 2.6s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

/* Base bubble */
.bub {
  padding: 8px 14px; max-width: 260px; font-size: 16px;
  line-height: 1.35; position: relative;
  opacity: 0; transform: scale(.92);
  animation: bubPop .35s cubic-bezier(.175,.885,.32,1.275) forwards;
}
.bub:nth-child(1) { animation-delay: .3s; }
.bub:nth-child(2) { animation-delay: .8s; }
.bub:nth-child(3) { animation-delay: 1.3s; }
.bub:nth-child(4) { animation-delay: 1.8s; }
.bub:nth-child(5) { animation-delay: 2.3s; }
@keyframes bubPop { to { opacity: 1; transform: scale(1); } }

/* Received: gray, left-aligned, tail bottom-left */
.bub-recv {
  background: var(--recv); color: var(--t1); align-self: flex-start;
  border-radius: 18px; border-bottom-left-radius: 2px;
  position: relative; margin-left: 8px;
}
.bub-recv::before {
  content: ''; position: absolute; bottom: 0; left: -7px;
  width: 12px; height: 16px;
  background: radial-gradient(ellipse at top right, transparent 60%, var(--recv) 60%);
}

/* Sent: blue, right-aligned, tail bottom-right */
.bub-sent {
  background: var(--blue); color: #fff; align-self: flex-end;
  border-radius: 18px; border-bottom-right-radius: 2px;
  position: relative; margin-right: 8px;
}
.bub-sent::after {
  content: ''; position: absolute; bottom: 0; right: -7px;
  width: 12px; height: 16px;
  background: radial-gradient(ellipse at top left, transparent 60%, var(--blue) 60%);
}

/* Sent green variant */
.bub-sent-green {
  background: var(--green); color: #fff; align-self: flex-end;
  border-radius: 18px; border-bottom-right-radius: 2px;
  position: relative; margin-right: 8px;
}
.bub-sent-green::after {
  content: ''; position: absolute; bottom: 0; right: -7px;
  width: 12px; height: 16px;
  background: radial-gradient(ellipse at top left, transparent 60%, var(--green) 60%);
}

/* Hero title */
.hero h1 {
  font-weight: 800; font-size: clamp(44px, 7vw, 80px);
  line-height: .95; letter-spacing: -2.5px; margin-bottom: 20px;
}
.hero h1 .gr { color: var(--green); }
.hero h1 .bl { color: var(--blue); }
.hero-sub {
  font-size: 17px; color: var(--t2); max-width: 460px;
  margin: 0 auto 36px; line-height: 1.5;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══ BUTTONS ═══ */
.btn {
  padding: 12px 28px; border-radius: 22px; font-size: 15px; font-weight: 600;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  transition: all .2s; cursor: pointer; border: none; font-family: inherit;
}
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dk); transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--t1); border: 1.5px solid var(--bdr); }
.btn-outline:hover { border-color: var(--t3); background: var(--bg2); transform: translateY(-1px); }

/* ═══ SECTIONS ═══ */
section { padding: 80px 20px; }
.section-header { text-align: center; margin-bottom: 48px; }
.section-label {
  display: inline-block; padding: 5px 14px; border-radius: 50px;
  font-size: 13px; font-weight: 600; letter-spacing: .5px; margin-bottom: 14px;
}
.section-label.green { background: rgba(52,199,89,.1); color: var(--green); }
.section-label.blue { background: rgba(0,122,255,.1); color: var(--blue); }
.section-title {
  font-weight: 700; font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -.8px; line-height: 1.1; margin-bottom: 10px;
}
.section-desc { color: var(--t2); font-size: 16px; max-width: 480px; margin: 0 auto; line-height: 1.5; }

/* ═══ STATS ═══ */
.stats-bar { background: var(--bg2); padding: 48px 20px; }
.stats-inner {
  max-width: 800px; margin: 0 auto;
  display: flex; justify-content: space-around; flex-wrap: wrap; gap: 24px;
}
.stat { text-align: center; }
.stat-num { font-weight: 700; font-size: 36px; letter-spacing: -1px; }
.stat-num .gr { color: var(--green); }
.stat-num .bl { color: var(--blue); }
.stat-label { font-size: 13px; color: var(--t3); font-weight: 500; margin-top: 2px; }

/* ═══ EVENTS ═══ */
.events-wrap { max-width: 900px; margin: 0 auto; }

/* City dropdown filter */
.city-filter {
  display: flex; justify-content: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 32px;
}
.city-btn {
  padding: 8px 18px; border-radius: 20px; font-size: 14px;
  font-weight: 600; border: 1.5px solid var(--bdr); background: var(--bg);
  color: var(--t2); cursor: pointer; transition: all .2s; font-family: inherit;
}
.city-btn:hover { border-color: var(--blue); color: var(--blue); }
.city-btn.active {
  background: var(--blue); color: #fff; border-color: var(--blue);
}

/* City sections */
.city-section { margin-bottom: 40px; }
.city-section.hidden { display: none; }
.city-label {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.2px; color: var(--t3); text-align: center;
  margin-bottom: 20px;
}
.city-label span { color: var(--blue); }

/* ── iMessage Event Bubbles ── */
.imsg-thread {
  display: flex; flex-direction: column; gap: 2px;
  padding: 0 8px;
}

/* Single event bubble row */
.evt-row {
  display: flex; flex-direction: column; margin-bottom: 12px;
  text-decoration: none; color: inherit;
}

/* SENT bubble (right aligned, blue) */
.evt-row.sent { align-items: flex-end; }
.evt-row.sent .evt-bubble {
  background: var(--blue); color: #fff;
  border-radius: 18px; border-bottom-right-radius: 2px;
  position: relative; margin-right: 8px;
}
.evt-row.sent .evt-bubble::after {
  content: ''; position: absolute; bottom: 0; right: -7px;
  width: 12px; height: 16px;
  background: radial-gradient(ellipse at top left, transparent 60%, var(--blue) 60%);
}

/* RECV bubble (left aligned, gray) */
.evt-row.recv { align-items: flex-start; }
.evt-row.recv .evt-bubble {
  background: var(--recv); color: var(--t1);
  border-radius: 18px; border-bottom-left-radius: 2px;
  position: relative; margin-left: 8px;
}
.evt-row.recv .evt-bubble::before {
  content: ''; position: absolute; bottom: 0; left: -7px;
  width: 12px; height: 16px;
  background: radial-gradient(ellipse at top right, transparent 60%, var(--recv) 60%);
}

.evt-bubble {
  max-width: 340px; width: 100%; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.evt-bubble:hover { transform: scale(1.01); box-shadow: var(--shadow-m); }

/* Image inside bubble */
.evt-img {
  width: 100%; 
  aspect-ratio: 2 / 1; 
  object-fit: contain; 
  background: #000;
  display: block;
}
.evt-img-fallback {
  width: 100%; height: 100px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px; background: rgba(255,255,255,.1);
}
.evt-row.recv .evt-img-fallback {
  background: rgba(0,0,0,.04);
}

/* Text content inside bubble */
.evt-body { padding: 10px 14px; }
.evt-title { font-weight: 700; font-size: 15px; line-height: 1.25; margin-bottom: 3px; }
.evt-venue { font-size: 13px; opacity: .8; margin-bottom: 3px; }
.evt-date { font-size: 12px; opacity: .65; }

.evt-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px; padding-top: 6px;
  border-top: 1px solid rgba(255,255,255,.15);
}
.evt-row.recv .evt-foot { border-top-color: rgba(0,0,0,.08); }

.evt-status {
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px;
}
.evt-status.sold-out { color: #ff3b30; }
.evt-row.sent .evt-status.sold-out { color: #ffcdd2; }

.evt-cta { font-size: 12px; font-weight: 600; opacity: .85; }

/* Delivered / Read receipt under bubble */
.evt-receipt {
  font-size: 11px; color: var(--t3); margin-top: 2px; padding: 0 4px;
}
.evt-row.sent .evt-receipt { text-align: right; }
.evt-row.recv .evt-receipt { text-align: left; }

/* Loading state */
.events-loading { text-align: center; padding: 60px 20px; color: var(--t2); }
.spinner {
  width: 28px; height: 28px;
  border: 3px solid var(--bdr); border-top-color: var(--blue);
  border-radius: 50%; animation: spin .7s linear infinite;
  margin: 0 auto 14px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.events-see-all { text-align: center; margin-top: 40px; }

/* API fallback note */
.api-note {
  max-width: 600px; margin: 16px auto 0; padding: 12px 16px;
  border-radius: 12px; background: rgba(255,59,48,.06);
  font-size: 13px; color: var(--t2); text-align: center; line-height: 1.5;
  display: none;
}
.api-note.show { display: block; }

/* ═══ PARTY TYPES ═══ */
#parties { background: var(--bg2); }
.parties-grid {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.party-card {
  background: var(--bg); border-radius: 20px; border: .5px solid var(--bdr);
  padding: 32px; transition: all .25s; box-shadow: var(--shadow-s);
  display: flex; flex-direction: column;
}
.party-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.party-emoji { font-size: 40px; margin-bottom: 16px; display: block; }
.party-card h3 { font-weight: 700; font-size: 22px; letter-spacing: -.5px; margin-bottom: 8px; }
.party-card > p { color: var(--t2); font-size: 15px; line-height: 1.55; margin-bottom: 20px; }
.party-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 24px; }
.party-tag {
  padding: 5px 12px; border-radius: 50px; font-size: 12px;
  font-weight: 600; background: var(--bg2); color: var(--t2);
}
.party-mini-chat {
  background: var(--bg2); border-radius: 16px; padding: 14px;
  display: flex; flex-direction: column; gap: 4px; margin-top: auto;
}
.mini-recv {
  padding: 8px 14px; border-radius: 16px 16px 16px 2px; font-size: 14px;
  max-width: 200px; line-height: 1.3;
  background: var(--recv); color: var(--t1); align-self: flex-start;
  position: relative; margin-left: 6px;
}
.mini-recv::before {
  content: ''; position: absolute; bottom: 0; left: -5px;
  width: 10px; height: 12px;
  background: radial-gradient(ellipse at top right, transparent 60%, var(--recv) 60%);
}
.mini-sent {
  padding: 8px 14px; border-radius: 16px 16px 2px 16px; font-size: 14px;
  max-width: 200px; line-height: 1.3;
  background: var(--blue); color: #fff; align-self: flex-end;
  position: relative; margin-right: 6px;
}
.mini-sent::after {
  content: ''; position: absolute; bottom: 0; right: -5px;
  width: 10px; height: 12px;
  background: radial-gradient(ellipse at top left, transparent 60%, var(--blue) 60%);
}
.mini-sent-green {
  padding: 8px 14px; border-radius: 16px 16px 2px 16px; font-size: 14px;
  max-width: 200px; line-height: 1.3;
  background: var(--green); color: #fff; align-self: flex-end;
  position: relative; margin-right: 6px;
}
.mini-sent-green::after {
  content: ''; position: absolute; bottom: 0; right: -5px;
  width: 10px; height: 12px;
  background: radial-gradient(ellipse at top left, transparent 60%, var(--green) 60%);
}

/* ═══ VENUES ═══ */
.venue-grid {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start;
}
.venue-info h3 { font-weight: 700; font-size: 22px; letter-spacing: -.5px; margin-bottom: 12px; }
.venue-info > p { color: var(--t2); font-size: 15px; line-height: 1.55; margin-bottom: 24px; }
.perks { display: flex; flex-direction: column; gap: 16px; }
.perk { display: flex; gap: 12px; align-items: flex-start; }
.perk-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.perk-icon.green { background: rgba(52,199,89,.1); }
.perk-icon.blue { background: rgba(0,122,255,.1); }
.perk h4 { font-size: 15px; font-weight: 600; margin-bottom: 1px; }
.perk p { font-size: 13px; color: var(--t3); }

.venue-form-wrap { background: var(--bg2); border-radius: 20px; padding: 32px; }
.venue-form-wrap h3 { font-weight: 700; font-size: 18px; margin-bottom: 20px; text-align: center; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-group { margin-bottom: 12px; }
.form-group label {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--t2); margin-bottom: 5px; padding-left: 4px;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 14px; border-radius: 12px;
  border: .5px solid var(--bdr); background: var(--bg);
  color: var(--t1); font-size: 15px; font-family: inherit;
  transition: all .2s; outline: none;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--blue); box-shadow: 0 0 0 3px rgba(0,122,255,.12);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--t3); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select {
  cursor: pointer; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%238e8e93' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.form-submit {
  width: 100%; padding: 13px; border-radius: 14px; background: var(--blue);
  color: #fff; font-size: 16px; font-weight: 600; border: none; cursor: pointer;
  font-family: inherit; transition: all .2s; margin-top: 4px;
}
.form-submit:hover { background: var(--blue-dk); }
.form-submit:active { transform: scale(.98); }
.form-success { display: none; text-align: center; padding: 32px 16px; }
.form-success.show { display: block; }
.form-success .checkmark {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin: 0 auto 14px;
}
.form-success h4 { font-size: 17px; font-weight: 600; margin-bottom: 6px; }
.form-success p { font-size: 14px; color: var(--t2); }

/* ═══ FOOTER ═══ */
footer { background: var(--bg2); border-top: .5px solid var(--bdr); padding: 48px 20px 28px; }
.footer-inner {
  max-width: 1000px; margin: 0 auto;
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 32px;
}
.footer-brand h3 { font-weight: 700; font-size: 18px; margin-bottom: 6px; }
.footer-brand p { color: var(--t3); font-size: 14px; max-width: 280px; line-height: 1.45; }
.footer-socials { display: flex; gap: 10px; margin-top: 14px; }
.social-link {
  width: 36px; height: 36px; border-radius: 10px; background: var(--bg);
  border: .5px solid var(--bdr); display: flex; align-items: center;
  justify-content: center; text-decoration: none; transition: all .2s;
}
.social-link:hover { transform: translateY(-2px); box-shadow: var(--shadow-s); }
.social-link svg { width: 16px; height: 16px; fill: var(--t2); }
.footer-links { display: flex; gap: 40px; }
.footer-col h4 {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1px; color: var(--t3); margin-bottom: 10px;
}
.footer-col a {
  display: block; color: var(--t2); text-decoration: none;
  font-size: 14px; padding: 3px 0; transition: color .2s;
}
.footer-col a:hover { color: var(--blue); }
.footer-bottom {
  max-width: 1000px; margin: 32px auto 0; padding-top: 16px;
  border-top: .5px solid var(--bdr); text-align: center;
  font-size: 13px; color: var(--t3);
}

/* ═══ UTILITY ═══ */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: all .6s cubic-bezier(.16,1,.3,1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
  .nav-links {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(255,255,255,.96); backdrop-filter: blur(20px);
    flex-direction: column; padding: 12px;
    border-bottom: .5px solid var(--bdr);
  }
  .nav-links.open { display: flex; }
  .nav-mob { display: block; }
  .imessage-window { max-width: 340px; }
  .bub { max-width: 220px; font-size: 15px; }
  .parties-grid, .venue-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; }
  .footer-links { flex-direction: column; gap: 20px; }
  .evt-bubble { max-width: 100% !important; }
}

/* ═══ CONTACT FORM ═══ */
#contact {
  background: var(--bg2);
  padding: 80px 20px;
}

.contact-wrap {
  max-width: 700px;
  margin: 0 auto;
}

.contact-form-wrap {
  background: var(--bg);
  border-radius: 20px;
  padding: 40px;
  box-shadow: var(--shadow-m);
  border: .5px solid var(--bdr);
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 14px 18px;
  border: 1.5px solid var(--bdr);
  border-radius: 12px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color .2s;
  background: var(--bg);
  color: var(--t1);
}

#contactForm input:focus,
#contactForm textarea:focus {
  outline: none;
  border-color: var(--green);
}

#contactForm textarea {
  resize: vertical;
  min-height: 120px;
}

#contactForm button {
  margin-top: 8px;
}

.form-success {
  display: none;
  text-align: center;
  padding: 60px 20px;
}

.form-success.show {
  display: block;
}

.checkmark {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--green);
  color: white;
  font-size: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.form-success h4 {
  font-size: 24px;
  margin-bottom: 8px;
}

.form-success p {
  color: var(--t2);
}

/* Footer social links */
.footer-social {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  flex-wrap: wrap;
}

.footer-social a {
  color: var(--t2);
  text-decoration: none;
  font-size: 16px;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: var(--green);
}
