/* deflickerapp.com. Direction and the reason for each choice: DESIGN.md next to this file. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-600-soft-latin.woff2") format("woff2");
}

:root {
  --paper: #faf7f2;
  --paper-deep: #f1ece4;
  --ink: #1c1a21;
  --ink-soft: #4b4654;
  --line: #cfc6b8;
  --night: #17141c;
  --night-text: #f3eee7;
  --night-soft: #b9b1c2;
  --night-line: #3a3442;
  --amber: #f0a23a;
  --amber-deep: #8a5200;

  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --text: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 18px;

  --gutter: clamp(16px, 4vw, 40px);
  --page: 1180px;
  --measure: 68ch;
  color-scheme: light;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
img, video, svg { display: block; max-width: 100%; }
img, video { height: auto; }
h1, h2, h3 { margin: 0 0 0.5em; text-wrap: balance; }
h1, h2 { font-family: var(--display); font-weight: 600; font-optical-sizing: auto; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.15rem, 1.5rem + 2.9vw, 3.05rem); line-height: 1.08; }
h2 { font-size: clamp(1.6rem, 1.3rem + 1.3vw, 2.1rem); line-height: 1.15; }
h3 { font-size: 1.15rem; line-height: 1.3; font-weight: 600; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; }
strong { font-weight: 600; }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--paper-deep); border-radius: var(--r-sm); padding: 0.1em 0.35em; }
pre { overflow-x: auto; background: var(--night); color: var(--night-text); border-radius: var(--r-md); padding: 14px 16px; font-size: 0.9rem; line-height: 1.5; }
pre code { background: none; padding: 0; color: inherit; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }
.night :focus-visible { outline-color: var(--amber); }

.wrap { width: 100%; max-width: var(--page); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -80px; z-index: 30;
  background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: var(--r-sm);
}
.skip-link:focus { top: 12px; }
.muted { color: var(--ink-soft); }
.small { font-size: 0.9375rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-weight: 600; font-size: 1.0625rem; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; text-decoration: none; font-size: 0.9375rem; }
.nav a:hover { text-decoration: underline; }
.nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.nav .nav-get {
  margin-left: 8px; background: var(--ink); color: var(--paper);
  border-radius: var(--r-sm); padding: 0 16px; font-weight: 600;
}
.nav .nav-get:hover { text-decoration: none; background: #34303d; }
@media (max-width: 600px) { .nav .nav-minor { display: none; } }

/* ---------- buttons, badge, links ---------- */
.store-badge { display: inline-block; line-height: 0; text-decoration: none; }
.store-badge img { height: 56px; width: auto; }
.store-badge.small img { height: 48px; }
.soon { margin: 0; font-weight: 600; font-size: 1.0625rem; min-height: 44px; display: inline-flex; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; margin-top: 28px; }
.text-link { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }

/* ---------- footage plates ---------- */
.plate { margin: 0; }
.plate-frame {
  position: relative; background: var(--night); border-radius: var(--r-lg); overflow: hidden;
  box-shadow: 0 1px 2px rgba(28, 26, 33, 0.12), 0 18px 40px -18px rgba(28, 26, 33, 0.45);
}
.plate-frame video, .plate-frame img { width: 100%; }
.plate figcaption { margin-top: 12px; font-size: 0.9375rem; color: var(--ink-soft); max-width: 60ch; }
.demo-toggle {
  position: absolute; right: 12px; bottom: 12px;
  width: 44px; height: 44px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: rgba(23, 20, 28, 0.82); color: var(--night-text);
}
.demo-toggle:hover { background: var(--night); }
.demo-toggle[hidden] { display: none; }
.demo-toggle svg { width: 18px; height: 18px; }
.demo-toggle .i-pause, .demo-toggle.is-playing .i-play { display: none; }
.demo-toggle.is-playing .i-pause { display: block; }
.demo-toggle:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 50%; }

/* ---------- home: hero ---------- */
.hero { padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 88px); }
/* phone: headline, then the footage, then the pitch; wide: text left, footage right */
.hero-grid { display: grid; gap: 24px; grid-template-areas: "head" "media" "body"; }
.hero-head { grid-area: head; max-width: 15ch; margin: 0; }
.hero .plate { grid-area: media; }
.hero-body { grid-area: body; }
.lead { font-size: 1.1875rem; line-height: 1.55; color: var(--ink-soft); max-width: 46ch; }
.hero .fine { margin-top: 18px; font-size: 0.9375rem; color: var(--ink-soft); }
.hero .cta-row { margin-top: 22px; }
@media (max-width: 599px) {
  .lead { font-size: 1.0625rem; }
  .hero .plate figcaption { font-size: 0.875rem; }
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "head media" "body media"; gap: 0 56px; }
  .hero-head { align-self: end; margin-bottom: 20px; }
  .hero-body { align-self: start; }
  .hero .plate { align-self: center; }
  .hero .cta-row { margin-top: 28px; }
}

/* ---------- home: the dark evidence band ---------- */
.night { background: var(--night); color: var(--night-text); }
.night a { color: var(--night-text); }
.night .muted, .night figcaption { color: var(--night-soft); }
.band { padding: clamp(56px, 8vw, 88px) 0; }
.band-grid { display: grid; gap: 40px; }
.band h2 { max-width: 20ch; }
@media (min-width: 900px) {
  .band-grid { grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 64px; align-items: start; }
  .band-grid > .band-text { grid-column: 2; grid-row: 1; }
  .band-grid > .compare-figure { grid-column: 1; grid-row: 1 / span 2; }
}
.measure-line { font-size: 1.0625rem; max-width: 52ch; }
.measure-line strong { color: var(--amber); font-weight: 600; }

/* brightness trace */
.trace { margin: 28px 0 0; }
.trace svg { width: 100%; height: auto; }
.trace .grid-line { stroke: var(--night-line); stroke-width: 1; }
.trace .before { fill: none; stroke: var(--night-soft); stroke-width: 1.5; stroke-linejoin: round; }
.trace .after { fill: none; stroke: var(--amber); stroke-width: 3.5; stroke-linejoin: round; stroke-linecap: round; }
.trace text { font: 400 13px var(--text); fill: var(--night-soft); }
.trace text.lab-before { fill: var(--night-text); font-weight: 600; }
.trace text.lab-after { fill: var(--amber); font-weight: 600; }
.trace figcaption { margin-top: 10px; font-size: 0.9375rem; max-width: 60ch; }

/* drag-to-compare */
.compare-figure { margin: 0; }
.compare {
  position: relative; aspect-ratio: 9 / 16; border-radius: var(--r-lg); overflow: hidden;
  touch-action: pan-y; cursor: ew-resize; user-select: none; --pos: 50%; background: #000;
}
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.compare .before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; margin-left: -1px; background: var(--night-text); pointer-events: none; }
.compare-handle {
  position: absolute; top: 50%; left: var(--pos); width: 44px; height: 44px; margin: -22px 0 0 -22px;
  border-radius: 50%; background: var(--amber); color: var(--ink); display: grid; place-items: center; pointer-events: none;
}
.compare-handle svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.compare-label {
  position: absolute; top: 12px; padding: 4px 9px; border-radius: var(--r-sm);
  font: 600 0.8125rem/1.3 var(--text); letter-spacing: 0.02em; pointer-events: none;
}
.compare-label.l { left: 12px; background: rgba(23, 20, 28, 0.85); color: var(--night-text); }
.compare-label.r { right: 12px; background: var(--amber); color: var(--ink); }
.compare input[type="range"] { position: absolute; inset: auto 0 0 0; width: 100%; opacity: 0; pointer-events: none; }
.compare:has(input:focus-visible) { outline: 3px solid var(--amber); outline-offset: 3px; }
.compare-figure figcaption { margin-top: 12px; font-size: 0.9375rem; }

/* ---------- home: engines ---------- */
.engines { padding: clamp(56px, 8vw, 80px) 0 clamp(40px, 6vw, 64px); }
.engines-grid { display: grid; gap: 40px; }
.engines-grid > div { min-width: 0; }
@media (min-width: 1000px) {
  .engines-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: start; }
}
.engines .intro { max-width: 58ch; }
.compare-table { width: 100%; border-collapse: collapse; font-size: 0.96875rem; }
.compare-table th, .compare-table td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.compare-table thead th { font-family: var(--display); font-size: 1.25rem; font-weight: 600; border-bottom: 2px solid var(--ink); padding-top: 0; }
.compare-table tbody th { font-weight: 600; width: 22%; color: var(--ink); }
.compare-table td { color: var(--ink-soft); }
@media (max-width: 640px) {
  .compare-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .compare-table tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .compare-table tbody th { display: block; width: auto; padding: 0 0 6px; border: 0; font-family: var(--display); font-size: 1.125rem; }
  .compare-table td { display: block; padding: 2px 0 4px; border: 0; }
  .compare-table td::before { content: attr(data-label) ": "; font-weight: 600; color: var(--ink); }
}
.research { margin-top: 22px; max-width: 58ch; }

/* ---------- home: steps in the app ---------- */
.steps { padding: clamp(48px, 7vw, 72px) 0; background: var(--paper-deep); }
.steps h2 { max-width: 22ch; }
.steps > .wrap > p { max-width: 60ch; }
.shots { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 28px 20px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .shots { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; } }
.shots img { border-radius: var(--r-lg); border: 1px solid var(--line); background: var(--night); }
.shots h3 { margin: 14px 0 4px; font-size: 1.0625rem; }
.shots p { font-size: 0.9375rem; color: var(--ink-soft); margin: 0; }
.steps-list { max-width: 62ch; margin: 24px 0 0; padding-left: 1.4em; }
.steps-list li { margin-bottom: 14px; padding-left: 4px; }
.steps-list li::marker { font-family: var(--display); font-weight: 600; }

/* ---------- home: prices ---------- */
.prices { padding: clamp(56px, 8vw, 88px) 0 clamp(40px, 6vw, 56px); }
.prices-inner { max-width: 860px; }
.price-list { list-style: none; padding: 0; margin: 28px 0 0; border-top: 2px solid var(--ink); }
.price-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 24px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.price-list .name { font-weight: 600; font-size: 1.0625rem; }
.price-list .what { grid-column: 1; color: var(--ink-soft); font-size: 0.96875rem; }
.price-list .amount { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-family: var(--display); font-size: 1.5rem; line-height: 1.2; white-space: nowrap; }
.price-list .amount span { display: block; font-family: var(--text); font-size: 0.875rem; color: var(--ink-soft); }
.price-notes { margin-top: 20px; max-width: 64ch; font-size: 0.9375rem; color: var(--ink-soft); }
.prices .cta-row { margin-top: 24px; }

/* ---------- home: questions and guides ---------- */
.qa { padding: clamp(48px, 7vw, 72px) 0 clamp(64px, 9vw, 104px); border-top: 1px solid var(--line); }
.qa-grid { display: grid; gap: 56px; }
@media (min-width: 1000px) { .qa-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 72px; } }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 16px; align-items: center; min-height: 56px; padding: 12px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary h3 { margin: 0; font-size: 1.0625rem; }
.faq summary::after {
  content: ""; flex: none; width: 10px; height: 10px; margin-right: 6px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg) translateY(-3px);
}
.faq details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq .answer { padding: 0 0 16px; color: var(--ink-soft); max-width: 62ch; }
.faq .answer p:last-child { margin-bottom: 0; }
.guide-index { list-style: none; padding: 0; margin: 16px 0 0; }
.guide-index li { border-top: 1px solid var(--line); }
.guide-index a { display: block; padding: 14px 0; text-decoration: none; }
.guide-index a:hover .gi-title { text-decoration: underline; }
.gi-title { display: block; font-weight: 600; }
.gi-meta { display: block; font-size: 0.875rem; color: var(--ink-soft); margin-top: 2px; }

/* ---------- guides index page ---------- */
.page-head { padding: clamp(32px, 6vw, 64px) 0 8px; }
.page-head h1 { max-width: 22ch; }
.guide-rows { list-style: none; padding: 0; margin: 24px 0 0; max-width: 820px; border-top: 2px solid var(--ink); }
.guide-rows li { border-bottom: 1px solid var(--line); }
.guide-rows a { display: block; padding: 22px 0; text-decoration: none; }
.guide-rows h2 { font-size: clamp(1.3rem, 1.15rem + 0.6vw, 1.55rem); margin: 0 0 6px; }
.guide-rows a:hover h2 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.guide-rows p { margin: 0; color: var(--ink-soft); max-width: 64ch; }
.guide-rows .gi-meta { margin-top: 8px; }
.guides-page { padding-bottom: clamp(56px, 8vw, 88px); }

/* ---------- article ---------- */
.breadcrumb ol { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 0.9375rem; color: var(--ink-soft); }
.breadcrumb li + li::before { content: "/"; margin: 0 8px; color: var(--line); }
.breadcrumb a { color: var(--ink-soft); }
.article { display: grid; gap: 0 64px; padding-top: clamp(28px, 5vw, 56px); padding-bottom: clamp(40px, 6vw, 64px); }
.article-head { grid-area: head; }
.article-head h1 { max-width: 22ch; }
.article-meta { color: var(--ink-soft); font-size: 0.9375rem; }
.toc { grid-area: toc; margin: 8px 0 28px; padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--r-md); max-width: var(--measure); }
.toc-title { font-weight: 600; margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 1.3em; font-size: 0.9375rem; }
.toc li { margin: 8px 0; line-height: 1.45; }
.prose { grid-area: prose; max-width: var(--measure); min-width: 0; }
.article { grid-template-areas: "head" "toc" "prose"; }
@media (min-width: 1100px) {
  .article { grid-template-columns: 230px minmax(0, var(--measure)); grid-template-areas: ". head" "toc prose"; }
  .toc { position: sticky; top: 84px; align-self: start; border: 0; padding: 4px 0 0; margin: 0; }
}
.prose h2 { margin-top: 1.8em; }
.prose h3 { margin-top: 1.4em; }
.prose li { margin-bottom: 0.45em; }
.prose .lead { max-width: none; }
.callout { background: var(--paper-deep); border-radius: var(--r-md); padding: 18px 20px; margin: 1.6em 0; }
.callout-title { display: block; font-weight: 600; margin-bottom: 4px; }
.callout p:last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 1.4em 0; border: 1px solid var(--line); border-radius: var(--r-md); }
.table-wrap table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 0.9375rem; }
.table-wrap th, .table-wrap td { text-align: left; vertical-align: top; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.table-wrap thead th { background: var(--paper-deep); font-weight: 600; }
.table-wrap tbody tr:last-child > * { border-bottom: 0; }
.howto { padding-left: 1.5em; margin: 1.2em 0 1.6em; }
.howto li { margin-bottom: 1.1em; padding-left: 4px; }
.howto li::marker { font-family: var(--display); font-weight: 600; font-size: 1.15rem; }
.howto h3 { margin: 0 0 4px; }
.howto p { margin: 0; }
.figure { margin: 1.8em 0; }
.figure figcaption { margin-top: 10px; font-size: 0.9375rem; color: var(--ink-soft); }
.chart { background: var(--paper-deep); border-radius: var(--r-md); }
.chart .ax { stroke: var(--line); stroke-width: 1; }
.chart .wave { stroke: var(--ink); stroke-width: 2.2; fill: none; }
.chart .tick { stroke: var(--ink-soft); stroke-width: 1; stroke-dasharray: 3 4; }
.chart .dot { fill: var(--ink); stroke: var(--paper-deep); stroke-width: 2; }
.chart .bar { fill: var(--ink-soft); }
.chart text { fill: var(--ink-soft); font: 400 17px var(--text); }
.chart text.t { fill: var(--ink); font-weight: 600; }

/* end-of-article app box */
.app-box {
  display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 4px 18px; align-items: start;
  border: 1px solid var(--ink); border-radius: var(--r-md); padding: 22px; margin: 8px 0 0; max-width: var(--measure);
}
.app-box img.app-icon { width: 64px; height: 64px; border-radius: 14px; grid-row: 1 / span 3; }
.app-box h2 { font-size: 1.4rem; margin: 0 0 6px; }
.app-box p { margin: 0 0 14px; color: var(--ink-soft); }
@media (max-width: 480px) {
  .app-box { grid-template-columns: minmax(0, 1fr); }
  .app-box img.app-icon { grid-row: auto; }
}
.after-article { padding-bottom: clamp(56px, 8vw, 88px); }
.more-guides { margin-top: 48px; max-width: var(--measure); }
.more-guides h2 { font-size: 1.4rem; }

/* ---------- 404 ---------- */
.notfound { padding: clamp(48px, 9vw, 112px) 0; max-width: 640px; }
.notfound svg { width: 100%; max-width: 420px; height: auto; margin-bottom: 28px; }
.notfound .flat { stroke: var(--amber-deep); stroke-width: 3; fill: none; stroke-linecap: round; stroke-linejoin: round; }
.notfound .jag { stroke: var(--ink-soft); stroke-width: 1.5; fill: none; stroke-linejoin: round; }
.notfound .links { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 20px; }

/* ---------- footer ---------- */
.site-footer { background: var(--night); color: var(--night-soft); padding: 40px 0 32px; font-size: 0.9375rem; }
.site-footer a { color: var(--night-text); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; align-items: flex-start; }
.footer-brand { display: flex; gap: 12px; align-items: center; max-width: 34ch; }
.footer-brand img { width: 40px; height: 40px; border-radius: 10px; flex: none; }
.footer-brand p { margin: 0; }
.footer-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 4px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; }
.footer-legal { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--night-line); font-size: 0.8125rem; }
.footer-legal p { margin: 0 0 4px; }

/* ---------- motion: nothing moves for people who ask for less ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
a, .nav .nav-get, .demo-toggle { transition: background-color 120ms ease-out, text-decoration-thickness 120ms ease-out; }
