/* Tangent — addtangent.com
   Dark theme, green accent (#4ade80), system font stack, responsive.
   Zero client-side JS (layout and interaction via CSS only). */

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

:root {
  --bg:        #0d0d0d;
  --surface:   #161616;
  --surface2:  #1e1e1e;
  --border:    #2a2a2a;
  --text:      #e8e8e8;
  --muted:     #888;
  --green:     #4ade80;
  --green-dim: #22c55e;
  --green-bg:  rgba(74, 222, 128, 0.08);
  --red:       #f87171;
  --radius:    8px;
  --max-w:     860px;
  --font:      -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
               sans-serif, "Apple Color Emoji";
}

html { font-size: 16px; scroll-behavior: smooth; }

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

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

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

/* ─── Layout shell ───────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(13, 13, 13, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.logo {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.logo span { color: var(--green); }

nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { font-size: 0.875rem; color: var(--muted); transition: color .15s; }
nav a:hover { color: var(--text); text-decoration: none; }

main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border);
  padding: 2.5rem 1.5rem;
}
.site-footer .inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem 2.5rem;
  align-items: center;
  justify-content: space-between;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 1rem; }
.footer-links a { font-size: 0.825rem; color: var(--muted); }
.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-copy { font-size: 0.8rem; color: var(--muted); }

/* ─── Draft banner ───────────────────────────────────────────────────────── */
.draft-banner {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.35);
  border-radius: var(--radius);
  color: #fbbf24;
  font-size: 0.9rem;
  padding: 0.75rem 1.25rem;
  margin: 2rem 0;
  display: flex;
  gap: 0.5rem;
  align-items: flex-start;
}
.draft-banner strong { white-space: nowrap; }

/* ─── Hero ───────────────────────────────────────────────────────────────── */
.hero {
  padding: 6rem 0 4rem;
  text-align: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--green-bg);
  border: 1px solid rgba(74, 222, 128, 0.25);
  border-radius: 100px;
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  margin-bottom: 1.5rem;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}
.hero h1 .accent { color: var(--green); }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto 2.5rem;
}
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--green);
  color: #0d0d0d;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.8rem 2rem;
  border-radius: 100px;
  transition: filter .15s;
  /* TODO: replace href="#" with real Chrome Web Store link once live */
}
.hero-cta:hover { filter: brightness(1.1); text-decoration: none; }
.hero-note {
  display: block;
  margin-top: 0.9rem;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ─── Features ───────────────────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}
.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.feature-icon {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}
.feature-card h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
}
.feature-card p {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ─── Pricing ────────────────────────────────────────────────────────────── */
.pricing {
  padding: 4rem 0;
  border-top: 1px solid var(--border);
}
.pricing h2 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.pricing-intro {
  color: var(--muted);
  margin-bottom: 2.5rem;
  font-size: 0.95rem;
}
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  position: relative;
}
.plan.featured {
  border-color: var(--green);
  background: var(--surface2);
}
.plan-badge {
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--green);
  color: #0d0d0d;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 100px;
  white-space: nowrap;
}
.plan-name {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.75rem;
}
.plan-price {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1;
}
.plan-price .period {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--muted);
}
.plan-desc {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--muted);
  line-height: 1.5;
}
.plan-cta {
  display: block;
  text-align: center;
  margin-top: 1.5rem;
  padding: 0.65rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color .15s, color .15s;
  /* TODO: replace href="#" with real checkout link */
}
.plan.featured .plan-cta {
  background: var(--green);
  border-color: var(--green);
  color: #0d0d0d;
}
.plan-cta:hover { text-decoration: none; border-color: var(--green); color: var(--green); }
.plan.featured .plan-cta:hover { filter: brightness(1.1); color: #0d0d0d; }
.pricing-note {
  margin-top: 1.5rem;
  font-size: 0.825rem;
  color: var(--muted);
}
.pricing-note strong { color: var(--text); }

/* ─── Legal pages ────────────────────────────────────────────────────────── */
.legal-header {
  padding: 3.5rem 0 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2.5rem;
}
.legal-header h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.legal-header .updated {
  font-size: 0.85rem;
  color: var(--muted);
  margin-top: 0.4rem;
}

.legal-body { padding-bottom: 4rem; }
.legal-body h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 2.5rem 0 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
}
.legal-body h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 1.5rem 0 0.4rem;
}
.legal-body p { margin-bottom: 0.9rem; font-size: 0.95rem; }
.legal-body ul, .legal-body ol {
  margin: 0.5rem 0 0.9rem 1.5rem;
  font-size: 0.95rem;
}
.legal-body li { margin-bottom: 0.35rem; }

.legal-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 1.25rem;
  font-size: 0.875rem;
}
.legal-body th, .legal-body td {
  padding: 0.6rem 0.9rem;
  border: 1px solid var(--border);
  text-align: left;
}
.legal-body th {
  background: var(--surface);
  font-weight: 600;
  color: var(--muted);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Strip the DRAFT blockquote from source markdown (we replace it with the banner) */
.legal-body blockquote {
  display: none;
}

/* Annotate ⚖️ items visually — they remain in the rendered HTML */
.legal-body p:has(> span.law-flag),
.legal-body li:has(> span.law-flag) {
  background: rgba(248, 113, 113, 0.08);
  border-left: 3px solid var(--red);
  padding: 0.4rem 0.75rem;
  border-radius: 0 4px 4px 0;
  color: #fca5a5;
  font-size: 0.875rem;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  nav { gap: 1rem; }
  nav a { font-size: 0.8rem; }
  .hero { padding: 4rem 0 3rem; }
  .features, .pricing-grid { grid-template-columns: 1fr; }
  .plan.featured { order: -1; }
}
