/*
 * ClipGuard site. The :root tokens mirror the extension's Dark theme
 * (graphite + ice, clipguard/src/ui/theme.css) so the site and the app
 * look the same.
 * To re-skin the site, change only the :root block.
 * No animations except the slideshow slide.
 */
:root {
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #141416;
  --surface: #1b1b1e;
  --surface-2: #232327;
  --border: #2f2f35;
  --border-strong: #47474f;

  --text: #f5f5f6;
  --text-dim: #cdcdd3;
  --text-faint: #9d9da6;

  --trusted: #4ade80;
  --unknown: #fbbf24;
  --danger: #ff6b6b;

  --primary: #d6e4ff;     /* main buttons */
  --on-primary: #111111;
  --accent: #d6e4ff;      /* active slideshow dot, focus rings */

  --radius: 12px;
  --radius-sm: 8px;
  --container: 1120px;
}

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

html { scroll-behavior: auto; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-sans);
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, ul, ol { margin: 0; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.narrow { max-width: 760px; }

/* ---------- Shared bits ---------- */
.eyebrow {
  margin-bottom: 16px;
  font: 700 16px/1.3 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.btn {
  display: inline-block;
  padding: 13px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: 700 13px/1 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
}
.btn-sm { padding: 10px 14px; font-size: 12px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { opacity: 0.88; }
.btn-ghost { border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { background: var(--surface-2); }
.btn:focus-visible, .nav a:focus-visible, summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Product screenshots */
.shot {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg);
}

.checklist { list-style: none; padding: 0; display: grid; gap: 10px; }
.checklist li { position: relative; padding-left: 26px; color: var(--text-dim); }
.checklist li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 7px;
  width: 11px;
  height: 6px;
  border-left: 2px solid var(--trusted);
  border-bottom: 2px solid var(--trusted);
  transform: rotate(-45deg);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 32px; height: 64px; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 700 15px/1 var(--font-mono);
  letter-spacing: 0.02em;
  text-decoration: none;
}
.brand-logo { color: var(--primary); } /* ice shield, like the extension */

.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
}
.nav a:hover { color: var(--text); }

/* ---------- Hero ---------- */
.hero { border-bottom: 1px solid var(--border); }
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 56px;
  align-items: center;
  padding-top: 88px;
  padding-bottom: 88px;
}

h1 {
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.lead { font-size: 19px; color: var(--text-dim); max-width: 520px; margin-bottom: 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.fine-print { font-size: 14px; color: var(--text-faint); }

/* Popup behind, confirm window in front */
.hero-visual { position: relative; min-height: 500px; }
.hero-visual .shot-popup { position: absolute; top: 0; left: 0; width: 58%; }
.hero-visual .shot-confirm {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 78%;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.9);
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--border); }
.section-head { max-width: 680px; margin-bottom: 48px; }
h2 {
  font-size: clamp(28px, 3.4vw, 40px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}
.section-lead { font-size: 18px; color: var(--text-dim); }
h3 { font-size: 18px; line-height: 1.3; font-weight: 700; margin-bottom: 8px; }

/* ---------- Demo GIFs (How it works) ---------- */
.demo { margin: 0; }
.demo + .demo { margin-top: 72px; }
.demo-title { margin-bottom: 24px; }
/* Each demo video sits exactly on top of its poster image (see demo-video.js) */
.demo-media { position: relative; max-width: 1000px; overflow: hidden; }
.demo-poster { display: block; width: 100%; height: auto; }
.demo-media video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; }
.demo-media video.is-waiting { opacity: 0; }

/* ---------- Slideshow ----------
   Works with no JavaScript (swipe / trackpad / shift+scroll).
   slideshow.js adds the arrows, dots and counter. */
.slides {
  position: relative;
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.slides::-webkit-scrollbar { display: none; }
.slides:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.slide {
  flex: 0 0 100%;
  min-width: 0; /* never grow wider than the slideshow */
  scroll-snap-align: start;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  min-height: 600px;
  margin: 0;
  padding: 56px;
}
.slide-media { display: flex; align-items: center; justify-content: center; gap: 24px; min-width: 0; }
.slide-media img { max-height: 488px; width: auto; max-width: 100%; }
.slide-copy p { color: var(--text-dim); font-size: 17px; }
.slide-copy h3 { font-size: 26px; line-height: 1.2; margin-bottom: 12px; }

.step-num {
  display: block;
  margin-bottom: 16px;
  font: 700 13px/1 var(--font-mono);
  color: var(--text-faint);
}
.state-label {
  margin-bottom: 10px;
  font: 700 12px/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text) !important;
}
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.dot-trusted { background: var(--trusted); }
.dot-unknown { background: var(--unknown); }
.dot-danger { background: var(--danger); }

/* Theme slides: name on the left, popup + confirm window on the right */
.slide--theme { grid-template-columns: 200px minmax(0, 1fr); }
.slide--theme .slide-media { gap: 4%; }
.slide-media .theme-popup { width: 42%; }   /* popup + confirm scale together to fit */
.slide-media .theme-confirm { width: 54%; }
.theme-name { font: 700 22px/1.2 var(--font-mono) !important; letter-spacing: 0.04em; text-transform: uppercase; }

.slideshow-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
}
.slideshow-controls[hidden] { display: none; }
.slide-count { min-width: 70px; font: 600 13px/1 var(--font-mono); color: var(--text-dim); }
.dots { display: flex; gap: 6px; }
.dot-btn {
  width: 28px;
  height: 4px;
  padding: 0;
  border: 0;
  border-radius: 2px;
  background: var(--border-strong);
  cursor: pointer;
}
.dot-btn[aria-current="true"] { background: var(--accent); }
.arrows { display: flex; gap: 8px; }
.slide-btn {
  width: 42px;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text);
  font: 400 18px/1 var(--font-mono);
  cursor: pointer;
}
.slide-btn:hover:not(:disabled) { background: var(--surface-2); }
.slide-btn:disabled { opacity: 0.35; cursor: default; }
.dot-btn:focus-visible, .slide-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Supported coins */
.coins {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(5, auto);
  grid-auto-flow: column; /* reads down the first column, then the second */
  gap: 1px;
  background: var(--border); /* 1px lines between rows */
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
/* Fills the empty last cell when the two columns are uneven */
.coins::after { content: ""; background: var(--bg); }

.coin {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 24px;
  background: var(--bg);
}
.coin-logo {
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border-strong); /* keeps dark logos (XRP) visible */
}
.coin-text { min-width: 0; }
.coin-name { font-weight: 700; font-size: 16px; }
.coin-ticker {
  margin-left: 6px;
  font: 600 12px/1 var(--font-mono);
  letter-spacing: 0.06em;
  color: var(--text-dim);
}


/* Closing CTA */
.cta { border-bottom: 0; }
.cta-inner { text-align: center; }
.cta-inner p { color: var(--text-dim); font-size: 18px; margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.brand-small { font-size: 13px; }
.footer-note { color: var(--text-faint); font-size: 14px; }
.footer-links { display: flex; gap: 20px; margin-left: auto; }
.footer-links a { color: var(--text-dim); font-size: 14px; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .slide--theme { grid-template-columns: 1fr; gap: 24px; }
  .slide--theme .slide-media { justify-content: center; }
}

@media (max-width: 860px) {
  .nav { display: none; }
  .header-inner { justify-content: space-between; }
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .slide { grid-template-columns: 1fr; gap: 28px; min-height: 0; padding: 28px 24px; }
  .slide-copy { order: 2; }
  .slide--theme .slide-copy { order: 0; }
  .slide-media .theme-confirm { display: none; }
  .slide-media .theme-popup { width: 100%; max-width: 300px; }
  .hero-inner { padding-top: 56px; padding-bottom: 56px; }
  .hero-visual { min-height: 0; }
  .hero-visual .shot-popup { display: none; }
  .hero-visual .shot-confirm { position: static; width: 100%; max-width: 480px; }
  .section { padding: 72px 0; }
}

@media (max-width: 560px) {
  .slide-count { display: none; }
  .dots { gap: 4px; }
  .dot-btn { width: 16px; }
  .coins { grid-template-columns: 1fr; grid-template-rows: none; grid-auto-flow: row; }
  .coins::after { display: none; }
  .coin { padding: 16px 20px; }
  .footer-links { margin-left: 0; }
}

/* Logo tick on pages whose CSP has no inline styles (privacy.html, terms.html) */
.logo-check { stroke: var(--bg); }

/* ---------- Legal pages (privacy.html, terms.html) ---------- */
.legal { border-bottom: 1px solid var(--border); }
.legal-inner { max-width: 760px; padding-top: 80px; padding-bottom: 96px; }
.legal h1 { font-size: 44px; margin-bottom: 10px; }
.legal-date { color: var(--text-faint); font-size: 14px; margin-bottom: 40px; }
.legal h2 { font-size: 22px; line-height: 1.3; margin: 44px 0 14px; }
.legal p { color: var(--text-dim); margin-bottom: 14px; }
.legal p strong, .legal li strong { color: var(--text); }
.legal a { color: var(--text); text-underline-offset: 3px; }
.legal code { font: 600 0.95em var(--font-mono); color: var(--text); }
.legal-summary {
  padding: 28px 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
}
.legal-summary h2 { margin: 0 0 16px; font-size: 18px; }
.legal-summary .checklist li { color: var(--text); }
.legal-list { margin: 0 0 14px; padding-left: 20px; color: var(--text-dim); display: grid; gap: 8px; }
.legal-table-wrap { overflow-x: auto; margin-bottom: 16px; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.legal-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 620px; }
.legal-table th, .legal-table td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.legal-table th { font: 700 12px/1.3 var(--font-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); background: var(--surface); }
.legal-table td { color: var(--text-dim); }
.legal-table td:first-child { color: var(--text); }
.legal-table tr:last-child td { border-bottom: 0; }
.footer-links a[aria-current="page"] { color: var(--text); }

@media (max-width: 560px) {
  .legal-inner { padding-top: 48px; padding-bottom: 64px; }
  .legal h1 { font-size: 34px; }
  .legal-summary { padding: 22px 20px; }
}


/* ---------- Pricing (index.html) ---------- */
.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 880px; }
.plan {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.plan .checklist { margin: 0; flex: 1; }
/* Pricing cards: plain grey bullets; only items marked .tick get the green tick */
.plan .checklist li:not(.tick)::before {
  left: 6px;
  top: 0.62em;
  width: 5px;
  height: 5px;
  border: 0;
  border-radius: 50%;
  background: var(--text-dim);
  transform: none;
}
.plan .btn { align-self: flex-start; }
.plan-pro {
  border-color: var(--accent);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 12%, var(--surface)) 0%, var(--surface) 55%);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 25%, transparent), 0 20px 60px -30px color-mix(in srgb, var(--accent) 45%, transparent);
}
.plan-top { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.plan-top h3 { margin: 0; font: 700 22px/1.2 var(--font-mono); letter-spacing: 0.02em; display: flex; align-items: center; gap: 10px; }
.price { margin: 0; font: 700 34px/1 var(--font-mono); }
.price-note { font-size: 15px; font-weight: 600; color: var(--text-dim); }
.tag {
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-primary);
  font: 700 11px/1.3 var(--font-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---------- Pay page (pay.html) ---------- */
.pay { padding: 72px 0 96px; }
.pay-inner { max-width: 560px; }
.pay-title { font-size: 44px; margin-bottom: 12px; }
.pay-lead { color: var(--text-dim); font-size: 17px; margin: 0 0 32px; }
.pay-card {
  padding: 28px;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 10%, var(--surface)) 0%, var(--surface) 60%);
}
.pay-card .plan-top { margin-bottom: 24px; }
.pay-label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 14px; color: var(--text-dim); }
.pay-input {
  display: block;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: 600 16px/1.3 var(--font-mono);
  letter-spacing: 0.04em;
  outline: none;
}
.pay-input:focus { border-color: var(--text-dim); }
.pay-input::placeholder { color: var(--text-faint); }
.pay-hint { margin: 8px 0 20px; font-size: 14px; color: var(--text-faint); }
.pay-msg { margin: 0 0 16px; font-size: 14px; color: var(--danger); }
.pay-msg[data-tone="info"] { color: var(--text-dim); }
.pay-btn { width: 100%; }
.pay-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.pay-note { margin: 20px 0 0; font-size: 13px; color: var(--text-faint); }
.pay-note a, .pay-alt a { color: var(--text-dim); }
.pay-alt { margin-top: 24px; font-size: 14px; color: var(--text-faint); }

@media (max-width: 760px) {
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 24px; }
  .pay-title { font-size: 34px; }
}
