/* ═══════════════════════════════════════════
   FSD Stories — Styles
   ═══════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #111111;
  --bg-card:    #1a1a1a;
  --bg-glass:   rgba(17, 17, 17, 0.85);
  --surface:    #222222;
  --border:     #2e2e2e;
  --text:       #f5f5f5;
  --text-dim:   #8a8a8a;
  --accent:     #ffc940;
  --accent-glow:#ffc94044;
  --radius:     12px;
  --radius-sm:  8px;
  --max-w:      1280px;
  --font:       "DM Sans", system-ui, -apple-system, sans-serif;
  --font-display: "Inter", "DM Sans", system-ui, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.nav__logo span { color: var(--accent); }

.nav__links {
  display: flex;
  gap: 24px;
  list-style: none;
}

.nav__links a {
  color: var(--text-dim);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); text-decoration: none; }

.nav__links a.active {
  color: var(--text);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 2px;
}


/* ── Manifesto ── */
.manifesto {
  padding: 0 24px 32px;
  position: relative;
}

.manifesto__bg {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100vh;
  background: url('cybergold.png') center center / cover no-repeat;
  opacity: 0.15;
  z-index: 0;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.manifesto__layout {
  position: relative;
  z-index: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.manifesto__inner {
  max-width: 720px;
}

.manifesto__title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 16px;
}

.manifesto__text p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.75;
  margin-bottom: 12px;
}

.manifesto__text strong {
  color: var(--text);
  font-weight: 600;
}

.manifesto__text em {
  font-style: italic;
  color: var(--text);
}

.t-red { color: var(--accent); }

.cite {
  color: var(--accent);
  font-size: 0.7em;
  vertical-align: super;
  text-decoration: none;
  font-weight: 600;
}

.cite:hover { text-decoration: underline; }

.manifesto__signature {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
}

/* ── Tag Cloud ── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: center;
  padding-top: 16px;
}

.tc {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: default;
  transition: border-color 0.6s, color 0.6s, background 0.6s, box-shadow 0.6s;
}

.tc:hover {
  border-color: var(--accent);
  color: var(--text);
}

.tc.tc--active {
  border-color: var(--accent);
  color: var(--text);
  background: rgba(227, 25, 55, 0.1);
  box-shadow: 0 0 12px 2px var(--accent-glow);
}

/* ── Section Headers ── */
.section-header {
  padding: 24px 24px 16px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-header p {
  color: var(--text-dim);
  margin-top: 8px;
  font-size: 1rem;
}

/* ── Filters ── */
.filters {
  padding: 0 24px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  font-family: var(--font);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.filter-btn:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* ── Video Grid ── */
.video-grid {
  padding: 0 24px 80px;
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

/* ── Video Card ── */
.video-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

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

.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  cursor: pointer;
  overflow: hidden;
  background: var(--surface);
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.video-card:hover .video-card__thumb img {
  transform: scale(1.05);
}

.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.2);
  opacity: 0.85;
  transition: opacity 0.2s;
}

.video-card__thumb:hover .video-card__play { opacity: 1; }

.video-card iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  display: block;
}

.video-card__body {
  padding: 16px;
}

.video-card__title {
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 4px;
}

.video-card__creator {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 6px;
  font-weight: 500;
}

.video-card__desc {
  font-size: 0.8rem;
  color: var(--text-dim);
  line-height: 1.6;
  margin-bottom: 10px;
}

.video-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.65rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 8px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* ── Why Section ── */
.why {
  padding: 80px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.why__card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  transition: border-color 0.3s, transform 0.3s;
}

.why__card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.why__card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.why__card p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ── Footer ── */
.footer {
  padding: 40px 24px;
  text-align: center;
  border-top: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.8rem;
}

.footer p + p { margin-top: 8px; }

.footer__sources {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.footer__sources p { margin-top: 4px; }
.footer__sources a { color: var(--text-dim); }
.footer__sources a:hover { color: var(--text); }

/* ── Manifesto collapse (mobile) ── */
.manifesto__toggle {
  display: none;           /* hidden on desktop */
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .manifesto { padding: 80px 16px 24px; }
  .manifesto__layout { grid-template-columns: 1fr; gap: 0; }

  /* Hide tag cloud on mobile */
  .tag-cloud { display: none; }

  /* Collapse manifesto text */
  .manifesto__text {
    max-height: 4.5em;      /* ~2 lines visible */
    overflow: hidden;
    position: relative;
    transition: max-height 0.4s ease;
  }

  .manifesto__text::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2em;
    background: linear-gradient(transparent, var(--bg));
    pointer-events: none;
    transition: opacity 0.3s;
  }

  .manifesto--expanded .manifesto__text {
    max-height: 600px;
  }

  .manifesto--expanded .manifesto__text::after {
    opacity: 0;
  }

  .manifesto__signature {
    display: none;
  }

  .manifesto--expanded .manifesto__signature {
    display: block;
  }

  .manifesto__toggle {
    display: inline-block;
    margin-top: 12px;
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--accent);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
  }

  .video-grid { grid-template-columns: 1fr; padding: 0 16px 48px; }
  .why__grid { grid-template-columns: 1fr; }
  .why { padding: 48px 16px; }
  .section-header, .filters { padding-left: 16px; padding-right: 16px; }
}
