/* ============================================================
   Branch Diff — landing page
   Dark, monospace-led identity derived from the extension's own
   world: a code diff. green = add / install, red = delete,
   amber = modify. Navy base (#0d1b2a gallery banner).
   ============================================================ */

:root {
  /* navy scale */
  --bg-0: #0a1420;
  --bg-1: #0f1e2e;
  --bg-2: #16293b;
  --line: #22384d;
  --line-soft: rgba(255, 255, 255, 0.06);

  /* text */
  --fg: #e8eef4;
  --muted: #93a4b5;
  --faint: #5f7285;

  /* diff semantics */
  --add: #43c15a;   /* green: add / install */
  --add-ink: #0a1a0e;
  --del: #f0595f;   /* red: delete */
  --mod: #d7a53f;   /* amber: modify */

  --radius: 14px;
  --radius-sm: 9px;
  --maxw: 1120px;

  --mono: ui-monospace, "SF Mono", "SFMono-Regular", "Cascadia Code", "JetBrains Mono", Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--fg);
  background:
    radial-gradient(1200px 620px at 78% -8%, rgba(67, 193, 90, 0.07), transparent 60%),
    radial-gradient(900px 520px at 6% 4%, rgba(23, 62, 94, 0.5), transparent 55%),
    linear-gradient(180deg, #0d1b2a 0%, var(--bg-0) 34%, #070e17 100%);
  background-attachment: fixed;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; }

code {
  font-family: var(--mono);
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-soft);
  padding: 0.08em 0.4em;
  border-radius: 5px;
}

::selection { background: rgba(67, 193, 90, 0.28); }

/* ---------- buttons ---------- */
.btn {
  --btn-pad-y: 0.6rem;
  --btn-pad-x: 1.05rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5ch;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: var(--btn-pad-y) var(--btn-pad-x);
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

.btn--install {
  background: var(--add);
  color: var(--add-ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 8px 26px -12px rgba(67, 193, 90, 0.8);
}
.btn--install:hover { background: #4fd267; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 10px 30px -10px rgba(67, 193, 90, 0.9); }

.btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--fg);
  border-color: var(--line);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); border-color: #34506b; }

.btn--lg { --btn-pad-y: 0.8rem; --btn-pad-x: 1.35rem; font-size: 0.98rem; }

.plus { font-weight: 800; font-size: 1.1em; line-height: 0; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.4rem);
  max-width: var(--maxw);
  margin: 0 auto;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(10, 20, 32, 0.82), rgba(10, 20, 32, 0.45));
  border-bottom: 1px solid var(--line-soft);
}
/* full-bleed sticky backdrop */
.nav::before {
  content: "";
  position: absolute;
  inset: 0 -50vw;
  z-index: -1;
  background: inherit;
  border-bottom: inherit;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--fg);
}
.brand__icon {
  display: block;
  width: 1.75em;
  height: 1.75em;
  border-radius: 6px;
  flex: none;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2.2vw, 1.7rem);
  font-size: 0.92rem;
}
.nav__links > a:not(.btn) {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  transition: color 0.15s ease;
}
.nav__links > a:not(.btn):hover { color: var(--fg); }

/* ---------- layout shell ---------- */
.hero,
.section,
.reqs {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: clamp(1rem, 4vw, 2.4rem);
  padding-right: clamp(1rem, 4vw, 2.4rem);
}

/* ---------- hero ---------- */
.hero {
  padding-top: clamp(2.6rem, 7vw, 5.5rem);
  padding-bottom: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
}

.hero__mark {
  display: block;
  width: clamp(66px, 11vw, 92px);
  height: auto;
  margin: 0 auto 1.5rem;
  filter: drop-shadow(0 20px 38px rgba(0, 0, 0, 0.55));
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.3rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.02);
}
.eyebrow__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--add);
  box-shadow: 0 0 0 3px rgba(67, 193, 90, 0.2);
}

.hero__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.15rem, 6.4vw, 4.15rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0 auto 1.3rem;
  max-width: 16ch;
}
.hero__title .src {
  color: var(--add);
  position: relative;
  white-space: nowrap;
}
.hero__title .src::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0.05em;
  height: 0.14em;
  background: linear-gradient(90deg, var(--add), transparent);
  border-radius: 2px;
  opacity: 0.5;
}

.hero__sub {
  font-size: clamp(1.02rem, 2.2vw, 1.22rem);
  color: var(--muted);
  max-width: 56ch;
  margin: 0 auto 2rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* install command chip */
.cmd {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  margin: 0 auto;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.28);
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-width: 100%;
}
.cmd__text {
  font-family: var(--mono);
  font-size: 0.86rem;
  color: var(--fg);
  background: none;
  border: 0;
  padding: 0.65rem 0.95rem;
  white-space: nowrap;
  overflow-x: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.7ch;
}
.cmd__prompt { color: var(--add); font-weight: 700; }
.cmd__copy {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 0;
  border-left: 1px solid var(--line);
  padding: 0 1rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.cmd__copy:hover { color: var(--fg); background: rgba(255, 255, 255, 0.09); }
.cmd__copy.is-copied { color: var(--add); }

/* screenshot frame */
.shot {
  margin: clamp(2.4rem, 6vw, 4rem) auto 0;
  max-width: 1000px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-1);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.shot__bar {
  display: flex;
  align-items: center;
  gap: 0.5ch;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(0, 0, 0, 0.25);
}
.shot__bar .dot { width: 11px; height: 11px; border-radius: 50%; background: #33475b; }
.shot__bar .dot:nth-child(1) { background: #f0595f; }
.shot__bar .dot:nth-child(2) { background: #d7a53f; }
.shot__bar .dot:nth-child(3) { background: #43c15a; }
.shot__ref {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--faint);
  letter-spacing: 0.03em;
}
.shot img { display: block; width: 100%; height: auto; }

/* ---------- generic section ---------- */
.section { padding-top: clamp(3.5rem, 8vw, 6rem); padding-bottom: clamp(1rem, 3vw, 2rem); }
.section__head { margin-bottom: 2.2rem; }
.section__kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.7ch;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.7rem;
}
.node {
  width: 9px; height: 9px; border-radius: 50%;
  border: 2px solid var(--add);
  background: transparent;
}
.section__title {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.6vw, 2.5rem);
  letter-spacing: -0.015em;
  line-height: 1.1;
  margin: 0;
  max-width: 20ch;
}

/* ---------- features grid ---------- */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.card {
  background: linear-gradient(180deg, var(--bg-1), rgba(15, 30, 46, 0.55));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.4rem 1.5rem;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}
.card:hover { transform: translateY(-3px); border-color: #33506c; background: linear-gradient(180deg, var(--bg-2), rgba(15, 30, 46, 0.7)); }
.card h3 {
  font-family: var(--mono);
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.85rem 0 0.5rem;
}
.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.card p code { font-size: 0.85em; }

.card__badges { display: flex; gap: 0.4rem; }
.badge {
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.8rem;
  width: 1.7em; height: 1.7em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}
.badge--a { color: var(--add); background: rgba(67, 193, 90, 0.14); }
.badge--m { color: var(--mod); background: rgba(215, 165, 63, 0.14); }
.badge--d { color: var(--del); background: rgba(240, 89, 95, 0.14); }

.card__ribbon {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.06em;
  color: var(--faint);
  margin: 0;
  padding: 0.2rem 0;
  border-bottom: 1px dashed var(--line);
  display: inline-block;
}

.add { color: var(--add); font-weight: 700; }
.del { color: var(--del); font-weight: 700; }

/* ---------- how it works ---------- */
.section--how .steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem 2.2rem;
  counter-reset: none;
}
.step {
  display: flex;
  gap: 1.1rem;
  align-items: flex-start;
  padding: 1.2rem 0;
  border-top: 1px solid var(--line-soft);
}
.step__n {
  flex: none;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--add);
  width: 2.2em; height: 2.2em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--add);
  border-radius: 50%;
  background: rgba(67, 193, 90, 0.08);
}
.step h3 {
  font-family: var(--mono);
  font-size: 1.02rem;
  margin: 0.15rem 0 0.35rem;
}
.step p { margin: 0; color: var(--muted); font-size: 0.94rem; }

/* ---------- requirements ---------- */
.reqs {
  margin-top: clamp(3rem, 7vw, 5rem);
  margin-bottom: clamp(3rem, 7vw, 5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding-top: 1.8rem;
  padding-bottom: 1.8rem;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.reqs__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2.6rem;
}
.req { display: flex; flex-direction: column; gap: 0.2rem; }
.req__k {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}
.req__v { font-family: var(--mono); font-size: 0.98rem; color: var(--fg); }
.req__v code { font-size: 0.86em; }

/* ---------- footer ---------- */
.footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 2.6rem clamp(1rem, 4vw, 2.4rem) 3.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.8rem;
  border-top: 1px solid var(--line-soft);
  font-family: var(--mono);
  font-size: 0.88rem;
  color: var(--muted);
}
.footer__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6ch;
  color: var(--fg);
  font-weight: 700;
}
.footer__brand .brand__icon { width: 1.5em; height: 1.5em; }
.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  margin-left: auto;
}
.footer__links a { color: var(--muted); text-decoration: none; transition: color 0.15s ease; }
.footer__links a:hover { color: var(--fg); }
.footer__legal { margin: 0; color: var(--faint); width: 100%; }

/* ---------- focus / a11y ---------- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--add);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .nav__links > a:not(.btn):not([href^="http"]) { display: none; }
  .section--how .steps { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero__actions .btn { flex: 1 1 auto; justify-content: center; }
  .nav__links { gap: 0.9rem; }
  .footer__links { margin-left: 0; }
}

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