/* Snipkit site: shared tokens, type, header, footer, and buttons.
   Light gray and white surfaces, near-black text, system font, system blue.
   Dark mode follows the system setting. */

:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --line: rgba(0, 0, 0, 0.08);
  --line-strong: rgba(0, 0, 0, 0.14);
  --blue: #0071e3;
  --blue-hover: #0077ed;
  --link: #0066cc;
  --red: #ff3b30;
  --accent: #0071e3;          /* UI accent: carets, selection handles, folder icons, featured ring */
  --btn-gray: #6e6e73;
  --btn-gray-hover: #636366;
  --seg-bg: rgba(0, 0, 0, 0.05);
  --seg-thumb: #ffffff;
  --seg-bar: rgba(0, 0, 0, 0.1);
  --seg-fill: rgba(0, 0, 0, 0.45);

  /* Surfaces */
  --raised: #ffffff;          /* tile or pill sitting on --bg */
  --raised-2: #f5f5f7;        /* tile or pill sitting on --surface */
  --well: #e9e9ee;            /* large stage on --bg: capture desk, HUD stage */
  --well-2: #e9e9ee;          /* media well inside a tile */
  --beautify: #d8dde6;
  --paper: #f4f1ea;           /* web page backdrop behind the article */
  --nav-bg: rgba(245, 245, 247, 0.8);
  --window: #ffffff;          /* mock app windows */
  --window-bar: #f0f0f2;
  --window-foot: #f5f5f7;
  --field: #f0f0f2;
  --card-ui: #ffffff;         /* small controls inside wells: style bar, mini panels */
  --thumb: #e9e9ee;
  --clip-bg: rgba(255, 255, 255, 0.92);
  --key-bg: #ffffff;
  --pill-bg: #e4eefb;
  --pill-ink: #0b4f9c;
  --selection: #b3d7ff;
  --rewrite-bg: #e4eefb;
  --chip: #f5f5f7;
  --sw-ink: #1d1d1f;
  --sw-ink-ring: transparent;

  /* HUD (always dark, slightly lifted in dark mode) */
  --hud-bg: #1c1c1e;
  --hud-ring: rgba(255, 255, 255, 0.08);
  --hud-key: #3a3a3c;

  /* Shadows */
  --shadow-frame: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, 0.28), 0 8px 20px -10px rgba(0, 0, 0, 0.12);
  --shadow-mock: 0 0 0 1px var(--line), 0 24px 60px -24px rgba(0, 0, 0, 0.22);
  --shadow-clip: 0 0 0 1px var(--line), 0 30px 70px -30px rgba(0, 0, 0, 0.35), 0 10px 24px -14px rgba(0, 0, 0, 0.15);
  --shadow-hud: 0 10px 30px -10px rgba(0, 0, 0, 0.4);
  --shadow-card: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.12));
  --shadow-bar: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.18));
  --shadow-recbar: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.25));
  --shadow-beautify: 0 14px 30px -10px rgba(0, 0, 0, 0.4);
  --shadow-doc: 0 0 0 1px var(--line), 0 8px 20px -10px rgba(0, 0, 0, 0.3);
  --shadow-chip: 0 0 0 1px var(--line), 0 4px 10px -6px rgba(0, 0, 0, 0.2);
  --radius: 18px;
  --radius-sm: 12px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 980px;
  --wrap-wide: 1100px;
  --gutter: 22px;
  color-scheme: light dark;
}

/* Dark appearance: follows the system setting. */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #161617;
    --ink: #f5f5f7;
    --ink-2: #a1a1a6;
    --ink-3: #86868b;
    --line: rgba(255, 255, 255, 0.1);
    --line-strong: rgba(255, 255, 255, 0.18);
    --blue: #0071e3;
    --blue-hover: #0077ed;
    --link: #2997ff;
    --accent: #0a84ff;
    --btn-gray: #48484a;
    --btn-gray-hover: #545456;
    --seg-bg: rgba(255, 255, 255, 0.08);
    --seg-thumb: #3a3a3c;
    --seg-bar: rgba(255, 255, 255, 0.14);
    --seg-fill: rgba(255, 255, 255, 0.6);

    --raised: #1c1c1e;
    --raised-2: #232325;
    --well: #1c1c1e;
    --well-2: #111112;
    --beautify: #283246;
    --nav-bg: rgba(0, 0, 0, 0.78);
    --window: #1e1e20;
    --window-bar: #2a2a2c;
    --window-foot: #19191b;
    --field: #2c2c2e;
    --card-ui: #2c2c2e;
    --thumb: #3a3a3c;
    --clip-bg: rgba(30, 30, 32, 0.94);
    --key-bg: #2c2c2e;
    --pill-bg: rgba(10, 132, 255, 0.2);
    --pill-ink: #6cb6ff;
    --selection: #3f638b;
    --rewrite-bg: rgba(10, 132, 255, 0.14);
    --chip: #3a3a3c;
    --sw-ink: #1d1d1f;
    --sw-ink-ring: rgba(255, 255, 255, 0.28);

    --hud-bg: #2c2c2e;
    --hud-ring: rgba(255, 255, 255, 0.12);
    --hud-key: #48484a;

    --shadow-frame: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 60px -24px rgba(0, 0, 0, 0.9), 0 8px 20px -10px rgba(0, 0, 0, 0.6);
    --shadow-mock: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 24px 60px -24px rgba(0, 0, 0, 0.9);
    --shadow-clip: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 30px 70px -30px rgba(0, 0, 0, 0.95), 0 10px 24px -14px rgba(0, 0, 0, 0.6);
    --shadow-hud: 0 10px 30px -10px rgba(0, 0, 0, 0.8);
    --shadow-card: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.55));
    --shadow-bar: drop-shadow(0 4px 14px rgba(0, 0, 0, 0.6));
    --shadow-recbar: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.7));
    --shadow-beautify: 0 14px 30px -10px rgba(0, 0, 0, 0.75);
    --shadow-doc: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 20px -10px rgba(0, 0, 0, 0.7);
    --shadow-chip: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 4px 10px -6px rgba(0, 0, 0, 0.6);
  }
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { max-width: 100%; }
figure { margin: 0; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
strong { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.skip {
  position: absolute; left: 8px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 8px 12px; border-radius: 8px;
  box-shadow: 0 0 0 1px var(--line);
}
.skip:focus { top: 8px; }
.mark { flex-shrink: 0; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.wrap--wide { max-width: var(--wrap-wide); }
.wrap--video { max-width: var(--wrap-wide); }

/* Type */
h1 {
  font-size: 60px; line-height: 1.05; letter-spacing: -0.022em; font-weight: 600;
  max-width: 860px; margin: 0 auto;
}
h1, h2, .sub, .lede { text-wrap: balance; }
h2 { font-size: 48px; line-height: 1.06; letter-spacing: -0.02em; font-weight: 600; }
h2.h2--small { font-size: 34px; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; font-weight: 600; }
.lede { font-size: 21px; line-height: 1.38; letter-spacing: -0.008em; color: var(--ink-2); max-width: 640px; margin: 22px auto 0; }
.sub { font-size: 21px; line-height: 1.38; letter-spacing: -0.008em; color: var(--ink-2); max-width: 660px; margin: 18px auto 0; }
.fine { font-size: 14px; color: var(--ink-3); }
.link::after { content: " \203A"; }

/* Buttons and keys */
.btn {
  display: inline-block; background: var(--blue); color: #fff; font-weight: 500;
  font-size: 17px; line-height: 1; padding: 13px 24px; border-radius: 980px;
  transition: background 0.2s var(--ease);
}
.btn:hover { background: var(--blue-hover); text-decoration: none; }
.btn--small { font-size: 13px; padding: 6px 13px; }
.btn--block { display: block; width: 100%; text-align: center; margin-top: 22px; }
button.btn { border: 0; font-family: inherit; cursor: pointer; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn--secondary { background: var(--btn-gray); color: #fff; }
.btn--secondary:hover { background: var(--btn-gray-hover); }
.key {
  display: inline-block; font-family: var(--font); font-size: 0.78em; font-weight: 500; line-height: 1.5;
  padding: 0 6px; border-radius: 5px; background: var(--key-bg); color: var(--ink);
  box-shadow: 0 0 0 1px var(--line-strong), 0 1px 0 var(--line-strong);
  vertical-align: 1px; margin: 0 2px;
}

/* Button and link variants used by the inner pages and share pages */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn svg { flex-shrink: 0; }
.btn-ghost { background: transparent; color: var(--link); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--seg-bg); }
.btn-lg { font-size: 17px; padding: 14px 26px; }
.btn-sm { font-size: 13px; padding: 7px 14px; }
.btn-block { display: flex; width: 100%; }
.text-link { color: var(--link); }
.text-link:hover { text-decoration: underline; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Global nav */
.globalnav {
  position: sticky; top: 0; z-index: 40;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
}
.brand .mark { color: var(--ink); }
.globalnav__row { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.brand:hover { text-decoration: none; }
.globalnav__links { display: flex; align-items: center; gap: 26px; font-size: 14px; }
.globalnav__links a:not(.btn) { color: var(--ink); opacity: 0.85; }
.globalnav__links a:not(.btn):hover { opacity: 1; text-decoration: none; }


/* Sections */
.section { padding: 96px 0; }
.section--white { background: var(--surface); }
/* Sub-sections that continue the band above them: same background, less space */
.section--cont { padding-top: 40px; }
.section__intro { text-align: center; margin-bottom: 52px; }
.section__intro + .wrap { margin-top: 0; }

/* Call to action: a button and a text link */
.cta { display: flex; align-items: center; justify-content: center; gap: 26px; margin-top: 30px; }
.cta .link { font-size: 17px; }

/* Frames: screenshots already carry their own window chrome; we add corner, hairline, shadow. */
.frame {
  position: relative; overflow: hidden; background: var(--raised);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-frame);
}
/* App screenshots are <picture>s with a dark source; let the <img> lay out as if it were the child. */
picture { display: contents; }
.frame > img, .frame > picture > img, .frame > video { display: block; width: 100%; height: auto; }
.frame--video video { aspect-ratio: 16 / 9; background: #000; }

/* Reveal on scroll (only when JS is present and motion allowed) */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease), transform 0.6s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }


/* Footer */
.footer { border-top: 1px solid var(--line); padding: 32px 0 44px; font-size: 13px; color: var(--ink-3); }
.footer__row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer__brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 600; font-size: 15px; }
.footer__brand:hover { text-decoration: none; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--ink-2); }
.footer__meta { display: flex; justify-content: space-between; gap: 8px 20px; flex-wrap: wrap; margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line); font-size: 12px; }
.footer__meta a { color: inherit; }

/* Reduced motion: no reveals */
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; transition: none; }
}

@media (max-width: 1024px) {
  h1 { font-size: 48px; }
}

@media (max-width: 734px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  h1 { font-size: 36px; letter-spacing: -0.012em; }
  h2 { font-size: 30px; }
  h2.h2--small { font-size: 26px; }
  h3 { font-size: 19px; }
  .lede { font-size: 18px; margin-top: 14px; }
  .sub { font-size: 17px; }
  .section { padding: 64px 0; }
  .section__intro { margin-bottom: 28px; }
  .cta { flex-direction: column; gap: 14px; margin-top: 24px; }
  .globalnav__links { gap: 16px; font-size: 13px; }
  .frame { border-radius: 8px; }
  .footer__row { flex-direction: column; align-items: flex-start; }
  .footer__links { gap: 10px 18px; }
}

@media (max-width: 360px) {
  .globalnav__links { gap: 12px; }
}
