/* Snipette site. One stylesheet, system fonts only (Segoe UI on Windows, like the app), light/dark via prefers-color-scheme.
   Visual motif: the app's capture overlay. Frozen screen dimmed, the selection bright with a thin accent outline and a
   label under it; overlapping shots, newest on top. The CSP forbids inline styles: theme SVG through classes here. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f2f4f7;
  --fg: #14181d;
  --muted: #4e5864;
  --border: #d2d8df;
  --accent: #0b62c4;
  --accent-fg: #ffffff;
  --accent-hover: #094f9e;
  --accent-soft: #dce9f9;
  --code-bg: #eaeef3;
  --shadow: 0 18px 40px -18px rgb(20 30 45 / 0.28), 0 2px 6px -2px rgb(20 30 45 / 0.10);
  /* "Frozen desktop" band: dark in both themes, like the overlay. */
  --dim: #1b2027;
  --dim-line: rgb(255 255 255 / 0.03);
  --dim-fg: #e9edf2;
  --sel-bg: var(--bg);
  --radius: 10px;
  --max: 70rem;
  --band: clamp(3.5rem, 2rem + 6vw, 6.5rem);
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #13161a;
    --bg-alt: #1a1e24;
    --fg: #e8ebef;
    --muted: #a5aeb9;
    --border: #333a44;
    --accent: #5aa6ff;
    --accent-fg: #0b1420;
    --accent-hover: #86beff;
    --accent-soft: #1d3350;
    --code-bg: #232831;
    --shadow: 0 18px 40px -18px rgb(0 0 0 / 0.7), 0 2px 6px -2px rgb(0 0 0 / 0.4);
    --dim: #0b0d10;
    --dim-line: rgb(255 255 255 / 0.028);
    --sel-bg: #1c2128;
  }
}

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

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--border) var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 1.0625rem/1.6 var(--font);
}

::selection { background: var(--accent); color: var(--accent-fg); }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); text-decoration-thickness: 2px; }

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

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

h1, h2, h3 { font-family: var(--display); line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(2.4rem, 1.3rem + 3.8vw, 4.4rem); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 0; }
h2 { font-size: clamp(1.75rem, 1.2rem + 2.2vw, 2.6rem); font-weight: 700; letter-spacing: -0.02em; margin: 0 0 1.5rem; }
h3 { font-size: 1.15rem; font-weight: 650; margin: 0 0 0.4rem; }
p, li, dd, figcaption, summary { text-wrap: pretty; }

code, kbd {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  border-radius: 4px;
  padding: 0.1em 0.35em;
}
code { overflow-wrap: anywhere; }
kbd { border: 1px solid var(--border); border-bottom-width: 2px; }

.skip {
  position: absolute; left: 0.5rem; top: -4rem;
  background: var(--accent); color: var(--accent-fg);
  padding: 0.6rem 1rem; border-radius: var(--radius); z-index: 10;
}
.skip:focus { top: 0.5rem; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 1rem; }
@media (min-width: 40rem) { .wrap { padding: 0 1.5rem; } }

/* Phones (touch only, phone-sized in portrait or landscape): Snipette is a Windows app, so the download steps back.
   The size limit keeps the download on Windows touch tablets (Surface without keyboard), which are touch-only too. */
.phone-only { display: none; }
@media (hover: none) and (pointer: coarse) and (max-width: 47.99rem),
       (hover: none) and (pointer: coarse) and (max-height: 32rem) {
  .pc-only { display: none !important; }
  .phone-only { display: block; }
}

/* Header */
.site-header { border-bottom: 1px solid var(--border); }
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.25rem 1rem; flex-wrap: wrap; padding-block: 0.5rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px;
  font-family: var(--display); font-weight: 700; font-size: 1.2rem; letter-spacing: -0.01em;
  color: var(--fg); text-decoration: none;
}
.brand:hover { color: var(--fg); }
.brand svg { width: 30px; height: 30px; }
.site-header nav ul { list-style: none; display: flex; align-items: center; gap: 0 1.1rem; margin: 0; padding: 0; flex-wrap: wrap; }
.site-header nav a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; color: var(--muted); text-decoration: none; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--fg); text-decoration: underline; }
.site-header nav .nav-cta {
  padding: 0 0.9rem; border: 1.5px solid var(--accent); border-radius: var(--radius);
  color: var(--accent); font-weight: 600;
}
.site-header nav .nav-cta:hover { background: var(--accent); color: var(--accent-fg); text-decoration: none; }
@media (max-width: 30rem) { .site-header nav .nav-hide-sm { display: none; } }

/* Logo colours (shared by header, schematics) */
.logo-back { fill: #0b62c4; }
.logo-front { fill: #5aa6ff; fill-opacity: 0.85; stroke: var(--bg); stroke-width: 1.5; }

/* Buttons */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 48px; padding: 0.7rem 1.4rem;
  border: 2px solid var(--accent); border-radius: var(--radius);
  font-weight: 600; text-decoration: none; line-height: 1.2;
}
.btn svg { width: 1.1em; height: 1.1em; flex: none; }
.btn-primary { background: var(--accent); color: var(--accent-fg); box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-fg); }
.btn-primary:active { transform: translateY(1px); }
.btn-secondary { background: transparent; color: var(--accent); }
.btn-secondary:hover { color: var(--accent-hover); border-color: var(--accent-hover); }

.meta { font-size: 0.92rem; color: var(--muted); margin: 0.9rem 0 0; }
.meta + .meta { margin-top: 0.25rem; }

/* Bands: one vertical rhythm for every section. */
.band { padding-block: var(--band); }
.band-alt { background: var(--bg-alt); }
.section-lead { max-width: 40rem; color: var(--muted); font-size: 1.1rem; margin: -0.75rem 0 2.5rem; }

/* Hero */
.hero { padding-block: clamp(2.5rem, 1rem + 5vw, 5rem) var(--band); overflow: hidden; }
.hero .wrap { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 58rem) { .hero .wrap { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 3.5rem; } }
.hero .lead { font-size: clamp(1.15rem, 1rem + 0.5vw, 1.3rem); color: var(--muted); margin: 1.25rem 0 2rem; max-width: 34rem; }
.hero .phone-only { margin: 0 0 1.25rem; }
/* Short viewports (landscape phones, small windows): the headline must not fill the screen. */
@media (max-height: 32rem) {
  h1 { font-size: clamp(2rem, 1.2rem + 2.6vw, 2.9rem); }
  .hero { padding-top: 1.75rem; }
  .hero .lead { margin: 0.9rem 0 1.25rem; }
}

/* Screenshot slots. Each <div class="shot"> is a placeholder with a drawn schematic; replace it with
   <img class="shot-img" ...> of the same 16:10 aspect ratio (see docs/SITE.md). Frames stay. */
.shot, .shot-img {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px;
}
.shot-img { height: auto; object-fit: cover; }
.shot svg { display: block; width: 100%; height: 100%; }

/* Schematic drawing parts */
.sk-page { fill: var(--bg); stroke: var(--border); }
.sk-line { stroke: var(--border); stroke-width: 6; stroke-linecap: round; }
.sk-line-zoom { stroke-width: 8; }
.sk-line-strong { stroke: var(--muted); stroke-opacity: 0.45; stroke-width: 6; stroke-linecap: round; }
.sk-dim { fill: #000; fill-opacity: 0.55; }
.sk-sel { fill: none; stroke: var(--accent); stroke-width: 2; }
.sk-shot { fill: var(--accent); fill-opacity: 0.08; stroke: var(--accent); stroke-width: 2; }
.sk-ghost { fill: none; stroke: var(--accent); stroke-opacity: 0.5; stroke-width: 1.5; stroke-dasharray: 5 5; }
.sk-accent { fill: var(--accent); }
.sk-cursor { fill: var(--fg); stroke: var(--bg); stroke-width: 1.5; }

/* Hero stack: two earlier shots behind the slot, offset like overlapping captures. */
.stack { position: relative; margin: 1.75rem 1.75rem 0 0; }
.stack::before, .stack::after {
  content: ""; position: absolute; inset: 0; border-radius: 6px;
  border: 1.5px dashed var(--accent); background: var(--bg-alt);
}
.stack::before { transform: translate(1.75rem, -1.75rem); opacity: 0.35; }
.stack::after { transform: translate(0.875rem, -0.875rem); opacity: 0.6; }
.stack > * { position: relative; z-index: 1; outline: 2px solid var(--accent); outline-offset: -1px; box-shadow: var(--shadow); }

/* Lead differentiators: three overlapping "shots", newest on top, as in the app. */
.cascade { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.cascade > li {
  position: relative; background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 1.75rem 1.5rem 2rem; box-shadow: var(--shadow);
}
.cascade > li:last-child { outline: 2px solid var(--accent); outline-offset: -1px; }
.cascade h3 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.9rem); letter-spacing: -0.015em; margin-bottom: 0.6rem; }
.cascade p { margin: 0; max-width: 36rem; color: var(--muted); }
.cascade p + p { margin-top: 0.75rem; }
.apps { display: flex; flex-wrap: wrap; gap: 0.4rem; list-style: none; padding: 0; margin: 1.1rem 0 0; }
.apps li {
  font-size: 0.88rem; padding: 0.3rem 0.75rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--fg);
}
@media (max-width: 47.99rem) {
  .cascade { gap: 0; }
  .cascade > li:nth-child(2) { margin: -0.75rem 0 0 0.75rem; }
  .cascade > li:nth-child(3) { margin: -0.75rem 0 0 1.5rem; }
}
@media (min-width: 48rem) {
  .cascade { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 0; }
  .cascade > li { padding: 2.25rem 2.5rem 3.25rem; }
  .cascade > li:nth-child(1) { grid-column: 1 / span 8; z-index: 1; }
  .cascade > li:nth-child(2) { grid-column: 3 / span 8; margin-top: -1.75rem; z-index: 2; }
  .cascade > li:nth-child(3) { grid-column: 5 / span 8; margin-top: -1.75rem; z-index: 3; padding-bottom: 2.25rem; }
}

/* The rest, as a compact list. Marker = two tiny overlapping squares (the logo). */
.details-list {
  list-style: none; margin: 3.5rem 0 0; padding: 2.5rem 0 0; border-top: 1px solid var(--border);
  display: grid; gap: 1.25rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
}
.details-list li { position: relative; padding-left: 1.75rem; color: var(--muted); }
.details-list li strong { color: var(--fg); font-weight: 600; }
.details-list li::before {
  content: ""; position: absolute; left: 0; top: 0.4em; width: 1rem; height: 0.8rem;
  background:
    linear-gradient(var(--accent), var(--accent)) right bottom / 0.6rem 0.5rem no-repeat,
    linear-gradient(var(--border), var(--border)) left top / 0.6rem 0.5rem no-repeat;
}
.details-title { font-size: 1.15rem; margin: 3.5rem 0 0; }
.details-title + .details-list { margin-top: 1rem; padding-top: 0; border-top: 0; }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 2.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); counter-reset: step; }
.steps li { counter-increment: step; }
.steps .step-text { display: grid; grid-template-columns: auto 1fr; gap: 0 0.85rem; margin-top: 1.1rem; }
.steps .step-text::before {
  content: counter(step); grid-row: span 2;
  font-family: var(--display); font-size: 2.6rem; font-weight: 700; line-height: 1; color: var(--accent);
}
.steps h3 { margin: 0.1rem 0 0.25rem; }
.steps p { margin: 0; color: var(--muted); }

/* Honest limits */
.faq { max-width: 48rem; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  min-height: 56px; padding: 0.75rem 0; cursor: pointer; list-style: none;
  font-weight: 600; font-size: 1.08rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.6rem; height: 0.6rem; margin-right: 0.3rem;
  border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-25%);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-25%); }
.faq summary:hover { color: var(--accent); }
.faq details p { margin: 0 0 1.1rem; max-width: 42rem; color: var(--muted); }

/* Download: the frozen, dimmed screen with one bright selection. */
.capture {
  background-color: var(--dim);
  /* Faint text lines of the "frozen" page behind the selection. */
  background-image: repeating-linear-gradient(to bottom, transparent 0 26px, var(--dim-line) 26px 32px);
  color: var(--dim-fg);
}
.selection {
  position: relative; max-width: 52rem; margin: 0 auto;
  background: var(--sel-bg); color: var(--fg);
  outline: 2px solid var(--accent); outline-offset: 0;
  padding: clamp(1.75rem, 1rem + 3vw, 3rem);
}
.selection h2 { margin-bottom: 0.75rem; }
.selection > p:first-of-type { color: var(--muted); margin: 0 0 1.75rem; max-width: 36rem; }
.selection .phone-only p { margin: 0 0 0.5rem; }
/* The size label under the selection, as in the capture overlay: here it carries the release facts. */
.sel-label {
  max-width: 52rem; margin: 0.6rem auto 0; padding: 0;
  font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--dim-fg);
}
.sel-label a { color: var(--dim-fg); }
.sel-label a:hover { color: #ffffff; }
.before-run { margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border); display: grid; gap: 1rem; }
.before-run p { margin: 0; padding-left: 2rem; position: relative; }
.before-run svg { position: absolute; left: 0; top: 0.15em; width: 1.25rem; height: 1.25rem; }
.ico { fill: none; stroke: var(--accent); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-on-accent { stroke: var(--accent-fg); stroke-width: 2; }

/* Long-form pages (thanks, help, legal) */
.prose { padding-block: clamp(2.5rem, 1.5rem + 3vw, 4rem); }
.prose > * { max-width: 46rem; }
.prose > p, .prose li { max-width: 40rem; }
.prose h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3rem); }
.prose h1 + .lead, .prose h1 + p { margin-top: 1rem; }
.prose .lead { font-size: 1.2rem; color: var(--muted); }
.prose h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.7rem); margin: 2.75rem 0 0.75rem; }
.prose ol li, .prose ul li { margin-bottom: 0.5rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--border); }
.prose address { font-style: normal; }
.legal-text { counter-reset: none; }
.legal-text h2 { font-size: 1.15rem; }

/* Numbered install steps (thanks page) */
.install { list-style: none; padding: 0; margin: 2rem 0; counter-reset: inst; display: grid; gap: 0.75rem; }
.install li {
  counter-increment: inst; position: relative; margin: 0;
  padding: 1rem 1.25rem 1rem 4rem; background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
}
.install li:last-child { outline: 2px solid var(--accent); outline-offset: -1px; }
.install li::before {
  content: counter(inst); position: absolute; left: 1.25rem; top: 0.8rem;
  font-family: var(--display); font-size: 1.7rem; font-weight: 700; line-height: 1; color: var(--accent);
}
.install strong { font-weight: 650; }
.note { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 6px; padding: 1rem 1.25rem; }
.note p { margin: 0; }
.note p + p { margin-top: 0.5rem; }
.quiet { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 1.75rem 0 2.25rem; font-size: 0.92rem; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1.5rem; }
.site-footer ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0 1.25rem; margin: 0; padding: 0; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.site-footer a:hover, .site-footer a[aria-current="page"] { color: var(--fg); }
.site-footer p { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .nav-cta, .faq summary::after { transition: background-color 0.15s ease-out, color 0.15s ease-out, border-color 0.15s ease-out, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1); }
}

@media print {
  .site-header nav, .skip { display: none; }
  .capture { background: none; color: inherit; }
}
