/**
 * SOURCE OF TRUTH KEYWORDS: site-styles, site-reset, nav, buttons, hero, product-picture, pill-mock
 * WHAT:  The reset, the sticky nav, the buttons, the hero and the CSS-drawn product picture (a window being typed into and the recording pill).
 * WHY:   Everything above the fold. The product picture is drawn in CSS rather than shipped as a screenshot so it is sharp at any size, follows the colour scheme, and cannot go stale when the app's look changes.
 * WHERE: Second stylesheet loaded by site/index.html, after tokens.css.
 */

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

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

body {
  margin: 0;
  background: var(--page);
  background-image: var(--glow);
  background-repeat: no-repeat;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* A backstop, not the fix: `clip` (unlike `hidden`) leaves position: sticky working, and means a
     single overflowing element can never put a horizontal scrollbar on the whole page. */
  overflow-x: clip;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
}

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

.skip {
  position: absolute;
  left: var(--space-4);
  top: -80px;
  z-index: 20;
  padding: var(--space-2) var(--space-4);
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: var(--radius-input);
}
.skip:focus {
  top: var(--space-4);
}

.wrap {
  width: 100%;
  max-width: var(--content);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Nav ─────────────────────────────────────────────────────────────── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--page) 86%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 0.5px solid transparent;
  transition: border-color var(--motion-medium) var(--ease);
}
.nav[data-stuck="true"] {
  border-bottom-color: var(--hairline);
}
.nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: var(--space-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  font-size: 15px;
}
.nav-links a {
  color: var(--text-2);
  text-decoration: none;
  transition: color var(--motion-fast) var(--ease);
}
.nav-links a:hover {
  color: var(--text);
}

/* ── Buttons ─────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 44px;
  padding-inline: var(--space-5);
  border-radius: var(--radius-full);
  border: 0.5px solid var(--hairline);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: transform var(--motion-fast) var(--ease), background var(--motion-fast) var(--ease);
}
.btn:hover {
  background: var(--sunken-strong);
}
.btn:active {
  transform: scale(0.98);
}
.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
}
.btn-primary:hover {
  background: var(--accent);
  filter: brightness(1.06);
}
.btn-lg {
  height: 52px;
  padding-inline: var(--space-6);
  font-size: 16px;
}
.btn-sm {
  height: 36px;
  padding-inline: var(--space-4);
  font-size: 14px;
  box-shadow: none;
}
.btn svg {
  width: 18px;
  height: 18px;
}

/* ── Hero ────────────────────────────────────────────────────────────── */

.hero {
  padding-block: var(--space-12) var(--space-10);
  text-align: center;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--accent-soft);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero h1 {
  margin: var(--space-5) auto 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(34px, 9.2vw, 112px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}
.hero h1 em {
  font-style: normal;
  color: var(--accent);
}
.lede {
  max-width: 34em;
  margin: var(--space-5) auto 0;
  font-size: clamp(18px, 2.2vw, 21px);
  color: var(--text-2);
}
.hero-cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-6);
}
.fine {
  margin: var(--space-4) 0 0;
  font-size: 14px;
  color: var(--text-3);
}
.fine a {
  color: var(--text-2);
}

/* ── Product picture ─────────────────────────────────────────────────── */

.stage {
  position: relative;
  margin: var(--space-10) auto 0;
  max-width: 880px;
  padding: var(--space-8) var(--space-5) 0;
  border-radius: var(--radius-panel);
  background: var(--sunken);
  border: 0.5px solid var(--hairline);
  overflow: hidden;
}
.window {
  max-width: 640px;
  margin-inline: auto;
  border-radius: 16px 16px 0 0;
  background: var(--card);
  border: 0.5px solid var(--hairline);
  border-bottom: 0;
  box-shadow: var(--shadow-panel);
  text-align: left;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-bottom: 0.5px solid var(--hairline);
}
.window-bar i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--sunken-strong);
}
.window-bar span {
  margin-left: var(--space-3);
  font-size: 13px;
  color: var(--text-3);
}
.window-body {
  min-height: 220px;
  padding: var(--space-5) var(--space-6) var(--space-12);
  font-size: 19px;
  line-height: 1.55;
}
.window-body .to {
  margin: 0 0 var(--space-3);
  font-size: 13px;
  color: var(--text-3);
}
.caret {
  display: inline-block;
  width: 2px;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: text-bottom;
  background: var(--accent);
  animation: blink 1s steps(2, start) infinite;
}

.pill {
  position: absolute;
  left: 50%;
  bottom: var(--space-5);
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: var(--space-3);
  height: 52px;
  padding-inline: var(--space-5);
  border-radius: var(--radius-full);
  background: var(--pill);
  border: 1px solid var(--pill-ring);
  color: var(--pill-ink);
  box-shadow: var(--shadow-panel);
  font-size: 13px;
}
.pill svg {
  width: 22px;
  height: auto;
  color: var(--pill-ink);
}
.bars {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
}
.bars b {
  width: 3.4px;
  height: 100%;
  border-radius: 2px;
  background: var(--signal);
  transform-origin: center;
  animation: bar 1.1s ease-in-out infinite;
}
.bars b:nth-child(2) { animation-delay: -0.3s; }
.bars b:nth-child(3) { animation-delay: -0.6s; }
.bars b:nth-child(4) { animation-delay: -0.15s; }
.bars b:nth-child(5) { animation-delay: -0.45s; }

@keyframes bar {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}
@keyframes blink {
  to { visibility: hidden; }
}
