/* cheaha.app: the apps' deep blue (#0B4F72) and light sea accent (#7FCBE0), light and dark. */
:root {
  --deep: #0b4f72;
  --sea: #7fcbe0;
  --bg: #ffffff;
  --band: #f2f6f9;
  --text: #15232c;
  --muted: #52636f;
  --card: #ffffff;
  --border: #d6e1e8;
  --accent: var(--deep);
  --accent-text: #ffffff;
  --link: #0b5f8a;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c141a;
    --band: #111c24;
    --text: #e2ebf1;
    --muted: #9db0bd;
    --card: #15222c;
    --border: #273846;
    --accent: #2a7fa8;
    --link: var(--sea);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

a { color: var(--link); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-row { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 16px; }

.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 600; }
.brand img { border-radius: 7px; }

.site-header nav { display: flex; align-items: center; gap: 20px; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: 15px; }
.site-header nav a:hover { color: var(--text); }

.button {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--accent);
}
.button:hover { filter: brightness(1.1); }
.button.ghost { background: transparent; color: var(--text); border-color: var(--border); }
nav a.button.small { padding: 6px 14px; color: var(--accent-text); }

/* The home page's opening: the three apps' story over Cheaha's ridgelines. */
.hero { padding: 72px 0 64px; position: relative; overflow: hidden; }
.hero::after {
  /* The ridgelines along the foot of every app's icon, faint, along the foot of the hero. */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 120px; pointer-events: none;
  background: linear-gradient(to top, color-mix(in srgb, var(--deep) 14%, transparent), transparent);
  clip-path: polygon(0 62%, 9% 30%, 17% 52%, 26% 40%, 50% 80%, 76% 44%, 86% 22%, 100% 50%, 100% 100%, 0 100%);
}
.hero-row { display: flex; align-items: center; justify-content: space-between; gap: 40px; position: relative; z-index: 1; }
.hero h1 { font-size: clamp(36px, 6vw, 56px); line-height: 1.1; margin: 0 0 16px; letter-spacing: -0.02em; }
.lead { font-size: 19px; color: var(--muted); max-width: 640px; margin: 0 0 28px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.platforms { color: var(--muted); font-size: 14px; margin-top: 20px; }
.hero-icons { display: grid; grid-template-columns: repeat(2, 120px); gap: 18px; flex-shrink: 0; }
.hero-icons img { width: 120px; height: 120px; border-radius: 26px; box-shadow: 0 16px 40px rgb(11 79 114 / 0.35); }
.hero-icons img:first-child { grid-column: span 2; justify-self: center; }

section { padding: 64px 0; }
.band { background: var(--band); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: 30px; margin: 0 0 8px; letter-spacing: -0.01em; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.grid + .grid { margin-top: 20px; }

.card { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 22px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); }
.note { color: var(--muted); }

/* The apps, one card each: icon, name, tagline, what it does, downloads. */
.app-card { display: flex; flex-direction: column; gap: 12px; }
.app-card .app-title { display: flex; align-items: center; gap: 12px; margin: 0; font-size: 20px; }
.app-card .app-title img { border-radius: 12px; flex: none; }
.app-card .tagline { color: var(--text); font-weight: 500; }
.app-card .desc { flex: 1 0 auto; }
.app-card ul { list-style: none; padding: 0; margin: 0; }
.app-card li { padding: 6px 0; border-top: 1px solid var(--border); }
.app-card li:first-child { border-top: 0; }
.app-card .soon { color: var(--muted); }
.app-card .more { font-size: 15px; }

/* What the three share. */
.features h3 { display: flex; align-items: center; gap: 8px; }

/* The footer: the brand and copyright, then the links, beside each other on wide screens. */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 48px; color: var(--muted); font-size: 15px; }
.footer-row { display: grid; gap: 24px; }
.site-footer p { margin: 10px 0 0; }
.site-footer p a { color: var(--muted); }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover, .site-footer p a:hover { color: var(--text); text-decoration: underline; }
@media (min-width: 760px) {
  .footer-row { grid-template-columns: minmax(260px, 1fr) minmax(0, 560px); align-items: start; }
  .footer-links { justify-content: flex-end; }
}

@media (max-width: 860px) {
  .grid, .grid.two { grid-template-columns: 1fr; }
  .hero-row { flex-direction: column-reverse; align-items: flex-start; }
  .hero-icons { grid-template-columns: repeat(3, 72px); gap: 12px; }
  .hero-icons img { width: 72px; height: 72px; border-radius: 16px; }
  .hero-icons img:first-child { grid-column: auto; }
  .site-header nav a:not(.button) { display: none; }
}

/* Terms and privacy, made from legal/ by tools/make-pages.py. */
.legal { max-width: 760px; }
.legal h1 { font-size: 36px; line-height: 1.2; margin: 0 0 6px; }
.legal h2 { font-size: 22px; margin: 32px 0 8px; }
.legal h3 { font-size: 18px; margin: 24px 0 6px; }
.legal li { margin: 4px 0; }
.placeholder-notice { border: 1px solid var(--border); border-left: 4px solid var(--accent); background: var(--band); border-radius: 6px; padding: 12px 16px; }

/* Documentation and support, made from docs/user/ by tools/make-pages.py. */
.docs-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
.docs-nav { position: sticky; top: 84px; font-size: 15px; }
.docs-nav-home { margin: 0 0 8px; font-weight: 600; }
.docs-nav-home a { color: var(--text); text-decoration: none; }
.docs-nav h2 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 20px 0 6px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; }
.docs-nav li a { display: block; padding: 3px 0 3px 10px; border-left: 2px solid var(--border); color: var(--muted); text-decoration: none; }
.docs-nav li a:hover { color: var(--text); }
.docs-nav li a[aria-current="page"] { color: var(--text); font-weight: 600; border-left-color: var(--accent); }
.docs-article { max-width: 760px; }
.docs-article h1 { font-size: 36px; line-height: 1.2; margin: 0 0 8px; }
.docs-article h2 { font-size: 22px; margin: 32px 0 8px; }
.docs-article h3 { font-size: 18px; margin: 24px 0 6px; }
.docs-article li { margin: 4px 0; }
.docs-article ul ul { margin: 4px 0; }
.docs-article code, .legal code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 0.92em; background: var(--band); padding: 1px 4px; border-radius: 4px; }
.doc-products { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 20px; }
.doc-products span { font-size: 13px; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 10px; }
.docs-index h1 { font-size: 36px; line-height: 1.2; margin: 0 0 8px; }
.docs-index h2 { font-size: 22px; margin: 36px 0 12px; display: flex; align-items: center; gap: 10px; }
.docs-index h2 img { border-radius: 7px; }
.doc-card { display: block; color: inherit; text-decoration: none; }
.doc-card:hover { border-color: var(--accent); }
.doc-card h3 { color: var(--link); }

@media (max-width: 860px) {
  .docs-layout { grid-template-columns: 1fr; gap: 24px; }
  .docs-nav { position: static; border-bottom: 1px solid var(--border); padding-bottom: 16px; }
}
