/* =====================================================
   Unbinge — unbinge.watch — shared site styles
   ===================================================== */
/* Cache-busting: bump ?v=2 in the stylesheet links on every page when this file changes. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #0b0d12;
  --surface:   #13161f;
  --border:    #1e2433;
  --text:      #e2e8f0;
  /* slate-400: AA contrast on --bg and --surface (13px body text). */
  --muted:     #94a3b8;
  --primary:   #3b82f6;
  --primary-h: #2563eb;
  --accent:    #93c5fd;
  --green:     #4ade80;
  --radius:    14px;
  --max-w:     1080px;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}
a:hover { color: #bfdbfe; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 200;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 700;
  text-decoration: underline;
}
.skip-link:focus,
.skip-link:focus-visible {
  top: 12px;
  color: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* NAV */
nav.site-nav {
  position: sticky;
  top: 0;
  background: rgba(11, 13, 18, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-brand {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; font-size: 14px; }
.nav-links a:hover,
.nav-links a:focus-visible { text-decoration: underline; }
.site-nav a,
.nav-cta,
.btn-primary,
.btn-outline,
a.feature-card {
  text-decoration: none;
}
.nav-cta {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none !important;
  transition: background .15s;
}
.nav-cta:hover { background: var(--primary-h); }

/* SECTIONS */
section { padding: 72px 24px; }
.container { max-width: var(--max-w); margin: 0 auto; }

/* HERO */
.hero {
  text-align: center;
  padding: 96px 24px 80px;
  background: radial-gradient(ellipse 70% 50% at 50% 0%, rgba(59,130,246,.15) 0%, transparent 70%);
}
.eyebrow {
  display: inline-block;
  background: rgba(59,130,246,.15);
  color: var(--accent);
  border: 1px solid rgba(59,130,246,.3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 14px;
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(32px, 6vw, 60px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  color: #f8fafc;
  max-width: 720px;
  margin: 0 auto 20px;
}
.hero h1 em { color: var(--accent); font-style: normal; }
.hero p {
  font-size: 18px;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 36px;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  transition: background .15s, transform .1s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary:hover { background: var(--primary-h); transform: translateY(-1px); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--text);
  padding: 13px 28px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  border: 1px solid var(--border);
  transition: border-color .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-outline:hover { border-color: var(--accent); text-decoration: none; }

/* FEATURES GRID */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
/* Homepage: four cards in a 2×2 grid under the interactive mode picker. */
#features .features-grid {
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 1fr;
}
@media (max-width: 800px) {
  #features .features-grid { grid-template-columns: 1fr 1fr; }
  #features .feature-card:nth-child(-n+3),
  #features .feature-card:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 600px) {
  #features .features-grid { grid-template-columns: 1fr; }
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.feature-card .icon { font-size: 28px; margin-bottom: 12px; }
.feature-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.feature-card p { font-size: 13px; color: var(--muted); line-height: 1.55; }
a.feature-card { color: inherit; text-decoration: none; display: block; }
a.feature-card:hover { border-color: var(--primary); text-decoration: none; }

/* LANDING / USE CASES */
.landing { padding: 48px 24px 32px; }
.landing-inner { max-width: 720px; margin: 0 auto; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 20px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--text); }
.prose h2 { font-size: 22px; font-weight: 800; margin: 36px 0 12px; }
.prose h3 { font-size: 16px; font-weight: 700; margin: 20px 0 8px; }
.prose p, .prose li { color: var(--muted); font-size: 15px; line-height: 1.7; margin-bottom: 12px; }
.prose ul { padding-left: 20px; margin-bottom: 16px; }
.prose strong { color: var(--text); }

/* PROFILE CARDS */
.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 32px;
}
.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 20px;
  text-align: center;
  transition: border-color .2s, transform .15s;
}
.profile-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.profile-card .emoji { font-size: 40px; margin-bottom: 12px; }
.profile-card h3 { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.profile-card p { font-size: 13px; color: var(--muted); }

/* SECTION HEADINGS */
.section-head { text-align: center; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(24px, 4vw, 38px); font-weight: 800; letter-spacing: -0.5px; }
.section-head p { color: var(--muted); margin-top: 10px; font-size: 16px; }

/* GUIDE STEPS */
.steps { counter-reset: step; display: flex; flex-direction: column; gap: 24px; }
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  counter-increment: step;
}
.step::before {
  content: counter(step);
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  min-width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.step h3 { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.step p, .step li { font-size: 14px; color: var(--muted); }
.step ul { padding-left: 18px; margin-top: 6px; }
.step li { margin-bottom: 4px; }

/* FAQ */
details.faq {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
details.faq summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
details.faq summary::after { content: '+'; font-size: 20px; color: var(--muted); }
details.faq[open] summary::after { content: '−'; }
details.faq .faq-body { padding: 0 20px 16px; color: var(--muted); font-size: 14px; }

/* UNINSTALL */
.uninstall-hero { text-align: center; padding: 80px 24px 60px; }
.uninstall-hero .big-emoji { font-size: 56px; margin-bottom: 16px; }
.feedback-form {
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.feedback-form h2 { font-size: 18px; margin-bottom: 20px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.form-group select,
.form-group input,
.form-group textarea {
  width: 100%;
  background: #0f1117;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group small { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.form-group select:focus,
.form-group input:focus,
.form-group textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-color: var(--accent);
}
.submit-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.submit-btn:hover { background: var(--primary-h); }
.success-msg {
  text-align: center;
  padding: 24px;
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 10px;
  color: var(--green);
  display: none;
}

/* FOOTER */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
footer a { color: var(--accent); }
footer a:hover { color: #bfdbfe; }

.faq-more { text-align: center; margin: 24px 0 0; }
.btn-outline[aria-disabled="true"],
.btn-outline:disabled,
button.btn-outline:disabled {
  opacity: .6;
  cursor: not-allowed;
  pointer-events: none;
}

@media (max-width: 600px) {
  nav.site-nav { flex-wrap: wrap; gap: 10px; }
  .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    width: 100%;
    order: 3;
  }
  .step { flex-direction: column; }
}

/* ============================================================
   MODE PICKER (homepage) — interactive Off/Explore/Focus cards,
   colored like the extension's mode switch (refs #142)
   ============================================================ */
.mode-picker { margin: 28px 0 40px; }
.mode-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.mode-card {
  appearance: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  font: inherit;
  gap: 4px;
  padding: 22px 18px;
  text-align: center;
  transition: border-color .18s ease, box-shadow .18s ease, color .18s ease;
}
.mode-card:hover { border-color: var(--accent); color: var(--text); }
.mode-card .mode-name { font-size: 18px; font-weight: 800; letter-spacing: -.2px; }
.mode-card .mode-tag { font-size: 12.5px; }

/* Selected card: Off = red, Explore = amber, Focus = green (extension palette). */
.mode-picker[data-active="off"] .mode-card[data-mode="off"] {
  background: linear-gradient(180deg, #e5564a, #cf3a2e);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 6px 16px rgba(207, 58, 46, .4);
  color: #fff;
}
.mode-picker[data-active="explore"] .mode-card[data-mode="explore"] {
  background: linear-gradient(180deg, #f2c14e, #df9f22);
  border-color: rgba(255, 255, 255, .25);
  box-shadow: 0 6px 16px rgba(223, 159, 34, .4);
  color: #231600;
}
.mode-picker[data-active="focus"] .mode-card[data-mode="focus"] {
  background: linear-gradient(180deg, #2bb673, #189a54);
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 6px 16px rgba(24, 154, 84, .4);
  color: #fff;
}

/* Detail panel under the cards, tinted per selected mode. */
.mode-detail { border-radius: var(--radius); margin-top: 14px; padding: 20px 22px; }
.mode-detail[hidden] { display: none; }
.mode-detail h3 { font-size: 16px; font-weight: 800; margin-bottom: 8px; }
.mode-detail p { font-size: 13.5px; line-height: 1.6; }
.mode-detail .mode-note { font-size: 12.5px; opacity: .82; margin-top: 6px; }
.mode-detail[data-mode-detail="off"] { background: rgba(229, 86, 74, .14); color: #f3b3ac; }
.mode-detail[data-mode-detail="off"] h3 { color: #ff8d84; }
.mode-detail[data-mode-detail="explore"] { background: rgba(242, 193, 78, .13); color: #ecd194; }
.mode-detail[data-mode-detail="explore"] h3 { color: #f2c14e; }
.mode-detail[data-mode-detail="focus"] { background: rgba(43, 182, 115, .13); color: #a7e8c3; }
.mode-detail[data-mode-detail="focus"] h3 { color: #4ade80; }

@media (max-width: 600px) {
  .mode-cards { grid-template-columns: 1fr; }
}

/* ============================================================
   SUBMIT FORM — "where does this channel fit" radio group (refs #142)
   ============================================================ */
fieldset.form-group { border: 0; padding: 0; }
fieldset.form-group legend {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
  padding: 0;
}
label.fit-option {
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font-size: 13px;
  gap: 10px;
  line-height: 1.45;
  margin-bottom: 6px;
  padding: 9px 12px;
  transition: border-color .18s ease, background .18s ease;
}
label.fit-option:hover { border-color: var(--accent); }
label.fit-option:has(input:checked) {
  border-color: var(--primary);
  background: rgba(59, 130, 246, .07);
}
/* Radios must NOT inherit the text-field chrome from ".form-group input" */
label.fit-option input[type="radio"] {
  appearance: auto;
  width: auto;
  height: auto;
  min-height: 0;
  flex: none;
  margin: 3px 0 0;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 50%;
  accent-color: var(--primary);
  box-shadow: none;
}
