/* =========================================================================
   Simple Works — the site's look, for every page.
   No web fonts, no framework. Light and dark follow the system (prefers-color-scheme).
   Animations only move transform and opacity, and stop for prefers-reduced-motion (at the end).
   The demos' stages have their own file, stage.css, loaded only where there is a demo.
   ========================================================================= */

/* ---------- tokens ---------- */
:root {
  --bg: #fbfbfd;
  --bg-2: #f2f2f5;
  --card: #ffffff;
  --text: #1d1d1f;
  --text-2: #5e5e63;
  --line: rgba(0, 0, 0, .09);
  --glass: rgba(251, 251, 253, .74);
  --link: #0066cc;
  --focus: #0071e3;
  --skel: rgba(0, 0, 0, .08);
  --ok: #1f9d47;

  /* The brand: the three keycaps of the logo. They also paint the site-wide gradients. */
  --b1: #ff5c7c; --b2: #5ea2ff; --b3: #a07bff;
  --grad: linear-gradient(90deg, #f0204a, #2563eb 50%, #6a3ce6);
  --grad-ink: linear-gradient(90deg, #d0103b, #1a5fd8, #5f33d6);

  --key-bg: linear-gradient(180deg, #ffffff, #f1f1f4);
  --key-border: rgba(0, 0, 0, .13);
  --key-shadow: 0 1.5px 0 rgba(0, 0, 0, .14), 0 2px 6px -2px rgba(0, 0, 0, .12);

  --shadow-lg: 0 40px 90px -30px rgba(20, 20, 40, .35), 0 12px 30px -12px rgba(20, 20, 40, .18);
  --shadow-md: 0 18px 40px -18px rgba(20, 20, 40, .28), 0 4px 12px -6px rgba(20, 20, 40, .12);

  --ease: cubic-bezier(.2, .75, .2, 1);
  --header-h: 52px;
  --gutter: 22px;
  --radius: 26px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;

  /* Until a page sets an app, its accents are the brand's. */
  --a1: var(--b1); --a2: #f0204a; --ink: #d0103b; --btn: var(--text);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-2: #0e0e10;
    --card: #161618;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --line: rgba(255, 255, 255, .11);
    --glass: rgba(16, 16, 18, .72);
    --link: #2997ff;
    --focus: #2997ff;
    --skel: rgba(255, 255, 255, .1);
    --ok: #30d158;
    --grad: linear-gradient(90deg, var(--b1), var(--b2) 50%, var(--b3));
    --grad-ink: linear-gradient(90deg, #ff6f8e, #6eabff, #b59bff);
    --key-bg: linear-gradient(180deg, #3a3a3f, #2b2b2f);
    --key-border: rgba(255, 255, 255, .09);
    --key-shadow: 0 1.5px 0 rgba(0, 0, 0, .7), 0 2px 8px -2px rgba(0, 0, 0, .6);
    --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, .9), 0 0 0 .5px rgba(255, 255, 255, .1);
    --shadow-md: 0 18px 40px -18px rgba(0, 0, 0, .8), 0 0 0 .5px rgba(255, 255, 255, .06);
    --ink: #ff6f8e;
  }
}

/* Each app's color, from the end of its icon's gradient (docs/DESIGN.md). --ink is for text, --btn is a
   button behind white text: both are darker than the icon color so they stay readable. */
[data-app="music-keys"]      { --a1: #ff5c7c; --a2: #f0204a; --ink: #d0103b; --btn: #d6153f; --g1: #f0365c; --g2: #c80f39; }
[data-app="window-keys"]     { --a1: #5ea2ff; --a2: #2563eb; --ink: #1a5fd8; --btn: #2160e4; --g1: #2f7af5; --g2: #1748c9; }
[data-app="screenshot-keys"] { --a1: #a07bff; --a2: #6a3ce6; --ink: #5f33d6; --btn: #6338e0; --g1: #8152f2; --g2: #5426cf; }
[data-app="contacts-keys"]   { --a1: #57bbb1; --a2: #0f9e8f; --ink: #0a7569; --btn: #0b766b; --g1: #13a594; --g2: #0a7569; }
[data-app="mixtape"]         { --a1: #ffb347; --a2: #e8590c; --ink: #b93f08; --btn: #c2460b; --g1: #f2711c; --g2: #b93f08; }
[data-app="water-break"]     { --a1: #55c4e3; --a2: #0a9ec2; --ink: #077590; --btn: #087893; --g1: #16a8cc; --g2: #077590; }
@media (prefers-color-scheme: dark) {
  [data-app="music-keys"]      { --ink: #ff6f8e; --g1: var(--a1); --g2: var(--a2); }
  [data-app="window-keys"]     { --ink: #6eabff; --g1: var(--a1); --g2: var(--a2); }
  [data-app="screenshot-keys"] { --ink: #b59bff; --g1: var(--a1); --g2: var(--a2); }
  [data-app="contacts-keys"]   { --ink: #5fd4c6; --g1: #6fd6ca; --g2: #14b3a2; }
  [data-app="mixtape"]         { --ink: #ffa05e; --g1: #ffc062; --g2: #f26b1d; }
  [data-app="water-break"]     { --ink: #63d0ee; --g1: #7fdcf3; --g2: #16b3db; }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  transition: opacity .25s ease;
}
/* While a page in another language is being translated, it stays hidden (the head script sets this). */
html.t-pending body { opacity: 0; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
kbd { font-family: var(--font); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 12px; top: 10px; z-index: 100; padding: 10px 16px; border-radius: 10px;
  background: var(--text); color: var(--bg); transform: translateY(-160%); transition: transform .2s;
}
.skip:focus { transform: none; text-decoration: none; }
.icon { width: 1em; height: 1em; flex: none; }

.wrap { width: min(1120px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.wrap-narrow { width: min(780px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.section { padding: clamp(88px, 12vw, 168px) 0; position: relative; }
.section.tight { padding-top: clamp(40px, 6vw, 80px); }
.alt { background: var(--bg-2); }
.center { text-align: center; }
.center .lead { margin-inline: auto; }
/* Centered sections center their titles; the cards and lists inside them read from the left. */
.center :is(.app-grid, .pairs, .cards, .lt-grid, .ks-grid, .friend, .facts, .faq-list, .shortcuts) { text-align: left; }

/* ---------- type ---------- */
.eyebrow { font-size: clamp(15px, 1.5vw, 19px); font-weight: 600; letter-spacing: -.005em; color: var(--text-2); margin-bottom: 12px; }
.h-hero { font-size: clamp(46px, 8.6vw, 104px); line-height: 1; letter-spacing: -.045em; font-weight: 700; }
.h-xl { font-size: clamp(40px, 6.4vw, 80px); line-height: 1.04; letter-spacing: -.035em; font-weight: 700; }
.h-l  { font-size: clamp(34px, 4.8vw, 56px); line-height: 1.07; letter-spacing: -.03em; font-weight: 700; }
.h-m  { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; letter-spacing: -.025em; font-weight: 700; }
.lead { font-size: clamp(19px, 2.1vw, 23px); line-height: 1.42; color: var(--text-2); max-width: 36em; margin-top: 20px; letter-spacing: -.012em; }
.grad-text {
  background-image: var(--grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
}
[data-app] .grad-text, .grad-app { background-image: linear-gradient(90deg, var(--g1, var(--a1)), var(--g2, var(--a2))); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-text { background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent; display: inline-block; }
.muted { color: var(--text-2); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 46px; padding: 0 24px; border-radius: 999px; border: 0;
  font-size: 17px; font-weight: 500; letter-spacing: -.01em; line-height: 1;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s, opacity .25s;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.97); }
.btn .icon { width: 17px; height: 17px; }
.btn-sm { min-height: 32px; padding: 0 14px; font-size: 13px; gap: 5px; }
.btn-sm .icon { width: 13px; height: 13px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--text); color: var(--bg); }
.btn-primary:hover { opacity: .88; }
.btn-accent { background: var(--btn); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 8px 22px -10px var(--btn); }
.btn-accent:hover { opacity: .92; }
.btn-secondary { background: color-mix(in srgb, var(--text) 7%, transparent); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-secondary:hover { background: color-mix(in srgb, var(--text) 12%, transparent); }
.btn-link { color: var(--link); padding: 0 10px; }
.btn-link .icon { width: 15px; height: 15px; transition: transform .25s var(--ease); }
.btn-link:hover .icon { transform: translateX(3px); }
/* A store button for an app that isn't on the App Store yet: grey, with a dot, and not a link. */
.btn[aria-disabled="true"] {
  background: var(--bg-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line);
  cursor: default; opacity: 1;
}
.btn[aria-disabled="true"]:active { transform: none; }
.btn[aria-disabled="true"]::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .55; margin-right: 2px; }
.btn-heart .icon { color: #ff4f6f; }
.btn-primary.btn-heart .icon { color: #ff5c7c; }

/* status chips: on the App Store, coming soon, in study */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: 0; color: var(--text-2);
  background: color-mix(in srgb, var(--text) 6%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  white-space: nowrap;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .6; }
.chip[data-status="live"] { color: var(--ok); }
.chip[data-status="study"]::before { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; }
.chip-plain::before { display: none; }

/* ---------- reading progress ---------- */
.scroll-progress {
  position: fixed; inset: 0 0 auto 0; height: 2px; z-index: 60; pointer-events: none;
  background: linear-gradient(90deg, var(--b1), var(--b2), var(--b3));
  transform-origin: 0 50%; transform: scaleX(var(--sp, 0));
}
[data-app] .scroll-progress { background: linear-gradient(90deg, var(--a1), var(--a2)); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: var(--glass);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.nav { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand .icon { width: 26px; height: 26px; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { color: var(--text-2); font-size: 13px; padding: 6px 10px; border-radius: 8px; transition: color .2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); text-decoration: none; }
.nav-right { display: flex; align-items: center; gap: 10px; }
.lang { display: inline-flex; padding: 2px; border-radius: 999px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.lang button {
  border: 0; background: transparent; padding: 4px 10px; min-height: 28px; border-radius: 999px;
  font-size: 12px; font-weight: 600; letter-spacing: .02em; color: var(--text-2); cursor: pointer;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
.lang button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .14), 0 0 0 .5px var(--line); }
.menu-btn {
  display: none; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: transparent;
  color: var(--text); cursor: pointer; align-items: center; justify-content: center;
}
.menu-btn .icon { width: 22px; height: 22px; }
.menu-btn .i-close { display: none; }
.menu-open .menu-btn .i-close { display: block; }
.menu-open .menu-btn .i-menu { display: none; }
.menu-sheet {
  position: absolute; inset: var(--header-h) 0 auto 0; z-index: 49; display: none;
  max-height: calc(100svh - var(--header-h)); overflow: auto;
  background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-md);
  padding: 12px 0 22px;
}
@media (max-width: 1000px) { .menu-open .menu-sheet { display: block; } }
.menu-sheet .wrap { display: grid; gap: 22px; }
.menu-apps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.menu-apps a { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; color: var(--text); font-weight: 600; font-size: 15px; }
.menu-apps a:hover { background: var(--bg-2); text-decoration: none; }
.menu-apps img { width: 36px; height: 36px; }
.menu-links { display: grid; gap: 2px; }
.menu-links a { padding: 10px 8px; color: var(--text); font-size: 17px; font-weight: 500; border-top: 1px solid var(--line); }
.menu-links a:hover { text-decoration: none; color: var(--link); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 52px 0 44px; font-size: 13px; color: var(--text-2); }
.ft-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 32px 48px; }
.ft-brand p { margin-top: 10px; max-width: 22em; }
.ft-nav { display: flex; flex-wrap: wrap; gap: 28px 64px; }
.ft-nav a { display: block; color: var(--text-2); padding: 4px 0; }
.ft-nav a:hover { color: var(--text); }
.ft-h { font-weight: 600; color: var(--text); margin-bottom: 6px; }
.ft-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.ft-line { display: flex; align-items: center; gap: 8px; color: var(--text); }
.ft-line .icon { width: 16px; height: 16px; color: var(--ok); }
.ft-line a { color: var(--link); }

/* ---------- shared blocks ---------- */
.cards { display: grid; gap: 20px; margin-top: 56px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { position: relative; background: var(--card); border-radius: var(--radius); padding: 30px 28px; box-shadow: inset 0 0 0 1px var(--line); }
.alt .card { background: var(--card); }
.card > .icon { width: 30px; height: 30px; margin-bottom: 16px; color: var(--ink); }
.card h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 8px; }
.card p { color: var(--text-2); font-size: 16px; }
.card p + p { margin-top: 10px; }

/* the name and its two readings */
.defs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 880px; margin: 52px auto 0; }
.def { text-align: left; background: var(--card); border-radius: 24px; padding: 28px 30px; box-shadow: inset 0 0 0 1px var(--line); }
.def-word { font-size: clamp(30px, 3.4vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.1; }
.def-kind { margin-top: 6px; font-size: 15px; font-style: italic; color: var(--text-2); }
.def-text { margin-top: 10px; font-size: 19px; color: var(--text-2); }

/* ---------- home: hero ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(72px, 9vw, 120px); position: relative; overflow: hidden; text-align: center; }
.hero .lead { margin-inline: auto; }
.hero-glow {
  position: absolute; inset: -10% -10% auto; height: 720px; pointer-events: none; opacity: .55;
  background:
    radial-gradient(38% 50% at 22% 30%, color-mix(in srgb, var(--b1) 45%, transparent), transparent 70%),
    radial-gradient(38% 50% at 50% 18%, color-mix(in srgb, var(--b2) 45%, transparent), transparent 70%),
    radial-gradient(38% 50% at 78% 30%, color-mix(in srgb, var(--b3) 45%, transparent), transparent 70%);
  filter: blur(40px);
}
@media (prefers-color-scheme: dark) { .hero-glow { opacity: .32; } }
.hero-inner { position: relative; }
.hero-icons { display: flex; justify-content: center; flex-wrap: wrap; gap: clamp(8px, 1.6vw, 18px); margin-bottom: clamp(28px, 4vw, 40px); }
.hero-icons a { display: block; border-radius: 22%; }
.hero-icon {
  width: clamp(58px, 8.4vw, 96px); height: auto;
  filter: drop-shadow(0 16px 22px rgba(30, 20, 60, .22));
  animation: float 7s ease-in-out infinite, pop .9s var(--ease) both;
  animation-delay: calc(var(--i, 0) * -1.15s), calc(var(--i, 0) * .07s);
  transition: scale .3s var(--ease);
}
.hero-icons a:hover .hero-icon { scale: 1.06; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pop { from { opacity: 0; scale: .7; } to { opacity: 1; scale: 1; } }
.hero-ctas { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 10px 18px; margin-top: 34px; }
.pills { list-style: none; padding: 0; margin: 34px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.pills li {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px 7px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--card) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line);
  font-size: 14px; color: var(--text-2);
}
.pills .icon { width: 16px; height: 16px; color: var(--text); }

/* ---------- home: the apps ---------- */
.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 56px; }
.app-card {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 10px;
  background: var(--card); border-radius: var(--radius); padding: 30px 28px 26px; color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .9s var(--ease);
}
.app-card::before {
  content: ""; position: absolute; inset: -40% -40% auto auto; width: 70%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 24%, transparent), transparent);
  pointer-events: none;
}
.app-card:hover { text-decoration: none; transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md); }
.app-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.app-card img { width: 64px; filter: drop-shadow(0 10px 14px rgba(0, 0, 0, .16)); }
.app-card h3 { font-size: 24px; letter-spacing: -.02em; }
.app-card-task { font-weight: 600; }
.app-card-friend { color: var(--text-2); font-size: 15px; }
.app-card-more { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 4px; color: var(--ink); font-weight: 500; }
.app-card-more .icon { width: 14px; height: 14px; transition: transform .25s var(--ease); }
.app-card:hover .app-card-more .icon { transform: translateX(3px); }
.app-card-plat { display: inline-flex; gap: 4px; align-items: center; font-size: 12px; color: var(--text-2); }
.app-card-plat .icon { width: 14px; height: 14px; }

/* ---------- home: friends, not replacements ---------- */
.pairs { list-style: none; padding: 0; margin: 56px auto 0; max-width: 940px; display: grid; gap: 14px; }
.pair {
  display: grid; grid-template-columns: minmax(0, 13em) 34px minmax(0, 13em) minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 18px 22px; border-radius: 22px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.pair-apple { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text-2); }
.pair-apple .icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); }
.pair-plus { width: 26px; height: 26px; color: var(--text-2); justify-self: center; }
.pair-ours { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.pair-ours:hover { text-decoration: none; color: var(--ink); }
.pair-ours img { width: 32px; }
.pair p { color: var(--text-2); font-size: 15px; }
.pairs-note { margin: 34px auto 0; max-width: 34em; text-align: center; font-size: clamp(19px, 2vw, 22px); font-weight: 600; letter-spacing: -.015em; }

/* ---------- home: simple pricing ---------- */
.timeline { list-style: none; padding: 0; margin: 60px auto 0; max-width: 1000px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; counter-reset: step; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 16%; right: 16%; top: 31px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, var(--b1), var(--b2), var(--b3)); opacity: .5;
}
.tl-step { position: relative; text-align: center; padding: 0 8px; }
.tl-dot {
  width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 20px; display: grid; place-items: center;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md); color: var(--text);
}
.tl-dot .icon { width: 28px; height: 28px; }
.tl-step h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 8px; }
.tl-step p { color: var(--text-2); font-size: 16px; max-width: 20em; margin-inline: auto; }
.tl-note {
  margin: 48px auto 0; max-width: 760px; padding: 22px 26px; border-radius: 22px; text-align: center;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2); font-size: 17px;
}
.tl-note strong { color: var(--text); }

/* ---------- privacy (always dark) ---------- */
.privacy {
  --bg: #000; --bg-2: #0d0d0f; --card: #111114; --text: #f5f5f7; --text-2: #a1a1a6; --line: rgba(255, 255, 255, .1);
  --link: #2997ff; --focus: #2997ff; --ok: #30d158;
  background: radial-gradient(60% 40% at 50% 0%, rgba(48, 209, 88, .16), transparent 70%), #000;
  color: var(--text); color-scheme: dark;
}
.privacy-head { text-align: center; }
.privacy-head .lead { margin-inline: auto; }
.privacy-badge {
  display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 26px; margin-bottom: 26px;
  background: linear-gradient(160deg, #3ddc6a, #1f9d47); color: #fff;
  box-shadow: 0 20px 50px -14px rgba(48, 209, 88, .55), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.privacy-badge .icon { width: 46px; height: 46px; }
.privacy .eyebrow { color: var(--ok); }
.privacy .card > .icon { color: var(--ok); width: 32px; height: 32px; margin-bottom: 18px; }
.perm { margin-top: 16px; padding: 30px 30px 14px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.perm-title { font-size: 21px; letter-spacing: -.02em; margin-bottom: 12px; }
.perm-row { display: grid; grid-template-columns: 1fr 1.25fr 1.65fr; gap: 18px; padding: 16px 0; border-top: 1px solid var(--line); align-items: center; font-size: 16px; }
.perm-head { font-size: 13px; font-weight: 600; color: var(--text-2); border-top: 0; padding-bottom: 10px; }
.perm-app { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.perm-app img { width: 30px; }
.perm-row > span:nth-child(3) { color: var(--text-2); }
.pv-site { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 44px; color: var(--text-2); font-size: 15px; text-align: center; }
.pv-site .icon { width: 18px; height: 18px; color: var(--ok); }
.promises { list-style: none; padding: 0; margin: 40px auto 0; max-width: 760px; display: grid; gap: 12px; }
.promises li { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); font-size: 18px; font-weight: 600; letter-spacing: -.015em; }
.promises .icon { width: 26px; height: 26px; color: var(--ok); }

/* ---------- lightness: bars and numbers ---------- */
.lt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 60px; }
.lt-panel { padding: 32px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.lt-title { font-size: 21px; letter-spacing: -.02em; margin-bottom: 26px; }
.bars { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.bar-row { display: grid; grid-template-columns: 8.6em minmax(0, 1fr) 5.4em; align-items: center; gap: 14px; }
.bar-name { font-size: 15px; font-weight: 500; }
.bar-track { height: 12px; border-radius: 6px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.bar-fill {
  display: block; height: 100%; border-radius: 6px; width: calc(var(--v) / var(--max) * 100%);
  background: linear-gradient(90deg, var(--a1), var(--a2)); transform-origin: 0 50%;
  transition: transform 1.4s var(--ease) .1s;
}
html.js .bar-fill { transform: scaleX(0); }
html.js .is-in .bar-fill { transform: none; }
.bar-val { text-align: right; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lt-note { margin-top: 22px; font-size: 13px; color: var(--text-2); }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.stat { padding: 32px 24px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); text-align: center; }
.stat-num {
  font-size: clamp(48px, 6vw, 72px); font-weight: 700; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums;
  background: var(--grad-ink); -webkit-background-clip: text; background-clip: text; color: transparent;
  display: inline-flex; align-items: baseline; gap: 6px;
}
[data-app] .stat-num { background-image: linear-gradient(90deg, var(--g1), var(--g2)); }
.stat-num small { font-size: .4em; letter-spacing: -.01em; }
.stat-cap { margin-top: 10px; font-size: 17px; color: var(--text-2); }

/* ---------- keyboard ---------- */
.combo { display: inline-flex; gap: 4px; }
.combo kbd {
  position: relative; isolation: isolate;
  min-width: 30px; height: 30px; padding: 0 7px; border-radius: 7px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 500; line-height: 1; color: var(--text);
  background: var(--key-bg); border: 1px solid var(--key-border); box-shadow: var(--key-shadow);
  transition: transform .15s ease, color .2s ease, box-shadow .2s ease;
}
.combo kbd::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; z-index: -1;
  background: linear-gradient(180deg, var(--a1), var(--a2)); opacity: 0; transition: opacity .25s ease;
}
.is-lit .combo kbd, .combo kbd.is-lit { color: #fff; transform: translateY(1px); box-shadow: 0 0 0 3px color-mix(in srgb, var(--a1) 26%, transparent), 0 8px 18px -8px var(--a2); }
.is-lit .combo kbd::before, .combo kbd.is-lit::before { opacity: 1; }
.kc-media { flex-direction: column; gap: 1px; min-width: 52px !important; height: 40px !important; }
.kc-media .icon { width: 16px; height: 16px; }
.kc-media small { font-size: 9px; color: var(--text-2); font-weight: 500; }
.is-lit .kc-media small { color: rgba(255, 255, 255, .85); }
.ks-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 60px; align-items: start; }
.ks-col { padding: 24px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.ks-app { display: flex; align-items: center; gap: 10px; font-size: 18px; letter-spacing: -.02em; margin-bottom: 8px; color: var(--text); }
.ks-app:hover { text-decoration: none; color: var(--ink); }
.ks-app img { width: 34px; }
.ks-list { list-style: none; padding: 0; margin: 0; }
.ks-list li { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 14px; color: var(--text-2); }
.ks-list li:first-child { border-top: 0; }
.ks-list li:hover .combo kbd::before { opacity: 1; }
.ks-list li:hover .combo kbd { color: #fff; }
.ks-list li:hover .kc-media small { color: rgba(255, 255, 255, .85); }
.ks-note { margin-top: 26px; text-align: center; font-size: 14px; color: var(--text-2); }
/* one app's shortcuts, on its page */
.shortcuts { list-style: none; padding: 0; margin: 48px auto 0; max-width: 760px; border-top: 1px solid var(--line); }
.shortcuts li { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 4px; border-bottom: 1px solid var(--line); font-size: 17px; }
.shortcuts li > span:first-child { color: var(--text-2); }
.shortcuts li:hover .combo kbd::before { opacity: 1; }
.shortcuts li:hover .combo kbd { color: #fff; }

/* ---------- why simple works ---------- */
.why-grid { list-style: none; padding: 0; margin: 64px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 44px 40px; }
.why-item > .icon { width: 34px; height: 34px; margin-bottom: 16px; }
.why-item:nth-child(3n + 1) > .icon { color: #d0103b; }
.why-item:nth-child(3n + 2) > .icon { color: #1a5fd8; }
.why-item:nth-child(3n) > .icon { color: #5f33d6; }
@media (prefers-color-scheme: dark) {
  .why-item:nth-child(3n + 1) > .icon { color: #ff6f8e; }
  .why-item:nth-child(3n + 2) > .icon { color: #6eabff; }
  .why-item:nth-child(3n) > .icon { color: #b59bff; }
}
.why-item h3 { font-size: 21px; letter-spacing: -.02em; margin-bottom: 6px; }
.why-item p { color: var(--text-2); }

/* ---------- the support card ---------- */
.give {
  position: relative; overflow: hidden; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 28px;
  padding: 36px 40px; border-radius: 30px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line);
}
.give::before {
  content: ""; position: absolute; inset: -60% auto auto -10%; width: 50%; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, color-mix(in srgb, #ff5c7c 22%, transparent), transparent);
}
.give-heart { position: relative; width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: linear-gradient(160deg, #ff7a93, #e8264f); color: #fff; box-shadow: 0 18px 40px -14px rgba(232, 38, 79, .6), inset 0 1px 0 rgba(255, 255, 255, .3); }
.give-heart .icon { width: 36px; height: 36px; }
.give h2 { font-size: clamp(24px, 2.6vw, 30px); letter-spacing: -.025em; }
.give p { color: var(--text-2); margin-top: 6px; max-width: 38em; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 44px; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none; cursor: pointer; position: relative; padding: 22px 44px 22px 0;
  font-size: clamp(17px, 1.8vw, 20px); font-weight: 600; letter-spacing: -.015em;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -7px;
  background: linear-gradient(currentColor, currentColor) center / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) center / 2px 100% no-repeat;
  color: var(--text-2); transition: transform .3s var(--ease);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-a { padding: 0 0 24px; color: var(--text-2); max-width: 44em; }
.faq-a p + p { margin-top: 10px; }

/* ---------- choose yours: the closing tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; margin-top: 56px; }
.tile {
  position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  padding: 26px 12px 20px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--text);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .9s var(--ease);
}
.tile::before { content: ""; position: absolute; inset: -40% -20% auto; height: 70%; pointer-events: none; background: radial-gradient(closest-side, color-mix(in srgb, var(--a1) 24%, transparent), transparent); }
.tile:hover { text-decoration: none; transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line), var(--shadow-md); }
.tile img { position: relative; width: 64px; filter: drop-shadow(0 12px 16px color-mix(in srgb, var(--a2) 35%, transparent)); }
.tile b { position: relative; font-size: 16px; letter-spacing: -.015em; }
.tile .chip { position: relative; font-size: 11px; padding: 3px 8px; }

/* ---------- app pages ---------- */
.app-hero { padding: clamp(48px, 7vw, 96px) 0 clamp(64px, 8vw, 104px); text-align: center; position: relative; overflow: hidden; }
.app-hero::before {
  content: ""; position: absolute; inset: -20% 10% auto; height: 560px; pointer-events: none; opacity: .4; filter: blur(50px);
  background: radial-gradient(40% 50% at 50% 30%, color-mix(in srgb, var(--a1) 55%, transparent), transparent 70%);
}
@media (prefers-color-scheme: dark) { .app-hero::before { opacity: .26; } }
.app-hero > .wrap { position: relative; }
.app-hero .lead { margin-inline: auto; }
.app-icon { width: clamp(96px, 11vw, 132px); margin: 0 auto 18px; filter: drop-shadow(0 18px 26px color-mix(in srgb, var(--a2) 35%, transparent)); }
.app-name { font-size: clamp(19px, 2vw, 23px); font-weight: 600; color: var(--ink); margin-bottom: 10px; letter-spacing: -.015em; }
.app-friend { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 7px 14px 7px 10px; border-radius: 999px; font-size: 14px; color: var(--text-2); background: color-mix(in srgb, var(--card) 70%, transparent); box-shadow: inset 0 0 0 1px var(--line); }
.app-friend .icon { width: 16px; height: 16px; color: var(--ink); }
.app-buy { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 12px 18px; margin-top: 30px; }
.app-meta { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.app-page .eyebrow, .step-kicker { color: var(--ink); }

/* the native app and what ours adds */
.friend { display: grid; grid-template-columns: minmax(0, 1fr) 56px minmax(0, 1fr); align-items: stretch; gap: 0; margin-top: 56px; }
.friend-side { padding: 32px 30px; border-radius: var(--radius); background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.friend-side h3 { display: flex; align-items: center; gap: 10px; font-size: 21px; letter-spacing: -.02em; margin-bottom: 14px; }
.friend-side h3 .icon { width: 30px; height: 30px; padding: 6px; border-radius: 9px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.friend-side h3 img { width: 30px; }
.friend-side ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.friend-side li { display: flex; gap: 10px; color: var(--text-2); font-size: 16px; }
.friend-side li .icon { width: 18px; height: 18px; margin-top: 3px; color: var(--text-2); }
.friend-ours { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--a2) 45%, transparent); }
.friend-ours li .icon { color: var(--ink); }
.friend-plus { display: grid; place-items: center; }
.friend-plus .icon { width: 30px; height: 30px; padding: 6px; border-radius: 50%; background: var(--text); color: var(--bg); }
.friend-note { margin-top: 28px; text-align: center; color: var(--text-2); font-size: 17px; }

/* the real screens, drawn by the app itself */
.shots { display: flex; justify-content: center; align-items: flex-start; flex-wrap: wrap; gap: 28px; margin-top: 56px; }
.shot { margin: 0; text-align: center; }
.shot img { border-radius: 16px; box-shadow: var(--shadow-lg); margin-inline: auto; }
.shot figcaption { margin-top: 16px; font-size: 14px; color: var(--text-2); }
/* A panel much taller than the others (Mixtape's) shows its top, fading out, so the row stays even. */
.shot-tall img { max-height: 720px; object-fit: cover; object-position: top; -webkit-mask-image: linear-gradient(#000 82%, transparent); mask-image: linear-gradient(#000 82%, transparent); box-shadow: none; }

/* the app's own idea, in a sentence */
.quote { max-width: 900px; margin-inline: auto; text-align: center; }
.quote blockquote { font-size: clamp(30px, 4.4vw, 52px); line-height: 1.12; letter-spacing: -.03em; font-weight: 700; }
.quote p { margin-top: 22px; color: var(--text-2); font-size: clamp(17px, 1.8vw, 20px); max-width: 38em; margin-inline: auto; }

/* facts */
.facts { list-style: none; padding: 0; margin: clamp(48px, 7vw, 88px) 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { display: flex; gap: 14px; align-items: flex-start; padding: 24px; border-radius: 20px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.fact > .icon { width: 26px; height: 26px; color: var(--ink); margin-top: 1px; }
.fact h3 { font-size: 17px; letter-spacing: -.015em; margin-bottom: 4px; }
.fact p { font-size: 15px; color: var(--text-2); line-height: 1.45; }

/* an app in study: the honest note at the top */
.study-note {
  display: flex; gap: 14px; align-items: flex-start; max-width: 760px; margin: 0 auto; padding: 18px 22px; border-radius: 20px; text-align: left;
  background: color-mix(in srgb, var(--a1) 12%, var(--card)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--a2) 30%, transparent); font-size: 15px; color: var(--text-2);
}
.study-note .icon { width: 22px; height: 22px; color: var(--ink); margin-top: 1px; }
.study-note strong { color: var(--text); }

/* the end of an app page */
.closer { text-align: center; }
.closer .app-icon { margin-bottom: 22px; }
.closer .lead { margin-inline: auto; }
.others { margin-top: 72px; padding-top: 40px; border-top: 1px solid var(--line); }
.others h2 { font-size: 15px; font-weight: 600; color: var(--text-2); text-align: center; letter-spacing: 0; }
.others .tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 22px; }

/* ---------- long reads: philosophy ---------- */
.article { width: min(760px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.chapter { padding: clamp(56px, 8vw, 104px) 0 0; }
.chapter-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; margin-bottom: 18px; font-weight: 700; font-size: 17px; color: #fff; background: linear-gradient(160deg, var(--c1, #ff7a93), var(--c2, #e8264f)); }
.chapter:nth-of-type(6n + 2) { --c1: #7db4ff; --c2: #2563eb; }
.chapter:nth-of-type(6n + 3) { --c1: #b89cff; --c2: #6a3ce6; }
.chapter:nth-of-type(6n + 4) { --c1: #6fd6ca; --c2: #0f9e8f; }
.chapter:nth-of-type(6n + 5) { --c1: #ffc062; --c2: #e8590c; }
.chapter:nth-of-type(6n) { --c1: #7fdcf3; --c2: #0a9ec2; }
.chapter h2 { font-size: clamp(30px, 4vw, 44px); line-height: 1.1; letter-spacing: -.03em; margin-bottom: 18px; }
.chapter p { font-size: clamp(18px, 1.8vw, 20px); line-height: 1.6; color: var(--text-2); }
.chapter p + p { margin-top: 16px; }
.chapter p strong { color: var(--text); }
.chapter ul { margin: 16px 0 0; padding-left: 1.2em; color: var(--text-2); font-size: clamp(18px, 1.8vw, 20px); line-height: 1.6; }
.chapter li + li { margin-top: 6px; }
.chapter .pull { margin: 30px 0 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--c2, #e8264f); font-size: clamp(22px, 2.4vw, 28px); line-height: 1.3; letter-spacing: -.02em; font-weight: 600; color: var(--text); }
.never { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.never li { display: flex; align-items: center; gap: 12px; margin: 0 !important; padding: 16px 18px; border-radius: 18px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); color: var(--text) !important; font-weight: 600; font-size: 17px; }
.never .icon { width: 24px; height: 24px; color: var(--text-2); }

/* ---------- prose: support and the legal texts ---------- */
/* Each language's text exists once (data-only="pt|en|es|de"); only the page's language shows. */
html[data-lang="pt"] [data-only]:not([data-only="pt"]),
html[data-lang="en"] [data-only]:not([data-only="en"]),
html[data-lang="es"] [data-only]:not([data-only="es"]),
html[data-lang="de"] [data-only]:not([data-only="de"]) { display: none !important; }
.prose { width: min(720px, 100% - 2 * var(--gutter)); margin: 56px auto 104px; }
.prose h1 { font-size: clamp(34px, 5vw, 48px); letter-spacing: -.03em; line-height: 1.1; }
.prose h2 { font-size: 23px; letter-spacing: -.018em; margin: 40px 0 10px; }
.prose h3 { font-size: 19px; letter-spacing: -.015em; margin: 26px 0 8px; display: flex; align-items: center; gap: 10px; }
.prose h3 img { width: 28px; }
.prose p, .prose li { font-size: 17px; line-height: 1.6; color: var(--text-2); }
.prose p + p { margin-top: 12px; }
.prose ul { margin: 10px 0 0; padding-left: 1.2em; }
.prose li + li { margin-top: 8px; }
.prose li strong, .prose p strong { color: var(--text); }
.prose a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.prose .updated { margin-top: 10px; font-size: 14px; }
.prose .lead { margin-top: 18px; }
.prose .note { margin-top: 28px; padding: 16px 18px; border-radius: 16px; background: var(--bg-2); font-size: 15px; }
.prose .btn { text-decoration: none; }

/* ---------- donate ---------- */
.give-panel { max-width: 760px; margin: 56px auto 0; padding: 30px; border-radius: 28px; background: var(--card); box-shadow: inset 0 0 0 1px var(--line); }
.give-panel h2 { font-size: 23px; letter-spacing: -.02em; }
.give-panel > p { color: var(--text-2); margin-top: 8px; }
.pay { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 24px; }
.qr { width: 176px; height: 176px; flex: none; padding: 10px; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.qr svg { display: block; width: 100%; height: 100%; }
.pay-info { flex: 1; min-width: 240px; display: grid; gap: 6px; }
.pay-label { font-size: 13px; color: var(--text-2); }
.address { display: block; width: 100%; padding: 12px 14px; border: 0; border-radius: 12px; background: var(--bg-2); color: var(--text); font: 14px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; resize: none; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.steps-list { list-style: none; padding: 0; margin: 22px 0 0; display: grid; gap: 10px; counter-reset: s; }
.steps-list li { display: flex; gap: 12px; color: var(--text-2); font-size: 16px; }
.steps-list li::before { counter-increment: s; content: counter(s); flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--text); background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.costs { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; }
.costs li { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-top: 1px solid var(--line); color: var(--text-2); }
.costs li:first-child { border-top: 0; }
.costs b { color: var(--text); font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- 404 ---------- */
.lost { min-height: calc(100svh - var(--header-h) - 200px); display: grid; place-items: center; text-align: center; padding: 80px 0; }
.lost .lead { margin-inline: auto; }

/* ---------- reveal on scroll ---------- */
/* If site.js never runs (a failed download, an early error), the fallback animation shows everything after 3 s. */
html.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); animation: reveal-fallback 0s 3s forwards; }
html.js.ready .reveal { animation: none; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
html.js .reveal.is-in { opacity: 1; transform: none; }
html.js .app-card.reveal.is-in:hover, html.js .tile.reveal.is-in:hover { transform: translateY(-4px); transition-delay: 0s; }

/* ---------- scroll-driven effects (CSS where supported, JS fallback in site.js) ---------- */
.hero-icons { transform: translateY(var(--hp-y, 0)); }
.parallax { transform: translateY(var(--px, 0)); }
@supports (animation-timeline: scroll()) {
  .scroll-progress { animation: sp linear both; animation-timeline: scroll(root block); }
  @keyframes sp { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  .hero-icons { animation: heroUp linear both; animation-timeline: scroll(root block); animation-range: 0 90vh; }
  @keyframes heroUp { to { transform: translateY(-70px); opacity: .25; } }
}
@supports (animation-timeline: view()) {
  .parallax { animation: par linear both; animation-timeline: view(); animation-range: cover; }
  @keyframes par { from { transform: translateY(var(--par, 36px)); } to { transform: translateY(calc(var(--par, 36px) * -1)); } }
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-cta { display: none; }
  .ks-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pair { grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr); }
  .pair p { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .app-grid, .cols-3, .facts { grid-template-columns: minmax(0, 1fr); max-width: 560px; margin-inline: auto; }
  .cols-2, .why-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .why-grid { gap: 36px 28px; }
  .lt-grid, .stats { grid-template-columns: minmax(0, 1fr); }
  .perm-head { display: none; }
  .perm-row { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .timeline { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 460px; }
  .timeline::before { left: 31px; right: auto; top: 32px; bottom: 32px; width: 2px; height: auto; background: linear-gradient(180deg, var(--b1), var(--b2), var(--b3)); }
  .tl-step { display: grid; grid-template-columns: 64px minmax(0, 1fr); column-gap: 18px; text-align: left; padding: 0; }
  .tl-dot { margin: 0; grid-row: span 2; }
  .tl-step p { margin: 0; }
  .friend { grid-template-columns: minmax(0, 1fr); }
  .friend-plus { padding: 10px 0; }
  .give { grid-template-columns: minmax(0, 1fr); text-align: center; justify-items: center; padding: 32px 24px; }
  .others .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  .defs, .cols-2, .why-grid, .never { grid-template-columns: minmax(0, 1fr); }
  .btn { font-size: 16px; padding: 0 20px; }
  .ks-grid { grid-template-columns: minmax(0, 1fr); }
  .tiles, .others .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n v" "t t"; gap: 8px 12px; }
  .bar-name { grid-area: n; } .bar-val { grid-area: v; } .bar-track { grid-area: t; }
  .lt-panel { padding: 26px 22px; }
  .card { padding: 26px 22px; }
  .fact { padding: 20px; }
  .pair { padding: 16px; gap: 10px; }
  .pair-apple, .pair-ours { font-size: 15px; }
  .ft-nav { gap: 24px 40px; }
  .shortcuts li { font-size: 15px; }
  .give-panel { padding: 22px; }
  .qr { width: 150px; height: 150px; }
}
@media (max-width: 420px) {
  .lang button { padding: 4px 7px; }
  .nav { gap: 8px; }
  .nav-right { min-width: 0; gap: 4px; }
}
@media (max-width: 359px) {
  /* A long label (German, Spanish) may wrap instead of pushing the page sideways. */
  .btn { white-space: normal; max-width: 100%; padding-block: 10px; text-align: center; line-height: 1.2; }
  .brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 420px) {
  .menu-apps { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- reduced motion: everything visible, nothing moves ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0s !important; transition-delay: 0s !important; }
  html.js .reveal { opacity: 1; transform: none; }
  .hero-icons, .parallax { transform: none !important; opacity: 1 !important; }
  html.js .bar-fill { transform: none; }
  .scroll-progress { display: none; }
}

@media print {
  .site-header, .scroll-progress, .menu-sheet { display: none; }
  html.js .reveal { opacity: 1; transform: none; }
}
