/* Swipey.ai affiliate funnel — shared styles */

:root {
  --bg: #0d0d12;
  --bg-elevated: #16161f;
  --border: #2a2a38;
  --text: #f2f0f5;
  --text-muted: #a8a5b5;
  --accent: #ff3d7f;
  --accent-hover: #ff5c93;
  --radius: 14px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

img, video { max-width: 100%; display: block; }

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* ---- Site header ---- */

.site-header {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.site-header .wrap {
  display: flex;
  align-items: center;
}

.site-logo { display: inline-block; }

.site-logo img { height: 32px; width: auto; display: block; }

/* ---- Homepage grid ---- */

.hero-blurb {
  padding: 48px 0 24px;
  text-align: center;
}

.hero-blurb h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  margin: 0 0 10px;
}

.hero-blurb p {
  color: var(--text-muted);
  max-width: 560px;
  margin: 0 auto;
}

.sort-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin: 24px 0 8px;
}

.sort-controls a {
  display: inline-block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.sort-controls a.active {
  color: var(--text);
  border-color: var(--accent);
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  padding: 24px 0 60px;
}

.model-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.model-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
}

.model-card-media {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #000;
}

.model-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.play-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.play-badge svg { width: 14px; height: 14px; fill: #fff; }

.model-card-body { padding: 14px 16px 16px; }

.model-card-body h3 { margin: 0 0 4px; font-size: 1.05rem; }

.model-card-body .tagline {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0 0 8px;
  min-height: 2.6em;
}

.model-card-stats {
  display: flex;
  gap: 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.model-card-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.card-btn {
  flex: 1;
  text-align: center;
  padding: 9px 10px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

.card-btn-primary {
  background: var(--accent);
  color: #fff;
}

.card-btn-primary:hover { background: var(--accent-hover); }

.card-btn-secondary {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.card-btn-secondary:hover { border-color: var(--accent); }

/* ---- Gallery page ---- */

.model-header {
  padding: 32px 0 12px;
}

.model-header h1 { margin: 0 0 6px; }

.model-header .persona { color: var(--accent); font-size: 0.9rem; font-weight: 600; }

.header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.cta-button-top {
  margin-top: 14px;
  padding: 12px 26px;
  font-size: 0.95rem;
}

.cta-button-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.cta-button-outline:hover { border-color: var(--accent); background: transparent; }

/* ---- Prev / All Models / Next pager ---- */

.model-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 20px 0;
  font-size: 0.9rem;
}

.model-pager a { color: var(--text-muted); }

.model-pager a:hover { color: var(--text); }

.model-pager .all-models-link {
  color: var(--accent);
  font-weight: 600;
}

.model-pager .pager-disabled {
  color: var(--border);
}

/* ---- Related models ("You Might Also Like") ---- */

.related-section {
  padding: 30px 0 10px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.related-section h2 { margin: 0 0 18px; }

.gallery-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0;
  border-bottom: 1px solid var(--border);
}

.gallery-tabs button {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 10px 4px;
  margin-right: 20px;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
}

.gallery-tabs button.active {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.gallery-panel { display: none; padding-bottom: 40px; }
.gallery-panel.active { display: block; }

.gallery-grid-vertical {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 14px;
}

.gallery-grid-horizontal {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.media-tile {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #000;
  cursor: pointer;
}

.gallery-grid-vertical .media-tile { aspect-ratio: 9 / 16; }
.gallery-grid-horizontal .media-tile { aspect-ratio: 16 / 9; }

.gallery-figure {
  margin: 0;
}

.gallery-figure figcaption {
  margin: 8px 2px 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.media-tile img, .media-tile video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-tile .play-badge {
  width: 44px;
  height: 44px;
  bottom: auto;
  right: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.media-tile .play-badge svg { width: 18px; height: 18px; }

.media-tile.is-video.is-playing .play-badge { display: none; }

.gallery-cta {
  margin: 30px 0 60px;
  text-align: center;
}

/* ---- Profile page ---- */

.profile-layout {
  display: grid;
  grid-template-columns: minmax(280px, 380px) 1fr;
  gap: 40px;
  padding: 40px 0 60px;
  align-items: start;
}

@media (max-width: 780px) {
  .profile-layout { grid-template-columns: 1fr; }
}

.profile-hero { border-radius: var(--radius); overflow: hidden; }

.profile-hero img { width: 100%; aspect-ratio: 9 / 16; object-fit: cover; }

.profile-name { font-size: 2rem; margin: 0 0 4px; }

.profile-persona { color: var(--accent); font-weight: 600; margin: 0 0 18px; }

.profile-bio p { color: var(--text-muted); margin: 0 0 16px; }

.cta-button {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  padding: 16px 32px;
  border-radius: 999px;
  font-size: 1.05rem;
  margin-top: 10px;
}

.cta-button:hover { background: var(--accent-hover); }

.profile-links {
  margin-top: 24px;
  font-size: 0.9rem;
}

.profile-links a { color: var(--text-muted); border-bottom: 1px solid var(--border); }

/* ---- Footer ---- */

.site-footer {
  border-top: 1px solid var(--border);
  padding: 24px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-align: center;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin-bottom: 12px;
}

.footer-nav a {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.footer-nav a:hover { color: var(--text); }

/* ---- Lightbox ---- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  z-index: 100;
  padding: 40px 20px;
}

.lightbox-overlay img {
  max-width: 100%;
  max-height: calc(100% - 80px);
  width: auto;
  border-radius: 8px;
}

.lightbox-cta { flex-shrink: 0; }

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
}

/* ---- Profile "moments" video section ---- */

.moments-section {
  padding: 20px 0 50px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

.moments-section h2 { margin: 0 0 6px; }

.moments-intro { color: var(--text-muted); margin: 0 0 24px; }

.moments-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 18px;
}

.moments-grid .media-tile { aspect-ratio: 9 / 16; }

.moment-caption {
  margin: 10px 0 0;
  font-size: 0.88rem;
  color: var(--text);
}

.moment-detail {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

/* ---- Articles ---- */

.article-body {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 0 70px;
}

.article-body h1 { font-size: 2rem; margin: 0 0 20px; }
.article-body h2 { font-size: 1.5rem; margin: 40px 0 16px; }
.article-body h3 { font-size: 1.15rem; margin: 28px 0 12px; }

.article-body p, .article-body li {
  color: var(--text-muted);
  line-height: 1.7;
}

.article-body strong { color: var(--text); }

.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 6px; }

.article-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 36px 0;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.92rem;
}

.article-body th, .article-body td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.article-body th { color: var(--text); background: var(--bg-elevated); }
.article-body td { color: var(--text-muted); }

.article-cta-wrap { text-align: center; margin: 28px 0; }

.article-cta.cta-missing {
  background: transparent;
  border: 2px dashed var(--accent);
  color: var(--accent);
}

.article-cta.cta-missing::after {
  content: " (TODO: real link needed)";
  font-weight: 400;
  font-size: 0.75rem;
}


/* ---- Legacy /models/ listing ---- */

.legacy-model-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0 0 60px;
  margin: 0;
}

.legacy-model-list a {
  display: block;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  color: var(--text-muted);
}

.legacy-model-list a:hover { border-color: var(--accent); color: var(--text); }
