/* GitWorkStream: three repository lanes gathering into one node. Palette from the app icon.
   See what your agents are doing: the agent badge colour matches the app's. */
.gw {
  --gw-bg: #0b0d12;
  --gw-card: #151821;
  --gw-line: #262a35;
  --gw-ink: #eef1f6;
  --gw-muted: #9aa3b5;
  --gw-teal: #2ed4bf;
  --gw-violet: #a68cfa;
  --gw-blue: #4d9cff;
  --gw-agent: #d46bf2;
  --gw-navy: #05173d;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  background:
    radial-gradient(900px circle at 85% -10%, rgba(77, 156, 255, .14), transparent 60%),
    radial-gradient(700px circle at -10% 30%, rgba(46, 212, 191, .10), transparent 60%),
    var(--gw-bg);
  color: var(--gw-ink);
}
.gw .nav { background: rgba(11, 13, 18, .65); }
.gw section { max-width: 1200px; padding-block: clamp(56px, 8vw, 110px); }
.gw h2 { font-size: clamp(34px, 5vw, 60px); line-height: 1.02; }
.gw p { color: #c3c9d6; }
.gw code {
  font-family: var(--mono); font-size: .86em; padding: .12em .42em; border-radius: 6px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); color: var(--gw-ink);
}
.gw-eyebrow {
  font-family: var(--mono); font-size: 13px; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gw-teal) !important; margin: 0 0 16px;
}
.gw-eyebrow::before { content: "› "; color: var(--gw-muted); }
.gw-grad {
  background: linear-gradient(95deg, var(--gw-teal), var(--gw-violet) 55%, var(--gw-blue));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.gw-lede { font-size: clamp(18px, 1.9vw, 21px); max-width: 620px; }
.gw-head { margin-bottom: clamp(30px, 5vw, 56px); max-width: 780px; }
.gw-head .gw-lede { margin-top: 16px; }

/* ---------- Buttons ---------- */
.gw-btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 12px;
  text-decoration: none; font-weight: 600; transition: transform .2s, box-shadow .2s, background .2s;
}
.gw-btn svg { width: 18px; }
.gw-btn.primary { background: var(--gw-ink); color: #0b0d12; padding: 11px 24px 11px 20px; }
.gw-btn.primary svg { width: 22px; }
.gw-btn.primary span { display: flex; flex-direction: column; line-height: 1.15; font-size: 18px; }
.gw-btn.primary small { font-size: 12px; font-weight: 500; letter-spacing: .02em; color: #3a4150; }
.gw-play { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 10px; padding-left: 2px; color: #0b0d12; background: linear-gradient(135deg, var(--gw-teal), var(--gw-blue)); }
.gw-btn.primary:hover { background: #ffffff; }
.gw-btn.ghost { border: 1px solid var(--gw-line); background: rgba(255, 255, 255, .03); }
.gw-btn.ghost:hover { background: rgba(255, 255, 255, .08); }

/* ---------- Hero ---------- */
.gw-hero {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(20px, 4vw, 60px); align-items: center;
  padding-top: clamp(40px, 6vw, 80px) !important; padding-bottom: 20px !important;
}
.gw-app-id { display: flex; align-items: center; gap: 16px; margin-bottom: 28px; }
.gw-app-id img { width: 72px; height: 72px; filter: drop-shadow(0 14px 30px rgba(0, 0, 0, .6)); }
.gw-kicker { margin: 0; font-weight: 700; font-size: 18px; color: var(--gw-ink) !important; }
.gw-sub { margin: 2px 0 0; font-size: 14px; color: var(--gw-muted) !important; font-family: var(--mono); }
.gw-hero h1 { font-size: clamp(46px, 6.4vw, 88px); line-height: .98; margin-bottom: 26px; }
.gw-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.gw-meta { font-family: var(--mono); font-size: 13px; color: var(--gw-muted) !important; margin-top: 22px; }

/* Animated lanes */
.gw-lanes svg { width: 100%; height: auto; overflow: visible; }
.gw-lanes .lane { fill: none; stroke-width: 14; stroke-linecap: round; opacity: .28; }
.gw-lanes .lane.out { stroke: #fff; opacity: .16; stroke-dasharray: 2 14; stroke-width: 6; }
.gw-lanes .flow { fill: none; stroke-width: 14; stroke-linecap: round; stroke-dasharray: 60 460; animation: flow 3.6s linear infinite; }
.gw-lanes .flow.violet { animation-delay: -1.2s; }
.gw-lanes .flow.blue { animation-delay: -2.4s; }
@keyframes flow { from { stroke-dashoffset: 520; } to { stroke-dashoffset: 0; } }
.gw-lanes .teal { stroke: var(--gw-teal); fill: var(--gw-teal); }
.gw-lanes .violet { stroke: var(--gw-violet); fill: var(--gw-violet); }
.gw-lanes .blue { stroke: var(--gw-blue); fill: var(--gw-blue); }
.gw-lanes path.teal, .gw-lanes path.violet, .gw-lanes path.blue { fill: none; }
.gw-lanes .dot { stroke: none; filter: drop-shadow(0 0 6px currentColor); }
.gw-lanes .cap { stroke: none; }
.gw-lanes .node { fill: #fcfcff; }
.gw-lanes .node-glow { animation: pulse 3.6s ease-in-out infinite; transform-origin: 430px 210px; }
@keyframes pulse { 50% { transform: scale(1.18); opacity: .7; } }
.gw-lanes text { font-family: var(--mono); font-size: 17px; fill: var(--gw-muted); }
.gw-lanes text.branch { fill: var(--gw-ink); font-size: 16px; text-anchor: middle; }
.gw-lanes text.agent { fill: var(--gw-agent); font-size: 15px; }
.gw-lanes text.you { fill: var(--gw-ink); font-size: 15px; }

/* Hero screenshot on a tilted stage that flattens as you scroll */
.gw-stage {
  position: relative; z-index: 2; max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter);
  perspective: 1800px;
}
.gw-window {
  display: block; width: 100%; height: auto; border-radius: 14px; background: #1c1d22;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 60px 140px -40px rgba(0, 0, 0, .95), 0 0 120px -40px rgba(77, 156, 255, .45);
  transform: rotateX(calc(var(--tilt, 1) * 16deg)) scale(calc(1 - var(--tilt, 1) * .06));
  transform-origin: 50% 0; will-change: transform;
}

/* ---------- Problem ---------- */
.gw-problem { display: grid; grid-template-columns: 1fr 1.15fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.gw-prose p { font-size: clamp(17px, 1.7vw, 20px); margin: 0 0 18px; }

/* ---------- Cards ---------- */
.gw-kind-grid, .gw-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.gw-card {
  position: relative; padding: clamp(24px, 3.4vw, 40px); border-radius: 20px; overflow: hidden;
  background: var(--gw-card); border: 1px solid var(--gw-line);
}
.gw-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.gw-card::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(420px circle at 100% 0%, color-mix(in srgb, var(--c) 16%, transparent), transparent 70%);
}
.gw-card > * { position: relative; z-index: 1; }
.gw-card h3 { font-size: clamp(22px, 2.4vw, 28px); margin: 14px 0 12px; }
.gw-card p { margin: 0; font-size: 16.5px; }
.gw-tag { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }

/* ---------- Tour ---------- */
.gw-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.gw-tabs button {
  font: inherit; font-weight: 600; font-size: 15px; color: var(--gw-muted); cursor: pointer;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: 10px;
  background: transparent; border: 1px solid var(--gw-line); transition: color .2s, background .2s, border-color .2s;
}
.gw-tabs button:hover { color: var(--gw-ink); background: rgba(255, 255, 255, .04); }
.gw-tabs button[aria-selected="true"] { color: var(--gw-ink); background: rgba(77, 156, 255, .14); border-color: rgba(77, 156, 255, .5); }
.gw kbd {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; font-size: 12px; padding: 2px 7px; border-radius: 6px; color: var(--gw-ink);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); border-bottom-width: 2px;
}
.gw-tour-frame { margin: 0; }
.gw-tour-frame img {
  display: block; width: 100%; height: auto; border-radius: 14px; transition: opacity .25s;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 100px -40px #000;
}
.gw-tour-frame img.swap { opacity: 0; }
.gw-tour-frame .gw-tour-cap { margin-top: 16px; color: var(--gw-muted); font-size: 16px; }

/* ---------- Film ---------- */
.gw-film-frame {
  border-radius: 18px; overflow: hidden; aspect-ratio: 16 / 9; border: 1px solid var(--gw-line);
  box-shadow: 0 60px 140px -50px rgba(46, 212, 191, .45), 0 40px 120px -60px rgba(77, 156, 255, .6);
}
.gw-film-frame video { width: 100%; height: 100%; display: block; background: #000; }

/* ---------- Read-only ---------- */
.gw-readonly { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.gw-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.gw-list li { padding-left: 26px; position: relative; color: #c3c9d6; }
.gw-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 10px; height: 10px; border-radius: 50%; background: var(--gw-teal); box-shadow: 0 0 10px var(--gw-teal); }
.gw-list b { color: var(--gw-ink); }
.gw-term { border-radius: 14px; overflow: hidden; background: #07080c; border: 1px solid var(--gw-line); box-shadow: 0 40px 100px -40px #000; }
.gw-term-bar { display: flex; align-items: center; gap: 7px; padding: 12px 14px; background: #151821; border-bottom: 1px solid var(--gw-line); }
.gw-term-bar i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.gw-term-bar i:nth-child(2) { background: #febc2e; }
.gw-term-bar i:nth-child(3) { background: #28c840; }
.gw-term-bar span { margin-left: 10px; font-family: var(--mono); font-size: 12px; color: var(--gw-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gw-term pre { margin: 0; padding: 20px; font-family: var(--mono); font-size: 13.5px; line-height: 1.75; color: #d6dbe6; overflow-x: auto; }
.gw-term .c { color: var(--gw-teal); }
.gw-term .t { color: var(--gw-blue); }
.gw-term .m { color: #6f788a; }

/* ---------- Promise ---------- */
.gw-promise {
  text-align: center; border-radius: 28px; margin: 0 var(--gutter) !important;
  padding: clamp(50px, 8vw, 100px) clamp(22px, 5vw, 60px) !important;
  background: radial-gradient(600px circle at 50% 0%, rgba(166, 140, 250, .18), transparent 70%), var(--gw-card);
  border: 1px solid var(--gw-line);
}
@media (min-width: 1328px) { .gw-promise { margin: 0 auto !important; } }
.gw-promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 40px; text-align: left; }
.gw-promise-grid div { padding: 20px; border-radius: 16px; background: rgba(11, 13, 18, .6); border: 1px solid var(--gw-line); }
.gw-promise-grid b { display: block; font-size: 18px; margin-bottom: 4px; }
.gw-promise-grid span { color: var(--gw-muted); font-size: 15px; }

/* ---------- FAQ ---------- */
.gw-faq-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 6vw, 90px); align-items: start; }
.gw-support-lede a, .gw-faq a { color: var(--gw-teal); }
.gw-faq details { background: var(--gw-card); border: 1px solid var(--gw-line); border-radius: 14px; padding: 18px 22px; margin-bottom: 10px; }
.gw-faq summary { font-weight: 600; font-size: 17px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.gw-faq summary::-webkit-details-marker { display: none; }
.gw-faq summary::after { content: "+"; font-family: var(--mono); color: var(--gw-teal); transition: transform .3s; }
.gw-faq details[open] summary::after { transform: rotate(45deg); }
.gw-faq details p { margin: 12px 0 0; font-size: 16px; }
.gw .footer { border-top-color: var(--gw-line); }


/* ---------- Private-mode note ---------- */
.gw-private-note { text-align: center; font-family: var(--mono); font-size: 13px; color: var(--gw-muted) !important; margin: 18px 0 0; }

/* ---------- Live before / after ---------- */
.gw-live { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.gw-new { font-family: var(--mono); font-size: .78em; letter-spacing: .08em; color: var(--gw-blue); padding: .1em .4em; border-radius: 5px; background: rgba(77, 156, 255, .14); }
.gw-toggle { display: inline-flex; gap: 4px; padding: 4px; margin-top: 12px; border-radius: 12px; background: var(--gw-card); border: 1px solid var(--gw-line); flex-wrap: wrap; }
.gw-toggle button {
  font: inherit; font-weight: 600; font-size: 15px; color: var(--gw-muted); cursor: pointer; padding: 9px 16px; border-radius: 9px;
  background: transparent; border: 0; transition: color .2s, background .2s;
}
.gw-toggle button:hover { color: var(--gw-ink); }
.gw-toggle button[aria-pressed="true"] { color: #0b0d12; background: var(--gw-teal); }
.gw-live-frame { position: relative; margin: 0; border-radius: 14px; overflow: hidden; aspect-ratio: 2200 / 1392; background: #1c1d22; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 100px -40px #000, 0 0 100px -40px rgba(212, 107, 242, .45); }
.gw-live-frame img { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .45s ease; }
.gw-live-frame .after { opacity: 0; }
.gw-live-frame[data-state="after"] .after { opacity: 1; }
.gw-live-ring {
  position: absolute; left: 18.6%; top: 32.2%; width: 50.8%; height: 6%; border-radius: 8px; pointer-events: none;
  border: 2px solid var(--gw-teal); box-shadow: 0 0 0 5px rgba(46, 212, 191, .2), 0 0 30px rgba(46, 212, 191, .5);
  opacity: 0; transform: scale(.97); transition: opacity .4s .25s, transform .4s .25s;
}
.gw-live-frame[data-state="after"] .gw-live-ring { opacity: 1; transform: none; }

/* ---------- Attribution ---------- */
.gw-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.gw-steps li {
  position: relative; padding: 24px; border-radius: 18px; background: var(--gw-card); border: 1px solid var(--gw-line);
  display: flex; flex-direction: column; gap: 10px; overflow: hidden;
}
.gw-steps li::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--c); }
.gw-steps span { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 15px; background: var(--c); color: #0b0d12; }
.gw-steps b { font-size: 19px; color: var(--gw-ink); }
.gw-steps code { width: fit-content; max-width: 100%; overflow-wrap: anywhere; }
.gw-agents { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; align-items: center; }
.gw-agents span { font-weight: 600; font-size: 16px; padding: 6px 14px; border-radius: 9px; color: var(--gw-agent); background: rgba(212, 107, 242, .13); }
.gw-agents span::before { content: "✦ "; }
.gw-agents span.plain { background: none; color: var(--gw-muted); font-weight: 500; padding-left: 4px; }
.gw-agents span.plain::before { content: none; }

/* ---------- Ask ---------- */
.gw-ask { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 5vw, 70px); align-items: center; }
.gw-ask-frame { margin: 0; max-width: 560px; justify-self: center; width: 100%; }
.gw-ask-frame img, .gw-tour-frame img { background: #1c1d22; }
.gw-ask-frame img {
  display: block; width: 100%; height: auto; border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 100px -40px #000, 0 0 100px -40px rgba(77, 156, 255, .5);
}
.gw-promise-link { margin: 30px 0 0; }
.gw-promise-link a { color: var(--gw-teal); text-underline-offset: 4px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .gw-hero, .gw-problem, .gw-readonly, .gw-faq-wrap, .gw-kind-grid, .gw-grid-2, .gw-live, .gw-ask, .gw-steps { grid-template-columns: 1fr; }
  .gw-lanes { max-width: 460px; }
  .gw-promise-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .gw-promise-grid { grid-template-columns: 1fr; }
  .gw-live-frame, .gw-ask-frame img { border-radius: 8px; }
  .gw-tabs button { font-size: 14px; padding: 8px 12px; }
  .gw-window, .gw-tour-frame img { border-radius: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .gw-lanes .flow, .gw-lanes .node-glow { animation: none; }
  .gw-lanes .dot { display: none; }
  .gw-window { transform: none; }
  .gw-live-frame img, .gw-live-ring { transition: none; }
}
.gw .doc-body a { color: var(--gw-teal); }
