/* ericstager.com: the same soft dark house style as the apps.
   Tokens below are the only source of colour, size and spacing. */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/Inter-Regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/Inter-Medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("fonts/Inter-Bold.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 400; font-display: swap; src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "JetBrains Mono"; font-weight: 500; font-display: swap; src: url("fonts/JetBrainsMono-Medium.woff2") format("woff2"); }

:root {
  /* surfaces and lines: elevation comes from these steps only */
  --bg: #0E1116;
  --surface: #151A21;
  --surface2: #1B222C;
  --surface3: #232B37;
  --border: #2A3340;
  --border-strong: #3A4555;
  /* text */
  --text: #E6EDF3;
  --text-muted: #8B97A6;
  --text-faint: #5D6876;
  --on-accent: #0B0E12;
  /* colour means something */
  --accent: #4C9AFF;
  --positive: #2FBF71;
  --negative: #F2545B;
  --warning: #E3B341;
  --info: #9A8CFF;
  /* type: 28/20/15/13/11, plus the 48px wordmark of the logo lockups */
  --font-ui: "Inter", system-ui, sans-serif;
  --font-num: "JetBrains Mono", ui-monospace, monospace;
  --size-wordmark: 48px;
  --size-display: 28px;
  --size-title: 20px;
  --size-body: 15px;
  --size-small: 13px;
  --size-caption: 11px;
  /* 4px grid */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px;
  --section-gap: 64px;
  /* radii */
  --r-badge: 4px;
  --r-control: 6px;
  --r-card: 10px;
  --r-tile: 14px;
  /* sizes */
  --control-h: 32px;
  --control-h-lg: 40px;
  --header-h: 56px;
  --page-w: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 var(--size-body)/1.6 var(--font-ui);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--r-control); }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: var(--size-display); }
h2 { font-size: var(--size-title); }
h3 { font-size: var(--size-body); }
p { margin: 0; }
code, .mono { font-family: var(--font-num); font-feature-settings: "tnum"; }
code { font-size: var(--size-small); }

.wrap { max-width: var(--page-w); margin: 0 auto; padding: 0 var(--s6); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.overline {
  font-size: var(--size-caption); font-weight: 600; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--text-muted);
}
.skip { position: absolute; left: -999px; }
.skip:focus { left: var(--s4); top: var(--s3); z-index: 10; background: var(--surface2); padding: var(--s2) var(--s3); }

/* icons: Lucide outline, tinted from tokens */
.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75;
     stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------ header */
.site-header {
  position: sticky; top: 0; z-index: 5;
  height: var(--header-h);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { height: 100%; display: flex; align-items: center; gap: var(--s6); }
.brand { display: flex; align-items: center; gap: var(--s2); color: var(--text); font-weight: 600; }
.brand:hover { text-decoration: none; }
.brand-dots { display: flex; gap: 3px; }
.brand-dots span { width: 8px; height: 8px; border-radius: 50%; }
.site-nav { display: flex; gap: var(--s1); margin-left: auto; }
.site-nav a {
  display: inline-flex; align-items: center; gap: var(--s2);
  height: var(--control-h); padding: 0 var(--s3); border-radius: var(--r-control);
  color: var(--text-muted); font-size: var(--size-small); font-weight: 500;
}
.site-nav a:hover { color: var(--text); background: rgba(230, 237, 243, 0.06); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); background: rgba(76, 154, 255, 0.14); }
.site-nav img { width: 20px; height: 20px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  height: var(--control-h-lg); padding: 0 var(--s4); border-radius: var(--r-control);
  font: 600 var(--size-small)/1 var(--font-ui); border: 1px solid transparent; cursor: pointer;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #6AABFF; }
.btn-secondary { background: var(--surface2); color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--surface3); }
.btn-ghost { color: var(--text-muted); }
.btn-ghost:hover { color: var(--text); background: rgba(230, 237, 243, 0.06); }
.btn[aria-disabled="true"] { background: var(--surface2); color: var(--text-faint); border-color: var(--border); cursor: default; }

/* ------------------------------------------------------------------ badges */
.badges { display: flex; flex-wrap: wrap; gap: var(--s2); }
.badge {
  display: inline-flex; align-items: center; gap: var(--s1);
  height: 20px; padding: 0 6px; border-radius: var(--r-badge);
  font-size: var(--size-caption); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  white-space: nowrap;
}
.badge .i { width: 12px; height: 12px; stroke-width: 2.25; }
.badge-accent { color: var(--accent); background: rgba(76, 154, 255, 0.12); }
.badge-positive { color: var(--positive); background: rgba(47, 191, 113, 0.12); }
.badge-warning { color: var(--warning); background: rgba(227, 179, 65, 0.12); }
.badge-info { color: var(--info); background: rgba(154, 140, 255, 0.12); }
.badge-neutral { color: var(--text-muted); background: rgba(139, 151, 166, 0.12); }

/* ------------------------------------------------------------------ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); }
.card-pad { padding: var(--s4); }

/* ------------------------------------------------------------------ home hero */
.hero { padding: 88px 0 var(--section-gap); }
.hero h1 { font-size: var(--size-wordmark); letter-spacing: -0.02em; line-height: 1.1; max-width: 760px; margin-top: var(--s3); text-wrap: balance; }
.hero .lede { font-size: var(--size-title); line-height: 1.5; color: var(--text-muted); max-width: 680px; margin-top: var(--s5); }
.hero .actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s8); }

section { padding-bottom: var(--section-gap); }
.section-head { display: flex; flex-direction: column; gap: var(--s2); margin-bottom: var(--s6); }
.section-head p { color: var(--text-muted); max-width: 680px; }

/* app cards on the home page */
.apps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.app-card { display: flex; flex-direction: column; gap: var(--s4); padding: var(--s5); color: var(--text); }
.app-card:hover { text-decoration: none; border-color: var(--border-strong); background: var(--surface2); }
.app-card .shot { border-radius: var(--r-control); border: 1px solid var(--border); overflow: hidden; aspect-ratio: 16 / 10; }
.app-card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.app-card .who { display: flex; align-items: center; gap: var(--s3); }
.app-card .who img { width: 48px; height: 48px; }
.app-card .who h2 { font-size: var(--size-title); }
.app-card p { color: var(--text-muted); font-size: var(--size-small); flex-grow: 1; }
.app-card .more { display: inline-flex; align-items: center; gap: var(--s1); color: var(--accent); font-size: var(--size-small); font-weight: 600; }

/* three reasons */
.reasons { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.reason { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }
.reason .tile, .feature .tile {
  width: 36px; height: 36px; border-radius: var(--r-control); display: grid; place-items: center;
  background: rgba(76, 154, 255, 0.12); color: var(--accent); margin-bottom: var(--s2);
}
.reason p, .feature p { color: var(--text-muted); font-size: var(--size-small); }

/* ------------------------------------------------------------------ app pages */
.app-hero { padding: 72px 0 var(--s10); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s10); align-items: center; }
.lockup { display: flex; align-items: center; gap: var(--s5); }
.lockup img { width: 72px; height: 72px; }
.lockup .words { display: inline-flex; flex-direction: column; gap: 6px; }
.wordmark { font-size: var(--size-wordmark); font-weight: 600; letter-spacing: -0.02em; line-height: 1; }
/* tagline lockup rule: 0.25 × wordmark, tracking 0.14em, indent 0.22em; hidden below a 44px wordmark */
.tagline {
  font-size: calc(var(--size-wordmark) * 0.25); font-weight: 600; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-muted); line-height: 1; padding-left: 0.22em;
}
.app-hero .lede { font-size: var(--size-title); line-height: 1.5; margin-top: var(--s6); }
.app-hero .sub { color: var(--text-muted); margin-top: var(--s3); }
.app-hero .badges { margin-top: var(--s5); }
.app-hero .actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s6); }

.frame { background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-card); overflow: hidden; }
.frame-bar { height: 28px; display: flex; align-items: center; gap: 6px; padding: 0 var(--s3); border-bottom: 1px solid var(--border); background: var(--surface2); }
.frame-bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--surface3); border: 1px solid var(--border-strong); }
.frame-bar .title { width: auto; height: auto; border: 0; background: none; margin-left: var(--s2); font-size: var(--size-caption); color: var(--text-faint); border-radius: 0; }
figure { margin: 0; }
figcaption { margin-top: var(--s2); font-size: var(--size-small); color: var(--text-faint); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.feature { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s2); }

.shots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.shots .wide { grid-column: 1 / -1; }

/* download */
.downloads { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s4); }
.dl { padding: var(--s5); display: flex; flex-direction: column; gap: var(--s3); }
.dl .top { display: flex; align-items: center; justify-content: space-between; gap: var(--s2); }
.dl h3 { display: flex; align-items: center; gap: var(--s2); }
.dl p { color: var(--text-muted); font-size: var(--size-small); flex-grow: 1; }
.dl.primary { border-color: rgba(76, 154, 255, 0.5); }
pre {
  margin: 0; padding: var(--s3); overflow-x: auto;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-control);
  font: 400 var(--size-small)/1.6 var(--font-num); color: var(--text);
}
pre .c { color: var(--text-faint); }

.note { display: flex; gap: var(--s3); padding: var(--s4); align-items: flex-start; }
.note .i { color: var(--info); margin-top: 3px; }
.note p { color: var(--text-muted); font-size: var(--size-small); }

/* ------------------------------------------------------------------ footer */
.site-footer { border-top: 1px solid var(--border); padding: var(--s8) 0 var(--s10); color: var(--text-faint); font-size: var(--size-small); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: var(--s4) var(--s8); justify-content: space-between; }
.site-footer nav { display: flex; gap: var(--s4); flex-wrap: wrap; }
.site-footer a { color: var(--text-muted); }

/* ------------------------------------------------------------------ small screens */
@media (max-width: 900px) {
  .apps, .reasons, .features, .downloads { grid-template-columns: minmax(0, 1fr); }
  .app-hero { grid-template-columns: minmax(0, 1fr); padding-top: var(--s10); }
  .shots { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  :root { --size-wordmark: 36px; --section-gap: 48px; }
  .tagline { display: none; }
  .wrap { padding: 0 var(--s4); }
  .hero { padding-top: var(--s10); }
  .site-nav .label { display: none; }
  .lockup img { width: 56px; height: 56px; }
}
