/* ─────────────────────────────────────────────────────────────
   Zagan — Shared stylesheet
   Dark warm palette adapted from ForgeUI design spec
   ───────────────────────────────────────────────────────────── */

:root {
  --bg-opaque:   #181614;
  --panel:       #1F1D1A;
  --panel-raise: #252320;
  --panel-sunk:  #14120F;
  --border:      #2A2723;
  --border-hi:   #3A362F;

  --text:        #E8E2D5;
  --text-mute:   #9A9486;
  --text-dim:    #6A655C;

  --accent:      #D97759;
  --accent-soft: #E89B82;
  --accent-dim:  #8A4A38;
  --accent-bg:   rgba(217,119,89,0.10);

  --ok:    #8FA87A;
  --ok-bg: rgba(143,168,122,0.12);
  --warn:  #D4A84E;
  --err:   #C96855;

  --radius:    12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --shadow-card: 0 1px 2px rgba(0,0,0,0.30), 0 12px 32px rgba(0,0,0,0.20);
  --shadow-deep: 0 30px 80px rgba(0,0,0,0.55), 0 6px 18px rgba(0,0,0,0.35);
}

* , *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg-opaque);
  color: var(--text);
  font-family: 'Geist', -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; }

/* warm grain texture overlay — subtle, never noisy */
body::before {
  content: '';
  position: fixed; inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 20% 0%, rgba(217,119,89,0.06), transparent 60%),
    radial-gradient(circle at 90% 90%, rgba(143,168,122,0.03), transparent 60%);
  z-index: 0;
}

.serif { font-family: 'Source Serif 4', Georgia, serif; }
.italic { font-style: italic; }

.container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: 'Geist', sans-serif;
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .18s ease;
  white-space: nowrap;
  color: inherit;
  background: transparent;
}
.btn svg { width: 12px; height: 12px; }

.btn-primary {
  background: var(--accent); color: #1A0F0A;
  font-weight: 600;
}
.btn-primary:hover { background: var(--accent-soft); transform: translateY(-1px); }

.btn-ghost {
  background: transparent; color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--border-hi); background: var(--panel-raise); }

.btn-subtle {
  background: var(--panel-raise); color: var(--text-mute);
  border-color: var(--border);
}
.btn-subtle:hover { color: var(--text); border-color: var(--border-hi); }

.btn-danger {
  background: rgba(201,104,85,0.12); color: var(--err);
  border-color: rgba(201,104,85,0.30);
}
.btn-danger:hover { background: rgba(201,104,85,0.20); border-color: var(--err); }

/* ─── NAV ─── */
nav.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg-opaque) 80%, transparent);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}
.brand {
  display: inline-flex; align-items: baseline; gap: 12px;
  font-family: 'Source Serif 4', serif;
  font-size: 22px; font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  display: inline-block;
}
.brand-tag {
  font-family: 'Geist', sans-serif; font-size: 11px;
  font-weight: 400; color: var(--text-mute);
  letter-spacing: 0.06em; text-transform: uppercase;
  padding-left: 12px; border-left: 1px solid var(--border);
}
.nav-links { display: flex; gap: 26px; list-style: none; font-size: 14px; }
.nav-links a { color: var(--text-mute); transition: color .15s ease; }
.nav-links a:hover { color: var(--text); }
.nav-right { display: flex; align-items: center; gap: 10px; }

/* ─── HERO with centered video ─── */
.hero {
  padding: 56px 0 64px;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  position: relative;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; color: var(--text-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 24px;
}
.hero-eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-bg);
}

.hero-video {
  width: 100%;
  max-width: 880px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-sunk);
  box-shadow: var(--shadow-deep), 0 0 0 1px rgba(217,119,89,0.05);
  position: relative;
}
.hero-video iframe {
  width: 100%; height: 100%; display: block; border: none;
}
.hero-video::after {
  content: '';
  position: absolute; inset: -2px;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at top, var(--accent) 0%, transparent 70%);
  opacity: 0.08;
  pointer-events: none;
  z-index: -1;
  filter: blur(20px);
}

/* placeholder card when no featured video is set */
.hero-video.placeholder {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-decoration: none;
  background:
    linear-gradient(135deg, rgba(217,119,89,0.10) 0%, transparent 60%),
    var(--panel);
  transition: transform .3s ease, box-shadow .3s ease;
  cursor: pointer;
}
.hero-video.placeholder:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-deep), 0 0 0 1px var(--accent);
}
.hero-video.placeholder .play-circle {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 12px 40px rgba(217,119,89,0.45),
              0 0 0 8px rgba(217,119,89,0.10);
  transition: transform .3s ease;
}
.hero-video.placeholder:hover .play-circle {
  transform: scale(1.06);
}
.hero-video.placeholder .play-circle svg {
  width: 32px; height: 32px;
  color: #1A0F0A;
  margin-left: 4px;
}
.hero-video.placeholder .ph-title {
  margin-top: 24px;
  font-family: 'Source Serif 4', serif;
  font-size: 28px; font-weight: 400;
  color: var(--text);
  letter-spacing: -0.015em;
}
.hero-video.placeholder .ph-sub {
  margin-top: 6px;
  font-size: 13px; color: var(--text-mute);
  letter-spacing: 0.04em;
}

/* video card placeholder (smaller, for the grid) */
.video-card.placeholder {
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  aspect-ratio: 16/9;
  text-decoration: none;
  cursor: pointer;
}
.video-card.placeholder:hover { border-color: var(--accent); }
.video-card.placeholder .play-circle-sm {
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(217,119,89,0.35);
}
.video-card.placeholder .play-circle-sm svg {
  width: 18px; height: 18px; color: #1A0F0A; margin-left: 2px;
}
.video-card.placeholder .ph-label {
  margin-top: 14px;
  font-size: 13px; color: var(--text-mute);
}

.hero-caption {
  margin-top: 24px;
  display: flex; align-items: center; gap: 14px;
  color: var(--text-mute); font-size: 14px;
}
.hero-caption a {
  color: var(--text); border-bottom: 1px solid var(--border-hi);
  padding-bottom: 1px; transition: color .15s ease, border-color .15s ease;
}
.hero-caption a:hover { color: var(--accent); border-color: var(--accent); }
.hero-caption .sep { color: var(--text-dim); }

/* ─── SECTION HEADERS ─── */
.section-divider {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 56px 0 28px;
  border-top: 1px solid var(--border);
  margin-top: 40px;
  flex-wrap: wrap; gap: 12px;
}
.section-divider h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 28px; font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--text);
}
.section-divider .meta {
  font-size: 13px; color: var(--text-mute);
}

/* ─── FILTERS ─── */
.filters {
  display: inline-flex; gap: 4px;
  margin-bottom: 36px;
  padding: 4px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 7px 16px;
  border-radius: 999px;
  font-family: 'Geist', sans-serif;
  font-size: 13px; font-weight: 500;
  color: var(--text-mute);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.filter-tab:hover { color: var(--text); }
.filter-tab.active {
  background: var(--accent); color: #1A0F0A;
  font-weight: 600;
}

/* ─── PRODUCT GRID ─── */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .35s cubic-bezier(.2,.7,.2,1),
              box-shadow .35s ease,
              border-color .25s ease;
  display: flex; flex-direction: column;
  cursor: pointer;
}
.card:hover {
  transform: translateY(-3px);
  border-color: var(--border-hi);
  box-shadow: var(--shadow-card);
}
.card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.thumb {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--panel-sunk);
  position: relative;
  border-bottom: 1px solid var(--border);
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .8s cubic-bezier(.2,.7,.2,1);
}
.card:hover .thumb img { transform: scale(1.04); }

.thumb.cover {
  display: flex; align-items: center; justify-content: center;
  isolation: isolate;
}
.thumb.cover .cover-name {
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: rgba(255,255,255,0.95);
  font-size: 26px;
  text-align: center;
  padding: 0 24px;
  z-index: 2;
  text-shadow: 0 1px 24px rgba(0,0,0,0.45);
}
.thumb.cover::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255,255,255,0.15), transparent 55%),
    radial-gradient(circle at 75% 80%, rgba(0,0,0,0.30), transparent 60%);
  z-index: 1;
}

.badge {
  position: absolute; top: 12px; left: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px;
  background: rgba(20,18,15,0.85);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 11px; font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
  z-index: 3;
}
.badge .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-bg);
}
.badge.free .dot { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.badge.free { color: var(--ok); }

.card-body {
  padding: 18px 20px 20px;
  display: flex; flex-direction: column;
  flex: 1;
  gap: 14px;
}
.card-meta {
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.card-name {
  font-family: 'Source Serif 4', serif;
  font-size: 19px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.005em;
  line-height: 1.25;
  margin-top: 2px;
}
.card-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.price {
  font-family: 'Source Serif 4', serif;
  font-size: 22px; font-weight: 500;
  color: var(--text);
  letter-spacing: -0.01em;
}
.price.free { color: var(--ok); }
.price.unknown { color: var(--text-dim); font-style: italic; font-size: 14px; }

.buy {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 16px;
  background: var(--accent); color: #1A0F0A;
  border-radius: 999px;
  font-size: 13px; font-weight: 600;
  transition: background .2s ease, transform .2s ease;
  white-space: nowrap;
}
.buy:hover { background: var(--accent-soft); transform: translateX(2px); }
.buy svg { width: 11px; height: 11px; }
.buy.is-free { background: var(--ok); color: #0F140A; }
.buy.is-free:hover { background: #a8c490; }

.card.hidden { display: none; }

/* ─── TRUST STRIP ─── */
.trust {
  margin-top: 48px;
  padding: 24px 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: 32px;
  font-size: 13px; color: var(--text-mute);
}
.trust span { display: inline-flex; align-items: center; gap: 8px; }
.trust svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

/* ─── VIDEOS ─── */
.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.video-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-sunk);
  transition: border-color .2s ease, transform .25s ease;
}
.video-card:hover {
  border-color: var(--border-hi);
  transform: translateY(-2px);
}
.video-card iframe {
  width: 100%; aspect-ratio: 16/9; display: block; border: none;
}

/* ─── ABOUT ─── */
.about {
  padding: 80px 0 56px;
  text-align: center;
  max-width: 620px; margin: 0 auto;
}
.about .kicker {
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.12em; text-transform: uppercase;
  margin-bottom: 14px;
}
.about h3 {
  font-family: 'Source Serif 4', serif;
  font-size: 28px; font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin-bottom: 16px;
  text-wrap: balance;
  color: var(--text);
}
.about h3 em { font-style: italic; color: var(--accent); }
.about p {
  color: var(--text-mute); font-size: 15px; line-height: 1.7;
  text-wrap: balance;
}
.about-actions {
  margin-top: 28px;
  display: inline-flex; gap: 10px; flex-wrap: wrap; justify-content: center;
}

/* ─── FOOTER ─── */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 56px;
  background: var(--panel-sunk);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
  font-size: 13px; color: var(--text-mute);
}
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { transition: color .15s ease; }
.footer-links a:hover { color: var(--text); }

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(10,8,6,0.78);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  overflow-y: auto;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 1080px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  box-shadow: var(--shadow-deep);
  transform: translateY(20px) scale(0.98);
  transition: transform .3s cubic-bezier(.2,.7,.2,1);
  position: relative;
}
.modal-overlay.open .modal {
  transform: translateY(0) scale(1);
}
.modal-close {
  position: absolute; top: 16px; right: 16px;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(20,18,15,0.85);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 5;
  transition: all .18s ease;
}
.modal-close:hover {
  background: var(--accent); color: #1A0F0A;
  border-color: var(--accent);
}

.modal-gallery {
  background: var(--panel-sunk);
  display: flex; flex-direction: column;
  padding: 24px;
  gap: 12px;
  border-right: 1px solid var(--border);
}
.modal-gallery-main {
  aspect-ratio: 16/10;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.modal-gallery-main img {
  width: 100%; height: 100%; object-fit: cover;
}
.modal-gallery-main.cover {
  position: relative;
  font-family: 'Source Serif 4', serif;
  font-style: italic;
  color: rgba(255,255,255,0.95);
  font-size: 32px;
}
.modal-gallery-main.cover::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 25%, rgba(255,255,255,0.15), transparent 55%);
}
.modal-thumbs {
  display: flex; gap: 8px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 4px;
}
.modal-thumb {
  width: 84px; aspect-ratio: 16/10;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel);
  cursor: pointer;
  flex-shrink: 0;
  transition: border-color .18s ease, opacity .18s ease;
  opacity: 0.65;
}
.modal-thumb img { width: 100%; height: 100%; object-fit: cover; }
.modal-thumb.active {
  border-color: var(--accent);
  opacity: 1;
}
.modal-thumb:hover { opacity: 1; }

.modal-info {
  padding: 36px 36px 32px;
  display: flex; flex-direction: column;
  gap: 22px;
  overflow-y: auto;
}
.modal-info .meta {
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
}
.modal-info h2 {
  font-family: 'Source Serif 4', serif;
  font-size: 34px; font-weight: 400;
  letter-spacing: -0.02em; line-height: 1.1;
  color: var(--text);
}
.modal-info .description {
  color: var(--text-mute);
  font-size: 15px; line-height: 1.7;
}
.modal-info h4 {
  font-size: 11px; color: var(--text-mute);
  letter-spacing: 0.08em; text-transform: uppercase;
  margin-bottom: 10px;
}
.modal-info .features {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 8px;
}
.modal-info .features li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14px; color: var(--text);
  line-height: 1.5;
}
.modal-info .features li::before {
  content: '';
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  margin-top: 8px; flex-shrink: 0;
}
.modal-info .chips {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.modal-info .chip {
  padding: 5px 12px;
  background: var(--panel-raise);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px; color: var(--text-mute);
}
.modal-info .buy-row {
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.modal-info .buy-row .price {
  font-size: 32px;
}
.modal-info .buy-btn {
  padding: 13px 28px;
  font-size: 14px; font-weight: 600;
}

/* ─── RESPONSIVE ─── */
@media (max-width: 980px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
  .videos-grid { grid-template-columns: 1fr; }
  .modal { grid-template-columns: 1fr; max-height: 95vh; }
  .modal-gallery { border-right: none; border-bottom: 1px solid var(--border); }
  .modal-info { padding: 24px; }
}
@media (max-width: 720px) {
  .container { padding: 0 22px; }
  .hero { padding: 40px 0 48px; }
  .grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .brand-tag { display: none; }
  .section-divider { flex-direction: column; align-items: flex-start; }
  .trust { gap: 16px; padding: 18px; }
}
