/* MiniCert Setup. The same look as MiniCert Sync (minicert-sync/src/styles.css):
   its tokens, type and components, copied rather than shared, since the two are
   separate sites with no build step here. Change a token in both.

   Mobile first. Most people arrive from the QR code on the device's screen, on
   their phone. */

@font-face {
  font-family: 'Inter Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('assets/fonts/inter-latin-wght-normal.woff2') format('woff2-variations');
}

:root {
  --bg: #000;
  --surface: #0c0c10;
  --line: rgba(255, 255, 255, 0.08);

  --text: #fff;
  --text-2: rgba(255, 255, 255, 0.64);
  --text-3: rgba(255, 255, 255, 0.4);

  --violet: #7c4dff;          /* BRAND_VIOLET */
  --violet-hover: #8e66ff;
  --lavender: #b9a5f5;        /* BRAND_LAVENDER */
  --red: #ff453a;

  --radius: 20px;

  color-scheme: dark;
  font-family: 'Inter Variable', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { min-height: 100vh; font-size: 15px; line-height: 1.5; }
a { color: var(--lavender); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--lavender); outline-offset: 3px; }

/* ── Nav ───────────────────────────────────────────────────────────────── */

.nav {
  position: sticky; top: 0; z-index: 10;
  height: 64px; padding: 0 16px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { width: 24px; height: 26px; }
.brand-name { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
/* The same pill as the landing page's "Setup" link: neutral grey. Sync's tag is
   the landing page's violet "Sync Badges" pill (2026-09-29). */
.brand-tag {
  font-size: 12px; font-weight: 600; color: var(--text);
  padding: 2px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.16);
}
.nav-link { color: var(--text); font-size: 15px; font-weight: 500; }
.nav-link:hover { color: var(--lavender); text-decoration: none; }

/* ── Layout ────────────────────────────────────────────────────────────── */

.page { max-width: 640px; margin: 0 auto; padding: 20px 16px 48px; }

.guide-link { margin: 0; font-size: 14px; color: var(--text-2); text-align: center; }
.guide-link strong { color: #fff; font-weight: 600; }

.hero { position: relative; text-align: center; padding: 40px 0 32px; }
.hero::before {
  content: ''; position: absolute; inset: -40px 0 auto; height: 280px; z-index: -1;
  background: radial-gradient(closest-side, rgba(124, 77, 255, 0.28), transparent);
  filter: blur(20px);
}
.hero-logo { display: block; width: 52px; height: 56px; margin: 0 auto 20px; }
.hero h1 { font-size: 32px; line-height: 1.1; letter-spacing: -0.025em; font-weight: 650; margin: 0 0 12px; }
.hero p { color: var(--text-2); font-size: 16px; margin: 0 auto; max-width: 440px; }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px;
}

/* ── Steps ─────────────────────────────────────────────────────────────── */

.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-number {
  flex: none; width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--violet); color: #fff; font-weight: 700; font-size: 15px;
}
.step h2 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; margin: 4px 0 6px; }
.step p { margin: 0; color: var(--text-2); }
.step strong { color: var(--text); font-weight: 600; }

/* The one thing people get wrong: most are reading this on a phone. */
.step strong.warn { color: var(--red); font-weight: 700; text-shadow: 0 0 12px rgba(255, 69, 58, 0.6); }

/* A browser's name with its mark in front, kept together on one line. */
.browser { white-space: nowrap; color: var(--text); font-weight: 600; }
.browser-icon { width: 1em; height: 1em; margin-right: 0.3em; vertical-align: -0.12em; fill: currentColor; }

/* ── Step 4: which way the cube faces ────────────────────────────────── */
/* The cube lowers onto the MiniCert, then the screen's light traces up to the
   diagonal and out to "You". One loop every 6 s. */

.cube-diagram { display: block; width: 100%; max-width: 360px; margin: 16px auto 8px; overflow: visible; }
.cube-diagram .desk { stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.5; }
.cube-diagram .cord { fill: none; stroke: #3a3a44; stroke-width: 4; stroke-linecap: round; }
.cube-diagram .base { fill: #1b1b22; stroke: #34343e; stroke-width: 1.5; }
.cube-diagram .lip { fill: #24242c; stroke: #34343e; stroke-width: 1.5; }
.cube-diagram .screen { stroke: var(--lavender); stroke-width: 3; stroke-linecap: round; filter: drop-shadow(0 0 4px rgba(185, 165, 245, 0.8)); }
.cube-diagram .cube { fill: rgba(185, 165, 245, 0.07); stroke: rgba(255, 255, 255, 0.55); stroke-width: 1.5; }
.cube-diagram .mirror { stroke: var(--text); stroke-width: 2; }
.cube-diagram .ray { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-dasharray: 160; stroke-dashoffset: 160; }
.cube-diagram .ray-head { fill: none; stroke: var(--violet); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; opacity: 0; }
.cube-diagram .label { fill: var(--text-2); font-size: 12px; font-weight: 600; }
.cube-diagram .label-you { fill: var(--text); font-size: 14px; }

.cube-diagram .cube-drop { animation: cube-drop 6s ease-in-out infinite; }
.cube-diagram .ray { animation: ray-draw 6s ease-in-out infinite; }
.cube-diagram .ray-head { animation: ray-head 6s ease-in-out infinite; }

@keyframes cube-drop {
  0%       { transform: translateY(-30px); opacity: 0; }
  20%, 88% { transform: translateY(0); opacity: 1; }
  100%     { transform: translateY(0); opacity: 0; }
}
@keyframes ray-draw {
  0%, 28%  { stroke-dashoffset: 160; opacity: 1; }
  55%, 88% { stroke-dashoffset: 0; opacity: 1; }
  100%     { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes ray-head {
  0%, 52%  { opacity: 0; }
  58%, 88% { opacity: 1; }
  100%     { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .cube-diagram .cube-drop, .cube-diagram .ray, .cube-diagram .ray-head { animation: none; }
  .cube-diagram .ray { stroke-dashoffset: 0; }
  .cube-diagram .ray-head { opacity: 1; }
}

.step .step-note { margin-top: 12px; }

/* The username's place in a profile link, as Sync shows it. */
.example { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; white-space: nowrap; }
.step .example strong { color: var(--lavender); }

/* ── Buttons ───────────────────────────────────────────────────────────── */

.button {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 22px; border-radius: 999px;
  font-size: 15px; font-weight: 600;
  transition: background 0.15s, transform 0.1s;
}
.button:hover { text-decoration: none; }
.button:active { transform: scale(0.98); }
.button-primary { background: var(--violet); color: #fff; }
.button-primary:hover { background: var(--violet-hover); }
.button-large { height: 52px; padding: 0 30px; font-size: 16px; }

/* Full width on a phone, where it is a thumb target; sized to its label wider up. */
.sync-button { display: flex; width: 100%; margin: 24px 0 0; }

/* ── Help and footer ───────────────────────────────────────────────────── */

.help { margin-top: 40px; }
.help h2 { font-size: 20px; font-weight: 600; letter-spacing: -0.01em; margin: 0 0 8px; }
.help p { margin: 0; color: var(--text-2); }

.footer { text-align: center; color: var(--text-3); font-size: 13px; padding: 24px; }
.footer a { color: var(--text-2); }
.footer .copyright { margin-top: 8px; font-size: 12px; }

/* ── Wider screens ─────────────────────────────────────────────────────── */

@media (min-width: 640px) {
  .nav { padding: 0 24px; }
  .page { padding: 24px 24px 64px; }
  .hero { padding: 64px 0 40px; }
  .hero h1 { font-size: 44px; }
  .hero p { font-size: 17px; }
  .card { padding: 24px; }
  .step { gap: 20px; }
  .sync-button { width: fit-content; margin: 32px auto 0; }
}
