:root {
  --bg: #fafafa;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --ink-faint: #8a8a8a;
  --line: #e8e8e8;
  --accent: #6366f1;
  --accent-deep: #4f46e5;
  --card: #ffffff;
  --maxw: 760px;
  --maxw-wide: 920px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Work Sans", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  font-family: "Newsreader", Georgia, "Times New Roman", serif;
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.75rem;
}

a {
  color: inherit;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 18px 0;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}

.site-header.scrolled {
  border-bottom-color: var(--line);
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 0 24px;
}

.site-brand {
  font-family: "Newsreader", Georgia, serif;
  font-size: 21px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
}

.site-nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  color: var(--ink-soft);
}

.site-nav-links a {
  text-decoration: none;
}

.site-nav-links a:hover {
  color: var(--ink);
}

@media (max-width: 720px) {
  .site-nav-links {
    display: none;
  }
}

/* ── Landing hero ── */
.landing-hero {
  position: relative;
  padding: 56px 24px 32px;
  text-align: center;
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: center top;
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 60% 50% at 50% 20%,
    var(--bg) 40%,
    rgba(250, 250, 250, 0) 100%
  );
  pointer-events: none;
}

.landing-hero > * {
  position: relative;
}

.install-pill {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  padding: 14px 28px 14px 16px;
  font-size: 16px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 36px;
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.32);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.install-pill:hover {
  background: var(--accent-deep);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.38);
}

.install-pill-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.install-pill-icon img,
.install-pill-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.install-pill svg.ext {
  width: 16px;
  height: 16px;
  opacity: 0.85;
  flex-shrink: 0;
}

.landing-hero h1 {
  font-size: clamp(28px, 4.5vw, 46px);
  max-width: 22ch;
  margin: 0 auto;
  color: var(--ink);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.landing-hero .hero-lede {
  font-size: 18px;
  color: var(--ink-soft);
  margin: 24px auto 0;
  max-width: 44ch;
}

.landing-visual {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin: 48px auto 0;
  max-width: 340px;
  height: 120px;
}

.landing-visual .panel {
  width: 140px;
  height: 100px;
  border-radius: 8px;
  border: 1px solid var(--line);
  overflow: hidden;
  position: relative;
}

.landing-visual .panel.before {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 50%, #93c5fd 100%);
}

.landing-visual .panel.after {
  background:
    linear-gradient(45deg, #e5e5e5 25%, transparent 25%),
    linear-gradient(-45deg, #e5e5e5 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e5e5 75%),
    linear-gradient(-45deg, transparent 75%, #e5e5e5 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
  background-color: #f5f5f5;
}

.landing-visual .panel .subject {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 56px;
  height: 72px;
  background: var(--accent);
  border-radius: 28px 28px 8px 8px;
  opacity: 0.85;
}

.landing-visual .panel.before .subject {
  opacity: 1;
}

.landing-visual .arrow {
  font-size: 24px;
  color: var(--ink-faint);
  padding: 0 8px;
}

/* ── Landing body sections ── */
.landing-body {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 24px 64px;
}

.landing-body > h1:first-child,
.landing-body > h1:first-child + p {
  display: none;
}

.landing-body h2 {
  font-size: clamp(22px, 3vw, 30px);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.landing-body h2:first-child {
  margin-top: 0;
}

.landing-body p,
.landing-body li {
  color: var(--ink-soft);
  font-size: 15px;
}

.landing-body ul {
  padding-left: 1.25rem;
}

.landing-body a {
  color: var(--accent-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.landing-body a:hover {
  color: var(--accent);
}

.landing-cta-band {
  background: var(--card);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 64px 24px;
  text-align: center;
}

.landing-cta-band h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  max-width: 22ch;
  margin: 0 auto 0;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.landing-cta-band p {
  color: var(--ink-soft);
  margin-top: 14px;
  font-size: 15px;
}

.landing-cta-band .install-pill {
  margin-top: 28px;
  margin-bottom: 0;
}

.landing-cta-band--article {
  padding: 48px 24px;
  border-top: 1px solid var(--line);
  border-bottom: none;
}

.landing-cta-band--article .install-pill {
  margin-top: 0;
}

/* ── Article pages ── */
.site-main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 64px;
}

.site-main h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 1rem;
}

.site-main h2 {
  font-size: clamp(20px, 2.5vw, 26px);
  margin-top: 2rem;
}

.site-main h3 {
  font-size: 18px;
  margin-top: 1.5rem;
}

.site-main p,
.site-main li {
  color: var(--ink-soft);
  font-size: 15px;
}

.site-main a {
  color: var(--accent-deep);
}

.site-main a:hover {
  color: var(--accent);
}

.byline {
  color: var(--ink-faint);
  font-size: 0.85rem;
  margin: 0 0 1rem;
}

/* ── Footer ── */
.site-footer {
  max-width: var(--maxw-wide);
  margin: 0 auto;
  padding: 32px 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  color: var(--ink-faint);
  font-size: 13px;
  border-top: 1px solid var(--line);
}

.site-footer nav {
  display: flex;
  gap: 20px;
}

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

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

.site-footer p {
  margin: 0;
}

@media (max-width: 640px) {
  .site-footer {
    flex-direction: column;
    align-items: flex-start;
  }

  .install-pill {
    font-size: 14px;
    padding: 12px 20px 12px 14px;
  }
}
