/* Decoy Launcher website
   One colour has a job of its own: violet marks only what is hidden or
   secret (hidden apps, codes, vaults). Gold marks only Premium. */

:root {
  --bg: #eef1ec;
  --surface: #f8faf6;
  --ink: #17221d;
  --muted: #56635b;
  --line: #cfd8cf;
  --moss: #2f5a46;
  --moss-soft: #dde8e0;
  --secret: #6547e0;
  --secret-soft: #e9e4ff;
  --gold: #8f6a14;
  --gold-soft: #f4ead2;
  --shadow: 0 1px 0 rgba(23, 34, 29, 0.06), 0 12px 32px -18px rgba(23, 34, 29, 0.35);
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
  --radius-s: 8px;
  --radius-m: 14px;
  --radius-l: 28px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #111814;
    --surface: #18211c;
    --ink: #e4ebe5;
    --muted: #9eaba3;
    --line: #2c3832;
    --moss: #8fcfae;
    --moss-soft: #1f3129;
    --secret: #ab95ff;
    --secret-soft: #26213f;
    --gold: #e6c36a;
    --gold-soft: #2e2715;
    --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 36px -20px rgba(0, 0, 0, 0.8);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #111814;
  --surface: #18211c;
  --ink: #e4ebe5;
  --muted: #9eaba3;
  --line: #2c3832;
  --moss: #8fcfae;
  --moss-soft: #1f3129;
  --secret: #ab95ff;
  --secret-soft: #26213f;
  --gold: #e6c36a;
  --gold-soft: #2e2715;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.3), 0 16px 36px -20px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--moss); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 {
  font-family: var(--display);
  line-height: 1.12;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
  font-weight: 700;
}
h1 { font-size: clamp(2.3rem, 5.6vw, 4.1rem); font-variation-settings: "wdth" 85; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
h3 { font-size: 1.22rem; letter-spacing: -0.005em; }
p { margin: 0 0 1em; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-s);
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */

.site-head {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.15rem;
}
.brand svg { width: 30px; height: 30px; flex: none; }

.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: 999px; font-size: 0.97rem;
}
.nav a:hover { background: var(--moss-soft); }
.nav a[aria-current="page"] { background: var(--moss-soft); color: var(--moss); font-weight: 700; }

.icon-btn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 40px; height: 40px; border-radius: 999px; display: grid; place-items: center; cursor: pointer;
}
.icon-btn svg { width: 20px; height: 20px; }
.menu-btn { display: none; }

@media (max-width: 820px) {
  .menu-btn { display: grid; margin-left: auto; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 64px;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px; border-radius: var(--radius-s); }
  .nav .icon-btn { margin-top: 8px; }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font: 700 1rem/1 var(--body);
  padding: 14px 22px; border-radius: 999px; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
}
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--moss); color: var(--bg); text-decoration: none; }
.btn-quiet { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-quiet:hover { border-color: var(--ink); }
.btn-secret { background: var(--secret); color: #fff; }
.btn-secret[aria-pressed="true"] { background: transparent; color: var(--secret); border-color: var(--secret); }

/* ---------- Hero ---------- */

.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); gap: clamp(28px, 5vw, 72px); align-items: center;
}
.hero-lede { font-size: 1.22rem; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-note { margin-top: 18px; font-size: 0.92rem; color: var(--muted); }

.reveal-stage { justify-self: center; width: min(320px, 100%); text-align: center; }
.reveal-phone { position: relative; filter: drop-shadow(0 30px 40px rgba(17, 24, 20, 0.28)); }
.reveal-phone .face-hidden {
  position: absolute; inset: 0;
  clip-path: circle(0% at 70% 12%);
  transition: clip-path 0.9s cubic-bezier(.7, 0, .2, 1);
}
.reveal-phone.revealed .face-hidden { clip-path: circle(150% at 70% 12%); }
.reveal-stage .btn { margin-top: 22px; }
.reveal-caption { font-size: 0.92rem; color: var(--muted); margin-top: 12px; min-height: 3em; }

@media (max-width: 820px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .reveal-stage { width: min(280px, 100%); }
}

/* ---------- Sections on the landing page ---------- */

.band { padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.band-intro { max-width: 60ch; margin-bottom: 36px; }
.band-intro p { color: var(--muted); }

/* The feature index: a plain two-column list, grouped. */
.index-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 40px 56px; }
.index-group h3 { padding-bottom: 10px; border-bottom: 2px solid var(--ink); margin-bottom: 4px; }
.index-group ul { list-style: none; padding: 0; margin: 0; }
.index-group li { border-bottom: 1px solid var(--line); }
.index-group li a {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 2px;
  color: var(--ink); text-decoration: none;
}
.index-group li a:hover strong { text-decoration: underline; text-underline-offset: 3px; }
.index-group li a span { grid-column: 1; color: var(--muted); font-size: 0.95rem; }
.index-group li a .tag { grid-column: 2; grid-row: 1; }
@media (max-width: 760px) { .index-groups { grid-template-columns: 1fr; } }

.tag {
  display: inline-flex; align-items: center; gap: 4px; align-self: start;
  font-size: 0.78rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.tag-premium { background: var(--gold-soft); color: var(--gold); }
.tag-secret { background: var(--secret-soft); color: var(--secret); }

/* Showcase rows: picture beside the explanation, alternating. */
.show-row {
  display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(28px, 6vw, 80px);
  align-items: center; padding: 36px 0;
}
.show-row + .show-row { border-top: 1px dashed var(--line); }
.show-row.flip { grid-template-columns: minmax(0, 1fr) 260px; }
.show-row.flip figure { order: 2; }
.show-row p { color: var(--muted); max-width: 52ch; }
@media (max-width: 760px) {
  .show-row, .show-row.flip { grid-template-columns: 1fr; }
  .show-row.flip figure { order: 0; }
  .show-row figure { width: min(240px, 80%); margin-inline: auto; }
}

.plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px; }
.plan.premium { border: 2px solid var(--gold); }
.plan h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.plan .price { font-family: var(--body); font-size: 0.95rem; font-weight: 400; color: var(--muted); }
.plan ul { padding-left: 1.1em; margin: 0; }
.plan li { margin: 6px 0; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

.promise { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.promise div { border-top: 2px solid var(--moss); padding-top: 14px; }
.promise p { color: var(--muted); font-size: 0.98rem; }
@media (max-width: 760px) { .promise { grid-template-columns: 1fr; } }

/* ---------- Guide pages ---------- */

.page-head { padding: 48px 0 28px; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--muted); font-size: 1.15rem; max-width: 60ch; margin: 0; }
.crumbs { font-size: 0.92rem; margin-bottom: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }

.guide { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 56px; padding: 40px 0 80px; }
.toc { position: sticky; top: 96px; align-self: start; font-size: 0.95rem; }
.toc p { font-weight: 700; margin-bottom: 8px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--line); }
.toc a { display: block; padding: 6px 12px; color: var(--muted); text-decoration: none; margin-left: -2px; border-left: 2px solid transparent; }
.toc a:hover { color: var(--ink); }
.toc a.active { color: var(--ink); border-left-color: var(--ink); font-weight: 700; }
@media (max-width: 900px) {
  .guide { grid-template-columns: 1fr; gap: 24px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 6px; border: 0; }
  .toc a { border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; margin: 0; }
}

.topic { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 40px; padding: 8px 0 44px; }
.topic + .topic { border-top: 1px solid var(--line); padding-top: 40px; }
.topic.no-pic { grid-template-columns: minmax(0, 1fr); }
.topic-text { max-width: 64ch; }
.topic h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.topic h2 .tag { font-family: var(--body); letter-spacing: 0; }
.topic figure { margin: 0; position: sticky; top: 100px; align-self: start; }
@media (max-width: 760px) {
  .topic { grid-template-columns: 1fr; }
  .topic figure { position: static; width: min(230px, 75%); margin-inline: auto; order: -1; }
}

figure.phone img { filter: drop-shadow(0 18px 24px rgba(17, 24, 20, 0.22)); }
figure.phone figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 10px; }

.where {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-size: 0.93rem; margin: 0 0 18px; color: var(--muted);
}
.where b { color: var(--ink); font-weight: 700; margin-right: 4px; }
.where span {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 2px 9px; color: var(--ink);
}
.where i { font-style: normal; color: var(--muted); }

ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 0 0 1.2em; }
ol.steps > li {
  counter-increment: step; position: relative; padding: 0 0 14px 44px;
}
ol.steps > li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: 0.85rem;
}
ol.steps > li:not(:last-child)::after {
  content: ""; position: absolute; left: 13px; top: 32px; bottom: 4px; width: 2px; background: var(--line);
}

ul.points { padding-left: 1.15em; margin: 0 0 1.2em; }
ul.points li { margin: 6px 0; }

.note {
  border-left: 3px solid var(--moss); background: var(--moss-soft);
  padding: 12px 16px; border-radius: 0 var(--radius-s) var(--radius-s) 0; margin: 0 0 1.2em; font-size: 0.98rem;
}
.note.secret { border-left-color: var(--secret); background: var(--secret-soft); }
.note.warn { border-left-color: var(--gold); background: var(--gold-soft); }
.note p:last-child { margin: 0; }

kbd {
  font: 600 0.88em var(--body); background: var(--surface); border: 1px solid var(--line);
  border-bottom-width: 2px; border-radius: 6px; padding: 1px 6px;
}

table.compare { width: 100%; border-collapse: collapse; font-size: 0.97rem; margin-bottom: 1.4em; }
table.compare th, table.compare td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.compare th { font-family: var(--display); font-size: 1rem; }
.table-scroll { overflow-x: auto; }

.pager { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 24px; margin-top: 8px; }
.pager a { text-decoration: none; display: flex; flex-direction: column; color: var(--ink); max-width: 48%; }
.pager a small { color: var(--muted); }
.pager a.next { text-align: right; margin-left: auto; }

/* Features hub: guides as a list with their picture. */
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 18px; padding: 40px 0 80px; }
.hub a {
  display: grid; grid-template-columns: 78px 1fr; gap: 16px; align-items: center;
  padding: 14px; border-radius: var(--radius-m); color: var(--ink); text-decoration: none;
  border: 1px solid var(--line); background: var(--surface);
}
.hub a:hover { border-color: var(--ink); }
.hub img { width: 78px; }
.hub strong { font-family: var(--display); font-size: 1.1rem; display: block; }
.hub span { color: var(--muted); font-size: 0.94rem; }

details.faq { border-bottom: 1px solid var(--line); padding: 4px 0; }
details.faq summary {
  cursor: pointer; list-style: none; padding: 16px 32px 16px 0; position: relative;
  font-family: var(--display); font-weight: 700; font-size: 1.12rem;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.5rem; font-weight: 400; color: var(--muted);
}
details.faq[open] summary::after { content: "–"; }
details.faq > div { padding: 0 0 18px; color: var(--muted); max-width: 66ch; }

/* ---------- Footer ---------- */

.site-foot { border-top: 1px solid var(--line); padding: 40px 0 56px; font-size: 0.95rem; color: var(--muted); }
.site-foot .wrap { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 28px; }
.site-foot h4 { font-family: var(--display); color: var(--ink); margin: 0 0 10px; font-size: 1rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: 6px 0; }
.site-foot a { color: var(--muted); }
@media (max-width: 760px) { .site-foot .wrap { grid-template-columns: 1fr 1fr; } }

@media (prefers-reduced-motion: reduce) {
  .reveal-phone .face-hidden { transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Android TV (tv.html, and the TV parts of index.html) ---------- */

/* The "new" strip above the header on the home page. */
.news-strip {
  background: var(--ink); color: var(--bg); font-size: 0.95rem;
}
.news-strip .wrap { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding: 10px 0; text-align: center; }
.news-strip a { color: var(--bg); font-weight: 700; }
.news-strip .tag-new { background: var(--moss); color: var(--bg); }

.tag-new { background: var(--moss-soft); color: var(--moss); }

/* TV pictures are wide: they get more room than the phones. */
figure.tv { margin: 0; }
figure.tv img { width: 100%; filter: drop-shadow(0 18px 26px rgba(17, 24, 20, 0.25)); }
figure.tv figcaption { font-size: 0.85rem; color: var(--muted); text-align: center; margin-top: 10px; }

.hero-tv .wrap { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); }
.hero-tv figure { justify-self: stretch; }
@media (max-width: 820px) { .hero-tv .wrap { grid-template-columns: 1fr; } }

.show-row.wide { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.show-row.wide.flip { grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
@media (max-width: 760px) {
  .show-row.wide, .show-row.wide.flip { grid-template-columns: 1fr; }
  .show-row.wide figure { width: 100%; }
}
.show-row ul.points { color: var(--muted); max-width: 52ch; }

/* Phone or TV: the two ways to use Decoy, side by side. */
.platforms { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 24px; }
.platform {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
  padding: 28px; display: grid; grid-template-rows: auto auto 1fr auto; gap: 14px;
}
.platform .pic { display: grid; place-items: center; min-height: 230px; }
.platform .pic img { max-height: 260px; width: auto; }
.platform.tv .pic img { width: 100%; max-height: none; }
.platform h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0; }
.platform ul { margin: 0; padding-left: 1.1em; color: var(--muted); }
.platform li { margin: 4px 0; }
@media (max-width: 820px) { .platforms { grid-template-columns: 1fr; } }

/* Feature index items that aren't links. */
.index-group li > div {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; padding: 14px 2px;
}
.index-group li > div span { grid-column: 1; color: var(--muted); font-size: 0.95rem; }
.index-group li > div .tag { grid-column: 2; grid-row: 1; }

/* Big numbers under the TV hero. */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.stats div { border-top: 2px solid var(--ink); padding-top: 12px; }
.stats strong { display: block; font-family: var(--display); font-size: clamp(1.7rem, 3.4vw, 2.4rem); line-height: 1.1; }
.stats span { color: var(--muted); font-size: 0.95rem; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* A shell command people may copy. */
pre.cmd {
  background: var(--ink); color: var(--bg); border-radius: var(--radius-m); padding: 14px 16px;
  overflow-x: auto; font-size: 0.9rem; margin: 0 0 1.2em; white-space: pre;
}

/* TV guide: the pictures are landscape, so they get a wider column. */
.guide-tv .topic { grid-template-columns: minmax(0, 1fr) 340px; }
.guide-tv .topic.no-pic { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 1100px) { .guide-tv .topic { grid-template-columns: minmax(0, 1fr) 280px; } }
@media (max-width: 760px) {
  .guide-tv .topic { grid-template-columns: 1fr; }
  .guide-tv .topic figure { width: 100%; }
}
/* The guide's FAQ sits inside a topic. */
.topic-text details.faq { margin-bottom: 4px; }
