:root {
  --paper: #f6f1e7;
  --paper2: #fffaf1;
  --ink: #141414;
  --muted: rgba(20, 20, 20, 0.72);
  --faint: rgba(20, 20, 20, 0.46);
  --grid: rgba(20, 20, 20, 0.045);
  --grid-strong: rgba(20, 20, 20, 0.085);
  --accent: #ff3b30; /* iOS system red */
  --accent2: #0a84ff; /* iOS system blue */
  --shadow: 0 22px 70px rgba(0, 0, 0, 0.18);
  --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.12);
  --radius: 22px;
  --radius-sm: 14px;

  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
    "Liberation Mono", "Courier New", monospace;
  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --serif: "Fraunces", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

/* Background: sudoku-paper grid + soft ink wash */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1200px 900px at 20% 15%, rgba(10, 132, 255, 0.10), transparent 55%),
    radial-gradient(900px 700px at 85% 30%, rgba(255, 59, 48, 0.08), transparent 60%),
    linear-gradient(180deg, var(--paper), var(--paper2));
  z-index: -2;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, transparent 0 34px, var(--grid) 34px 35px),
    repeating-linear-gradient(90deg, transparent 0 34px, var(--grid) 34px 35px),
    repeating-linear-gradient(0deg, transparent 0 102px, var(--grid-strong) 102px 104px),
    repeating-linear-gradient(90deg, transparent 0 102px, var(--grid-strong) 102px 104px);
  opacity: 0.75;
  z-index: -1;
  mix-blend-mode: multiply;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

:focus-visible {
  outline: 3px solid rgba(10, 132, 255, 0.42);
  outline-offset: 3px;
  border-radius: 10px;
}

.wrap {
  width: min(1100px, calc(100% - 40px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  backdrop-filter: blur(12px);
  background: rgba(246, 241, 231, 0.76);
  border-bottom: 1px solid rgba(20, 20, 20, 0.08);
  z-index: 10;
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.14);
}

.brand .wordmark {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand .wordmark strong {
  font-family: var(--serif);
  font-variation-settings: "wght" 700;
  letter-spacing: 0.2px;
}

.brand .wordmark span {
  font-size: 12px;
  color: var(--muted);
}

nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.navlink {
  font-size: 13px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.10);
  background: rgba(255, 255, 255, 0.55);
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.navlink:hover {
  text-decoration: none;
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(20, 20, 20, 0.16);
}

main {
  padding: 28px 0 70px;
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 28px;
  align-items: center;
  padding: 26px 0 14px;
}

.kicker {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

h1 {
  margin: 10px 0 10px;
  font-family: var(--serif);
  font-size: clamp(42px, 5.4vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.6px;
}

.subtitle {
  font-size: 16px;
  line-height: 1.55;
  color: var(--muted);
  max-width: 52ch;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 22px;
}

.chip {
  font-family: var(--mono);
  font-size: 12px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.55);
}

.chip b {
  font-weight: 700;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.14);
  background: rgba(255, 255, 255, 0.70);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.10);
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
  font-size: 14px;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.14);
  background: rgba(255, 255, 255, 0.92);
}

.btn.primary {
  border-color: rgba(255, 59, 48, 0.30);
  background: linear-gradient(180deg, rgba(255, 59, 48, 0.12), rgba(255, 255, 255, 0.70));
}

.btn .dot {
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 59, 48, 0.18);
}

.phone {
  position: relative;
  border-radius: 34px;
  padding: 14px;
  background: rgba(20, 20, 20, 0.92);
  box-shadow: var(--shadow);
  transform: rotate(0.35deg);
}

.phone::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.phone .notch {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 22px;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 0 0 14px 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: 2;
}

.phone video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 22px;
  background: #000;
}

.float-in {
  opacity: 0;
  transform: translateY(10px);
  animation: enter 680ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.delay-1 { animation-delay: 40ms; }
.delay-2 { animation-delay: 120ms; }
.delay-3 { animation-delay: 200ms; }
.delay-4 { animation-delay: 280ms; }

@keyframes enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  margin-top: 34px;
  padding-top: 20px;
  border-top: 1px solid rgba(20, 20, 20, 0.10);
}

.section h2 {
  margin: 0 0 10px;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: -0.2px;
}

.section p {
  margin: 0 0 10px;
  color: var(--muted);
  line-height: 1.65;
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
  margin-top: 14px;
}

.card {
  grid-column: span 4;
  border-radius: var(--radius);
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow-soft);
  padding: 16px 16px 14px;
  position: relative;
  overflow: hidden;
}

.card::after {
  content: "";
  position: absolute;
  inset: -40px -30px auto auto;
  width: 160px;
  height: 160px;
  background:
    radial-gradient(circle at 30% 30%, rgba(10, 132, 255, 0.18), transparent 60%),
    radial-gradient(circle at 70% 60%, rgba(255, 59, 48, 0.16), transparent 62%);
  filter: blur(6px);
  opacity: 0.85;
}

.card h3 {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.card p {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.card code {
  font-family: var(--mono);
  font-size: 12px;
  padding: 2px 6px;
  background: rgba(20, 20, 20, 0.06);
  border-radius: 8px;
}

.demos {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 12px;
}

.demo-tabs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

.tab {
  font-family: var(--mono);
  font-size: 12px;
  padding: 9px 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  user-select: none;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease;
}

.tab:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.92);
  border-color: rgba(20, 20, 20, 0.16);
}

.tab[aria-selected="true"] {
  border-color: rgba(10, 132, 255, 0.35);
  background: linear-gradient(180deg, rgba(10, 132, 255, 0.12), rgba(255, 255, 255, 0.70));
}

.demo-pane {
  display: none;
}

.demo-pane[aria-hidden="false"] {
  display: block;
}

.media {
  border-radius: var(--radius);
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: var(--shadow-soft);
  padding: 14px;
  overflow: hidden;
}

.media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  border: 1px solid rgba(20, 20, 20, 0.10);
}

.media .caption {
  margin-top: 10px;
  font-size: 12px;
  color: var(--faint);
}

pre {
  margin: 12px 0 0;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(20, 20, 20, 0.12);
  background: rgba(255, 255, 255, 0.62);
  overflow: auto;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
}

footer {
  padding: 22px 0 38px;
  color: var(--faint);
  font-size: 12px;
}

.fineprint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.fineprint .links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.pill {
  font-family: var(--mono);
  font-size: 11px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px dashed rgba(20, 20, 20, 0.18);
  background: rgba(255, 255, 255, 0.50);
}

/* Responsive */
@media (max-width: 940px) {
  .hero {
    grid-template-columns: 1fr;
  }
  .phone {
    max-width: 520px;
    margin: 12px auto 0;
  }
  .card {
    grid-column: span 6;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(1100px, calc(100% - 28px));
  }
  nav {
    gap: 8px;
  }
  .navlink {
    padding: 7px 9px;
  }
  .card {
    grid-column: span 12;
  }
  .phone {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    animation: none !important;
    transition: none !important;
  }
}

