/* ============================================================
   OmniVault — landing page
   Light & airy, Apple-style. Purple → blue brand gradient.
   ============================================================ */

:root {
  /* Surfaces */
  --bg:            #FBFAFE;
  --bg-soft:       #F4F1FB;
  --surface:       #FFFFFF;
  --surface-2:     #FAF8FE;

  /* Ink */
  --ink:           #17141F;
  --ink-2:         #4B4658;
  --ink-3:         #79748A;

  /* Brand */
  --violet:        #6750A4;   /* MD3 primary, app accent */
  --violet-2:      #7C5CF6;
  --blue:          #2F6BEA;   /* the vault blue from the icon */
  --green:         #16A06A;   /* the </> green from the icon */
  --accent-ink:    #5B43A0;   /* readable purple for links/text */

  --grad:          linear-gradient(115deg, #7C5CF6 0%, #5A6BF0 45%, #2F8AEA 100%);
  --grad-soft:     linear-gradient(115deg, rgba(124,92,246,.14), rgba(47,138,234,.14));

  /* Lines */
  --border:        #E9E5F3;
  --border-2:      #DED8EE;

  /* Shadows (layered, low-opacity, Apple-ish) */
  --sh-sm:  0 1px 2px rgba(23,20,31,.05), 0 2px 6px rgba(23,20,31,.04);
  --sh-md:  0 4px 12px rgba(23,20,31,.07), 0 12px 28px rgba(23,20,31,.06);
  --sh-lg:  0 8px 24px rgba(40,30,90,.10), 0 30px 70px rgba(40,30,90,.14);
  --sh-glow: 0 30px 90px rgba(96,80,164,.22);

  --radius:   18px;
  --radius-lg:24px;
  --maxw:     1140px;

  --ease: cubic-bezier(.22, 1, .36, 1);

  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 17px;
  letter-spacing: -0.006em;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
code, kbd, pre { font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace; }
:focus-visible { outline: 2.5px solid var(--violet-2); outline-offset: 3px; border-radius: 6px; }
::selection { background: rgba(124,92,246,.22); }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.center { text-align: center; margin-inline: auto; }

/* ---------- Decorative aurora ---------- */
.aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.blob--violet { width: 620px; height: 620px; top: -260px; left: -180px;
  background: radial-gradient(circle, rgba(124,92,246,.55), transparent 68%); }
.blob--blue { width: 680px; height: 680px; top: -340px; right: -240px;
  background: radial-gradient(circle, rgba(47,138,234,.42), transparent 68%); }

/* ---------- Typography scale ---------- */
h1, h2, h3 { letter-spacing: -0.03em; line-height: 1.05; font-weight: 700; }
h2 { font-size: clamp(1.9rem, 1.1rem + 2.6vw, 3rem); letter-spacing: -0.032em; }
h3 { font-size: 1.12rem; letter-spacing: -0.02em; line-height: 1.25; }
p  { color: var(--ink-2); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  text-transform: uppercase; color: var(--accent-ink);
  margin-bottom: 18px;
}
.eyebrow.center { display: flex; width: max-content; }
.eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--grad); box-shadow: 0 0 0 4px rgba(124,92,246,.12);
}

kbd {
  font-size: .82em; font-weight: 600; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 1.7em; padding: .42em .5em;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--border-2); border-bottom-width: 2px;
  border-radius: 7px; box-shadow: var(--sh-sm);
}

/* ---------- Buttons ---------- */
.btn {
  --pad: 13px 22px;
  display: inline-flex; align-items: center; gap: 9px;
  padding: var(--pad); border-radius: 999px;
  font-weight: 600; font-size: .96rem; letter-spacing: -0.01em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
  will-change: transform;
}
.btn--sm { padding: 9px 17px; font-size: .9rem; }
.btn--lg { padding: 15px 26px; font-size: 1rem; }
.btn--primary {
  color: #fff; background: var(--grad);
  box-shadow: 0 6px 18px rgba(96,80,164,.30), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(96,80,164,.40), inset 0 1px 0 rgba(255,255,255,.3); }
.btn--ghost { color: var(--accent-ink); background: rgba(124,92,246,.07); }
.btn--ghost:hover { background: rgba(124,92,246,.13); transform: translateY(-2px); }
.btn--outline { color: var(--ink); background: var(--surface); border-color: var(--border-2); box-shadow: var(--sh-sm); }
.btn--outline:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: var(--violet-2); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  transition: background .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(251,250,254,.78);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom-color: var(--border);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; }
.brand__mark { border-radius: 8px; box-shadow: var(--sh-sm); }
.brand__name { font-size: 1.06rem; }
.nav__links { display: flex; gap: 6px; margin-inline: auto; }
.nav__links a {
  padding: 8px 13px; border-radius: 9px; font-size: .94rem; font-weight: 500; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--ink); background: rgba(124,92,246,.07); }
.nav__cta { margin-left: 0; }

/* ---------- Hero ---------- */
.hero { padding-top: clamp(56px, 8vw, 104px); }
.hero__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.hero__title {
  font-size: clamp(2.6rem, 1.4rem + 5.4vw, 5rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.0;
  margin-bottom: 22px;
}
.hero__sub {
  font-size: clamp(1.06rem, 1rem + .5vw, 1.32rem);
  color: var(--ink-2); max-width: 40ch; line-height: 1.5; margin-bottom: 32px;
}
.hero__sub strong { color: var(--ink); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.hero__meta { margin-top: 22px; font-size: .88rem; color: var(--ink-3); }

.hero__shot { margin-top: clamp(48px, 7vw, 84px); padding-inline: 24px; perspective: 1600px; }

/* Window chrome */
.window {
  position: relative; max-width: 1080px; margin-inline: auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden;
  box-shadow: var(--sh-lg);
}
.window::after { /* glow */
  content: ""; position: absolute; inset: auto 0 -40px 0; height: 120px; z-index: -1;
  background: var(--grad); filter: blur(60px); opacity: .25; border-radius: 50%;
}
.window__bar {
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding-inline: 16px;
  background: linear-gradient(var(--surface-2), var(--surface));
  border-bottom: 1px solid var(--border);
}
.tl { width: 12px; height: 12px; border-radius: 50%; }
.tl--r { background: #FF5F57; } .tl--y { background: #FEBC2E; } .tl--g { background: #28C840; }
.window__title { margin-inline: auto; font-size: .82rem; font-weight: 600; color: var(--ink-3); transform: translateX(-26px); }
.window img { width: 100%; }
.window--tight { max-width: 720px; }

/* ---------- Stats ---------- */
.stats { padding: clamp(70px, 9vw, 120px) 24px clamp(20px, 3vw, 40px); }
.stats__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
  padding: 34px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--sh-md);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; }
.stat__num { font-size: clamp(2rem, 1.4rem + 2vw, 2.9rem); font-weight: 800; letter-spacing: -0.04em; }
.stat__label { font-size: .9rem; color: var(--ink-3); }

/* ---------- Feature rows ---------- */
.feature { padding: clamp(64px, 9vw, 120px) 0; }
.feature--alt { background: var(--bg-soft); border-block: 1px solid var(--border); }
.feature__inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.feature__inner--reverse .feature__copy { order: 2; }
.feature__copy h2 { margin: 14px 0 18px; }
.feature__copy > p { font-size: 1.12rem; line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.feature__copy strong { color: var(--ink); font-weight: 600; }
.feature__copy em { font-style: normal; color: var(--accent-ink); font-weight: 600; }

.ticks { list-style: none; padding: 0; margin-top: 22px; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; color: var(--ink-2); font-size: 1.01rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--grad-soft);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236750A4' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"),
    var(--grad-soft);
  background-repeat: no-repeat; background-position: center;
}
.ticks kbd { margin: 0 1px; }

.badge {
  display: inline-flex; align-items: center; gap: 9px; margin-top: 24px;
  padding: 9px 15px; border-radius: 999px;
  background: rgba(22,160,106,.10); color: #0E7A50; font-size: .88rem; font-weight: 600;
  border: 1px solid rgba(22,160,106,.20);
}
.badge__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,160,106,.18); }

/* ---------- Mock UI cards ---------- */
.mock {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--sh-lg); overflow: hidden;
}

/* Fragment tabs mock */
.frag__tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.frag__tab {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 500; color: var(--ink-3);
  padding: 6px 11px; border-radius: 9px; white-space: nowrap;
}
.frag__tab.is-active { color: var(--ink); background: var(--surface); box-shadow: var(--sh-sm); border: 1px solid var(--border); }
.frag__add { margin-left: auto; color: var(--ink-3); font-weight: 600; padding: 4px 9px; border-radius: 8px; }
.lang { width: 13px; height: 13px; border-radius: 4px; }
.lang--js { background: #F0DB4F; } .lang--css { background: #2F6BEA; } .lang--md { background: #8B8B8B; }
.code { margin: 0; padding: 20px 22px; font-size: .84rem; line-height: 1.75; overflow-x: auto; color: #3A3550; }
.code .t-key { color: #B5179E; } .code .t-fn { color: var(--blue); font-weight: 600; }
.code .t-num { color: #C2410C; } .code .t-tag { color: #16A06A; }
.code .t-attr { color: #6750A4; } .code .t-str { color: #0E7A50; }
.frag__foot { display: flex; gap: 8px; padding: 0 22px 18px; }
.chip { font-size: .76rem; font-weight: 500; padding: 4px 10px; border-radius: 7px; }
.chip--react { background: rgba(34,170,140,.14); color: #0E7A50; }
.chip--util { background: rgba(47,107,234,.13); color: #2456C8; }

/* Search mock */
.search__bar {
  display: flex; align-items: center; gap: 11px; padding: 15px 18px;
  border-bottom: 1px solid var(--border); color: var(--ink-3);
}
.search__typed { font-size: .98rem; color: var(--ink); font-weight: 500; }
.tok { font-family: "JetBrains Mono", monospace; font-size: .9em; padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.tok--filter { background: rgba(124,92,246,.14); color: var(--accent-ink); }
.tok--bool   { background: rgba(47,138,234,.14); color: #2456C8; }
.tok--neg    { background: rgba(179,38,30,.10); color: #B3261E; }
.tok--phrase { background: rgba(22,160,106,.14); color: #0E7A50; }
.tok--wild   { background: rgba(255,160,0,.18); color: #B26A00; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--violet-2); margin-left: 2px; vertical-align: -2px; animation: blink 1.1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }

.search__results { padding: 8px; }
.res { padding: 13px 14px; border-radius: 12px; transition: background .2s; }
.res + .res { margin-top: 2px; }
.res--top { background: var(--grad-soft); }
.res__main { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.res__title { font-weight: 600; font-size: .96rem; color: var(--ink); }
.res__score { font-size: .76rem; font-weight: 700; color: var(--accent-ink); font-family: "JetBrains Mono", monospace; }
.res:not(.res--top) .res__score { color: var(--ink-3); }
.res__code { display: block; font-size: .82rem; color: var(--ink-2); }

/* Smart-group rules mock */
.mock--rules { padding: 4px; }
.rules__head { padding: 16px 18px 4px; }
.rules__title { font-weight: 600; font-size: .96rem; }
.rules__match { padding: 6px 18px 14px; color: var(--ink-3); font-size: .9rem; }
.seg { background: rgba(124,92,246,.12); color: var(--accent-ink); font-weight: 600; padding: 2px 9px; border-radius: 6px; }
.rule {
  display: flex; align-items: center; gap: 8px; margin: 8px 12px;
  padding: 11px 14px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
  font-size: .9rem;
}
.rule__field { font-weight: 600; color: var(--ink); }
.rule__op { color: var(--ink-3); }
.rule__val { margin-left: auto; font-family: "JetBrains Mono", monospace; font-size: .84rem; color: var(--accent-ink); background: rgba(124,92,246,.10); padding: 3px 9px; border-radius: 6px; }
.rules__foot { display: flex; align-items: center; gap: 9px; padding: 14px 18px; color: var(--ink-3); font-size: .88rem; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(22,160,106,.5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22,160,106,0); } 100% { box-shadow: 0 0 0 0 rgba(22,160,106,0); } }

/* ---------- Search-syntax band ---------- */
.syntax { padding: clamp(64px, 9vw, 120px) 0; text-align: center; }
.syntax h2 { margin: 14px 0 16px; }
.syntax__sub { max-width: 50ch; font-size: 1.1rem; }
.syntax__demo {
  margin: 36px auto 0; max-width: 760px; padding: 22px 26px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--sh-md); overflow-x: auto;
}
.syntax__demo code { font-size: 1rem; line-height: 2.1; white-space: nowrap; }
.syntax__demo .tok { font-size: .94rem; }
.syntax__legend { display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: center; margin-top: 22px; font-size: .86rem; color: var(--ink-3); }
.syntax__legend span { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 12px; height: 12px; border-radius: 4px; }
.sw--filter { background: rgba(124,92,246,.55); }
.sw--bool   { background: rgba(47,138,234,.55); }
.sw--neg    { background: rgba(179,38,30,.5); }
.sw--phrase { background: rgba(22,160,106,.55); }
.sw--wild   { background: rgba(255,160,0,.65); }

/* ---------- Feature grid ---------- */
.grid-feat { padding: clamp(64px, 9vw, 120px) 0; text-align: center; }
.grid-feat h2 { margin: 14px 0 48px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; text-align: left; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--sh-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--sh-md); border-color: var(--border-2); }
.card__ic {
  width: 44px; height: 44px; display: grid; place-items: center; margin-bottom: 16px;
  border-radius: 12px; background: var(--grad-soft); color: var(--accent-ink);
  font-weight: 700; font-size: 1rem; font-family: "JetBrains Mono", monospace;
}
.card h3 { margin-bottom: 7px; }
.card p { font-size: .94rem; color: var(--ink-3); line-height: 1.5; }

/* ---------- Shortcuts ---------- */
.shortcuts { padding: clamp(64px, 9vw, 110px) 0; text-align: center; background: var(--bg-soft); border-block: 1px solid var(--border); }
.shortcuts h2 { margin: 14px 0 44px; }
.keys { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 720px; margin-inline: auto; text-align: left; }
.keyrow {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--sh-sm);
}
.keys__act { font-weight: 500; color: var(--ink-2); }
.kbd-set { display: inline-flex; gap: 5px; }

/* ---------- Download ---------- */
.download { padding: clamp(76px, 10vw, 130px) 0; text-align: center; position: relative; }
.download__inner { display: flex; flex-direction: column; align-items: center; }
.download__mark { border-radius: 20px; box-shadow: var(--sh-glow); margin-bottom: 26px; }
.download h2 { font-size: clamp(2.1rem, 1.4rem + 3vw, 3.4rem); font-weight: 800; letter-spacing: -0.04em; }
.download__sub { margin: 16px 0 36px; max-width: 44ch; font-size: 1.12rem; color: var(--ink-2); }
.download__btns { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.dl { text-align: left; }
.dl__txt { display: flex; flex-direction: column; line-height: 1.15; }
.dl__lead { font-size: .72rem; font-weight: 500; opacity: .8; }
.dl__plat { font-size: .98rem; font-weight: 700; }
.dl--soon { opacity: .55; pointer-events: none; box-shadow: none; cursor: default; }
.dl--soon .dl__lead { color: var(--accent-ink); opacity: 1; font-weight: 700; }
.download__note { margin-top: 30px; max-width: 56ch; font-size: .86rem; color: var(--ink-3); }
.download__note code { background: var(--bg-soft); border: 1px solid var(--border); padding: 2px 7px; border-radius: 6px; font-size: .9em; }

/* ---------- Footer ---------- */
.footer { padding: 44px 0; border-top: 1px solid var(--border); background: var(--surface); }
.footer__inner { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.footer__brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; }
.footer__brand img { border-radius: 7px; }
.footer__links { display: flex; gap: 18px; margin-inline: auto; }
.footer__links a { font-size: .92rem; color: var(--ink-2); transition: color .2s; }
.footer__links a:hover { color: var(--accent-ink); }
.footer__legal { width: 100%; font-size: .82rem; color: var(--ink-3); padding-top: 8px; border-top: 1px solid var(--border); margin-top: 4px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal:nth-child(2) { transition-delay: .06s; }
.reveal:nth-child(3) { transition-delay: .12s; }
.cards .reveal, .stats .reveal { transition-delay: calc(var(--i, 0) * 60ms); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature__inner { grid-template-columns: 1fr; }
  .feature__inner--reverse .feature__copy { order: 0; }
  .feature__copy > p, .ticks { max-width: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .stats__grid { grid-template-columns: repeat(2, 1fr); gap: 28px 20px; }
}
@media (max-width: 720px) {
  .nav__links { display: none; }
  .keys { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}
@media (max-width: 540px) {
  .cards { grid-template-columns: 1fr; }
  .btn--lg { width: 100%; justify-content: center; }
  .hero__cta, .download__btns { width: 100%; }
  .dl { justify-content: center; }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .caret, .pulse { animation: none; }
  * { transition-duration: .01ms !important; }
}
