/* apps.botit.fi — shared stylesheet
   Plain CSS. No build step, no imports, no third-party requests.
   Typography uses the platform's own UI font — on iOS/macOS that is SF,
   which matches the app itself and costs zero downloads. */

:root {
  --bg: #faf8f4;
  --bg-raised: #ffffff;
  --bg-sunken: #f2eee7;
  --text: #1e2422;
  --text-muted: #5c6663;
  --accent: #2f5d50;
  --accent-text: #24483e;
  --border: #e2dcd2;
  --rule: #d8d1c5;

  --measure: 34rem;
  --radius: 10px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14181a;
    --bg-raised: #1c2124;
    --bg-sunken: #191d20;
    --text: #e8e6e1;
    --text-muted: #9aa4a3;
    --accent: #7fc0aa;
    --accent-text: #93cdb8;
    --border: #2a3134;
    --rule: #2a3134;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout ---------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* The phone strip needs more room than the reading measure allows. */
.wrap-wide {
  max-width: 50rem;
}

.centered {
  text-align: center;
}

main {
  padding-bottom: 4rem;
}

section {
  margin: 3rem 0;
}

/* ---------- Typography ---------- */

h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 0.6em;
  text-wrap: balance;
}

h1 {
  font-size: 2.1rem;
  font-weight: 700;
}

h2 {
  font-size: 1.35rem;
  font-weight: 650;
  margin-top: 2.5rem;
}

h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-top: 1.75rem;
}

p,
ul,
ol,
dl {
  margin: 0 0 1.1rem;
}

ul,
ol {
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.4rem;
}

li::marker {
  color: var(--text-muted);
}

a {
  color: var(--accent-text);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

strong {
  font-weight: 650;
}

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

.lead {
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.muted {
  color: var(--text-muted);
}

.small {
  font-size: 0.9rem;
}

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

header.site {
  padding: 3.5rem 0 0;
}

header.site .eyebrow {
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

/* Hero — the front page only; the privacy page keeps the plain header. */

header.hero {
  text-align: center;
  padding: 3.5rem 0 1rem;
}

header.hero .lead {
  max-width: 30rem;
  margin-left: auto;
  margin-right: auto;
}

.app-icon {
  display: block;
  width: 84px;
  height: 84px;
  margin: 0 auto 1.5rem;
  border-radius: 19px;
}

.icon-bg {
  fill: var(--accent);
}

.icon-route {
  stroke: var(--bg-raised);
  stroke-width: 5;
  stroke-linecap: round;
  opacity: 0.75;
}

.icon-dot,
.icon-pin {
  fill: var(--bg-raised);
}

.cta {
  margin-top: 1.75rem;
}

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

/* Phone mockups */

.screens {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  margin: 2rem 0 1rem;
}

.screen {
  margin: 0;
  text-align: center;
}

.screen svg,
.screen .phone-shot {
  display: block;
  width: 100%;
  height: auto;
  max-width: 220px;
  margin: 0 auto;
}

.screen figcaption {
  margin-top: 0.9rem;
  font-weight: 650;
  font-size: 0.95rem;
}

.screen figcaption span {
  display: block;
  margin-top: 0.2rem;
  font-weight: 400;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.ph-frame {
  fill: var(--bg-raised);
  stroke: var(--border);
  stroke-width: 2;
}

.ph-screen {
  fill: var(--bg-sunken);
}

.ph-notch {
  fill: var(--border);
}

.ph-land {
  fill: var(--accent);
  opacity: 0.16;
}

.ph-land.dim {
  opacity: 0.09;
}

.ph-water {
  fill: var(--accent);
  opacity: 0.28;
}

.ph-route {
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 1 10;
  opacity: 0.9;
}

.ph-here {
  fill: var(--accent);
}

.ph-here-ring {
  stroke: var(--accent);
  stroke-width: 2;
  opacity: 0.4;
}

.ph-pin {
  fill: var(--accent);
  opacity: 0.85;
}

.ph-card {
  fill: var(--bg-raised);
  stroke: var(--border);
  stroke-width: 1.5;
}

.ph-dot {
  fill: var(--accent);
  opacity: 0.5;
}

.ph-title {
  fill: var(--text);
  opacity: 0.8;
}

.ph-line {
  fill: var(--text);
  opacity: 0.45;
}

.ph-line.dim {
  opacity: 0.22;
}

.ph-hero-block {
  fill: var(--accent);
  opacity: 0.14;
}

.ph-tag {
  fill: var(--accent);
  opacity: 0.35;
}

.ph-tag.dim {
  opacity: 0.18;
}

.ph-button {
  fill: var(--accent);
  opacity: 0.9;
}

.backlink {
  display: inline-block;
  font-size: 0.9rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  text-decoration: none;
}

.backlink:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

/* ---------- Cards & callouts ---------- */

.card {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 1.5rem 0;
}

.card :last-child {
  margin-bottom: 0;
}

.card h2,
.card h3 {
  margin-top: 0;
}

.summary {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 2rem 0;
}

.summary :last-child {
  margin-bottom: 0;
}

.summary h2 {
  margin-top: 0;
  font-size: 1rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------- Feature list ---------- */

.features {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.features li {
  padding: 0.9rem 0;
  border-top: 1px solid var(--rule);
  margin: 0;
}

.features li:last-child {
  border-bottom: 1px solid var(--rule);
}

.features b {
  display: block;
  font-weight: 650;
  margin-bottom: 0.15rem;
}

.features span {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* ---------- Contact ---------- */

.contact-email {
  font-size: 1.15rem;
  font-weight: 650;
  display: inline-block;
  margin-bottom: 0.3rem;
}

/* ---------- FAQ ---------- */

.faq h3 {
  margin-bottom: 0.35rem;
}

.faq p {
  color: var(--text-muted);
}

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

footer.site {
  border-top: 1px solid var(--rule);
  padding: 1.75rem 0 3rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

footer.site p {
  margin: 0 0 0.4rem;
}

footer.site a {
  color: var(--text-muted);
}

footer.site nav a + a {
  margin-left: 1rem;
}

/* ---------- Small screens ---------- */

/* Three phones side by side stop being legible well before the text does,
   so below this width the strip becomes a swipeable row. */
@media (max-width: 40rem) {
  .wrap-wide {
    padding-right: 0;
  }

  .screens {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-right: 1.5rem;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }

  .screen {
    flex: 0 0 62%;
    scroll-snap-align: start;
  }

  .wrap-wide .small {
    padding-right: 1.5rem;
  }
}

@media (max-width: 32rem) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 1.75rem;
  }

  header.site {
    padding-top: 2.5rem;
  }

  .app-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }
}

/* ---------- Print (the privacy page gets saved to PDF) ---------- */

@media print {
  :root {
    --bg: #fff;
    --bg-raised: #fff;
    --bg-sunken: #fff;
    --text: #000;
    --text-muted: #333;
    --border: #999;
    --rule: #999;
  }

  body {
    font-size: 11pt;
  }

  .backlink,
  footer.site nav {
    display: none;
  }

  a {
    text-decoration: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.85em;
    color: #333;
  }
}
