/**
 * Screen Awesome — landing site styles.
 *
 * Two rules shape this file:
 *
 * 1. No external requests. No web fonts, no CDN, no analytics, no embeds. A site whose
 *    headline claim is "this extension cannot phone home" must not itself phone home —
 *    anyone can open the network panel and check. It is also why the site is fast without
 *    needing a build step.
 *
 * 2. The palette is the extension's own (src/styles/theme.css), so the site and the product
 *    look like one thing. Violet is UI accent; the red is reserved for the record dot and
 *    is never used for links or buttons here either.
 *
 * Dark is the default and light follows the OS, matching the extension.
 */

:root {
  color-scheme: dark;

  --canvas: #0a0a0f;
  --surface: #121218;
  --raised: #1a1a22;
  --border: #26262f;
  --border-strong: #383843;

  --ink: #f5f5f7;
  --ink-2: #9d9daa;
  --ink-muted: #6b6b7a;

  --accent: #8b6bff;
  --accent-hover: #a288ff;
  --accent-dim: #1c1436;
  --record: #f04452;
  --good: #34d3a3;

  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 12px 32px -8px rgb(0 0 0 / 0.75);
  --container: 1120px;

  /* Fluid type: one scale, no media queries needed for text. */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.08rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3: clamp(1.9rem, 1.5rem + 2vw, 2.9rem);
  --step-4: clamp(2.3rem, 1.6rem + 3.4vw, 4.1rem);
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;

    --canvas: #f7f7f9;
    --surface: #ffffff;
    --raised: #ffffff;
    --border: #e5e5ea;
    --border-strong: #c8c8d0;

    --ink: #0d0d12;
    --ink-2: #55555f;
    --ink-muted: #83838f;

    --accent: #5b3ce0;
    --accent-hover: #4c2fd0;
    --accent-dim: #f0ecfe;
    --record: #d92b3a;
    --good: #12805c;

    --shadow: 0 12px 32px -8px rgb(13 13 18 / 0.14);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--accent-hover);
}

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

/* Keyboard users need a way past the nav; sighted mouse users never see this. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.7rem 1.1rem;
  z-index: 100;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip:focus {
  left: 0;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.1rem, 4vw, 2rem);
}

/* ---------------------------------------------------------------- typography */

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.6em;
  font-weight: 700;
  text-wrap: balance;
}

h1 {
  font-size: var(--step-4);
  letter-spacing: -0.035em;
}
h2 {
  font-size: var(--step-3);
}
h3 {
  font-size: var(--step-1);
}

p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}

.lede {
  font-size: var(--step-1);
  color: var(--ink-2);
  line-height: 1.55;
  max-width: 60ch;
}

.muted {
  color: var(--ink-2);
}

.small {
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* Anchored headings must not hide under the sticky header. */
[id] {
  scroll-margin-top: 5.5rem;
}

/* -------------------------------------------------------------------- header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--canvas) 88%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  min-height: 4rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.brand:hover {
  color: var(--ink);
}

.brand svg {
  width: 28px;
  height: 28px;
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.6rem);
  font-size: var(--step--1);
}

/*
 * Scoped to .nav__link, not `.nav a`.
 *
 * `.nav a` is specificity (0,1,1) and would beat `.btn--primary` (0,1,0) no matter what
 * order they appear in, so the install button in the header lost its white text and
 * inherited muted ink — which on violet is barely legible in light mode.
 */
.nav__link {
  color: var(--ink-2);
  text-decoration: none;
  font-weight: 500;
}

.nav__link:hover {
  color: var(--ink);
}

/* The nav links are secondary on small screens; the install button is what matters. */
@media (max-width: 33rem) {
  .nav__link {
    display: none;
  }
}

/* ------------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: var(--step--1);
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.15s;
  white-space: nowrap;
}

.btn--primary {
  background: var(--accent);
  color: #fff;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
  transform: translateY(-1px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-strong);
  color: var(--ink);
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.btn--sm {
  padding: 0.5rem 0.95rem;
}

/* ---------------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding: clamp(3.5rem, 9vw, 7rem) 0 clamp(2.5rem, 6vw, 4.5rem);
  overflow: hidden;
}

/* A single soft violet bloom behind the headline. Decorative, so it is inert. */
.hero::before {
  content: '';
  position: absolute;
  inset: -30% 20% auto;
  height: 60vh;
  background: radial-gradient(ellipse at 50% 0%, var(--accent-dim), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: 100px;
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 1.6rem;
}

.hero__eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--good);
  flex: none;
}

.hero h1 {
  max-width: 22ch;
}

.hero h1 em {
  font-style: normal;
  color: var(--accent);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
  align-items: center;
}

.hero__note {
  margin: 1.1rem 0 0;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* --------------------------------------------------------------- proof strip */

.proof {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(210px, 100%), 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(2.5rem, 6vw, 4rem);
}

.proof > div {
  background: var(--surface);
  padding: 1.4rem 1.5rem;
}

.proof dt {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: 0.3rem;
}

.proof dd {
  margin: 0;
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ------------------------------------------------------------------ sections */

section {
  padding: clamp(3rem, 8vw, 5.5rem) 0;
}

.section__head {
  max-width: 62ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.section__head h2 {
  margin-bottom: 0.5rem;
}

/* ---------------------------------------------------------------- card grids */

.grid {
  display: grid;
  gap: 1.1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(290px, 100%), 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.6rem;
  transition: border-color 0.15s, transform 0.15s;
}

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

.card h3 {
  margin-bottom: 0.4rem;
  font-size: var(--step-0);
  font-weight: 650;
}

.card p {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--step--1);
}

.card__icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--accent-dim);
  color: var(--accent);
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.card__icon svg {
  width: 20px;
  height: 20px;
}

/* A card that carries the headline claim, so it earns the accent border. */
.card--feature {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  background: linear-gradient(180deg, var(--accent-dim), var(--surface) 60%);
}

/* ------------------------------------------------------------------- compare */

.table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  min-width: 34rem;
}

caption {
  text-align: left;
  padding: 1.1rem 1.4rem 0;
  color: var(--ink-muted);
  font-size: var(--step--1);
}

th,
td {
  text-align: left;
  padding: 0.9rem 1.4rem;
  border-bottom: 1px solid var(--border);
}

thead th {
  background: var(--raised);
  font-weight: 650;
  color: var(--ink-2);
  white-space: nowrap;
}

tbody tr:last-child td,
tbody tr:last-child th {
  border-bottom: 0;
}

tbody th {
  font-weight: 500;
  color: var(--ink);
}

.yes {
  color: var(--good);
  font-weight: 650;
}

.no {
  color: var(--ink-muted);
}

/* ----------------------------------------------------------------------- faq */

.faq {
  display: grid;
  gap: 0.7rem;
  max-width: 74ch;
}

/* <details> rather than JS: keyboard-operable and findable by in-page search for free. */
details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 1.3rem;
  transition: border-color 0.15s;
}

details[open] {
  border-color: var(--border-strong);
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 1.1rem 0;
  list-style: none;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '';
  margin-left: auto;
  flex: none;
  width: 9px;
  height: 9px;
  margin-top: 0.45em;
  border-right: 2px solid var(--ink-muted);
  border-bottom: 2px solid var(--ink-muted);
  transform: rotate(45deg);
  transition: transform 0.2s;
}

details[open] summary::after {
  transform: rotate(-135deg);
}

details > div {
  padding-bottom: 1.2rem;
  color: var(--ink-2);
  font-size: var(--step--1);
  max-width: 68ch;
}

details > div > :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------------ cta */

.cta {
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--accent-dim), var(--surface) 70%);
  padding: clamp(2.5rem, 7vw, 4rem) clamp(1.2rem, 5vw, 3rem);
}

.cta h2 {
  max-width: 26ch;
  margin-inline: auto;
}

.cta .lede {
  margin-inline: auto;
  max-width: 52ch;
}

.cta .hero__actions {
  justify-content: center;
}

/* ------------------------------------------------------------------ prose doc */

/* Terms and privacy: a single readable column. */
.prose {
  max-width: 72ch;
}

.prose h2 {
  font-size: var(--step-2);
  margin-top: 2.4em;
}

.prose h2:first-of-type {
  margin-top: 1.2em;
}

.prose h3 {
  font-size: var(--step-0);
  margin-top: 1.8em;
}

.prose ul,
.prose ol {
  margin: 0 0 1.1em;
  padding-left: 1.3rem;
  color: var(--ink-2);
}

.prose li {
  margin-bottom: 0.45em;
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose strong {
  color: var(--ink);
}

.callout {
  border: 1px solid color-mix(in srgb, var(--good) 40%, var(--border));
  background: color-mix(in srgb, var(--good) 8%, var(--surface));
  border-radius: var(--radius-sm);
  padding: 1.1rem 1.3rem;
  margin: 0 0 1.6em;
}

.callout p {
  margin: 0;
  color: var(--ink);
  font-size: var(--step--1);
}

.page-head {
  padding: clamp(2.5rem, 7vw, 4rem) 0 0;
}

.page-head h1 {
  font-size: var(--step-3);
  margin-bottom: 0.3em;
}

/* ------------------------------------------------------------------- footer */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: clamp(3rem, 8vw, 5rem);
  padding: clamp(2.5rem, 6vw, 3.5rem) 0 2.5rem;
}

.site-footer__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 3rem;
  justify-content: space-between;
  margin-bottom: 2.5rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.8rem;
  font-size: var(--step--1);
}

.site-footer nav a {
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer nav a:hover {
  color: var(--ink);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  padding-top: 1.6rem;
  font-size: var(--step--1);
  color: var(--ink-muted);
}

.site-footer__bottom p {
  margin: 0;
}

/* Screen-reader-only, for headings that structure the document without being shown. */
.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;
}
