/* ═══════════════════════════════════════════════════════════════
   Family Memories — page-specific styles
   Accent: --neon-pink (#FF2D78)
   Global design system lives in css/styles.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Hero ── */
.mem-hero {
  text-align: center;
  padding: 52px 20px 32px;
}

.mem-hero-icon {
  font-size: 44px;
  color: var(--neon-pink);
  display: block;
  margin: 0 auto 16px;
  filter: drop-shadow(0 0 10px rgba(255, 45, 120, 0.5));
  --ph-duotone-opacity: 0.3;
}

.mem-title {
  font-family: 'Syne', sans-serif;
  font-weight: 900;
  font-size: clamp(32px, 5vw, 52px);
  margin: 0 0 12px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
}

.mem-sub {
  font-size: 15px;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.55;
  font-family: 'Satoshi', sans-serif;
}

/* ── Section containers ── */
.mem-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 40px;
}

.docs-section {
  max-width: 760px;
}

/* ── Upload zone ── */
.upload-zone {
  border: 1.5px dashed var(--border-subtle);
  border-radius: 16px;
  padding: 32px 24px;
  text-align: center;
  background: rgba(255, 45, 120, 0.02);
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
  margin-bottom: 22px;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--neon-pink);
  background: rgba(255, 45, 120, 0.05);
}

.upload-hint {
  font-size: 12px;
  color: var(--text-faint);
  margin: 12px 0 0;
  line-height: 1.4;
  font-family: 'Satoshi', sans-serif;
}

/* ── Upload progress list ── */
.progress-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.progress-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  padding: 12px 16px;
}

.progress-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Satoshi', sans-serif;
}

.progress-track {
  height: 4px;
  background: var(--bg-elevated);
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-violet));
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* ── Month group + divider ── */
.month-group {
  margin-bottom: 44px;
}

.month-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.month-line {
  flex: 1;
  height: 1px;
  border-radius: 1px;
}

.month-line:first-child {
  background: linear-gradient(90deg, var(--neon-pink), transparent);
}

.month-line:last-child {
  background: linear-gradient(270deg, var(--neon-violet), transparent);
}

.month-badge {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  padding: 5px 16px;
  border-radius: 999px;
  letter-spacing: 0.04em;
}

/* ── Polaroid photo grid ── */
/* White polaroids on dark background: intentional "photos on a dark table" effect */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 22px;
}

.photo-card {
  position: relative;
  background: #F5F2EE;
  padding: 10px 10px 42px;
  border-radius: 2px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.04);
  transform: rotate(var(--tilt, 0deg));
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}

.photo-card:hover {
  transform: rotate(0deg) scale(1.04);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(255, 45, 120, 0.15);
  z-index: 10;
}

.photo-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}

/* Caption and date use dark text — they sit on the white polaroid bottom */
.photo-caption {
  font-family: 'Satoshi', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  color: #555;
  padding-top: 10px;
  min-height: 22px;
  cursor: text;
}

.caption-placeholder {
  color: #aaa;
  font-style: italic;
  font-size: 11px;
}

.caption-input {
  width: 100%;
  border: none;
  border-bottom: 1.5px solid var(--neon-pink);
  font-family: 'Satoshi', sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  padding: 5px 2px;
  outline: none;
  background: transparent;
  color: #333;
  display: block;
  margin-top: 8px;
  box-sizing: border-box;
}

.photo-date {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  color: #aaa;
  text-align: center;
  margin-top: 4px;
}

.photo-del {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.4);
  color: #fff;
  font-size: 11px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
}

.photo-card:hover .photo-del {
  opacity: 1;
}

.photo-del:hover {
  background: rgba(239, 68, 68, 0.9);
}

@media (hover: none) {
  .photo-del {
    opacity: 0.65;
  }
}

/* ── Section divider pill ── */
.mem-divider {
  text-align: center;
  padding: 24px 20px;
}

.mem-divider-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 10px 24px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--text-secondary);
}

.mem-divider-text {
  font-family: 'Satoshi', sans-serif;
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Docs section ── */
.docs-heading {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 22px;
  margin: 0 0 16px;
  color: var(--text-primary);
}

.sensitivity-warning {
  background: rgba(255, 184, 0, 0.06);
  border: 1px solid rgba(255, 184, 0, 0.25);
  border-radius: 12px;
  padding: 13px 18px;
  font-size: 13px;
  color: var(--neon-amber);
  line-height: 1.55;
  margin-bottom: 22px;
  font-family: 'Satoshi', sans-serif;
}

.doc-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}

.doc-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  flex-wrap: wrap;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.doc-card:hover {
  border-color: rgba(255, 45, 120, 0.3);
  box-shadow: 0 0 20px rgba(255, 45, 120, 0.07);
}

.doc-badge {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 4px 9px;
  border-radius: 6px;
  flex-shrink: 0;
}

.doc-info {
  flex: 1;
  min-width: 0;
}

.doc-name {
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
  font-family: 'Satoshi', sans-serif;
}

.doc-meta {
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: var(--text-faint);
  margin-top: 3px;
}

.doc-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Lightbox ── */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(7, 7, 26, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: lb-fade 0.18s ease;
}

@keyframes lb-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.lb-content {
  text-align: center;
  max-width: 90vw;
}

.lb-img {
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.7);
  animation: lb-pop 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes lb-pop {
  from { transform: scale(0.92); }
  to   { transform: scale(1); }
}

.lb-caption {
  color: var(--text-secondary);
  font-family: 'Satoshi', sans-serif;
  font-size: 16px;
  margin-top: 16px;
}

.lb-date {
  color: var(--text-faint);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  margin-top: 6px;
}

.lb-close {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.lb-close:hover {
  border-color: var(--neon-pink);
  color: var(--text-primary);
}

.lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.15s, color 0.15s;
}

.lb-nav:hover {
  border-color: var(--neon-pink);
  color: var(--text-primary);
}

.lb-prev {
  left: 16px;
}

.lb-next {
  right: 16px;
}

.lb-counter {
  position: fixed;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-faint);
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
}

/* ── Empty states ── */
.empty-state {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-secondary);
  font-family: 'Satoshi', sans-serif;
}

.empty-state .big-emoji {
  font-size: 44px;
  display: block;
  margin-bottom: 12px;
}

.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 19px;
  color: var(--text-primary);
  margin: 0 0 8px;
}

.empty-state p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .mem-title { font-size: 28px; }
  .mem-hero { padding: 36px 16px 24px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 16px; }
  .photo-card { padding: 8px 8px 38px; }
  .lb-nav { width: 38px; height: 38px; font-size: 20px; }
  .mem-section { padding: 0 16px 32px; }
}

@media (max-width: 380px) {
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
