/* Handy Apps Studio — spec-sheet editorial.
   Palette: cool grey-green neutrals + a single crimson signal.
   Type: Bricolage Grotesque (display) / Public Sans (body) / JetBrains Mono (metadata). */

:root {
  --paper:      #F1F2EE;
  --surface:    #FFFFFF;
  --surface-2:  #E9EBE5;
  --ink:        #14161A;
  --muted:      #5D646E;
  --rule:       #D7DAD2;
  --rule-soft:  #E4E6DF;
  --accent:     #A8104C;
  --accent-ink: #FFFFFF;
  --accent-soft:#F6E7ED;
  --star:       #A8104C;

  --display: "Bricolage Grotesque", "Trebuchet MS", ui-sans-serif, system-ui, sans-serif;
  --body: "Public Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 68rem;
  --step--1: 0.8125rem;
  --step-0:  1rem;
  --step-1:  1.1875rem;
  --step-2:  1.5rem;
  --step-3:  2rem;
  --step-4:  clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:      #101210;
    --surface:    #171A18;
    --surface-2:  #1E221F;
    --ink:        #E8EBE5;
    --muted:      #99A09B;
    --rule:       #2A2E2A;
    --rule-soft:  #222623;
    --accent:     #FF6B95;
    --accent-ink: #1A0710;
    --accent-soft:#2B141D;
    --star:       #FF6B95;
  }
}
:root[data-theme="dark"] {
  --paper:      #101210;
  --surface:    #171A18;
  --surface-2:  #1E221F;
  --ink:        #E8EBE5;
  --muted:      #99A09B;
  --rule:       #2A2E2A;
  --rule-soft:  #222623;
  --accent:     #FF6B95;
  --accent-ink: #1A0710;
  --accent-soft:#2B141D;
  --star:       #FF6B95;
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: from-font; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

/* ---------- masthead ---------- */

.masthead {
  border-bottom: 1px solid var(--rule);
  background: var(--surface);
}
.masthead .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
  padding-block: 14px;
}
.wordmark {
  font-family: var(--display);
  font-weight: 800;
  font-size: var(--step-1);
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.wordmark span { color: var(--accent); }
.masthead nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.masthead nav a {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.02em;
  color: var(--muted);
  text-decoration: none;
}
.masthead nav a:hover, .masthead nav a[aria-current="page"] { color: var(--accent); }

/* ---------- generic blocks ---------- */

main { display: block; }
section { border-top: 1px solid var(--rule-soft); }
section:first-of-type { border-top: 0; }
.band { padding-block: clamp(2.5rem, 1.6rem + 3vw, 4rem); }
.band--tight { padding-block: clamp(1.75rem, 1.2rem + 2vw, 2.75rem); }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

h1, h2, h3 { font-family: var(--display); letter-spacing: -0.025em; text-wrap: balance; margin: 0; }
h1 { font-size: var(--step-4); line-height: 1.04; font-weight: 800; }
h2 { font-size: var(--step-3); line-height: 1.12; font-weight: 700; }
h3 { font-size: var(--step-1); line-height: 1.25; font-weight: 700; }

p { margin: 0 0 1em; max-width: 62ch; }
.lead { font-size: var(--step-2); line-height: 1.4; max-width: 34ch; }
.answer {
  font-size: var(--step-1);
  line-height: 1.55;
  max-width: 58ch;
  border-left: 3px solid var(--accent);
  padding-left: 18px;
  margin: 0 0 1.5em;
}

/* ---------- hero ---------- */

.hero { padding-block: clamp(2.75rem, 1.5rem + 5vw, 5rem) clamp(2rem, 1.4rem + 2vw, 3rem); }
.hero h1 { max-width: 16ch; }
.hero p { margin-top: 20px; font-size: var(--step-1); max-width: 54ch; }

.ticker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  border-top: 1px solid var(--rule);
  margin-top: 34px;
}
.ticker div {
  border-bottom: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  padding: 14px 16px 12px 0;
}
.ticker div:last-child { border-right: 0; }
.ticker dt {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.ticker dd {
  margin: 4px 0 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ---------- catalog ledger ---------- */

.ledger { border-top: 1px solid var(--rule); }
.entry {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 0 20px;
  padding-block: 22px;
  border-bottom: 1px solid var(--rule);
  align-items: start;
}
.entry__icon {
  width: 72px; height: 72px;
  border-radius: 16px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
}
.entry__body > * { max-width: 60ch; }
.entry__title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.entry__title h3 { margin: 0; }
.entry__title a { color: var(--ink); text-decoration: none; }
.entry__title a:hover { color: var(--accent); text-decoration: underline; }
.entry__body p { margin: 8px 0 0; color: var(--muted); }

.spec {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 12px 0 0;
  padding: 0;
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.spec b { font-weight: 500; color: var(--ink); }
.rating { color: var(--star); white-space: nowrap; }

.tag {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 2px 9px;
  white-space: nowrap;
}
.tag--new { color: var(--accent); border-color: var(--accent); }

@media (max-width: 34rem) {
  .entry { grid-template-columns: 56px minmax(0, 1fr); gap: 0 14px; }
  .entry__icon { width: 56px; height: 56px; border-radius: 13px; }
}

/* ---------- app page ---------- */

.apphead {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
  padding-block: clamp(2rem, 1.4rem + 2.5vw, 3.25rem) 0;
}
.apphead img {
  width: 112px; height: 112px;
  border-radius: 25px;
  border: 1px solid var(--rule);
}
.apphead h1 { font-size: var(--step-3); max-width: 20ch; }
.apphead .kicker {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
}
@media (max-width: 34rem) {
  .apphead { grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
  .apphead img { width: 76px; height: 76px; border-radius: 17px; }
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 12px 20px;
  border-radius: 2px;
  margin-top: 6px;
}
.cta:hover { filter: brightness(1.08); text-decoration: none; }
.cta--ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--accent);
}

/* spec table */
.facts { border-top: 1px solid var(--rule); margin: 0; }
.facts div {
  display: grid;
  grid-template-columns: minmax(8rem, 15rem) minmax(0, 1fr);
  gap: 4px 20px;
  border-bottom: 1px solid var(--rule-soft);
  padding-block: 9px;
}
.facts dt {
  font-family: var(--mono);
  font-size: var(--step--1);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.facts dd { margin: 0; font-variant-numeric: tabular-nums; }
@media (max-width: 30rem) {
  .facts div { grid-template-columns: minmax(0, 1fr); }
}

/* screenshots */
.shots {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
  margin: 0;
  scroll-snap-type: x mandatory;
}
.shots img {
  flex: 0 0 auto;
  width: 200px;
  border-radius: 14px;
  border: 1px solid var(--rule);
  background: var(--surface-2);
  scroll-snap-align: start;
}

/* bulleted feature list */
.points { list-style: none; margin: 0; padding: 0; max-width: 62ch; }
.points li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 12px;
}
.points li::before {
  content: "";
  position: absolute;
  left: 4px; top: 0.62em;
  width: 9px; height: 2px;
  background: var(--accent);
}

/* FAQ */
.faq { border-top: 1px solid var(--rule); }
.faq details {
  border-bottom: 1px solid var(--rule);
}
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 32px 16px 0;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--step-1);
  letter-spacing: -0.015em;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  color: var(--accent);
  font-size: var(--step-2);
  line-height: 1;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 18px; }
.faq details > div p { margin: 0; }

/* comparison table */
.tablewrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; min-width: 34rem; font-size: var(--step--1); }
caption { text-align: left; color: var(--muted); font-size: var(--step--1); padding-bottom: 10px; }
th, td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
thead th {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--rule);
}
tbody th { font-weight: 600; font-size: var(--step-0); }

/* related grid */
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0 28px; border-top: 1px solid var(--rule); }
.related a {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding-block: 16px;
  border-bottom: 1px solid var(--rule-soft);
  text-decoration: none;
  color: var(--ink);
}
.related a:hover strong { color: var(--accent); }
.related img { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--rule); }
.related span { display: block; font-size: var(--step--1); color: var(--muted); }

/* breadcrumb */
.crumbs {
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
  padding-top: 18px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }

/* prose for guides / about */
.prose h2 { margin-top: 2.2em; }
.prose h3 { margin-top: 1.6em; }
.prose ul { max-width: 62ch; padding-left: 1.1em; }
.prose li { margin-bottom: 8px; }

/* footer */
footer {
  border-top: 1px solid var(--rule);
  background: var(--surface);
  margin-top: 0;
}
footer .wrap { padding-block: 34px 44px; }
.footgrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: 26px 32px;
}
.footgrid h4 {
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  font-weight: 400;
}
.footgrid ul { list-style: none; margin: 0; padding: 0; }
.footgrid li { margin-bottom: 6px; font-size: var(--step--1); }
.footgrid a { color: var(--ink); text-decoration: none; }
.footgrid a:hover { color: var(--accent); text-decoration: underline; }
.colophon {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid var(--rule-soft);
  font-family: var(--mono);
  font-size: var(--step--1);
  color: var(--muted);
}
.colophon p { max-width: 70ch; margin: 0 0 6px; }

.skip {
  position: absolute; left: -9999px;
}
.skip:focus { position: static; display: inline-block; padding: 8px 14px; background: var(--accent); color: var(--accent-ink); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* why-download reasons */
.sect { font-size: var(--step-2); margin-bottom: 20px; }
.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 0 32px;
  border-top: 2px solid var(--ink);
}
.reasons > div { padding-top: 16px; border-bottom: 1px solid var(--rule-soft); }
.reasons h3 { font-size: var(--step-1); margin-bottom: 8px; }
.reasons p { color: var(--muted); }

/* App Store voice */
.voice__score { font-size: var(--step-1); }
.quote {
  margin: 0 0 16px;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--rule);
  max-width: 44rem;
}
.quote p { margin: 0 0 8px; }
.quote__stars { color: var(--star); letter-spacing: 0.12em; font-size: var(--step--1); }
.quote__title { font-family: var(--display); font-weight: 700; font-size: var(--step-1); }
.quote footer { font-family: var(--mono); font-size: var(--step--1); color: var(--muted); }
.voice__note { font-size: var(--step--1); color: var(--muted); }
