/* Knewflash — Red-Line Minimalist.
   Tokens sync'd with app/lib/core/theme. Brand = iOS system red #FF453A. */

:root {
  --bg: #000000;
  --brand: #ff453a;
  --brand-dim: #d63a30;
  --brand-wash: rgba(255, 69, 58, 0.08);
  --content: #ffffff;
  --muted: #b8b8b8;
  --variant: #8a8a8a;
  --faint: #555555;
  --s1: #0a0a0a;
  --s2: #141414;
  --s3: #1f1f1f;
  --outline: #1f1f1f;
  --outline-soft: #161616;
  /* 3.5:1 against --bg (#000); WCAG AA non-text minimum is 3:1. */
  --outline-strong: #636363;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --maxw: 1120px;
  --gutter: clamp(20px, 4vw, 40px);
  --font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "JetBrains Mono", "Menlo", "Consolas",
    monospace;
  --m-fast: 160ms;
  --m-medium: 260ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--content);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--m-fast) var(--ease);
}
a:hover {
  color: var(--content);
}

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

::selection {
  background: var(--brand);
  color: var(--content);
}

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

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--brand);
}

/* ---------- Wordmark ---------- */
.wordmark {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  line-height: 1;
}
.wordmark span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: var(--content);
}
.wordmark .bar {
  width: 32px;
  height: 3px;
  background: var(--brand);
  border-radius: 2px;
}

/* ---------- Header ---------- */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--outline-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-links {
  display: flex;
  gap: 32px;
  align-items: center;
}
.nav-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.nav-links a:hover {
  color: var(--content);
}
.nav-links a:focus-visible,
.nav-cta:focus-visible,
.cta:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}
.nav-cta {
  display: inline-flex;
  align-items: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-md);
  background: var(--brand);
  color: var(--content);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  transition: background var(--m-fast) var(--ease);
}
.nav-cta:hover {
  color: var(--content);
  background: var(--brand-dim);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: clamp(72px, 11vw, 128px) 0 clamp(56px, 9vw, 96px);
}
.hero h1 {
  font-size: clamp(44px, 6.6vw, 84px);
  font-weight: 800;
  letter-spacing: -2.4px;
  line-height: 0.98;
  margin: 22px 0 24px;
  max-width: 14ch;
}
.hero h1 .accent {
  color: var(--brand);
}
.hero p.lede {
  font-size: clamp(16px, 1.5vw, 18px);
  color: var(--muted);
  max-width: 32em;
  margin-bottom: 32px;
}

/* ---------- Store badges ---------- */
.badges {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 56px;
  padding: 0 22px 0 18px;
  border-radius: var(--r-md);
  background: var(--s2);
  border: 1px solid var(--outline-strong);
  color: var(--content);
  transition: border-color var(--m-fast) var(--ease),
    background var(--m-fast) var(--ease);
}
.badge:hover {
  color: var(--content);
  border-color: var(--brand);
  background: var(--s3);
}
.badge svg {
  width: 26px;
  height: 26px;
  flex: none;
}
.badge .b-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.badge .b-text small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--variant);
}
.badge .b-text strong {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.3px;
}

/* ---------- Section ---------- */
section.block {
  padding: clamp(64px, 8vw, 104px) 0;
  border-top: 1px solid var(--outline-soft);
}
.section-head {
  margin-bottom: clamp(36px, 4.4vw, 56px);
  max-width: 44em;
}
.section-head h2 {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  letter-spacing: -1.2px;
  line-height: 1.02;
  margin-top: 14px;
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.step {
  padding: 32px 28px;
  background: var(--s1);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.step .s-num {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brand);
}
.step h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-top: 4px;
}
.step p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- Feature grid ---------- */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.feature {
  padding: 32px 28px;
  background: var(--s1);
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.feature .fnum {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--brand);
}
.feature h3 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.3px;
  margin-top: 4px;
}
.feature p {
  color: var(--muted);
  font-size: 14px;
}

/* ---------- FAQ ---------- */
.faq {
  border: 1px solid var(--outline);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--s1);
}
.faq details {
  border-bottom: 1px solid var(--outline);
}
.faq details:last-child { border-bottom: none; }
.faq summary {
  list-style: none;
  cursor: pointer;
  padding: 22px clamp(22px, 2.4vw, 28px);
  font-size: 16px;
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  color: var(--brand);
  font-size: 22px;
  font-weight: 300;
  line-height: 1;
  transition: transform var(--m-medium) var(--ease);
  flex: none;
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .answer {
  padding: 0 clamp(22px, 2.4vw, 28px) 24px;
  color: var(--muted);
  font-size: 14px;
  max-width: 64em;
}

/* ---------- CTA band ---------- */
.cta-band {
  text-align: center;
  padding: clamp(72px, 9vw, 112px) 0;
  border-top: 1px solid var(--outline-soft);
  background: radial-gradient(
    700px 320px at 50% 0%,
    var(--brand-wash),
    transparent 70%
  );
}
.cta-band h2 {
  font-size: clamp(32px, 5.4vw, 64px);
  font-weight: 800;
  letter-spacing: -1.8px;
  line-height: 0.98;
  margin: 0 auto 18px;
  max-width: 18ch;
}
.cta-band h2 .accent { color: var(--brand); }
.cta-band p {
  color: var(--muted);
  margin: 0 auto 32px;
  max-width: 32em;
}
.cta-band .badges { justify-content: center; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--outline-soft);
  padding: 48px 0 56px;
  background: var(--s1);
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  align-items: center;
}
.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-links a {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.4px;
}
.footer-links a:hover {
  color: var(--content);
}
.footer-legal {
  margin-top: 24px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.2px;
}

/* ---------- Legal pages ---------- */
.legal {
  padding: 72px 0 96px;
  max-width: 760px;
}
.legal h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  letter-spacing: -1.6px;
  margin: 18px 0 10px;
  line-height: 1;
}
.legal .updated {
  color: var(--variant);
  font-size: 13px;
  margin-bottom: 40px;
}
.legal h2 {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.2px;
  margin: 40px 0 12px;
}
.legal p,
.legal li {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.6;
}
.legal ul {
  padding-left: 22px;
}
.legal a {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--muted);
}
.back:hover {
  color: var(--brand);
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.001ms !important;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 880px) {
  .features,
  .steps {
    grid-template-columns: 1fr;
  }
  .nav-links {
    display: none;
  }
}
@media (max-width: 520px) {
  .hero h1 { letter-spacing: -1.6px; }
  .section-head h2 { letter-spacing: -1px; }
  .badge { padding: 0 16px; }
}
