/* ScaleWebOps. One stylesheet for every page. System font first; Inter is a
   self-hosted fallback that Apple devices never download. Tokens: brand/README.md. */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter.woff2?v=f95560fc85") format("woff2");
  font-weight: 400 600;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --alt: #f5f5f7;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --line: #d2d2d7;
  --link: #1b2bd6;
  --button: #1b2bd6;
  --button-hover: #1522ad;
  --button-text: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.82);
  --code-bg: #eeeef1;
  --frame: #1d1d1f;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* One fluid scale, linear between 320 and 1440 px wide */
  --text-h1: clamp(2.5rem, 1.786rem + 3.571vw, 5rem);
  --text-h2: clamp(1.875rem, 1.482rem + 1.964vw, 3.25rem);
  --text-h3: clamp(1.3125rem, 1.241rem + 0.357vw, 1.5rem);
  --text-body: clamp(1.0625rem, 1.027rem + 0.179vw, 1.1875rem);
  --text-lede: clamp(1.1875rem, 1.116rem + 0.357vw, 1.4375rem);
  --text-small: 0.875rem;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 48px);
  --section: clamp(64px, 9vw, 128px);
  --header-h: 56px;
  --radius: 18px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --alt: #161617;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --line: #424245;
    --link: #9aa6ff;
    --button: #2f3fe8;
    --button-hover: #4453f0;
    --header-bg: rgba(0, 0, 0, 0.76);
    --code-bg: #2a2a2d;
    --frame: #2a2a2d;
  }
}

/* StencilPort keeps its violet for actions and links, inside the same frame. */
.product-stencilport main,
.product-stencilport .subnav,
.product-stencilport .site-footer {
  --link: #5a35f0;
  --button: #5a35f0;
  --button-hover: #4726d6;
}
@media (prefers-color-scheme: dark) {
  .product-stencilport main,
  .product-stencilport .subnav,
  .product-stencilport .site-footer {
    --link: #b3a4ff;
    --button: #5a35f0;
    --button-hover: #6a48f5;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--text-body)/1.5 var(--font);
  letter-spacing: -0.003em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-wrap: break-word;
}
img, picture, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
.prose p a, .prose li a, .prose td a, .contact-card a:not(.email), .hero-note a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

h1, h2, h3 { font-weight: 600; margin: 0; text-wrap: balance; }
h1 { font-size: var(--text-h1); line-height: 1.07; letter-spacing: -0.022em; }
h2 { font-size: var(--text-h2); line-height: 1.1; letter-spacing: -0.018em; }
h3 { font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.012em; }
p { margin: 0; }

.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  padding: 12px 16px; border-radius: 8px;
  background: var(--button); color: var(--button-text); font-weight: 600;
}
.skip-link:focus { top: 8px; }

.container { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }

.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 10px 22px;
  border: 0; border-radius: 980px;
  background: var(--button); color: var(--button-text);
  font: 400 1.0625rem/1.2 var(--font); letter-spacing: -0.01em;
  cursor: pointer; text-decoration: none;
  transition: background-color 0.2s ease;
}
.button:hover { background: var(--button-hover); text-decoration: none; }
.button.quiet { background: transparent; color: var(--link); padding-inline: 10px; }
.button.quiet:hover { background: transparent; text-decoration: underline; text-underline-offset: 0.15em; }

/* Header ------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent);
}
.site-header .wrap { display: flex; align-items: center; gap: 28px; min-height: var(--header-h); }
.brand { flex: none; display: flex; align-items: center; min-height: 44px; }
.brand img { height: 24px; width: auto; }
.nav { margin-left: auto; }
.nav ul, .menu ul { list-style: none; margin: 0; padding: 0; }
.nav ul { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text); font-size: 1rem; }
.nav a[aria-current="page"] { color: var(--muted); }
.header-cta.button { min-height: 36px; padding: 6px 16px; font-size: 1rem; }

.menu { display: none; margin-left: auto; position: relative; }
.menu summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  min-height: 44px; padding-inline: 6px; color: var(--text); font-size: 1.0625rem;
}
.menu summary::-webkit-details-marker { display: none; }
.menu ul {
  position: absolute; right: 0; top: calc(100% + 6px); width: min(260px, calc(100vw - 2 * var(--gutter)));
  padding: 8px; border-radius: 14px;
  background: var(--bg); border: 1px solid var(--line);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.14);
}
.menu li a { display: flex; align-items: center; min-height: 44px; padding-inline: 12px; color: var(--text); border-radius: 8px; }
.menu li a:hover { background: var(--alt); text-decoration: none; }

/* StencilPort sub-navigation */
.subnav { border-bottom: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.subnav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; min-height: 52px; }
.subnav .product-name { flex: none; display: flex; align-items: center; min-height: 44px; }
.subnav .product-name img { height: 24px; width: auto; }
.subnav ul { display: flex; flex-wrap: wrap; gap: 0 22px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.subnav a { display: flex; align-items: center; min-height: 44px; color: var(--muted); font-size: 1rem; white-space: nowrap; }
.subnav a:hover { color: var(--text); text-decoration: none; }
.subnav a[aria-current="page"] { color: var(--text); }

@media (max-width: 833px) {
  .nav, .site-header .header-cta { display: none; }
  .menu { display: block; }
}
@media (max-width: 600px) {
  .subnav ul { margin-left: 0; width: 100%; gap: 0 14px; }
}

/* Sections ----------------------------------------------------------- */
.section { padding-block: var(--section); }
.section.alt { background: var(--alt); }
.section-head { max-width: 720px; margin: 0 auto clamp(40px, 5vw, 64px); text-align: center; }
.section-head p { margin-top: 16px; color: var(--muted); font-size: var(--text-lede); line-height: 1.35; }
.muted-note { color: var(--muted); }
.section-head .links { display: flex; justify-content: center; flex-wrap: wrap; gap: 0 16px; margin-top: 8px; font-size: var(--text-body); align-items: center; }
.section-head .links a { display: inline-flex; align-items: center; min-height: 44px; }
.hairline { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* Hero */
.hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: var(--section); text-align: center; }
.hero p.sub { max-width: 720px; text-wrap: balance; margin: 16px auto 0; color: var(--muted); font-size: var(--text-lede); line-height: 1.35; }
.hero .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 24px; }
.hero-shot { margin: clamp(32px, 5vw, 56px) auto 0; max-width: 820px; }
.hero-note { margin-top: 16px; font-size: var(--text-small); color: var(--muted); }

/* Devices: drawn in CSS around a real capture. Sized by their wrapper. */
.device { container-type: inline-size; width: min(100%, 260px); margin-inline: auto; }
.phone { padding: 2.8cqw; border-radius: 14.5cqw; background: var(--frame); box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14); }
.scr { display: block; position: relative; overflow: hidden; border-radius: 11.8cqw; background: #f7f5f0; padding-top: 9cqw; }
.scr::before { content: ""; position: absolute; z-index: 1; top: 2.8cqw; left: 50%; width: 26cqw; height: 6.6cqw; transform: translateX(-50%); border-radius: 99px; background: #000; }
.scr.dim { background: #71706e; }
@media (prefers-color-scheme: dark) { .scr { background: #151419; } .scr.dim { background: #0a090b; } }
.scr img { width: 100%; height: auto; }

.tablet { padding: 1.2cqw; border-radius: 3.1cqw; background: var(--frame); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14); }
.tablet img { width: 100%; height: auto; border-radius: 2cqw; }

/* The hero shows a tablet from 700 px wide and a phone below that. */
.hero-device { width: 100%; }
.hero-device .frame { padding: 1.2cqw; border-radius: 3.1cqw; background: var(--frame); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.14); }
.hero-device .scr { padding-top: 0; border-radius: 2cqw; }
.hero-device .scr::before { display: none; }
@media (max-width: 699px) {
  .hero-device { width: min(70%, 260px); }
  .hero-device .frame { padding: 2.8cqw; border-radius: 14.5cqw; }
  .hero-device .scr { padding-top: 9cqw; border-radius: 11.8cqw; }
  .hero-device .scr::before { display: block; }
}

/* Before/after */
.compare { margin: 0 auto; max-width: 640px; }
.compare-paper { position: relative; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08); --pos: 50%; }
.compare-paper img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-after { clip-path: inset(0 0 0 var(--pos)); }
.compare-rule { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: #1d1d1f; }
.compare-tag { position: absolute; bottom: 12px; padding: 2px 8px; color: #1d1d1f; font-size: var(--text-small); }
.compare-tag.left { left: 8px; }
.compare-tag.right { right: 8px; }
.compare-knob { display: none; position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; background: #fff; color: #1d1d1f; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28); place-items: center; }
.compare-knob svg { width: 22px; height: 22px; }
.compare-paper[data-ready] { cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.compare-paper[data-ready] .compare-knob { display: grid; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.compare-paper:has(.compare-range:focus-visible) .compare-knob { outline: 2px solid #1b2bd6; outline-offset: 2px; }
.compare figcaption { margin-top: 12px; text-align: center; font-size: var(--text-small); color: var(--muted); }

/* A strict row of app screens at one size */
.screens { list-style: none; margin: clamp(48px, 5vw, 64px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 40px; }
.screens figure { margin: 0; }
.screens figcaption { margin: 20px auto 0; max-width: 300px; text-align: center; }
.screens figcaption strong { display: block; font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.012em; font-weight: 600; }
.screens figcaption span { display: block; margin-top: 6px; color: var(--muted); }
@media (max-width: 899px) {
  .screens { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .screens li:last-child:nth-child(odd) { grid-column: 1 / -1; width: calc(50% - 20px); justify-self: center; }
}
@media (max-width: 599px) {
  .screens { grid-template-columns: minmax(0, 1fr); }
  .screens li:last-child:nth-child(odd) { width: auto; }
}

/* Text columns */
.columns { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.columns.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.columns.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px; }
.columns h3 { margin-bottom: 8px; }
.columns p { color: var(--muted); }
.columns .num { display: block; margin-bottom: 8px; color: var(--muted); font-size: var(--text-small); }
@media (max-width: 899px) { .columns.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 734px) { .columns.three { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
@media (max-width: 599px) { .columns.four { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* FAQ */
.faq-list { max-width: 720px; margin-inline: auto; }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list details:first-child { border-top: 1px solid var(--line); }
.faq-list summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 44px; padding-block: 16px; font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: ""; flex: none; width: 13px; height: 13px; background: linear-gradient(var(--muted), var(--muted)) center / 100% 1.5px no-repeat, linear-gradient(var(--muted), var(--muted)) center / 1.5px 100% no-repeat; transition: transform 0.2s ease; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding-bottom: 20px; color: var(--muted); }

/* Closing section */
.closing { text-align: center; }
.closing p { margin: 16px auto 0; max-width: 560px; color: var(--muted); font-size: var(--text-lede); line-height: 1.35; }
.closing .button { margin-top: 24px; }
.closing .email { display: flex; justify-content: center; align-items: center; min-height: 44px; width: fit-content; margin: 4px auto 0; }

/* Inner pages -------------------------------------------------------- */
.page-head { max-width: 720px; margin-inline: auto; padding-top: var(--section); padding-bottom: clamp(32px, 4vw, 48px); }
.lede { font-size: var(--text-lede); line-height: 1.35; color: var(--muted); }
.page-head .lede { margin-top: 16px; }
.page-head:has(+ .contact-grid) { max-width: 960px; }
.meta { color: var(--muted); font-size: var(--text-small); }

.prose { max-width: 720px; margin-inline: auto; padding-bottom: var(--section); }
.prose p { margin-block: 1em; }
.prose h2 { font-size: var(--text-h3); margin: 2.25em 0 0.5em; line-height: 1.2; letter-spacing: -0.012em; }
.prose h3 { font-size: 1.125rem; margin: 1.75em 0 0.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-block: 0.45em; }
.prose details { border-bottom: 1px solid var(--line); }
.prose summary { cursor: pointer; font-weight: 600; padding-block: 12px; min-height: 44px; }
.note { padding: 12px 16px; border-radius: 12px; background: var(--alt); }
.table-scroll { max-width: 100%; }
table { border-collapse: collapse; width: 100%; margin-block: 1em; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); padding: 10px 14px 10px 0; }
th { font-weight: 600; }
code, kbd { font-family: var(--mono); font-size: max(1rem, 0.88em); background: var(--code-bg); padding: 1px 5px; border-radius: 5px; overflow-wrap: anywhere; }
ol.steps { padding-left: 1.4em; }

/* Imported StencilPort reading pages use .wrap.prose */
.wrap.prose { max-width: calc(720px + 2 * var(--gutter)); }
.sp-page { padding-top: var(--section); }
.sp-page h1 { margin-bottom: 16px; }

/* Stacks wide tables on phones; column names come from the imported headers. */
@media (max-width: 600px) {
  .table-scroll table, .table-scroll tbody, .table-scroll tr, .table-scroll td { display: block; width: 100%; }
  .table-scroll thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-scroll tr { padding-block: 10px; border-bottom: 1px solid var(--line); }
  .table-scroll td { border: 0; padding: 6px 0; }
  .table-scroll td::before { display: block; font-size: var(--text-small); color: var(--muted); }
  .table-scroll:has(th:nth-child(4)) td:nth-child(1)::before { content: "Switch"; }
  .table-scroll:has(th:nth-child(4)) td:nth-child(2)::before { content: "What is sent"; }
  .table-scroll:has(th:nth-child(4)) td:nth-child(3)::before { content: "Why"; }
  .table-scroll:has(th:nth-child(4)) td:nth-child(4)::before { content: "Kept for"; }
  .table-scroll:not(:has(th:nth-child(4))) td:nth-child(1)::before { content: "Problem"; }
  .table-scroll:not(:has(th:nth-child(4))) td:nth-child(2)::before { content: "Likely cause"; }
  .table-scroll:not(:has(th:nth-child(4))) td:nth-child(3)::before { content: "Fix"; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 72px); align-items: start; max-width: 960px; margin-inline: auto; padding-bottom: var(--section); }
@media (max-width: 833px) { .contact-grid { grid-template-columns: minmax(0, 1fr); } }
.contact-card h2 { font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.012em; margin-bottom: 8px; }
.contact-card p { color: var(--muted); margin-top: 12px; }
.contact-card .email { font-size: var(--text-lede); overflow-wrap: anywhere; }
.contact-card ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--muted); }
.form { display: grid; gap: 20px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: 1rem; }
.field .hint { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font: inherit; }
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--link); outline-offset: 0; }
.form .note-small { color: var(--muted); font-size: var(--text-small); }

/* StencilPort landing */
.sp-hero { padding-top: clamp(40px, 6vw, 80px); padding-bottom: clamp(32px, 5vw, 56px); text-align: center; }
.sp-hero .app-icon { width: clamp(84px, 9vw, 112px); height: auto; aspect-ratio: 1; border-radius: 22%; margin: 0 auto 24px; }
.sp-hero .lede { max-width: 640px; margin: 16px auto 0; }
.sp-hero .actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-top: 24px; }
.coming-soon { display: inline-flex; align-items: center; min-height: 44px; color: var(--muted); }
.sp-compare { padding-bottom: var(--section); }
.sp-features { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 0 0 clamp(32px, 4vw, 48px); margin: 0; }
.feature h2 { font-size: var(--text-h3); line-height: 1.2; letter-spacing: -0.012em; margin-bottom: 8px; }
.feature p { color: var(--muted); }
.sp-meta { max-width: 720px; margin-inline: auto; padding-bottom: var(--section); text-align: center; }
@media (max-width: 899px) { .sp-features { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) { .sp-features { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* 404 */
.notfound { padding-block: var(--section); text-align: center; }
.notfound .lede { margin-top: 16px; }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; margin-top: 24px; }
.notfound .code { color: var(--muted); margin-bottom: 8px; }

/* Footer ------------------------------------------------------------- */
.site-footer { background: var(--alt); color: var(--muted); padding-block: clamp(40px, 5vw, 56px) 32px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px; }
.footer-brand img { height: 22px; width: auto; margin-bottom: 12px; }
.footer-brand p { max-width: 340px; }
.site-footer h2 { font: 600 1rem/1.4 var(--font); letter-spacing: 0; color: var(--text); margin: 0 0 8px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: var(--text); }
.footer-base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); font-size: var(--text-small); }
@media (max-width: 734px) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .site-footer ul { gap: 0; }
  .site-footer li a { display: flex; align-items: center; min-height: 44px; }
  .footer-base a { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Motion: one subtle fade-up, for browsers with scroll timelines */
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  @keyframes fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
  @supports (animation-timeline: view()) {
    .reveal { animation: fade-up linear both; animation-timeline: view(); animation-range: entry 0% entry 28%; }
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .subnav, .skip-link, .actions, .menu { display: none; }
  body { background: #fff; color: #000; }
}
@media (max-width: 599px) {
  .device { width: min(100%, 248px); }
  .hero-device { width: min(70%, 248px); }
}
