/* ============================================================
   VimCode — landing page
   Palette pulled from the extension icon: charcoal-navy ground,
   Vimium hint-gold, light-blue accent.
   ============================================================ */
:root {
  --bg:        #181a21;
  --bg-2:      #1c1e26;
  --surface:   #23262f;
  --surface-2: #2a2d38;
  --border:    #343846;
  --border-2:  #3f4456;

  --text:      #e9ebf2;
  --muted:     #9aa1b3;
  --faint:     #6c7287;

  --gold:      #f6c747;
  --gold-2:    #ffd96b;
  --gold-deep: #c9961f;
  --blue:      #86cff4;
  --blue-2:    #a7defb;

  --radius:    16px;
  --radius-sm: 10px;
  --maxw:      1140px;
  --shadow:    0 24px 60px -20px rgba(0,0,0,.6);
  --ring:      0 0 0 1px var(--border);

  --font:  'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono:  'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.02em; margin: 0; }
p { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.accent { color: var(--gold); }
.muted  { color: var(--muted); }
.small  { font-size: .9rem; }
.grad {
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-2) 40%, var(--blue) 110%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- keycaps ---------- */
kbd {
  font-family: var(--mono);
  font-size: .82em;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  padding: .34em .5em;
  margin: 0 1px;
  color: var(--text);
  background: linear-gradient(180deg, #30343f, #262932);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 7px;
  box-shadow: 0 1px 0 rgba(0,0,0,.35);
  white-space: nowrap;
}
code {
  font-family: var(--mono);
  font-size: .88em;
  background: rgba(134,207,244,.1);
  color: var(--blue-2);
  padding: .12em .42em;
  border-radius: 6px;
}
.cmd {
  font-family: var(--mono);
  font-size: .82em;
  color: var(--gold);
  background: rgba(246,199,71,.12);
  padding: .12em .5em;
  border-radius: 6px;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* Vimium-style hint chip */
.hint {
  font-family: var(--mono);
  font-weight: 700;
  font-size: .8rem;
  text-transform: uppercase;
  color: #2a1f02;
  background: linear-gradient(180deg, var(--gold-2), var(--gold-deep));
  border: 1px solid #8a6510;
  border-radius: 5px;
  padding: .18em .45em;
  box-shadow: 0 2px 6px rgba(0,0,0,.45);
  letter-spacing: .02em;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: 600; font-size: .98rem;
  padding: 12px 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease, border-color .2s ease;
  will-change: transform;
}
.btn--sm { padding: 8px 16px; font-size: .9rem; }
.btn--primary {
  color: #241a02;
  background: linear-gradient(180deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 26px -8px rgba(246,199,71,.55);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -8px rgba(246,199,71,.6); }
.btn--ghost {
  color: var(--text);
  background: rgba(255,255,255,.03);
  border-color: var(--border-2);
}
.btn--ghost:hover { transform: translateY(-2px); border-color: var(--gold); background: rgba(246,199,71,.08); }

/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(24,26,33,.82);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom-color: var(--border);
}
.nav__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.18rem; letter-spacing: -.02em; }
.brand__logo { border-radius: 8px; }
.nav__links { display: flex; gap: 28px; margin-left: 18px; margin-right: auto; }
.nav__links a { color: var(--muted); font-weight: 500; font-size: .96rem; transition: color .15s ease; }
.nav__links a:hover { color: var(--text); }
.nav__cta { display: flex; gap: 10px; }
.nav__burger { display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .25s; }

/* ============================================================
   HERO
   ============================================================ */
.hero { position: relative; padding: 150px 24px 60px; text-align: center; overflow: hidden; }
.hero__glow {
  position: absolute; inset: -20% 0 auto 0; height: 720px; z-index: -2;
  background:
    radial-gradient(560px 320px at 22% 12%, rgba(246,199,71,.20), transparent 70%),
    radial-gradient(620px 360px at 82% 8%, rgba(134,207,244,.16), transparent 70%);
  filter: blur(8px);
}
.hero__grid {
  position: absolute; inset: 0; z-index: -3;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 55% at 50% 0%, #000 35%, transparent 80%);
}
.hero__inner { max-width: 820px; margin: 0 auto; position: relative; z-index: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .82rem; font-weight: 600; color: var(--muted);
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 15px; border-radius: 999px; margin-bottom: 26px;
  transition: border-color .2s ease, color .2s ease;
}
.pill:hover { border-color: var(--gold); color: var(--text); }
.pill__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px var(--gold); }

.hero__title { font-size: clamp(2.4rem, 6vw, 4.3rem); font-weight: 900; }
.hero__sub {
  margin: 24px auto 0; max-width: 600px;
  font-size: clamp(1.02rem, 2.2vw, 1.22rem); color: var(--muted);
}
.hero__sub em { color: var(--blue-2); font-style: normal; font-weight: 600; }
.hero__actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 34px; }
.hero__hint { margin-top: 26px; color: var(--faint); font-size: .92rem; }

/* floating hint chips */
.floaters { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hint--float {
  position: absolute; left: var(--x); top: var(--y);
  opacity: 0; animation: floatIn .8s ease forwards, bob 5s ease-in-out infinite;
  animation-delay: var(--d), calc(var(--d) + .8s);
}
@keyframes floatIn { from { opacity: 0; transform: translateY(14px) scale(.8); } to { opacity: .9; transform: none; } }
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }

/* product window */
.window {
  margin: 60px auto 0; max-width: 1000px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow);
  position: relative;
}
.window::after { /* gold halo */
  content: ""; position: absolute; inset: -1px; border-radius: 14px; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(246,199,71,.12), 0 40px 120px -40px rgba(246,199,71,.25);
}
.window__bar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 15px; background: var(--bg-2); border-bottom: 1px solid var(--border);
}
.window__dot { width: 11px; height: 11px; border-radius: 50%; background: #3a3d4a; }
.window__dot:nth-child(1) { background: #e06c5b; }
.window__dot:nth-child(2) { background: #e0b85b; }
.window__dot:nth-child(3) { background: #5bcc7a; }
.window__title { margin-left: 10px; font-family: var(--mono); font-size: .78rem; color: var(--faint); }
.window img { width: 100%; display: block; }

/* ============================================================
   MODES STRIP
   ============================================================ */
.modes { padding: 26px 0 10px; }
.modes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
  transition: transform .2s ease, border-color .2s ease;
}
.mode:hover { transform: translateY(-4px); border-color: var(--border-2); }
.mode__kbd { display: flex; gap: 5px; margin-bottom: 14px; }
.mode__kbd kbd { font-size: .95rem; padding: .45em .6em; }
.mode h3 { font-size: 1.1rem; margin-bottom: 6px; }
.mode p { color: var(--muted); font-size: .96rem; }

/* ============================================================
   SECTIONS
   ============================================================ */
.section { padding: 90px 0; }
.section--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg)); border-block: 1px solid var(--border); }
.section__head { max-width: 640px; margin: 0 auto 52px; text-align: center; }
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .78rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px;
}
.section__head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.section__head p { margin-top: 14px; color: var(--muted); font-size: 1.08rem; }

/* ---------- feature cards ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-5px); border-color: var(--border-2); box-shadow: var(--shadow); }
.card__icon {
  width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 18px;
}
.card__icon[data-c="gold"] { color: var(--gold); background: rgba(246,199,71,.12); border: 1px solid rgba(246,199,71,.25); }
.card__icon[data-c="blue"] { color: var(--blue); background: rgba(134,207,244,.12); border: 1px solid rgba(134,207,244,.25); }
.card h3 { font-size: 1.18rem; margin-bottom: 10px; }
.card p { color: var(--muted); font-size: .98rem; }
.card p kbd { font-size: .78em; }

/* ============================================================
   CHEATSHEET
   ============================================================ */
.sheet__tools {
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  flex-wrap: wrap; margin-bottom: 28px;
}
.sheet__filters { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-family: var(--font); font-size: .9rem; font-weight: 600;
  color: var(--muted); background: var(--surface); border: 1px solid var(--border);
  padding: 8px 15px; border-radius: 999px; cursor: pointer;
  transition: all .16s ease;
}
.chip:hover { color: var(--text); border-color: var(--border-2); }
.chip.is-active { color: #241a02; background: linear-gradient(180deg, var(--gold-2), var(--gold)); border-color: transparent; }

.sheet__search { position: relative; flex: 1; min-width: 240px; max-width: 360px; }
.sheet__search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--faint); }
.sheet__search input {
  width: 100%; font-family: var(--font); font-size: .95rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px;
  padding: 11px 16px 11px 42px; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.sheet__search input::placeholder { color: var(--faint); }
.sheet__search input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(246,199,71,.15); }

.sheet { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; align-items: start; }
.sheet__card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px 26px;
  transition: opacity .2s ease;
}
.sheet__card.is-hidden { display: none; }
.sheet__title { display: flex; align-items: center; gap: 10px; font-size: 1.18rem; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.dot[data-c="gold"] { background: var(--gold); box-shadow: 0 0 10px rgba(246,199,71,.6); }
.dot[data-c="blue"] { background: var(--blue); box-shadow: 0 0 10px rgba(134,207,244,.6); }
.sheet__when { color: var(--faint); font-size: .88rem; margin: 6px 0 18px; }

.rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.row {
  display: flex; align-items: center; gap: 16px;
  padding: 11px 0; border-top: 1px solid var(--border);
}
.row:first-child { border-top: 0; }
.row.is-hidden { display: none; }
.keys { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 130px; flex-shrink: 0; }
.keys .sep { color: var(--faint); margin: 0 2px; }
.act { color: var(--muted); font-size: .95rem; }

.sheet__empty { text-align: center; color: var(--faint); padding: 40px 0; font-size: 1.05rem; }
.sheet__foot {
  margin-top: 26px; text-align: center; color: var(--faint); font-size: .92rem;
  max-width: 760px; margin-inline: auto;
}
.sheet__foot strong { color: var(--muted); }

/* ============================================================
   OVERLAY SHOWCASE
   ============================================================ */
.overlay__wrap { display: grid; grid-template-columns: 1fr 1.1fr; gap: 50px; align-items: center; }
.overlay__copy h2 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; }
.overlay__copy > p { margin-top: 16px; color: var(--muted); font-size: 1.05rem; }
.overlay__copy .small { margin-top: 16px; }
.overlay__shot { margin: 0; }

/* ---------- code block ---------- */
.codeblock { margin: 22px 0 8px; border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--bg-2); }
.codeblock__bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px; background: var(--surface); border-bottom: 1px solid var(--border);
  font-family: var(--mono); font-size: .76rem; color: var(--faint);
}
.copy {
  font-family: var(--font); font-size: .78rem; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px solid var(--border-2); border-radius: 6px;
  padding: 4px 10px; cursor: pointer; transition: all .15s ease;
}
.copy:hover { color: var(--text); border-color: var(--gold); }
.copy.is-done { color: var(--gold); border-color: var(--gold); }
.codeblock pre { margin: 0; padding: 16px 18px; overflow-x: auto; }
.codeblock code { background: none; padding: 0; color: var(--text); font-size: .88rem; line-height: 1.7; }
.c-prompt { color: var(--gold); user-select: none; }

/* ============================================================
   INSTALL
   ============================================================ */
.install { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.install__card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: clamp(16px, 3vw, 28px);
}
.install__card .codeblock pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.install__card > .btn { align-self: flex-start; margin-top: auto; }
.install__card h3 { font-size: 1.2rem; margin-bottom: 8px; }
.install__card > p { color: var(--muted); font-size: .96rem; }
.install__keys { list-style: none; margin: 4px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.install__keys li { display: flex; align-items: center; gap: 10px; }
.install__keys span { color: var(--muted); font-size: .92rem; }

/* ============================================================
   CTA
   ============================================================ */
.cta { padding: 96px 0; text-align: center; position: relative; overflow: hidden; }
.cta::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(600px 300px at 50% 0%, rgba(246,199,71,.14), transparent 70%);
}
.cta__inner { max-width: 620px; }
.cta__logo { margin: 0 auto 22px; border-radius: 14px; box-shadow: var(--shadow); }
.cta h2 { font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; }
.cta p { margin: 16px auto 30px; color: var(--muted); max-width: 480px; }
.cta .hero__actions { margin-top: 0; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { border-top: 1px solid var(--border); padding: 40px 0 28px; background: var(--bg-2); }
.footer__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer__brand { display: flex; align-items: center; gap: 12px; }
.footer__brand img { border-radius: 8px; }
.footer__brand strong { font-size: 1.1rem; font-weight: 800; display: block; }
.footer__by { font-size: .85rem; color: var(--faint); }
.footer__by a:hover { color: var(--gold); }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); font-size: .92rem; transition: color .15s ease; }
.footer__links a:hover { color: var(--text); }
.footer__note { text-align: center; color: var(--faint); font-size: .82rem; margin-top: 26px; }

/* ============================================================
   SCROLL REVEAL
   ============================================================ */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-in { opacity: 1; transform: none; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .features { grid-template-columns: repeat(2, 1fr); }
  .install { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .install__card:last-child { grid-column: 1 / -1; }
  .modes__grid { grid-template-columns: 1fr; }
  .overlay__wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
@media (max-width: 720px) {
  .nav__links, .nav__cta { display: none; }
  .nav.is-open .nav__links {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    background: rgba(24,26,33,.97); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border); padding: 14px 24px 20px;
  }
  .nav.is-open .nav__cta { display: flex; position: absolute; top: 100%; right: 24px; margin-top: 200px; }
  .nav__burger { display: flex; margin-left: auto; }
  .nav.is-open .nav__burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .nav.is-open .nav__burger span:nth-child(2) { opacity: 0; }
  .nav.is-open .nav__burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .hero { padding-top: 120px; }
  .features { grid-template-columns: 1fr; }
  .install, .sheet { grid-template-columns: minmax(0, 1fr); }
  .section { padding: 64px 0; }
  .sheet__tools { flex-direction: column; align-items: stretch; }
  .sheet__search { max-width: none; }
  .footer__inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 360px) {
  .sheet .row { flex-direction: column; align-items: flex-start; gap: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}
