/* PennyPilot site — one stylesheet for every page. */

:root {
  --bg: #ffffff;
  --bg-soft: #f5f6f8;
  --surface: #ffffff;
  --border: #e3e5ea;
  --text: #14161a;
  --text-dim: #5c6370;
  --accent: #2f9e44;
  --accent-soft: #e9f7ec;
  --shadow: 0 1px 2px rgba(20, 22, 26, .04), 0 8px 24px rgba(20, 22, 26, .06);
  --radius: 16px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1013;
    --bg-soft: #16191e;
    --surface: #16191e;
    --border: #262a31;
    --text: #f2f4f7;
    --text-dim: #9aa2af;
    --accent: #51cf66;
    --accent-soft: #13291a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .35);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
        Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header ---------- */

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

header.site .wrap {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  letter-spacing: -.01em;
  color: var(--text);
  text-decoration: none;
  margin-right: auto;
}

.brand img {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: block;
}

nav.site a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 15px;
  margin-left: 22px;
}

nav.site a:hover,
nav.site a[aria-current="page"] { color: var(--text); }

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

.hero {
  padding: 72px 0 8px;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 56px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(38px, 6vw, 58px);
  line-height: 1.06;
  letter-spacing: -.03em;
  margin: 0 0 20px;
  font-weight: 700;
}

.hero p.lede {
  font-size: 21px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0 0 28px;
  max-width: 34em;
}

.hero-art img {
  width: 100%;
  border-radius: 34px;
  box-shadow: var(--shadow);
  display: block;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 22px;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
}

.btn:hover { filter: brightness(1.06); }

.btn.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.note {
  font-size: 14px;
  color: var(--text-dim);
}

/* ---------- sections ---------- */

section { padding: 72px 0; }

section.alt {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

h2 {
  font-size: clamp(28px, 3.4vw, 36px);
  letter-spacing: -.02em;
  line-height: 1.15;
  margin: 0 0 14px;
  font-weight: 700;
}

.section-lede {
  color: var(--text-dim);
  font-size: 18px;
  max-width: 42em;
  margin: 0 0 40px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -.01em;
}

.card p {
  margin: 0;
  color: var(--text-dim);
  font-size: 15.5px;
}

.card .ic {
  font-size: 22px;
  line-height: 1;
  display: block;
  margin-bottom: 14px;
}

/* screenshot strip */

.shots {
  display: flex;
  gap: 22px;
  overflow-x: auto;
  padding: 4px 24px 24px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.shots figure {
  margin: 0;
  flex: 0 0 240px;
  scroll-snap-align: center;
}

.shots img {
  width: 100%;
  border-radius: 26px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: block;
}

.shots figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-dim);
  text-align: center;
}

/* ---------- long-form pages ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 56px 24px 24px;
}

.doc h1 {
  font-size: clamp(32px, 5vw, 44px);
  letter-spacing: -.025em;
  line-height: 1.1;
  margin: 0 0 10px;
}

.doc .meta {
  color: var(--text-dim);
  font-size: 15px;
  margin: 0 0 40px;
}

.doc h2 {
  font-size: 24px;
  margin: 44px 0 12px;
  scroll-margin-top: 80px;
}

.doc h3 {
  font-size: 18px;
  margin: 28px 0 8px;
}

.doc p, .doc li { color: var(--text); }

.doc ul, .doc ol { padding-left: 22px; }

.doc li { margin-bottom: 8px; }

.callout {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 28%, transparent);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 28px 0;
}

.callout p { margin: 0; }

.toc {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 40px;
}

.toc p {
  margin: 0 0 10px;
  font-weight: 650;
  font-size: 15px;
}

.toc ol {
  margin: 0;
  padding-left: 20px;
  font-size: 15.5px;
}

.toc li { margin-bottom: 4px; }

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

.faq {
  border-top: 1px solid var(--border);
  padding: 20px 0;
}

.faq:last-of-type { border-bottom: 1px solid var(--border); }

.faq h3 { margin: 0 0 6px; font-size: 17.5px; }

.faq p { margin: 0; color: var(--text-dim); font-size: 16px; }

table.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 15.5px;
  margin: 20px 0;
}

table.spec th, table.spec td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

table.spec th {
  width: 30%;
  font-weight: 600;
  color: var(--text-dim);
}

/* ---------- footer ---------- */

footer.site {
  border-top: 1px solid var(--border);
  padding: 36px 0 56px;
  color: var(--text-dim);
  font-size: 14.5px;
}

footer.site .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 26px;
  align-items: center;
}

footer.site a { color: var(--text-dim); text-decoration: none; }

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

footer.site .spacer { margin-left: auto; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 48px;
    text-align: left;
  }

  .hero-art { max-width: 260px; margin: 0 auto; }

  section { padding: 56px 0; }

  nav.site a { margin-left: 16px; font-size: 14px; }

  footer.site .spacer { margin-left: 0; flex-basis: 100%; }
}
