/*
 * rscflow.com — the site for Auth.
 *
 * Same palette as the app (Auth_2FA_Premium_Kit_v3), so the page and the app read as one thing.
 * No web fonts, no scripts and no third-party requests: the site of an app that promises to stay
 * offline should not phone anywhere either, and a strict CSP (Caddyfile) holds it to that.
 */

:root {
  color-scheme: light dark;
  --bg: #f9f8ff;
  --bg-2: #f3effd;
  --surface: #ffffff;
  --border: #e4dff0;
  --text: #211733;
  --text-2: #625b73;
  --muted: #857e94;
  --tint: #f0e7ff;
  --primary: #7c3aed;
  --primary-ink: #6d28d9;
  --accent: #8750f8;
  --success: #16805a;
  --warning: #9a6200;
  --glow: rgba(124, 58, 237, 0.16);
  --shadow: 0 1px 2px rgba(33, 23, 51, 0.06), 0 12px 32px rgba(33, 23, 51, 0.08);
  --radius: 18px;
  --wrap: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b081a;
    --bg-2: #110c24;
    --surface: #17102d;
    --border: #2a2045;
    --text: #f6f1ff;
    --text-2: #b6a8d0;
    --muted: #8f82ab;
    --tint: #21173f;
    --primary: #7c3aed;
    --primary-ink: #d6a5ff;
    --accent: #d6a5ff;
    --success: #42d6b0;
    --warning: #f5c46a;
    --glow: rgba(124, 58, 237, 0.32);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 18px 48px rgba(0, 0, 0, 0.45);
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary-ink);
  text-underline-offset: 3px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

h1,
h2,
h3 {
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.wrap {
  width: min(var(--wrap), 100% - 32px);
  margin-inline: auto;
}

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 16px;
  top: 16px;
  z-index: 10;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: 10px;
}

/* ---------- Header ---------- */

.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 64px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}

.site-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.site-nav a {
  color: var(--text-2);
  text-decoration: none;
  font-size: 15px;
  padding: 8px 12px;
  border-radius: 10px;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  background: var(--tint);
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 72px 0 40px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -20% -10% auto;
  height: 620px;
  background:
    radial-gradient(40% 50% at 30% 30%, var(--glow), transparent 70%),
    radial-gradient(35% 45% at 75% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%);
  pointer-events: none;
}

.hero .wrap {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 48px;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 auto 20px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  color: var(--text-2);
  font-size: 14px;
}

.eyebrow .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

.hero h1 {
  font-size: clamp(36px, 6vw, 64px);
  max-width: 16ch;
  margin-inline: auto;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lede {
  max-width: 60ch;
  margin: 20px auto 0;
  color: var(--text-2);
  font-size: clamp(17px, 2vw, 20px);
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 32px 0 0;
  padding: 0;
  list-style: none;
}

.platform {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  box-shadow: var(--shadow);
  font-weight: 600;
}

.platform svg {
  flex: none;
  color: var(--primary-ink);
}

.platform small {
  display: block;
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  line-height: 1.2;
}

.platform span {
  line-height: 1.25;
  text-align: left;
}

.note {
  color: var(--muted);
  font-size: 14px;
  margin: 16px 0 0;
}

/* Screens: a desktop window with a phone overlapping its corner. */
.screens {
  position: relative;
  margin: 8px auto 0;
  width: min(980px, 100%);
  padding-bottom: 48px;
}

.screens .desktop {
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  width: 79%;
}

.screens .phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 25%;
  border-radius: 28px;
  border: 6px solid #1a1330;
  box-shadow: var(--shadow);
  overflow: hidden;
  background: #1a1330;
}

/* ---------- Sections ---------- */

section {
  padding: 72px 0;
}

.section-head {
  max-width: 640px;
  margin-bottom: 40px;
}

.section-head h2 {
  font-size: clamp(28px, 4vw, 40px);
}

.section-head p {
  color: var(--text-2);
  margin: 12px 0 0;
  font-size: 18px;
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.feature .glyph {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--tint);
  color: var(--primary-ink);
}

.feature h3 {
  font-size: 18px;
  margin-bottom: 6px;
}

.feature p {
  margin: 0;
  color: var(--text-2);
}

kbd {
  font: 600 0.85em ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  padding: 1px 6px;
  border: 1px solid var(--border);
  border-bottom-width: 2px;
  border-radius: 6px;
  background: var(--bg-2);
  white-space: nowrap;
}

.band {
  background: var(--bg-2);
  border-block: 1px solid var(--border);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: start;
}

.checks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 18px;
}

.checks li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 12px;
}

.checks li::before {
  content: "";
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--tint)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237c3aed' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 4.5 4.5L19 7'/%3E%3C/svg%3E")
    center / 16px no-repeat;
}

.checks strong {
  display: block;
}

.checks span {
  color: var(--text-2);
}

.card {
  padding: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card h3 {
  font-size: 20px;
  margin-bottom: 8px;
}

.card p {
  color: var(--text-2);
  margin: 0 0 12px;
}

.card p:last-child {
  margin-bottom: 0;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.price strong {
  font-size: 44px;
  letter-spacing: -0.03em;
  line-height: 1;
}

.price span {
  color: var(--muted);
}

/* ---------- FAQ ---------- */

.faq {
  display: grid;
  gap: 12px;
  max-width: 800px;
}

.faq details {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}

.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 18px 52px 18px 20px;
  font-weight: 600;
  position: relative;
}

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

.faq summary::after {
  content: "";
  position: absolute;
  right: 20px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s;
}

.faq details[open] summary::after {
  transform: translateY(-30%) rotate(-135deg);
}

.faq details > div {
  padding: 0 20px 18px;
  color: var(--text-2);
}

.faq details p {
  margin: 0 0 10px;
}

.faq details p:last-child {
  margin: 0;
}

/* ---------- Document pages (privacy, support) ---------- */

.doc {
  padding: 56px 0 80px;
}

.doc .wrap {
  max-width: 760px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 44px);
  margin-bottom: 8px;
}

.doc .meta {
  color: var(--muted);
  margin: 0 0 32px;
}

.doc h2 {
  font-size: 22px;
  margin: 40px 0 12px;
}

.doc p,
.doc li {
  color: var(--text-2);
}

.doc strong {
  color: var(--text);
}

.doc ul {
  padding-left: 22px;
}

.doc li {
  margin-bottom: 6px;
}

.summary {
  margin: 0 0 8px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 14px;
  background: var(--surface);
}

.summary p {
  margin: 0;
  color: var(--text);
}

.contact {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
  margin: 24px 0 8px;
}

/* ---------- Footer ---------- */

.site-foot {
  border-top: 1px solid var(--border);
  padding: 32px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 32px;
  align-items: center;
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-left: auto;
}

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

.site-foot a:hover {
  color: var(--text);
}

/* ---------- 404 ---------- */

.lost {
  min-height: 60vh;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 0;
}

.lost p {
  color: var(--text-2);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 12px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}

/* ---------- Narrow screens ---------- */

@media (max-width: 760px) {
  .site-head .wrap {
    gap: 12px;
  }

  .site-nav a {
    padding: 8px;
    font-size: 14px;
  }

  .site-nav .wide-only {
    display: none;
  }

  .hero {
    padding-top: 48px;
  }

  .split {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
  }

  section {
    padding: 56px 0;
  }

  /* A phone-width page shows the phone: the desktop window would be too small to read. */
  .screens {
    padding-bottom: 0;
  }

  .screens picture:first-child {
    display: none;
  }

  .screens .phone {
    position: static;
    width: min(300px, 72%);
    margin-inline: auto;
  }

  .site-foot nav {
    margin-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .faq summary::after {
    transition: none;
  }
}
