/* CleverNotes website. Colours match the app (apps/web/src/styles/theme.css). */

:root {
  --bg: #FBFAF7;
  --panel: #FFFFFF;
  --tint: #F4F2EC;
  --sidebar: #F6F5F4;
  --border: #E4E1D9;
  --text: #1F1E1B;
  --text-2: #3E3C37;
  --muted: #66635B;
  --accent: #2F4BD8;
  --accent-ink: #1E35A8;
  --accent-soft: #E7EBFC;
  --green: #1F9D4A;
  --mark: hsla(46, 93%, 70%, 0.55);
  --dark-bg: #1F1E1B;
  --dark-text: #F3F1EC;
  --dark-muted: #B4AFA4;
  --shadow: 0 30px 80px -20px rgba(31, 30, 27, 0.28), 0 8px 24px -8px rgba(31, 30, 27, 0.12);
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, Cambria, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --panel: #1E1D1A;
    --tint: #1A1917;
    --sidebar: #191816;
    --border: #2F2D29;
    --text: #F3F1EC;
    --text-2: #D6D2C9;
    --muted: #A29D92;
    --accent: #7D90FF;
    --accent-ink: #A9B6FF;
    --accent-soft: #252B4A;
    --green: #4CC774;
    --mark: hsla(46, 80%, 50%, 0.35);
    --dark-bg: #0E0D0C;
    --shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.7), 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; }
a { color: var(--accent-ink); }
code { font: 0.88em var(--mono); background: var(--tint); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }
mark { background: var(--mark); color: inherit; border-radius: 3px; padding: 0 2px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 6px; z-index: 50; }
.skip:focus { left: 12px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
}
.nav-inner { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 18px; letter-spacing: -0.01em; }
.nav-links { display: flex; gap: 24px; margin-left: auto; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 15px; }
.nav-links a:hover { color: var(--text); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  background: var(--text); color: var(--bg);
  font-weight: 600; font-size: 16px; text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35); }
.btn-small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--text); padding: 0 6px; }
.btn-ghost:hover { box-shadow: none; color: var(--accent-ink); }

/* Type */
.eyebrow { margin: 0 0 14px; font-size: 13px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent-ink); }
.eyebrow-light { color: #A9B6FF; }
h1, .h2 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.02em; margin: 0; }
h1 { font-size: clamp(42px, 6.2vw, 74px); line-height: 1.03; }
h1 em { font-style: italic; font-weight: 500; color: var(--accent-ink); }
.h2 { font-size: clamp(32px, 4.2vw, 48px); line-height: 1.1; margin-bottom: 18px; }
.lede { font-size: 19px; color: var(--text-2); margin: 22px 0 0; max-width: 34em; }
.center .lede { margin-left: auto; margin-right: auto; }

/* Hero */
.hero { padding: 72px 0 96px; position: relative; }
.hero::before {
  content: ""; position: absolute; inset: -120px 0 auto; height: 620px; z-index: -1; pointer-events: none;
  background:
    radial-gradient(600px 340px at 85% 30%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(520px 300px at 10% 10%, color-mix(in srgb, #E8A33C 12%, transparent), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; margin-top: 32px; }
.cta-center { justify-content: center; }
.proof { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-size: 14.5px; }
.proof li { display: inline-flex; align-items: center; gap: 8px; }
.tick { width: 16px; height: 16px; border-radius: 50%; background: color-mix(in srgb, var(--green) 18%, transparent); position: relative; flex: none; }
.tick::after { content: ""; position: absolute; left: 5px; top: 3px; width: 4px; height: 7px; border: solid var(--green); border-width: 0 2px 2px 0; transform: rotate(45deg); }

/* Product mock */
.mock {
  background: var(--panel); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow); overflow: hidden; font-size: 12px; line-height: 1.45;
  transform: perspective(1600px) rotateY(-4deg) rotateX(2deg);
}
.mock-bar { display: flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; background: var(--sidebar); border-bottom: 1px solid var(--border); }
.mock-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.mock-bar span { margin: 0 auto; font-size: 11px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 1px 40px; }
.mock-body { display: grid; grid-template-columns: 132px 176px 1fr; height: 400px; }
.m-side { background: var(--sidebar); border-right: 1px solid var(--border); padding: 12px 10px; }
.m-search { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 4px 8px; color: var(--muted); margin-bottom: 12px; }
.m-label { margin: 12px 0 4px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 600; }
.m-item { margin: 0; padding: 4px 8px; border-radius: 6px; color: var(--text-2); display: flex; justify-content: space-between; }
.m-item b { font-weight: 500; color: var(--muted); }
.m-item.is-on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.m-list { border-right: 1px solid var(--border); overflow: hidden; }
.m-card { display: block; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.m-card strong { display: block; font-size: 12.5px; color: var(--text); }
.m-card span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--text-2); margin: 2px 0 4px; }
.m-card em { font-style: normal; font-size: 10.5px; color: var(--muted); }
.m-card.is-on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.m-note { padding: 18px 26px; position: relative; color: var(--text-2); font-size: 12.5px; }
.m-note p { margin: 0 0 10px; }
.m-crumb { font-size: 10.5px; color: var(--muted); }
.m-note h3 { font-family: var(--sans); font-size: 21px; line-height: 1.2; color: var(--text); margin: 4px 0 8px; letter-spacing: -0.01em; }
.m-chip { display: inline-block; font-size: 10.5px; font-weight: 600; color: var(--accent-ink); background: var(--accent-soft); border-radius: 999px; padding: 2px 9px; }
.m-note a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.m-check { list-style: none; padding: 0; margin: 0 0 10px; }
.m-check li { position: relative; padding-left: 22px; margin: 4px 0; }
.m-check li::before { content: ""; position: absolute; left: 0; top: 2px; width: 12px; height: 12px; border: 1.5px solid var(--muted); border-radius: 3px; }
.m-check li.done { color: var(--muted); text-decoration: line-through; }
.m-check li.done::before { background: var(--accent); border-color: var(--accent); }
.m-sync { position: absolute; right: 16px; bottom: 14px; display: inline-flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--muted); background: var(--sidebar); border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }

/* Pillars */
.pillars { padding: 8px 0 40px; }
.pillar-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 28px; }
.pillar h2 { font-size: 20px; margin: 16px 0 8px; letter-spacing: -0.01em; }
.pillar p { margin: 0; color: var(--text-2); font-size: 16px; }
.p-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--accent-soft); display: grid; place-items: center; }
.p-icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */
.section { padding: 104px 0; }
.section-tint { background: var(--tint); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split > * { min-width: 0; }
.split-rev .split-copy { order: 2; }
.split-copy > p { color: var(--text-2); margin: 0 0 12px; max-width: 32em; }
.list { list-style: none; padding: 0; margin: 24px 0 0; }
.list li { position: relative; padding-left: 26px; margin: 12px 0; color: var(--text-2); }
.list li::before { content: ""; position: absolute; left: 4px; top: 10px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); transform: rotate(45deg); }
.list strong { color: var(--text); }

.steps { display: grid; gap: 14px; }
.step { display: flex; gap: 18px; align-items: flex-start; background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 22px; }
.step > span { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--text); color: var(--bg); font-weight: 700; font-family: var(--serif); font-size: 17px; }
.step strong { display: block; font-size: 17px; }
.step p { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* Search demo */
.search-demo { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; padding: 20px; box-shadow: var(--shadow); }
.sd-box { display: flex; align-items: center; border: 2px solid var(--accent); border-radius: 10px; padding: 11px 14px; font: 15px var(--mono); color: var(--text); overflow: hidden; white-space: nowrap; }
.sd-q b { color: var(--accent-ink); font-weight: 600; }
.caret { width: 2px; height: 20px; background: var(--accent); margin-left: 2px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sd-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 8px; }
.sd-chips span { font-size: 12.5px; background: var(--accent-soft); color: var(--accent-ink); border-radius: 999px; padding: 3px 10px; font-weight: 600; }
.sd-hit { padding: 12px 4px; border-bottom: 1px solid var(--border); }
.sd-hit strong { font-size: 15px; }
.sd-hit p { margin: 2px 0 0; color: var(--text-2); font-size: 14px; }
.sd-ops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* Features */
.feat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 48px; background: var(--border); border: 1px solid var(--border); border-radius: 16px; overflow: hidden; }
.feat { background: var(--bg); padding: 30px; }
.feat h3 { margin: 0 0 6px; font-size: 18px; letter-spacing: -0.01em; }
.feat p { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* Privacy */
.section-dark { background: var(--dark-bg); color: var(--dark-text); }
.section-dark .split-copy > p { color: var(--dark-muted); }
.promise { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.promise li { padding: 18px 0 18px 36px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); color: var(--dark-muted); position: relative; }
.promise li:last-child { border-bottom: 0; }
.promise li::before { content: ""; position: absolute; left: 4px; top: 24px; width: 16px; height: 16px; border-radius: 50%; background: rgba(76, 199, 116, 0.2); }
.promise li::after { content: ""; position: absolute; left: 10px; top: 27px; width: 4px; height: 8px; border: solid #4CC774; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.promise strong { color: var(--dark-text); display: block; font-size: 17px; }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; font-size: 18px; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 24px; font-weight: 400; color: var(--muted); transition: transform 0.2s ease; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 22px; color: var(--text-2); max-width: 40em; }

/* Final CTA */
.cta-final { padding-top: 40px; }
.cta-final .wrap { background: var(--panel); border: 1px solid var(--border); border-radius: 24px; padding: 64px 32px; position: relative; overflow: hidden; }
.cta-final .wrap::before { content: ""; position: absolute; inset: 0; z-index: 0; background: radial-gradient(500px 220px at 50% 0%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.cta-final .wrap > * { position: relative; }
.fine { margin: 16px 0 0; font-size: 13.5px; color: var(--muted); }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 36px 0 48px; color: var(--muted); font-size: 14px; }
.foot-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.foot-inner p { margin: 0; }
.foot-links { margin-left: auto !important; display: flex; gap: 20px; flex-wrap: wrap; }
.foot-links a { color: var(--muted); }

/* Scroll reveal (only when JS opts in) */
.js-reveal .reveal { opacity: 0; transform: translateY(14px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js-reveal .reveal.is-in { opacity: 1; transform: none; }

/* Responsive */
@media (max-width: 960px) {
  .hero { padding-top: 48px; }
  .hero-grid, .split { grid-template-columns: 1fr; gap: 44px; }
  .split-rev .split-copy { order: 0; }
  .mock { transform: none; }
  .pillar-grid, .feat-grid { grid-template-columns: 1fr 1fr; }
  .section { padding: 80px 0; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-inner { justify-content: space-between; }
  .wrap { padding: 0 16px; }
  .mock-body { grid-template-columns: 1fr; height: auto; }
  .m-side, .m-list { display: none; }
  .m-note { padding-bottom: 48px; }
  .pillar-grid, .feat-grid { grid-template-columns: 1fr; }
  .lede { font-size: 17.5px; }
  .sd-box { font-size: 13px; }
  .cta-final .wrap { border-radius: 18px; padding: 48px 20px; }
  .foot-links { margin-left: 0 !important; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .caret { animation: none; }
  .btn, .faq summary::after { transition: none; }
}
