/* Hierax — hierax.app
   Colours come from the app icon (docs/brand/README.md in the app repo). */

:root {
  color-scheme: light dark;

  --bg: #f6f8fc;
  --surface: #ffffff;
  --ink: #0e1a3a;
  --ink-2: #4a5672;
  --line: #e1e6f0;
  --accent: #015ac2;
  --accent-soft: #e6f0fd;
  --panel: #e8edf5;

  /* The icon's background, top right to bottom. */
  --blue-1: #1991fd;
  --blue-2: #015ac2;
  --blue-3: #012e7a;
  --blue-4: #01215d;

  --radius: 18px;
  --page: 1080px;
  --gutter: 16px;
  --overlap: clamp(72px, 18vw, 220px);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #070c1a;
    --surface: #0f172b;
    --ink: #e9eef8;
    --ink-2: #a3aec6;
    --line: #1e2a45;
    --accent: #6cb4ff;
    --accent-soft: #12264a;
    --panel: #10192e;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p, li { text-wrap: pretty; }

.wrap {
  width: 100%;
  max-width: calc(var(--page) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* Header */

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font: 700 19px/1 var(--font-display);
  letter-spacing: -0.01em;
}
.brand img { width: 32px; height: 32px; }

.site-nav { display: flex; gap: 22px; font-size: 15px; }
.site-nav a { color: inherit; text-decoration: none; opacity: 0.85; }
.site-nav a:hover { opacity: 1; text-decoration: underline; }

/* Hero */

.hero {
  color: #fff;
  background:
    radial-gradient(120% 90% at 85% -10%, var(--blue-1) 0%, transparent 60%),
    linear-gradient(165deg, var(--blue-2) 0%, var(--blue-3) 60%, var(--blue-4) 100%);
}

.hero-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-top: 40px;
  padding-bottom: calc(var(--overlap) + 72px);
}

.hero-icon {
  width: 168px;
  height: 168px;
  filter: drop-shadow(0 18px 36px rgba(0, 12, 40, 0.45));
}

.hero h1 {
  margin-top: 28px;
  font-size: clamp(48px, 9vw, 76px);
  font-weight: 800;
}

.tagline {
  margin: 10px 0 0;
  font: 600 clamp(21px, 3.4vw, 28px)/1.25 var(--font-display);
  letter-spacing: -0.015em;
}

.lede {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.84);
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: 32px;
  padding: 15px 26px;
  border-radius: 999px;
  background: #fff;
  color: var(--blue-2);
  font-weight: 650;
  font-size: 17px;
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 10, 40, 0.3);
}
.cta:hover { background: #eef5ff; text-decoration: none; }
.cta .icon { width: 20px; height: 20px; }

/* Before the TestFlight link exists: the same pill, outlined and inert. */
.cta-soon {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.45);
  cursor: default;
}

.hero-meta {
  margin: 18px 0 0;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.72);
}

/* The main screenshot, pulled up over the bottom of the hero. */

.showcase { margin-top: calc(-1 * var(--overlap)); }
.showcase img {
  width: 100%;
  filter: drop-shadow(0 24px 48px rgba(0, 12, 40, 0.35));
}

/* Sections */

.section { padding: 88px 0 0; }

.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: clamp(30px, 4.6vw, 40px); }

.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.feature {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.feature h3 { margin-top: 18px; font-size: 20px; }
.feature p { margin: 8px 0 0; color: var(--ink-2); font-size: 16px; }

.badge {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}

kbd {
  font: 600 0.82em/1 var(--font);
  padding: 0.18em 0.42em;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg);
  color: var(--ink);
  white-space: nowrap;
}

/* Screenshots */

.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
/* Figures in a row stretch to the same height, so panels and captions line up. */
.shot { display: flex; flex-direction: column; margin: 0; }
.shot a {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: var(--radius);
  background: var(--panel);
}
.shot img { width: 100%; filter: drop-shadow(0 10px 22px rgba(0, 12, 40, 0.28)); }
.shot img.small { width: 62%; }
.shot figcaption { margin-top: 12px; color: var(--ink-2); font-size: 15px; }

/* Privacy band */

.private {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 40px;
  align-items: start;
  padding: 44px;
  border-radius: calc(var(--radius) + 6px);
  color: #fff;
  background: linear-gradient(160deg, var(--blue-3) 0%, var(--blue-4) 100%);
}
.private h2 { font-size: clamp(28px, 4vw, 36px); }
.private > div > p { margin: 12px 0 0; color: rgba(255, 255, 255, 0.8); }
.private a { color: #fff; }

.points { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.points li { display: flex; gap: 14px; }
.points .icon { margin-top: 2px; color: #8cc6ff; }
.points strong { display: block; }
.points span { color: rgba(255, 255, 255, 0.78); font-size: 16px; }

/* Requirements and support */

.facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.fact {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.fact h2 { font-size: 24px; }
.fact ul { margin: 14px 0 0; padding-left: 1.2em; color: var(--ink-2); }
.fact li + li { margin-top: 6px; }
.fact p { margin: 14px 0 0; color: var(--ink-2); }

/* Long-form pages (privacy policy) */

.plain-header { border-bottom: 1px solid var(--line); }

.prose { max-width: 720px; padding-top: 56px; padding-bottom: 24px; }
.prose h1 { font-size: clamp(34px, 5vw, 44px); }
.prose .updated { margin: 10px 0 0; color: var(--ink-2); font-size: 15px; }
.prose h2 { margin-top: 44px; font-size: 24px; }
.prose h3 { margin-top: 28px; font-size: 19px; }
.prose p, .prose li { color: var(--ink); }
.prose p { margin: 14px 0 0; }
.prose ul, .prose ol { margin: 14px 0 0; padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose table { width: 100%; margin-top: 16px; border-collapse: collapse; font-size: 16px; }
.prose th, .prose td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--surface); }
.prose .pending {
  margin-top: 28px;
  padding: 20px 22px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
}

/* Footer */

.site-footer {
  margin-top: 96px;
  padding: 36px 0 48px;
  border-top: 1px solid var(--line);
  color: var(--ink-2);
  font-size: 14px;
}
.site-footer .row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 24px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a { color: var(--ink-2); }
.site-footer .legal { margin: 16px 0 0; max-width: 760px; font-size: 13px; }

/* Narrow screens */

@media (max-width: 860px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .private { grid-template-columns: 1fr; padding: 32px 24px; gap: 28px; }
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .site-nav { gap: 16px; font-size: 14px; }
  .hero-body { padding-top: 24px; padding-bottom: calc(var(--overlap) + 52px); }
  .hero-icon { width: 136px; height: 136px; }
  .lede { font-size: 17px; }
  .section { padding-top: 64px; }
  .features, .facts, .gallery { grid-template-columns: 1fr; }
  .shot a { padding: 14px; }
  .feature, .fact { padding: 22px; }
}
