:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --surface-2: #f0f0f3;
  --text: #1d1d1f;
  --muted: #6e6e73;
  --faint: #a1a1a6;
  --line: rgba(0, 0, 0, 0.08);
  --accent: #2f6fde;
  --accent-deep: #18346e;
  --accent-soft: rgba(47, 111, 222, 0.12);
  --green: #28a745;
  --orange: #e8890c;
  --shadow: 0 30px 80px -20px rgba(24, 52, 110, 0.25), 0 10px 30px -10px rgba(0, 0, 0, 0.12);
  --sidebar: #e9e9ee;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0b0d;
    --surface: #1c1c1f;
    --surface-2: #26262a;
    --text: #f5f5f7;
    --muted: #a1a1a6;
    --faint: #6e6e73;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #4d8bf5;
    --accent-soft: rgba(77, 139, 245, 0.16);
    --green: #3ccf65;
    --orange: #ffa53a;
    --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --sidebar: #232327;
  }
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font: 17px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Helvetica Neue", sans-serif; letter-spacing: -0.02em; }
h2 { font-size: clamp(32px, 5vw, 48px); line-height: 1.08; font-weight: 700; }
.lede { font-size: clamp(19px, 2.2vw, 23px); color: var(--muted); max-width: 640px; margin: 18px auto 0; line-height: 1.4; }
a { color: var(--accent); text-decoration: none; }

section { padding: 0 24px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px max(24px, calc((100vw - 1080px) / 2));
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 600; }
.brand img { border-radius: 22.5%; }
.nav nav { display: flex; gap: 28px; font-size: 14px; }
.nav nav a { color: var(--muted); transition: color .2s; }
.nav nav a:hover { color: var(--text); }

/* hero */
.hero { text-align: center; padding-top: clamp(64px, 11vw, 120px); }
.hero-icon { border-radius: 22.5%; box-shadow: 0 20px 50px -12px rgba(24, 52, 110, 0.5); }
.hero h1 { font-size: clamp(48px, 9vw, 92px); line-height: 1.02; font-weight: 800; margin-top: 36px; letter-spacing: -0.035em; }
.cta { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pill {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  background: var(--text); color: var(--bg); font-weight: 600; font-size: 16px;
}
a.pill { transition: transform .15s, opacity .15s; }
a.pill:hover { transform: translateY(-1px); opacity: .9; }
.fine { font-size: 13px; color: var(--faint); }

/* the app window */
.shot { margin: clamp(56px, 8vw, 96px) auto 0; max-width: 1128px; }
.window {
  display: grid; grid-template-columns: 190px 270px 1fr;
  height: 560px; border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: var(--shadow);
  font-size: 13px; text-align: left;
}
.win-sidebar { background: var(--sidebar); padding: 16px 10px; }
.lights { display: flex; gap: 8px; margin: 0 6px 22px; }
.lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.lights i:nth-child(2) { background: #febc2e; }
.lights i:nth-child(3) { background: #28c840; }
.side-head { font-size: 11px; font-weight: 600; color: var(--faint); margin: 14px 8px 4px; }
.side-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 7px; font-weight: 600; }
.side-item .ico { color: var(--accent); width: 16px; text-align: center; }
.side-item b { margin-left: auto; font-size: 11px; color: var(--muted); }
.side-item.active { background: var(--accent-soft); }

.win-list { border-right: 1px solid var(--line); padding: 16px 10px; }
.list-title { font-weight: 700; font-size: 15px; margin: 2px 8px 14px; }
.row { padding: 10px; border-radius: 9px; display: grid; gap: 2px; margin-bottom: 2px; }
.row strong { font-size: 13px; }
.row span { color: var(--muted); font-size: 12px; }
.row.selected { background: var(--accent); color: #fff; }
.row.selected span { color: rgba(255, 255, 255, 0.8); }
.tag { font-style: normal; font-size: 10.5px; font-weight: 600; justify-self: start; margin-top: 4px; padding: 1px 7px; border-radius: 99px; }
.tag.ready { color: var(--green); background: color-mix(in srgb, var(--green) 15%, transparent); }
.tag.review { color: var(--orange); background: color-mix(in srgb, var(--orange) 15%, transparent); }
.tag.writing { color: var(--accent); background: var(--accent-soft); }
.row.selected .tag { color: #fff; background: rgba(255, 255, 255, 0.22); }

.win-note { padding: 18px 36px; overflow: hidden; }
.note-tabs { display: inline-flex; background: var(--surface-2); border-radius: 8px; padding: 2px; margin-bottom: 22px; }
.note-tabs span { padding: 4px 14px; border-radius: 6px; color: var(--muted); font-weight: 500; }
.note-tabs .on { background: var(--surface); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.12); }
.win-note h3 { font-size: 22px; }
.props { display: grid; grid-template-columns: 70px 1fr; gap: 4px 12px; margin: 12px 0 6px; padding: 10px 0; border-block: 1px solid var(--line); }
.props span { color: var(--faint); }
.props em { font-style: normal; color: var(--accent); }
.win-note h4 { font-size: 15px; margin: 16px 0 6px; }
.win-note ul { padding-left: 18px; color: var(--text); }
.win-note li { margin: 3px 0; }
.win-note p { color: var(--text); line-height: 1.6; max-width: 560px; }
.todos { list-style: none; padding: 0 !important; }
.todos li { display: flex; align-items: center; gap: 9px; color: var(--accent) !important; }
.box { width: 14px; height: 14px; border: 1.5px solid var(--faint); border-radius: 4px; flex: none; }
.box.on { background: var(--accent); border-color: var(--accent); position: relative; }
.box.on::after { content: ""; position: absolute; left: 4px; top: 1px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* features */
.feature {
  max-width: 1080px; margin: clamp(96px, 14vw, 170px) auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.feature.flip .copy { order: 2; }
.kicker { color: var(--accent); font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.copy p:not(.kicker) { color: var(--muted); font-size: 19px; margin-top: 18px; max-width: 460px; }

.card { background: var(--surface); border-radius: 18px; padding: 26px; box-shadow: var(--shadow); font-size: 14px; }
.card-head { font-weight: 700; font-size: 16px; margin-bottom: 14px; }
.card-head span { color: var(--faint); font-weight: 400; }
.quote { color: var(--muted); font-style: italic; border-left: 3px solid var(--accent-soft); padding-left: 12px; margin-bottom: 20px; }
.match { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 12px; margin: 10px 0; }
.match i { height: 6px; border-radius: 3px; background: var(--surface-2); position: relative; overflow: hidden; }
.match i::after { content: ""; position: absolute; inset: 0; width: var(--w); background: var(--accent); border-radius: 3px; }
.match b { font-size: 12px; color: var(--muted); text-align: right; font-weight: 500; }
.match.dim { opacity: 0.55; }
.name-field { margin-top: 20px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 9px 12px; display: flex; align-items: center; }
.caret { width: 1.5px; height: 16px; background: var(--accent); margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.btn { margin-top: 16px; display: inline-block; background: var(--accent); color: #fff; font-weight: 600; padding: 8px 16px; border-radius: 8px; font-size: 13px; }

.note .line { margin: 6px 0; color: var(--muted); }
.note .line b { color: var(--text); }
.diff { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }
del { background: rgba(255, 69, 58, 0.18); color: #e5484d; text-decoration: line-through; padding: 0 3px; border-radius: 3px; }
ins { background: rgba(48, 209, 88, 0.18); color: var(--green); text-decoration: none; padding: 0 3px; border-radius: 3px; }

.chat { display: flex; flex-direction: column; gap: 10px; }
.bubble { max-width: 85%; padding: 10px 14px; border-radius: 16px; background: var(--surface-2); line-height: 1.45; }
.bubble a { display: block; margin-top: 6px; font-size: 12.5px; font-weight: 600; }
.bubble.me { align-self: flex-end; background: var(--accent); color: #fff; }
.typing { display: flex; gap: 5px; padding: 14px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); animation: dot 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.todo { display: grid; grid-template-columns: 14px 1fr; column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.todo .box { margin-top: 4px; grid-row: span 2; }
.todo small { color: var(--faint); font-size: 12px; }

/* privacy */
.privacy { text-align: center; max-width: 1080px; margin: clamp(120px, 16vw, 200px) auto 0; }
.lock { color: var(--accent); margin-bottom: 20px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 56px; text-align: left; }
.grid3 > div, .tile { background: var(--surface); border-radius: 18px; padding: 28px; }
.grid3 h3, .tile h3 { font-size: 19px; margin-bottom: 8px; }
.grid3 p, .tile p { color: var(--muted); font-size: 15px; }

/* stats */
.stats { max-width: 1080px; margin: clamp(96px, 12vw, 140px) auto 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; text-align: center; }
.stats b {
  display: block; font-size: clamp(44px, 6vw, 64px); font-weight: 800; letter-spacing: -0.03em;
  background: linear-gradient(180deg, var(--accent), var(--accent-deep));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-color-scheme: dark) { .stats b { background: linear-gradient(180deg, #8db4ff, var(--accent)); -webkit-background-clip: text; background-clip: text; } }
.stats span { color: var(--muted); font-size: 15px; }

/* workflow */
.workflow { text-align: center; max-width: 1080px; margin: clamp(120px, 16vw, 200px) auto 0; scroll-margin-top: 80px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 56px; text-align: left; }

/* closing */
.closing { text-align: center; max-width: 760px; margin: clamp(120px, 16vw, 200px) auto 0; }
.closing img { border-radius: 22.5%; margin-bottom: 28px; }
.closing .pill { margin-top: 36px; }

footer { text-align: center; color: var(--faint); font-size: 13px; padding: 96px 24px 48px; }

/* scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret, .typing i { animation: none; }
}

/* narrower screens */
@media (max-width: 960px) {
  .window { grid-template-columns: 190px 1fr; }
  .win-note { display: none; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .feature { grid-template-columns: 1fr; gap: 36px; }
  .feature.flip .copy { order: 0; }
  .grid3, .stats { grid-template-columns: 1fr; }
  .stats { gap: 36px; }
  .nav nav { display: none; }
}
@media (max-width: 560px) {
  section { padding: 0 16px; }
  .window { grid-template-columns: 1fr; height: auto; }
  .win-sidebar { display: none; }
  .win-list { border: 0; }
  .tiles { grid-template-columns: 1fr; }
  .match { grid-template-columns: 90px 1fr 32px; }
}
