/* ═══════════════════════════════════════════
   Elvera — Browse Page Styles
   ═══════════════════════════════════════════ */


/* ══════════════════════════ */
/* HERO                       */
/* ══════════════════════════ */
.browse-hero {
  min-height: 50vh;
  display: flex; align-items: center; justify-content: center; flex-direction: column;
  padding: 140px 24px 60px;
  text-align: center;
  background: var(--white);
  position: relative;
}
.browse-hero h1 {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(40px, 7vw, 90px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 16px;
}
.browse-hero p {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 460px;
  margin-bottom: 36px;
}

/* Search */
.search-wrap {
  display: flex; align-items: center; gap: 0;
  max-width: 440px; width: 100%;
  border: 1px solid rgba(26,21,16,0.15);
  border-radius: 50px;
  overflow: hidden;
  background: var(--ivory);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-wrap:focus-within {
  border-color: var(--cobalt);
  box-shadow: 0 0 0 3px var(--cobalt-glow);
}
.search-input {
  flex: 1;
  border: none; outline: none; background: transparent;
  font-family: var(--sans); font-size: 15px; font-weight: 300;
  padding: 14px 20px;
  color: var(--text);
}
.search-input::placeholder { color: var(--text-muted); opacity: 0.6; }
.search-btn {
  background: var(--charcoal); color: var(--white); border: none;
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 12px 24px; cursor: pointer; border-radius: 0 50px 50px 0;
  transition: background 0.2s;
  white-space: nowrap;
}
.search-btn:hover { background: #000; }

/* Search result */
.search-result {
  margin-top: 32px;
  display: none;
  animation: fadeUp 0.4s ease;
}
.search-result.visible { display: block; }
.search-empty {
  margin-top: 24px;
  display: none;
  font-size: 15px; color: var(--text-muted);
  animation: fadeUp 0.3s ease;
}
.search-empty.visible { display: block; }


/* ══════════════════════════ */
/* CAROUSEL SECTIONS          */
/* ══════════════════════════ */
.carousel-section {
  padding: 64px 0 80px;
  overflow: hidden;
}
.carousel-section:nth-child(even) {
  background: var(--bone);
}
.carousel-section:nth-child(odd) {
  background: var(--ivory);
}
.carousel-label {
  font-family: var(--serif);
  font-weight: 300;
  font-style: italic;
  font-size: clamp(26px, 4vw, 44px);
  line-height: 1.15;
  padding: 0 40px;
  margin-bottom: 32px;
  color: var(--text);
}
.carousel-label span {
  color: var(--cobalt);
}
.carousel-sub {
  font-size: 15px;
  color: var(--text-muted);
  padding: 0 40px;
  margin-top: -20px;
  margin-bottom: 28px;
}

.carousel-track {
  display: flex;
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 8px 40px 24px;
  scrollbar-width: none;
}
.carousel-track::-webkit-scrollbar { display: none; }


/* ══════════════════════════ */
/* CARD — COLLAPSED           */
/* ══════════════════════════ */
.elvera-card {
  flex: 0 0 320px;
  min-width: 300px;
  max-width: 360px;
  scroll-snap-align: start;
  background: var(--white);
  border-radius: 24px;
  padding: 28px 24px 24px;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.3s ease;
  position: relative;
  border: 1px solid rgba(26,21,16,0.06);
}
.elvera-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(26,21,16,0.10);
}

/* Portrait circle */
.card-portrait {
  width: 72px; height: 72px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500; font-size: 22px;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
}
.card-portrait.grad-1 { background: linear-gradient(135deg, #4854AA, #7B68C0); }
.card-portrait.grad-2 { background: linear-gradient(135deg, #B8753E, #D4A99A); }
.card-portrait.grad-3 { background: linear-gradient(135deg, #6B5E50, #A99A8C); }
.card-portrait.grad-4 { background: linear-gradient(135deg, #D4A99A, #F5F0E8); color: var(--text); }
.card-portrait.grad-5 { background: linear-gradient(135deg, #1E1008, #4854AA); }
.card-portrait.grad-6 { background: linear-gradient(135deg, #2A2118, #B8753E); }

/* Couples: two overlapping circles */
.card-portrait-couple {
  display: flex; align-items: center; margin-bottom: 16px;
}
.card-portrait-couple .cp {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500; font-size: 17px;
  color: var(--white);
  border: 3px solid var(--white);
}
.card-portrait-couple .cp:nth-child(2) { margin-left: -16px; }
.card-portrait-couple .cp.cg-1 { background: linear-gradient(135deg, #4854AA, #7B68C0); }
.card-portrait-couple .cp.cg-2 { background: linear-gradient(135deg, #D4A99A, #B8753E); }

/* Number + mode badge */
.card-meta {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px;
}
.card-number {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--text-muted); letter-spacing: 0.5px;
}
.card-badge {
  font-size: 11px; font-weight: 500;
  padding: 3px 10px; border-radius: 50px;
  letter-spacing: 0.3px; text-transform: uppercase;
}
.badge-self { background: rgba(72,84,170,0.10); color: var(--cobalt); }
.badge-baby { background: rgba(212,169,154,0.20); color: #8B5E3C; }
.badge-elder { background: rgba(107,94,80,0.15); color: var(--text-muted); }
.badge-couples { background: rgba(184,117,62,0.15); color: var(--copper); }

.card-name {
  font-family: var(--sans); font-weight: 500; font-size: 18px;
  color: var(--text); margin-bottom: 4px;
}
.card-essence {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 15px; color: var(--text); line-height: 1.5;
  margin-bottom: 12px;
}

/* Trait chips */
.card-traits {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-bottom: 14px;
}
.trait-chip {
  font-size: 12px; font-weight: 400;
  color: var(--text-muted);
  background: var(--bone);
  padding: 4px 12px; border-radius: 50px;
}

.card-compare {
  font-size: 13px; color: var(--text-muted);
  margin-bottom: 12px; font-style: italic;
}

/* Open arrow */
.card-cta {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--cobalt);
  margin-top: auto;
}
.card-cta svg {
  width: 16px; height: 16px;
  transition: transform 0.2s;
}
.elvera-card:hover .card-cta svg {
  transform: translateX(4px);
}


/* ══════════════════════════ */
/* MODAL — EXPANDED CARD      */
/* ══════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(26,21,16,0.6);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  display: none; align-items: center; justify-content: center;
  padding: 24px;
  animation: fadeIn 0.25s ease;
}
.modal-overlay.open { display: flex; }

.modal-card {
  background: var(--white);
  border-radius: 28px;
  max-width: 520px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  padding: 40px 36px 32px;
  position: relative;
  animation: scaleUp 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--bone); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.modal-close:hover { background: rgba(26,21,16,0.08); }
.modal-close svg { width: 16px; height: 16px; color: var(--text); }

.modal-portrait {
  width: 96px; height: 96px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 500; font-size: 30px;
  color: var(--white); margin-bottom: 20px;
}

.modal-name {
  font-family: var(--sans); font-weight: 500; font-size: 24px;
  color: var(--text); margin-bottom: 4px;
}
.modal-meta {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.modal-essence {
  font-family: var(--serif); font-style: italic; font-weight: 300;
  font-size: 18px; color: var(--text); line-height: 1.5;
  margin-bottom: 16px;
}
.modal-desc {
  font-size: 15px; color: var(--text-muted); line-height: 1.7;
  margin-bottom: 20px;
}
.modal-section-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px;
}
.modal-values {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 24px;
}
.modal-values .trait-chip {
  font-size: 13px; padding: 6px 16px;
}

.modal-truth {
  background: var(--bone);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 24px;
}
.modal-truth h4 {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 16px; margin-bottom: 8px; color: var(--text);
}
.modal-truth p {
  font-size: 14px; color: var(--text-muted); line-height: 1.6;
}

.modal-actions {
  display: flex; gap: 10px; flex-wrap: wrap;
}
.modal-actions button {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  padding: 12px 24px; border-radius: 50px; cursor: pointer;
  transition: all 0.2s; border: none;
}
.modal-actions .btn-primary {
  background: var(--charcoal); color: var(--white);
}
.modal-actions .btn-primary:hover { background: #000; }
.modal-actions .btn-secondary {
  background: transparent; color: var(--text-muted);
  border: 1px solid rgba(26,21,16,0.15);
}
.modal-actions .btn-secondary:hover {
  border-color: rgba(26,21,16,0.3); color: var(--text);
}


/* ══════════════════════════ */
/* FOOTER (browse-specific)   */
/* ══════════════════════════ */
.browse-footer {
  text-align: center;
  padding: 48px 24px;
  background: var(--charcoal);
  color: rgba(245,240,232,0.5);
  font-size: 13px;
}
.browse-footer a {
  color: rgba(245,240,232,0.7);
  transition: color 0.2s;
}
.browse-footer a:hover { color: var(--bone); }
.footer-logo {
  font-family: var(--serif); font-weight: 500; font-size: 18px;
  color: var(--bone); letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 8px;
}


/* ══════════════════════════ */
/* ANIMATIONS                 */
/* ══════════════════════════ */
@keyframes fadeIn {
  from { opacity: 0; } to { opacity: 1; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleUp {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}


/* ══════════════════════════ */
/* RESPONSIVE                 */
/* ══════════════════════════ */
@media (max-width: 768px) {
  .browse-hero { padding: 120px 20px 48px; }
  .carousel-label { padding: 0 20px; font-size: clamp(24px, 6vw, 36px); }
  .carousel-sub { padding: 0 20px; }
  .carousel-track { padding: 8px 20px 20px; gap: 16px; }
  .elvera-card { flex: 0 0 280px; min-width: 260px; }
  .modal-card { padding: 28px 24px 24px; }
}
