/* ============================================
   Bounce Session — Styling Directory + Invite
   Club Volley x On
   ============================================ */

:root {
  --bg: #F2EDE8;
  --text: #2A2522;
  --muted: #8B7D6B;
  --accent: #B85A30;
  --surface: #E8E2DA;
  --dark: #1E1C1A;
  --white: #FAF8F5;
  --font-display: 'Syne', sans-serif;
  --font-body: 'Instrument Sans', sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- Grain ---- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.3;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.07'/%3E%3C/svg%3E");
}

/* ---- Label ---- */
.label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---- Header ---- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 40px;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 100;
  border-bottom: 1px solid var(--surface);
}
.site-header .brand-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
}
.site-header .logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.site-header .brand-divider {
  width: 1px;
  height: 28px;
  background: var(--surface);
  display: inline-block;
}
.site-header .on-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.site-header .on-lockup img {
  height: 34px;
  width: auto;
  display: block;
}
.site-header .collab {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.site-header .collab .on-mark {
  height: 28px;
  width: auto;
  display: inline-block;
}
.site-header .collab span {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 640px) {
  .site-header { padding: 16px 20px; }
  .site-header .collab { display: none; }
  .site-header .on-lockup .on-lockup-text { display: none; }
  .site-header .on-lockup img { height: 28px; }
  .site-header .brand-divider { height: 22px; }
}

/* ---- Hero ---- */
.hero-banner {
  padding: 80px 40px 48px;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-banner h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 56px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-banner .subtitle {
  font-size: 18px;
  color: var(--muted);
  max-width: 600px;
  line-height: 1.5;
}
.hero-banner .event-meta {
  display: flex;
  gap: 32px;
  margin-top: 24px;
  flex-wrap: wrap;
}
.hero-banner .meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-banner .meta-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.hero-banner .meta-value {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
}

/* ---- Tabs ---- */
.tabs {
  display: flex;
  gap: 0;
  padding: 0 40px;
  max-width: 1200px;
  margin: 0 auto;
  border-bottom: 1px solid var(--surface);
  position: sticky;
  top: 73px;
  background: var(--bg);
  z-index: 90;
}
.tab {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 16px 24px;
  cursor: pointer;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}
.tab .count {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 400;
  color: var(--muted);
  margin-left: 6px;
}

/* ---- Product Grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  padding: 32px 40px 80px;
  max-width: 1200px;
  margin: 0 auto;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ---- Category Divider ---- */
.category-divider {
  grid-column: 1 / -1;
  padding: 24px 0 8px;
  border-bottom: 1px solid var(--surface);
}
.category-divider h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---- Product Card ---- */
.product-card {
  background: var(--white);
  border-radius: 4px;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  position: relative;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(42, 37, 34, 0.08);
}
.product-card .card-image {
  aspect-ratio: 4/5;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.product-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.15s ease;
}
.product-card:hover .card-image img {
  transform: scale(1.05);
}
.product-card .card-image .placeholder-type {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  color: var(--surface);
  opacity: 0.6;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  text-align: center;
  line-height: 1;
  padding: 16px;
}
.product-card .card-body {
  padding: 16px;
}
.product-card .card-type {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.product-card .card-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 8px;
  line-height: 1.2;
}
.product-card .card-colors {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.color-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  padding: 3px 8px;
  background: var(--bg);
  border-radius: 2px;
}
.color-chip .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.08);
  flex-shrink: 0;
}
.product-card .card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--accent);
  transition: gap 0.2s;
}
.product-card:hover .card-link { gap: 8px; }
.product-card .card-link svg {
  width: 12px;
  height: 12px;
}

/* ---- Select Button ---- */
.select-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.select-btn:hover {
  border-color: var(--accent);
  transform: scale(1.1);
}
.select-btn.selected {
  background: var(--accent);
  border-color: var(--accent);
}
.select-btn svg { width: 16px; height: 16px; }
.select-btn.selected svg { color: var(--white); }

/* ---- Selections Sidebar ---- */
.selections-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--dark);
  color: var(--white);
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.selections-bar.visible { transform: translateY(0); }
.selections-bar .sel-count {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.selections-bar .sel-count span {
  color: var(--accent);
  font-size: 20px;
  margin-right: 6px;
}
.selections-bar .sel-actions {
  display: flex;
  gap: 12px;
}
.btn-bar {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 13px;
  padding: 10px 20px;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.btn-bar:hover { opacity: 0.85; }
.btn-bar.primary { background: var(--accent); color: var(--white); }
.btn-bar.secondary { background: transparent; color: var(--white); border: 1px solid rgba(255,255,255,0.2); }

/* ---- Order Summary Modal ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(30, 28, 26, 0.6);
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 4px;
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
}
.modal h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  margin-bottom: 8px;
}
.modal .modal-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.modal .invitee-input {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--surface);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  margin-bottom: 24px;
}
.modal .invitee-input:focus {
  outline: none;
  border-color: var(--accent);
}
.order-list {
  list-style: none;
  margin-bottom: 24px;
}
.order-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--surface);
  font-size: 14px;
}
.order-list li:last-child { border-bottom: none; }
.order-list .item-name { font-weight: 600; }
.order-list .item-color { color: var(--muted); font-size: 13px; }
.order-list .item-remove {
  color: var(--muted);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px;
  transition: color 0.2s;
}
.order-list .item-remove:hover { color: var(--accent); }
.modal-actions {
  display: flex;
  gap: 12px;
}
.btn-modal {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 14px 28px;
  border-radius: 2px;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
}
.btn-modal:hover { opacity: 0.85; }
.btn-modal.primary { background: var(--text); color: var(--bg); }
.btn-modal.secondary { background: transparent; color: var(--text); border: 1px solid var(--surface); }
.copied-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--dark);
  color: var(--white);
  padding: 12px 24px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: all 0.3s;
  z-index: 400;
  pointer-events: none;
}
.copied-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ---- Color Toggle ---- */
.color-toggles {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.color-toggle {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s;
  position: relative;
  padding: 0;
  background: none;
}
.color-toggle:hover { transform: scale(1.15); }
.color-toggle.active { border-color: var(--accent); }
.color-toggle .swatch {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1);
}
.color-toggle .tooltip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--dark);
  color: var(--white);
  font-size: 11px;
  font-family: var(--font-body);
  padding: 3px 8px;
  border-radius: 2px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s;
}
.color-toggle:hover .tooltip { opacity: 1; }

/* ---- Size Selector ---- */
.size-selector {
  margin-bottom: 12px;
}
.size-selector select {
  width: 100%;
  padding: 8px 10px;
  font-family: var(--font-body);
  font-size: 13px;
  border: 1px solid var(--surface);
  border-radius: 2px;
  background: var(--bg);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238B7D6B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}
.size-selector select:focus {
  outline: none;
  border-color: var(--accent);
}

/* ---- RSVP / Invite Page ---- */
.invite-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.invite-hero {
  padding: 80px 40px;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}
.invite-hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.invite-hero .invite-sub {
  font-size: 17px;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto 32px;
  line-height: 1.6;
}
.invite-details {
  display: flex;
  gap: 40px;
  justify-content: center;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.invite-details .detail {
  text-align: center;
}
.invite-details .detail-label {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 4px;
}
.invite-details .detail-value {
  font-weight: 500;
  font-size: 16px;
}

/* ---- RSVP Form ---- */
.rsvp-section {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 40px 80px;
}
.rsvp-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  margin-bottom: 8px;
}
.rsvp-section .form-note {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 32px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--surface);
  border-radius: 2px;
  background: var(--white);
  color: var(--text);
  transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
}
.form-divider {
  border: none;
  border-top: 1px solid var(--surface);
  margin: 32px 0;
}
.btn-submit {
  width: 100%;
  padding: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  background: var(--text);
  color: var(--bg);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
  margin-top: 8px;
}
.btn-submit:hover { opacity: 0.85; }

/* ---- Confirmation ---- */
.confirmation {
  display: none;
  text-align: center;
  padding: 80px 40px;
  max-width: 560px;
  margin: 0 auto;
}
.confirmation.show { display: block; }
.confirmation h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 36px;
  margin-bottom: 12px;
}
.confirmation p {
  color: var(--muted);
  font-size: 16px;
  margin-bottom: 24px;
}
.btn-outline {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  padding: 14px 28px;
  border: 1px solid var(--text);
  border-radius: 2px;
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s;
}
.btn-outline:hover { opacity: 0.7; }

/* ---- Footer ---- */
.site-footer {
  background: var(--dark);
  color: var(--white);
  padding: 32px 40px;
  text-align: center;
  font-size: 13px;
  margin-top: auto;
}
.site-footer .footer-logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 14px;
  margin-bottom: 4px;
}
.site-footer .footer-sub {
  color: #9B8D7B;
}
.site-footer .powered-by {
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #9B8D7B;
}
.site-footer .powered-by img {
  height: 32px;
  width: auto;
  display: inline-block;
}

/* ---- Identity Bar ---- */
.identity-bar {
  background: var(--surface);
  padding: 10px 40px;
  font-size: 13px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.identity-bar .identity-name {
  font-weight: 600;
  color: var(--text);
}
.identity-bar .identity-done {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  padding: 8px 20px;
  background: var(--accent);
  color: var(--white);
  border: none;
  border-radius: 2px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.identity-bar .identity-done:hover { opacity: 0.85; }

/* ---- Tier Badges ---- */
.tier-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
}
.tier-badge.tier-a {
  background: var(--accent);
  color: var(--white);
}
.tier-badge.tier-b {
  background: var(--surface);
  color: var(--muted);
  border: 1px solid var(--muted);
}

/* ---- Error / Invalid State ---- */
.error-state {
  text-align: center;
  padding: 120px 40px;
  max-width: 480px;
  margin: 0 auto;
}
.error-state h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  margin-bottom: 12px;
}
.error-state p {
  color: var(--muted);
  font-size: 15px;
}

/* ---- Passphrase Modal ---- */
.pass-gate {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pass-gate .pass-box {
  text-align: center;
  max-width: 360px;
}
.pass-gate h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 28px;
  margin-bottom: 8px;
}
.pass-gate p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.pass-gate input {
  width: 100%;
  padding: 14px 16px;
  font-family: var(--font-body);
  font-size: 15px;
  border: 1px solid var(--surface);
  border-radius: 2px;
  background: var(--white);
  color: var(--text);
  text-align: center;
  margin-bottom: 12px;
}
.pass-gate input:focus { outline: none; border-color: var(--accent); }
.pass-gate .pass-error {
  color: var(--accent);
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
}

/* ---- Invitee Card (Admin) ---- */
.invitee-card {
  background: var(--white);
  border-radius: 4px;
  margin-bottom: 16px;
  overflow: hidden;
}
.invitee-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  transition: background 0.15s;
}
.invitee-header:hover { background: var(--bg); }
.invitee-header .invitee-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
.invitee-header .invitee-meta {
  font-size: 13px;
  color: var(--muted);
}
.invitee-header .invitee-status {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 2px;
}
.invitee-status.invited { background: var(--surface); color: var(--muted); }
.invitee-status.rsvped { background: #e8f0e8; color: #4a7c59; }
.invitee-status.selections_complete { background: #d4e8d4; color: #2d5f3d; }
.invitee-body {
  padding: 0 20px 20px;
  display: none;
  border-top: 1px solid var(--surface);
}
.invitee-body.open { display: block; padding-top: 16px; }

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .hero-banner { padding: 48px 24px 32px; }
  .hero-banner h1 { font-size: 36px; }
  .tabs { padding: 0 24px; overflow-x: auto; }
  .tab { padding: 14px 16px; font-size: 12px; white-space: nowrap; }
  .product-grid { padding: 24px; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
  .site-header { padding: 16px 24px; }
  .selections-bar { padding: 14px 24px; }
  .invite-hero { padding: 48px 24px; }
  .invite-hero h1 { font-size: 32px; }
  .rsvp-section { padding: 0 24px 48px; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .modal { padding: 24px; margin: 16px; }
}
