/* Transformium — transformium.app
 *
 * One stylesheet, no JavaScript anywhere on the site. The vhost serves
 * `default-src 'none'; style-src 'self'; img-src 'self'`, so this file and the icon are the
 * only two things a page may load. An inline style attribute or a <style> block would be
 * blocked at runtime and the page would degrade silently rather than error — site-check.yml
 * fails the build on either, which is the only place that failure is visible.
 *
 * Colours come from the app icon (scripts/generate-icons.swift): the plate gradient runs
 * rgb(51,133,240) → rgb(26,87,199). Using the same two values here means the site and the
 * thing it is selling are not almost the same blue.
 */

:root {
  --blue:        #3385f0;
  --blue-deep:   #1a57c7;
  --ink:         #16181d;
  --ink-soft:    #4a5061;
  --rule:        #e2e5ec;
  --ground:      #ffffff;
  --ground-soft: #f6f8fb;
  --code-bg:     #f1f4f9;
  --focus:       #1a57c7;

  color-scheme: light dark;
}

/* Dark is a real design, not an inversion: the plate blue is already dark, so the accent
 * lightens rather than darkens to keep contrast against the ground above 4.5:1. */
@media (prefers-color-scheme: dark) {
  :root {
    --blue:        #78b0ff;
    --blue-deep:   #a9ccff;
    --ink:         #e9ecf2;
    --ink-soft:    #a7aebd;
    --rule:        #2b3040;
    --ground:      #101319;
    --ground-soft: #171b24;
    --code-bg:     #1c212c;
    --focus:       #78b0ff;
  }
}

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  -webkit-text-size-adjust: 100%;
}

/* A single measure for prose. The content here is explanatory rather than promotional, and
 * long lines are the fastest way to make an explanation go unread. */
.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

/* ── Skip link ────────────────────────────────────────────────────────────────────────────
 * Every page has a header before its content. Visually hidden until focused, then a real,
 * visible target — a skip link that stays invisible when focused is worse than none, because
 * a keyboard user has no way to tell it took. */
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--blue-deep);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 0 0 6px 0;
  z-index: 10;
}
.skip:focus { left: 0; }

@media (prefers-color-scheme: dark) {
  .skip { background: var(--blue); color: #0b0e14; }
}

/* ── Focus ────────────────────────────────────────────────────────────────────────────────
 * Never removed, never colour-only. A 2px ring with an offset reads against every background
 * on the site, including inside the blue hero. */
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ── Header ───────────────────────────────────────────────────────────────────────────── */
.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 650;
  font-size: 1.05rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { display: block; border-radius: 6px; }

.nav { display: flex; gap: 1.25rem; }
.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
}
.nav a:hover { color: var(--ink); text-decoration: underline; }
/* aria-current marks the page you are on. Styled with weight and colour together, so the cue
 * does not depend on distinguishing two greys. */
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ── Hero ─────────────────────────────────────────────────────────────────────────────── */
.hero { padding: 3rem 0 2.25rem; text-align: center; }
.hero img { display: block; margin: 0 auto 1.5rem; border-radius: 22%; }

h1 {
  font-size: clamp(2rem, 6vw, 2.9rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  margin: 0 0 0.9rem;
}

.tagline {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin: 0 auto;
  max-width: 34rem;
}

/* ── Downloads ────────────────────────────────────────────────────────────────────────────
 * `.download-btn` is asserted by deploy-website.sh in both directions: with DOWNLOADS_LIVE=0
 * no button may carry an href, and with =1 at least one must. Renaming this class silently
 * disables that gate, so it is a contract, not a style hook. */
.downloads {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin: 2rem 0 0;
}

/* .action-btn looks the same and carries no gate: the Buy button and the purchase page's Register
 * button. They are not downloads, and must not satisfy (or trip) the DOWNLOADS_LIVE check. */
.download-btn, .action-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 9px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  background: var(--blue-deep);
  color: #fff;
  border: 1px solid transparent;
}
.download-btn:hover, .action-btn:hover { background: var(--blue); }

@media (prefers-color-scheme: dark) {
  .download-btn, .action-btn { background: var(--blue); color: #0b0e14; }
  .download-btn:hover, .action-btn:hover { background: var(--blue-deep); }
}

/* The pre-release state. A <span>, not a disabled <button>: there is nothing to press, and a
 * button that does nothing is a promise the page cannot keep. It is dimmed AND labelled —
 * "not yet" has to survive being read aloud, not just looked at. */
.download-btn.is-inert {
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--rule);
  cursor: default;
}

.notice {
  margin: 1.75rem auto 0;
  max-width: 34rem;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--blue);
  border-radius: 8px;
  background: var(--ground-soft);
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: left;
}
.notice strong { color: var(--ink); }

/* ── Sections ─────────────────────────────────────────────────────────────────────────── */
section { padding: 2.5rem 0; border-top: 1px solid var(--rule); }
.hero { border-top: 0; }

h2 {
  font-size: 1.45rem;
  letter-spacing: -0.015em;
  margin: 0 0 1rem;
}
h3 {
  font-size: 1.05rem;
  margin: 1.75rem 0 0.4rem;
}
p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-deep); }
@media (prefers-color-scheme: dark) { a { color: var(--blue); } }

/* ── The two halves ───────────────────────────────────────────────────────────────────── */
.halves {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.half {
  border: 1px solid var(--rule);
  border-radius: 10px;
  padding: 1.25rem;
  background: var(--ground-soft);
}
.halves:not(:last-child) { margin-bottom: 1.25rem; }
.half h3 { margin-top: 0; }
.half p:last-child { margin-bottom: 0; }

/* ── Time comparison ──────────────────────────────────────────────────────────────────────
 * The figures are the page's headline claim. Each carries an id that check-website.py holds
 * to scripts/time_savings.py, so they are edited there, not here or in the markup. The fast
 * card is marked by its label and its figure's colour together, never by the border alone. */
.time {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0 0 0.9rem;
}
.is-fast { border-color: var(--blue-deep); }
.is-fast .time { color: var(--blue-deep); }

ol.steps { margin: 0 0 1rem; padding-left: 1.2rem; }
ol.steps li { margin-bottom: 0.35rem; }
ol.steps:last-child { margin-bottom: 0; }

/* ── Email address ────────────────────────────────────────────────────────────────────────
 * cloaki.app's technique, deliberately unchanged. The address is never written in a page:
 * the link's text is assembled here from data-user and data-domain, and its mailto: href spells
 * @ and . as character references. Together they defeat harvesters that grep page source for
 * name@domain, with no script — which the CSP would block anyway. Generated text cannot be
 * selected, so the address is click-to-mail rather than copy-paste; that is the trade.
 * check-website.py fails a page that writes an address in plain text, and fails the build if
 * this rule goes missing, since every .email-link would then render as an empty link. */
a.email-link::before {
  content: attr(data-user) "@" attr(data-domain);
}

/* ── Keys ─────────────────────────────────────────────────────────────────────────────────
 * <kbd> for real. The shortcut glyphs are the product's most-quoted detail and screen readers
 * announce ⌃⌘X as "up arrowhead command X" — so every one on the site carries a spelled-out
 * label in the markup rather than relying on the symbols alone. */
kbd {
  display: inline-block;
  font: inherit;
  font-size: 0.9em;
  padding: 0.1em 0.45em;
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--code-bg);
  color: var(--ink);
  white-space: nowrap;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--code-bg);
  padding: 0.12em 0.35em;
  border-radius: 4px;
}

pre {
  background: var(--code-bg);
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 1rem;
  overflow-x: auto;
  font-size: 0.9rem;
  line-height: 1.55;
}
pre code { background: none; padding: 0; }

/* ── Lists ────────────────────────────────────────────────────────────────────────────── */
.plain { list-style: none; margin: 0; padding: 0; }
.plain li { padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.plain li:last-child { border-bottom: 0; }

ul.bullets { margin: 0 0 1rem; padding-left: 1.2rem; }
ul.bullets li { margin-bottom: 0.4rem; }

/* ── Details ──────────────────────────────────────────────────────────────────────────────
 * <details> rather than a scripted accordion: it is keyboard-operable, announced correctly,
 * and works with the CSP that forbids script. */
details {
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0 1rem;
  margin-bottom: 0.6rem;
  background: var(--ground-soft);
}
summary {
  cursor: pointer;
  font-weight: 600;
  padding: 0.85rem 0;
}
details[open] summary { border-bottom: 1px solid var(--rule); margin-bottom: 0.85rem; }
details > :last-child { margin-bottom: 0.85rem; }

/* ── Footer ───────────────────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--rule);
  padding: 2rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  flex-wrap: wrap;
}
.footer a { color: var(--ink-soft); }
.footer nav { display: flex; gap: 1rem; }

/* Respect the setting. Nothing on this site animates today; this is here so that adding a
 * transition later cannot quietly ignore it. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* The registration key on the purchase-confirmation page (served by server/app/pages.py). A key is
   139 characters with no spaces, so it wraps anywhere rather than scrolling sideways on a phone. */
pre.license-key {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 1rem;
  user-select: all;
}
