/* The landing page. Tokens are the app's Midnight theme (src/renderer/src/theme/tokens.css) and its fonts. */

@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/jetbrains-mono-latin-500-normal.woff2') format('woff2'); }

:root {
  color-scheme: dark;

  /* Midnight */
  --bg: #0d0e10;
  --panel: #111215;
  --chip: #16171b;
  --border: rgba(255, 255, 255, 0.075);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #e8e9eb;
  --muted: #8a8f98;
  --accent: #8b7cf6;
  --accent-hi: #ab9ffb;
  --accent-soft: rgba(139, 124, 246, 0.15);
  --accent-fg: #fff;
  --send-glow: 0 0 0 1px rgba(139, 124, 246, 0.5), 0 4px 18px rgba(139, 124, 246, 0.45);

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

  --radius-control: 7px;
  --radius-app: 10px;
  --radius-card: 14px;

  --gutter: 24px;
  --section: 136px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

@media (max-width: 767px) {
  :root { --gutter: 16px; --section: 88px; }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  font-feature-settings: 'cv11', 'ss01';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 600; }
ul { margin: 0; padding: 0; list-style: none; }
figure { margin: 0; }

code,
kbd {
  font-family: var(--font-mono);
  font-size: 0.86em;
  padding: 0.12em 0.4em;
  border-radius: 5px;
  background: var(--chip);
  border: 1px solid var(--border);
  color: #c4b5fd;
  white-space: nowrap;
}
kbd { color: var(--text); }

::selection { background: rgba(139, 124, 246, 0.35); }

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

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

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

.skip {
  position: absolute;
  left: 16px;
  top: -48px;
  z-index: 100;
  padding: 8px 14px;
  border-radius: var(--radius-control);
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
}
.skip:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(1160px + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.container--wide { max-width: calc(1280px + 2 * var(--gutter)); }

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

/* ------------------------------------------------------------------ Nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(13, 14, 16, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.nav.is-scrolled { border-bottom-color: var(--border); }

.nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  height: 64px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; justify-self: start; font-weight: 600; font-size: 15px; letter-spacing: -0.01em; }
/* The icon's squircle is 824 of its 1024 canvas: a 30px image shows a 24px mark. */
.brand__mark { display: grid; place-items: center; width: 24px; height: 24px; }
.brand__mark img { width: 30px; height: 30px; max-width: none; }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  padding: 6px 12px;
  border-radius: var(--radius-control);
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background-color 0.15s;
}
.nav__links a:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }

.nav__actions { display: flex; align-items: center; gap: 8px; justify-self: end; }

.icon-link {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-control);
  color: var(--muted);
  transition: color 0.15s, background-color 0.15s;
}
.icon-link:hover { color: var(--text); background: rgba(255, 255, 255, 0.04); }
.icon-link .i { width: 18px; height: 18px; }

@media (max-width: 767px) {
  .nav__inner { grid-template-columns: 1fr auto; height: 56px; }
  .nav__links { display: none; }
}

/* ------------------------------------------------------------------ Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background-color 0.15s, box-shadow 0.2s, color 0.15s, transform 0.15s var(--ease);
}
.btn .i { width: 18px; height: 18px; }
.btn--sm { height: 34px; padding: 0 14px; font-size: 14px; border-radius: 8px; }
.btn--sm .i { width: 16px; height: 16px; }
.btn--lg { height: 48px; padding: 0 22px; font-size: 15px; border-radius: 10px; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-fg);
  box-shadow: var(--send-glow), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.btn--primary:hover { background: #978af7; box-shadow: 0 0 0 1px rgba(139, 124, 246, 0.6), 0 6px 26px rgba(139, 124, 246, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.2); }
.btn--primary:active { transform: translateY(1px); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border-strong);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn--ghost .i { color: var(--muted); }

/* ------------------------------------------------------------------ Hero */

.hero { position: relative; padding-top: 96px; }
.hero::before {
  /* The light from the top, in the accent: like the icon's glow. */
  content: '';
  position: absolute;
  inset: -64px 0 auto;
  height: 820px;
  background:
    radial-gradient(ellipse 50% 60% at 50% 0%, rgba(139, 124, 246, 0.22), transparent 70%),
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(139, 124, 246, 0.07), transparent 80%);
  pointer-events: none;
}
.hero::after {
  /* A faint grid, fading out. */
  content: '';
  position: absolute;
  inset: -64px 0 auto;
  height: 760px;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  mask-image: radial-gradient(ellipse 60% 70% at 50% 0%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero__inner { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(139, 124, 246, 0.08);
  box-shadow: inset 0 0 0 1px rgba(139, 124, 246, 0.25);
  color: #c4b5fd;
  font-size: 13px;
  font-weight: 500;
}
.pill__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.2); }

.hero__title {
  margin-top: 28px;
  max-width: 15ch;
  font-size: clamp(40px, 6.4vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 600;
  background: linear-gradient(180deg, #fff 0%, #fff 45%, #b8bbc2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-wrap: balance;
}
.br-wide { display: none; }

.hero__lead {
  margin-top: 24px;
  max-width: 600px;
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  text-wrap: balance;
}

.hero__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.hero__meta { margin-top: 18px; font-size: 13px; color: var(--muted); letter-spacing: 0.01em; }

@media (max-width: 767px) {
  .hero { padding-top: 64px; }
  .hero__cta { flex-direction: column; align-self: stretch; }
  .hero__cta .btn { width: 100%; }
}

/* ------------------------------------------------------------------ App windows (the real screenshots) */

.window { position: relative; }
.window--hero { margin-top: 72px; }
@media (max-width: 767px) { .window--hero { margin-top: 56px; } }

.window__glow {
  position: absolute;
  inset: 6% 8% auto;
  height: 70%;
  background: radial-gradient(ellipse at 50% 30%, rgba(139, 124, 246, 0.32), transparent 70%);
  filter: blur(48px);
  pointer-events: none;
}

.window__frame {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 1px 0 0 rgba(255, 255, 255, 0.06) inset,
    0 30px 80px -10px rgba(0, 0, 0, 0.7),
    0 12px 32px -8px rgba(0, 0, 0, 0.5);
}
.window__frame::after {
  /* A fine rim over the image, so its edge reads the same on every theme. */
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}
.window__frame img { width: 100%; }

/* The window's traffic lights, where macOS draws them (trafficLightPosition 14,13), in the window's own points. */
.lights {
  --win-w: 1440;
  --win-h: 900;
  position: absolute;
  left: calc(14 / var(--win-w) * 100%);
  top: calc(13 / var(--win-h) * 100%);
  display: flex;
  gap: calc(8 / 12 * 100%);
  width: calc(12 / var(--win-w) * 100%);
}
.window--sm .lights { --win-w: 900; --win-h: 580; }
.lights i {
  flex: none;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #ff5f57;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.2);
}
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }

.window__frame--stack { display: grid; }
.window__frame--stack img { grid-area: 1 / 1; opacity: 0; transition: opacity 0.35s var(--ease); }
.window__frame--stack img.is-shown { opacity: 1; }


/* On a phone the hero shows the request and its response, cropped from the window (x 288..1000, y 78..790). */
@media (max-width: 599px) {
  .window--hero .window__frame { aspect-ratio: 1; }
  .window--hero .window__frame img { position: absolute; max-width: none; width: calc(1440 / 712 * 100%); left: calc(-288 / 712 * 100%); top: calc(-78 / 712 * 100%); }
  .window--hero .lights { display: none; }
}

/* ------------------------------------------------------------------ Sections */

.section { position: relative; padding-top: var(--section); }
.section--cta { padding-bottom: var(--section); }

.section__head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section__head .lead { margin-left: auto; margin-right: auto; }

.eyebrow {
  margin-bottom: 14px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-hi);
}

.h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.12;
  letter-spacing: -0.032em;
  text-wrap: balance;
}
.h3 { font-size: 15px; line-height: 1.4; letter-spacing: -0.01em; font-weight: 600; }
.h3--lg { font-size: 20px; letter-spacing: -0.02em; }

.lead {
  margin-top: 18px;
  max-width: 560px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--muted);
  text-wrap: pretty;
}

.tile {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  border-radius: 9px;
  background: linear-gradient(180deg, rgba(139, 124, 246, 0.16), rgba(139, 124, 246, 0.07));
  box-shadow: inset 0 0 0 1px rgba(139, 124, 246, 0.24);
  color: var(--accent-hi);
}
.tile .i { width: 18px; height: 18px; }

/* Two columns: a text and its media. */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; align-items: center; }
.split--media { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 56px; }
.split--flip { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
.split--flip .split__text { order: 2; }

@media (max-width: 1023px) {
  .split,
  .split--media,
  .split--flip { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .split--flip .split__text { order: 0; }
}

/* ------------------------------------------------------------------ Local */

.path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
  font-size: 13px;
}
.path__label { color: var(--muted); }
.path code { font-size: 13px; padding: 6px 10px; border-radius: 8px; white-space: normal; overflow-wrap: anywhere; }

.points {
  border-radius: var(--radius-card);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--border);
}
.point { display: flex; gap: 16px; padding: 24px; }
.point + .point { border-top: 1px solid var(--border); }
.point p { margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--muted); }

/* ------------------------------------------------------------------ Feature grid */

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  border-radius: var(--radius-card);
  overflow: hidden;
  background: var(--border);
  box-shadow: 0 0 0 1px var(--border);
}
.card { padding: 28px; background: var(--bg); transition: background-color 0.2s; }
.card:hover { background: #101114; }
.card .h3 { margin-top: 20px; }
.card p { margin-top: 6px; font-size: 15px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1023px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .grid { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 24px; }
}

/* ------------------------------------------------------------------ Themes */

.themes { margin-top: 96px; }
.themes__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; margin-bottom: 28px; }
.themes__head .muted { margin-top: 6px; font-size: 15px; }

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: 11px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--border);
}
.swatch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 12px 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font: 500 13px/1 var(--font-sans);
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.swatch:hover { color: var(--text); }
.swatch[aria-pressed='true'] { background: var(--chip); color: var(--text); box-shadow: inset 0 0 0 1px var(--border-strong); }
.swatch__dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sw-bg) 50%, var(--sw-ac) 50%);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
}

@media (max-width: 767px) {
  .themes { margin-top: 72px; }
  .swatches { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); width: 100%; }
}
@media (max-width: 599px) {
  /* Five across on a phone: the dot over its name. */
  .swatch { flex-direction: column; justify-content: center; gap: 6px; height: 54px; padding: 0 2px; font-size: 12px; }
}

/* ------------------------------------------------------------------ Protocols */

.protocols { display: grid; gap: 8px; margin-top: 32px; }
.proto {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 14px 0 8px;
  border-radius: 10px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--border);
  font-size: 15px;
}
.proto__tag {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 26px;
  border-radius: 6px;
  background: var(--cs);
  color: var(--c);
  font: 500 12px/1 var(--font-mono);
  letter-spacing: 0.02em;
}
.proto--soon { color: var(--muted); }
.soon {
  margin-left: auto;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: #c4b5fd;
  font-size: 12px;
  font-weight: 500;
}

/* ------------------------------------------------------------------ Postman */

.checks { display: grid; gap: 12px; margin-top: 28px; }
.checks li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.7; }
.checks code { white-space: normal; }
.checks .i { width: 18px; height: 18px; margin-top: 3px; color: var(--accent-hi); }

/* ------------------------------------------------------------------ Runner */

.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; margin-top: 48px; }
.facts .h3 { margin-top: 16px; }
.facts p { margin-top: 4px; font-size: 15px; line-height: 1.6; color: var(--muted); }

@media (max-width: 1023px) { .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 24px; } }
@media (max-width: 479px) { .facts { grid-template-columns: minmax(0, 1fr); gap: 28px; } }

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

.faq { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 64px; align-items: start; }
@media (max-width: 1023px) { .faq { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

.faq__list { border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: #fff; }
.faq summary .i { width: 18px; height: 18px; color: var(--muted); transition: transform 0.2s var(--ease); }
.faq details[open] summary .i { transform: rotate(180deg); }
.faq details p { padding: 0 40px 24px 0; margin-top: -6px; font-size: 15px; line-height: 1.65; color: var(--muted); }
.faq details code { white-space: normal; overflow-wrap: anywhere; }

/* ------------------------------------------------------------------ Download */

.cta {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 72px 32px;
  border-radius: 20px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(139, 124, 246, 0.18), transparent 70%),
    linear-gradient(180deg, #16171b, #0f1013);
  box-shadow: inset 0 0 0 1px var(--border-strong), 0 30px 80px -30px rgba(0, 0, 0, 0.8);
}
.cta__icon { width: 96px; height: 96px; margin: -8px 0 20px; }
.cta .lead { margin-left: auto; margin-right: auto; }
.cta .hero__cta { margin-top: 32px; }
.note { margin-top: 18px; max-width: 460px; font-size: 13px; line-height: 1.6; color: var(--muted); }
.note kbd { font-size: 12px; }

@media (max-width: 767px) {
  .cta { padding: 56px 20px; border-radius: 16px; }
  .cta .hero__cta { align-self: stretch; }
}

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

.footer { border-top: 1px solid var(--border); padding: 40px 0; }
.footer__inner { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.footer__brand { display: flex; flex-direction: column; gap: 8px; }
.footer__brand .muted { font-size: 13px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 4px 24px; font-size: 14px; color: var(--muted); }
.footer__links a:hover { color: var(--text); }
.footer__copy { justify-self: end; font-size: 13px; }

@media (max-width: 767px) {
  .footer__inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .footer__copy { justify-self: start; }
}

/* ------------------------------------------------------------------ Breakpoints of the hero */

@media (min-width: 1024px) {
  .br-wide { display: inline; }
  .hero__title { max-width: none; }
}

/* ------------------------------------------------------------------ Motion */

.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  *,
  *::before,
  *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
