/* ═══════════════════════════════════════════════
   Channel S Digital — News Automation Tools
   Dark-red brand identity, newsroom aesthetic
   ═══════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a14;
  --bg-secondary: #12121f;
  --bg-card: #161625;
  --bg-card-hover: #1c1c30;
  --red-primary: #B8001F;
  --red-dark: #8B0015;
  --red-glow: rgba(184, 0, 31, 0.25);
  --gold: #F5A623;
  --gold-dim: #c4881c;
  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #606078;
  --border: #2a2a40;
  --border-light: #3a3a55;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ── Selection ── */
::selection { background: var(--red-primary); color: white; }

/* ── Typography ── */
.gradient-text {
  background: linear-gradient(135deg, var(--red-primary), var(--gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(184, 0, 31, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(245, 166, 35, 0.06) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 80%, rgba(10, 10, 20, 0.8) 0%, transparent 40%);
  z-index: 0;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

/* ── Nav ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 2rem;
  background: rgba(10, 10, 20, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text-primary);
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
}

.brand-icon { color: var(--red-primary); font-size: 1.4rem; }
.brand-accent { color: var(--red-primary); }

.nav-links { display: flex; align-items: center; gap: 2rem; }

.nav-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--text-primary); }

.nav-cta {
  padding: 8px 20px;
  border-radius: 8px;
  background: var(--red-primary);
  color: white !important;
  font-weight: 600;
  transition: background 0.2s, transform 0.15s;
}

.nav-cta:hover { background: var(--red-dark); transform: translateY(-1px); }

/* ── Hero Content ── */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 800px;
}

.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 100px;
  background: rgba(184, 0, 31, 0.15);
  border: 1px solid rgba(184, 0, 31, 0.3);
  color: var(--red-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: var(--red-primary);
  color: white;
  box-shadow: 0 4px 20px rgba(184, 0, 31, 0.3);
}

.btn-primary:hover {
  background: var(--red-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 30px rgba(184, 0, 31, 0.4);
}

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

.btn-outline:hover {
  border-color: var(--red-primary);
  color: var(--red-primary);
  transform: translateY(-2px);
}

.btn-block { width: 100%; justify-content: center; }

.btn-text {
  background: none;
  border: none;
  color: var(--gold);
  cursor: pointer;
  font-size: 0.8rem;
  font-family: var(--font-sans);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-text:hover { color: var(--gold); }

/* ── Large Buttons ── */
.btn-large {
  padding: 16px 36px;
  font-size: 1.05rem;
  border-radius: 12px;
  justify-content: center;
}
.btn-large svg { width: 22px; height: 22px; }

/* ═══════════════ CTA DOWNLOAD SECTION ═══════════════ */
.section-cta {
  max-width: none;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.section-cta .section-header { margin-bottom: 3rem; }

.cta-box {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.cta-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(184, 0, 31, 0.12);
  font-size: 2rem;
  margin-bottom: 1rem;
}

.cta-info h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.cta-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cta-features li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.cta-action {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-top: 0.5rem;
}

.cta-action .btn { width: 100%; }

.cta-note {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.card-tag {
  font-size: 0.65rem;
  font-family: var(--font-mono);
  color: var(--gold-dim);
  background: rgba(245, 166, 35, 0.08);
  padding: 3px 10px;
  border-radius: 6px;
  letter-spacing: 0.05em;
}

@media (max-width: 768px) {
  .cta-box { grid-template-columns: 1fr; padding: 1.5rem; }
  .btn-large { padding: 14px 24px; font-size: 0.95rem; }
}

/* ── Metrics ── */
.hero-metrics {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 3rem;
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--border);
}

.metric-item { text-align: center; }

.metric-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.metric-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

/* ═══════════════ SECTIONS ═══════════════ */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.section-dark {
  max-width: none;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-label {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 4px;
  background: rgba(184, 0, 31, 0.1);
  color: var(--red-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ═══════════════ TOOLS GRID ═══════════════ */
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.tool-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  transition: all 0.3s;
  display: flex;
  flex-direction: column;
}

.tool-card:hover {
  border-color: var(--red-primary);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(184, 0, 31, 0.15);
}

.card-glow {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 30% 20%, rgba(184, 0, 31, 0.06) 0%, transparent 50%);
  pointer-events: none;
}

.card-body { padding: 2rem 1.5rem; flex: 1; position: relative; }

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: rgba(184, 0, 31, 0.12);
  color: var(--red-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.card-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-features li {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding-left: 1.2rem;
  position: relative;
}

.card-features li::before {
  content: '›';
  position: absolute;
  left: 0;
  color: var(--red-primary);
  font-weight: 700;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-version {
  font-size: 0.75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  background: rgba(255,255,255,0.03);
  padding: 4px 10px;
  border-radius: 6px;
}

.btn-download {
  padding: 8px 16px;
  font-size: 0.8rem;
  border-radius: 8px;
  background: var(--red-primary);
  color: white;
  border: none;
}

.btn-download:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

/* ═══════════════ MODAL ═══════════════ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal.active { display: flex; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.7);
  backdrop-filter: blur(8px);
}

.modal-content {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 2.5rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s;
}

.modal-close:hover { background: rgba(255,255,255,0.05); color: var(--text-primary); }

.modal-header { text-align: center; margin-bottom: 2rem; }

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: rgba(184, 0, 31, 0.12);
  color: var(--red-primary);
  font-size: 1.8rem;
}

.modal-title { font-size: 1.4rem; font-weight: 700; margin-bottom: 0.5rem; }

.modal-desc { color: var(--text-secondary); font-size: 0.85rem; }

.modal-steps { margin-bottom: 1.5rem; }

.modal-step {
  display: flex;
  gap: 1rem;
  padding: 1rem 0;
  opacity: 0.3;
  transition: opacity 0.5s;
}

.modal-step.active { opacity: 1; }

.modal-step.completed { opacity: 0.6; }

.modal-step.completed .step-dot { background: #22c55e; border-color: #22c55e; }
.modal-step.completed .step-dot::after { content: '✓'; }

.step-indicator { display: flex; flex-direction: column; align-items: center; width: 24px; }

.step-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.3s;
}

.step-dot.active { border-color: var(--red-primary); background: rgba(184, 0, 31, 0.2); }
.step-dot.active::after { content: '●'; color: var(--red-primary); font-size: 0.5rem; }

.step-line {
  flex: 1;
  width: 1px;
  background: var(--border);
  margin: 4px 0;
}

.step-title { font-size: 0.9rem; font-weight: 600; margin-bottom: 2px; }
.step-text { font-size: 0.8rem; color: var(--text-muted); }

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.key-preview {
  background: rgba(0,0,0,0.3);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.key-label { font-size: 0.7rem; color: var(--text-muted); white-space: nowrap; }

.key-preview code {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold);
  word-break: break-all;
  flex: 1;
}

.modal-loader {
  text-align: center;
  padding: 2rem;
}

.loader {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--red-primary);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.modal-error {
  text-align: center;
  padding: 1rem;
  color: var(--red-primary);
}

.modal-error .btn { margin-top: 1rem; }

.modal-info {
  background: rgba(245, 166, 35, 0.06);
  border: 1px solid rgba(245, 166, 35, 0.15);
  border-radius: 10px;
  padding: 1rem;
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-info code {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  background: rgba(0,0,0,0.3);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold);
}

.modal-info strong { color: var(--text-primary); }

/* ═══════════════ ABOUT ═══════════════ */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.about-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem;
  transition: border-color 0.2s;
}

.about-card:hover { border-color: var(--border-light); }

.about-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.about-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.about-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ═══════════════ FOOTER ═══════════════ */
.footer {
  padding: 3rem 2rem;
  text-align: center;
}

.footer-inner { max-width: 600px; margin: 0 auto; }

.footer-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
}

.footer-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ═══════════════ RESPONSIVE ═══════════════ */
@media (max-width: 768px) {
  .hero { min-height: 90vh; padding: 1.5rem; }
  .hero-title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero-sub { font-size: 1rem; }
  .hero-metrics { gap: 1.5rem; flex-wrap: wrap; justify-content: center; }
  .nav-links { gap: 1rem; }
  .nav-link { font-size: 0.75rem; }
  .nav-cta { padding: 6px 14px; }
  .section { padding: 4rem 1.5rem; }
  .tools-grid { grid-template-columns: 1fr; }
  .modal-content { padding: 1.5rem; }
  .about-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .nav { padding: 0 1rem; }
  .nav-links .nav-link:not(.nav-cta) { display: none; }
  .hero-metrics { flex-direction: column; gap: 1rem; }
}
