/* ─── SHARE / GALLERY DETAIL PAGE ─── */

/* Page wrapper */
.page {
  position: relative; z-index: 1;
  max-width: 640px; margin: 0 auto;
  padding: 32px 20px 72px;
}

/* ─── ARTWORK ─── */
.artwork-wrap {
  position: relative; opacity: 0;
  animation: revealUp 0.7s cubic-bezier(0.22,1,0.36,1) forwards 0.1s;
}
.artwork-frame {
  width: 100%; border-radius: 20px; overflow: hidden;
  box-shadow: 0 4px 24px rgba(44,40,37,0.10), 0 1px 4px rgba(44,40,37,0.06);
  position: relative; background: var(--bg-warm); aspect-ratio: 2/3;
}
.artwork-frame svg { width: 100%; height: 100%; display: block; }
.artwork-frame img { width: 100%; height: 100%; object-fit: cover; display: block; }
.artwork-frame::after {
  content: ''; position: absolute; inset: 0; border-radius: 20px;
  box-shadow: inset 0 0 60px rgba(44,40,37,0.08); pointer-events: none;
}

/* ─── CAPTION ─── */
.caption-wrap {
  margin-top: 20px; text-align: center; opacity: 0;
  animation: revealUp 0.6s cubic-bezier(0.22,1,0.36,1) forwards 0.3s;
}
.caption {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 16px; color: var(--accent); line-height: 1.55;
  max-width: 360px; margin: 0 auto;
}

/* ─── PEEK SECTION ─── */
.peek-wrap {
  margin-top: 28px; opacity: 0;
  animation: revealUp 0.6s cubic-bezier(0.22,1,0.36,1) forwards 0.45s;
}
.peek-block {
  background: var(--bg-warm); border-radius: 14px;
  padding: 20px 22px; position: relative; overflow: hidden;
}
.peek-label {
  font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-hint); margin-bottom: 10px; font-weight: 500;
}
.peek-text { font-size: 14.5px; line-height: 1.8; color: var(--text-secondary); }
.peek-block::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 52px;
  background: linear-gradient(to bottom, transparent, var(--bg-warm));
  border-radius: 0 0 14px 14px; pointer-events: none;
}

/* ─── CTA ─── */
.cta-wrap {
  margin-top: 32px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  opacity: 0; animation: revealUp 0.6s cubic-bezier(0.22,1,0.36,1) forwards 0.6s;
}
.cta-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 36px; background: var(--text-primary); color: var(--bg);
  border: none; border-radius: 28px;
  font-size: 15px; font-weight: 500; font-family: 'Inter', sans-serif;
  cursor: pointer; text-decoration: none;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  box-shadow: 0 2px 12px rgba(44,40,37,0.15); letter-spacing: 0.01em;
}
.cta-btn:hover { background: #3d3632; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(44,40,37,0.18); }
.cta-btn:active { transform: translateY(0); }
.cta-sub { font-size: 12px; color: var(--text-hint); letter-spacing: 0.01em; }
.cta-sub span { display: inline-flex; align-items: center; gap: 5px; }
.cta-dot { width: 2px; height: 2px; border-radius: 50%; background: var(--accent-light); display: inline-block; }

/* ─── MORE DREAMS ─── */
.more-wrap {
  margin-top: 52px; opacity: 0;
  animation: revealUp 0.5s cubic-bezier(0.22,1,0.36,1) forwards 0.75s;
}
.more-title {
  font-family: 'Lora', serif; font-size: 16px; font-weight: 400;
  color: var(--text-secondary); margin-bottom: 14px;
}
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-card {
  background: var(--bg-card); border-radius: 12px; overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(44,40,37,0.04);
  cursor: pointer; transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.more-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(44,40,37,0.09); }
.more-art { width: 100%; aspect-ratio: 2/3; overflow: hidden; }
.more-art svg { width: 100%; height: 100%; display: block; }
.more-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.more-body { padding: 8px 10px 10px; }
.more-caption {
  font-family: 'Lora', serif; font-style: italic;
  font-size: 11.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.45;
}

/* ─── PAGE FOOTER ─── */
.page-footer {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 48px; padding-top: 24px;
  border-top: 1px solid var(--border-light);
  opacity: 0; animation: revealUp 0.5s ease forwards 0.85s;
}
.page-footer-logo {
  font-family: 'Lora', serif; font-size: 14px;
  color: var(--accent); font-style: italic; text-decoration: none;
}
.page-footer-links { display: flex; gap: 18px; }
.page-footer-links a {
  font-size: 12px; color: var(--text-hint);
  text-decoration: none; transition: color 0.15s;
}
.page-footer-links a:hover { color: var(--text-secondary); }

/* ─── ANIMATIONS ─── */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ─── DOWNLOAD BTN (frosted glass, bottom-right of artwork) ─── */
.artwork-dl-btn {
  position: absolute;
  bottom: 14px; right: 14px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(250,248,245,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 2px 12px rgba(44,40,37,0.18);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  z-index: 10;
  color: var(--accent);
}
.artwork-dl-btn:hover {
  background: rgba(255,255,255,0.98);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(44,40,37,0.2);
}
.artwork-dl-btn:active { transform: translateY(0) scale(0.95); }
.artwork-dl-btn svg { display: block; flex-shrink: 0; }
.artwork-dl-btn .dl-spinner {
  display: none;
  width: 16px; height: 16px;
  border: 2px solid var(--accent-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.artwork-dl-btn.loading .dl-icon { display: none; }
.artwork-dl-btn.loading .dl-spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SHARE BAR ─── */
.share-bar {
  margin-top: 18px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  opacity: 0;
  animation: revealUp 0.6s cubic-bezier(0.22,1,0.36,1) forwards 0.38s;
}

/* Native share button — shown on mobile only via JS */
.share-native-btn {
  display: none;
  align-items: center; gap: 7px;
  padding: 9px 18px;
  background: var(--text-primary); color: var(--bg);
  border: none; border-radius: 20px;
  font-size: 13px; font-weight: 500; font-family: 'Inter', sans-serif;
  cursor: pointer; white-space: nowrap;
  transition: background 0.15s, transform 0.12s;
}
.share-native-btn:hover { background: #3d3632; }
.share-native-btn:active { transform: scale(0.97); }
.share-native-btn.visible { display: inline-flex; }

/* Divider between native btn and platform icons */
.share-divider {
  display: none;
  width: 1px; height: 20px; background: var(--border); flex-shrink: 0;
}
.share-divider.visible { display: block; }

/* Platform icon buttons */
.share-icons { display: flex; align-items: center; gap: 6px; }
.share-icons.hidden { display: none; }
.share-icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; text-decoration: none; flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.share-icon-btn:hover {
  background: var(--bg-warm); border-color: var(--accent-light);
  transform: translateY(-1px); box-shadow: 0 3px 10px rgba(44,40,37,0.1);
}
.share-icon-btn:active { transform: scale(0.93); }
.share-icon-btn svg { display: block; }

/* Download icon button — same ring style as platform icons */
.share-dl-btn {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-card);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-secondary); flex-shrink: 0;
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.share-dl-btn:hover {
  background: var(--bg-warm); border-color: var(--accent-light);
  transform: translateY(-1px); box-shadow: 0 3px 10px rgba(44,40,37,0.1);
  color: var(--accent);
}
.share-dl-btn:active { transform: scale(0.93); }
.share-dl-btn .dl-spinner {
  display: none;
  width: 14px; height: 14px;
  border: 2px solid var(--accent-light); border-top-color: var(--accent);
  border-radius: 50%; animation: spin 0.7s linear infinite;
}
.share-dl-btn.loading .dl-icon { display: none; }
.share-dl-btn.loading .dl-spinner { display: block; }

/* ─── MOBILE ─── */
@media (max-width: 500px) {
  .nav-link { display: none; }
  .page { padding: 20px 14px 56px; }
  .artwork-frame { border-radius: 16px; }
  .caption { font-size: 15px; }
  .more-grid { gap: 8px; }
  .page-footer { flex-direction: column; gap: 12px; align-items: flex-start; }
}
