/* avasoft.app — one stylesheet for every page. Colors are tokens; the dark theme redefines them. */

:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --ink: #12151d;
  --ink-2: #4a5263;
  --ink-3: #6b7385;
  --line: #e3e6ee;
  --accent: #2f5fe8;
  --accent-ink: #ffffff;
  --accent-soft: #e8eeff;
  --shadow: 0 1px 2px rgba(16, 24, 48, .06), 0 8px 24px rgba(16, 24, 48, .06);
  --radius: 18px;
  --wide: 1080px;
  --text: 700px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0f17;
    --surface: #151a26;
    --ink: #eef1f7;
    --ink-2: #b4bccc;
    --ink-3: #8a93a6;
    --line: #242b3b;
    --accent: #8aa4ff;
    --accent-ink: #0c0f17;
    --accent-soft: #1b2440;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0f17;
  --surface: #151a26;
  --ink: #eef1f7;
  --ink-2: #b4bccc;
  --ink-3: #8a93a6;
  --line: #242b3b;
  --accent: #8aa4ff;
  --accent-ink: #0c0f17;
  --accent-soft: #1b2440;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
strong { font-weight: 650; }

/* The bar: brand at the left, five links that scroll sideways on a narrow phone. */
.bar { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid var(--line);
}
.top .bar { display: flex; align-items: center; gap: 20px; height: 56px; }
.brand { font-weight: 750; font-size: 18px; letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.top nav { display: flex; gap: 4px; margin-left: auto; overflow-x: auto; scrollbar-width: none; }
.top nav::-webkit-scrollbar { display: none; }
.top nav a {
  color: var(--ink-2); text-decoration: none; font-size: 15px; white-space: nowrap;
  padding: 6px 10px; border-radius: 999px;
}
.top nav a:first-child { display: none; }
.top nav a:hover { color: var(--ink); background: var(--accent-soft); }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

main { max-width: var(--wide); margin: 0 auto; padding: 0 16px 80px; }

/* Type */
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.015em; margin: 0; }
h1 { font-size: clamp(34px, 6vw, 56px); font-weight: 760; letter-spacing: -.03em; }
h2 { font-size: clamp(24px, 3vw, 30px); font-weight: 720; }
h3 { font-size: 19px; font-weight: 680; margin-top: 28px; }
h4 { font-size: 17px; font-weight: 650; margin-top: 22px; }
p, ul, ol { margin: 12px 0 0; color: var(--ink-2); }
li { margin: 6px 0; }
li::marker { color: var(--ink-3); }
p strong, li strong { color: var(--ink); }
hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
table { border-collapse: collapse; width: 100%; margin-top: 16px; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink); font-weight: 650; }
td { color: var(--ink-2); }
.table-scroll { overflow-x: auto; }

/* Hero */
.hero { padding: 64px 0 40px; max-width: 820px; }
.hero .appicon { width: 96px; height: 96px; border-radius: 22px; box-shadow: var(--shadow); display: block; margin-bottom: 24px; }
.hero .kicker { color: var(--accent); font-weight: 650; font-size: 15px; letter-spacing: .02em; margin: 0 0 10px; }
.hero h1 + p { font-size: clamp(18px, 2.2vw, 21px); line-height: 1.5; color: var(--ink-2); margin-top: 18px; }
.store {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 24px;
  padding: 10px 16px; border-radius: 999px; font-size: 15px; font-weight: 600;
  background: var(--accent-soft); color: var(--ink);
}
.store::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* The apps, on the home page */
.apps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 8px 0 24px; }
.app {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--ink); transition: transform .15s ease, border-color .15s ease;
}
.app:hover, .app:focus-within { transform: translateY(-2px); border-color: var(--accent); }
.app { position: relative; }
/* The whole card is the link to the app's page (its title's link, stretched over the card); the
   App Store badge sits above that, so it is a link of its own. */
.app h3 a { color: inherit; text-decoration: none; outline: none; }
.app:has(h3 a:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.app h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.app .get { position: relative; z-index: 1; align-self: flex-start; margin-top: 6px; line-height: 0; }
.app .get img { width: 120px; height: 40px; }
.store-badge { margin: 26px 0 0; line-height: 0; }
.store-badge img { width: 150px; height: 50px; }
.app img { width: 64px; height: 64px; border-radius: 15px; }
/* A hairline ring, so a dark icon still has an edge on a dark card. */
.app img, .hero .appicon { outline: 1px solid var(--line); outline-offset: -1px; }
.app h3 { margin: 6px 0 0; font-size: 21px; }
.app p { margin: 0; flex: 1; }
.app .more { color: var(--accent); font-weight: 600; font-size: 15px; }

/* Sections: on a wide screen the heading sits in its own column at the left. */
section { padding: 48px 0; border-top: 1px solid var(--line); }
section > h2 { margin-bottom: 4px; }
section > h3:first-of-type { margin-top: 18px; }
@media (min-width: 900px) {
  body:not(.legal) section {
    display: grid; grid-template-columns: 260px minmax(0, 1fr); column-gap: 56px; align-items: start;
  }
  body:not(.legal) section > * { grid-column: 2; }
  body:not(.legal) section > h2 { grid-column: 1; grid-row: 1 / span 200; position: sticky; top: 88px; }
  body:not(.legal) section > :nth-child(2) { margin-top: 0; }
}
section p:first-child, section ul:first-child { margin-top: 0; }

/* Lead paragraphs that start with a bold name read as a list of features. */
section > p > strong:first-child { color: var(--ink); }

/* Long-form legal pages: one readable column. */
body.legal main, body.page.narrow main { max-width: calc(var(--text) + 32px); }
body.legal .hero { padding-bottom: 16px; }
body.legal section { padding: 32px 0; }
body.legal h2 { font-size: 23px; }
.updated { color: var(--ink-3); font-size: 15px; }

/* Support: each question folds open. */
details {
  border: 1px solid var(--line); border-radius: 14px; background: var(--surface);
  margin-top: 10px;
}
details:first-of-type, h3 + details { margin-top: 14px; }
summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; position: relative;
  font-weight: 620; color: var(--ink); line-height: 1.4;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: ""; position: absolute; right: 20px; top: 50%; width: 9px; height: 9px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg); transition: transform .15s ease;
}
details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
details:target { border-color: var(--accent); }
.answer { padding: 0 18px 16px; }
.answer > p:first-child { margin-top: 0; }

/* A call to action button. */
.button {
  display: inline-block; margin-top: 18px; padding: 12px 20px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 650; text-decoration: none;
}
.button:hover { filter: brightness(1.08); }

.note { font-size: 14px; color: var(--ink-3); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-3); font-size: 14px; }
.foot .bar { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
.foot p { margin: 0; color: var(--ink-3); }
.foot .links { display: flex; gap: 18px; }
.foot a { color: var(--ink-2); text-decoration: none; }
.foot a:hover { color: var(--ink); }

@media (min-width: 640px) {
  .top nav a:first-child { display: inline; }
}
@media (max-width: 639px) {
  .hero { padding-top: 40px; }
  section { padding: 36px 0; }
  .top .bar { gap: 8px; }
  .top nav a { padding: 6px 8px; font-size: 14.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .app, summary::after { transition: none; }
}

/* A how-to page: the contents at the top, numbered steps, and the screenshots and videos. */
.contents {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 32px;
  padding: 24px; margin: 8px 0 40px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.contents .group { margin: 0; font-weight: 680; }
.contents .group a { color: var(--ink); text-decoration: none; }
.contents ul { list-style: none; padding: 0; margin: 6px 0 14px; font-size: 15px; }
.contents li { margin: 4px 0; }
.contents li a { color: var(--ink-2); text-decoration: none; }
.contents a:hover { color: var(--accent); }

/* Headings jump under the sticky bar, not behind it. */
[id] { scroll-margin-top: 72px; }

body.guide section h3 { padding-top: 8px; }
body.guide section h3 + p { margin-top: 8px; }
body.guide ol { padding-left: 1.4em; }
body.guide ol li::marker { color: var(--accent); font-weight: 700; }
.tip {
  margin-top: 14px; padding: 12px 16px; border-radius: 12px;
  background: var(--accent-soft); color: var(--ink-2); font-size: 15.5px;
}
.tip strong { color: var(--ink); }

/* Phone screenshots and videos are tall: keep them phone-sized, not page-wide. */
figure.media { margin: 20px 0 4px; max-width: 300px; }
figure.media img, figure.media video, figure.media .slot {
  display: block; width: 100%; border-radius: 22px; border: 1px solid var(--line); background: #000;
}
figure.media figcaption { margin-top: 8px; font-size: 14px; color: var(--ink-3); line-height: 1.45; }
figure.media .slot {
  aspect-ratio: 9 / 19.5; display: grid; place-content: center; text-align: center; gap: 6px;
  background: var(--surface); border: 2px dashed var(--line); color: var(--ink-3); font-size: 14px;
}
figure.media.video .slot { aspect-ratio: 9 / 16; }
figure.media .slot code { font-size: 12px; }
