/* gitgate.ailio.dev: one stylesheet, system fonts, light and dark. */
:root {
  --bg: #f5f8f9; --surface: #ffffff; --panel: #eaf0f2; --line: #d3dde2;
  --ink: #0e1b26; --muted: #4d5f6b; --green: #0b7d57; --green-soft: #def3ea; --amber: #8f5600; --amber-soft: #fbeed4;
  --red: #b42a2a; --action: #0e1b26; --action-ink: #ffffff; --focus: #0b7d57;
  --term-bg: #0b141b; --term-edge: #22343f; --term-bar: #1b2b35; --term-dot: #2b4150; --term-fg: #c9d6dc; --term-dim: #7f95a1;
  --term-cmd: #f2f8fa; --term-prompt: #2fd39a; --term-ok: #7fe8c1; --term-bad: #ff9a9a; --term-warn: #f6c777;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gut: clamp(16px, 5vw, 64px); --max: 1120px; --radius: 14px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0b141b; --surface: #112029; --panel: #14262f; --line: #263d4a;
  --ink: #e8f1f4; --muted: #9db0ba; --green: #2fd39a; --green-soft: #12382f; --amber: #f0a93a; --amber-soft: #3a2c12;
  --red: #ff8a8a; --action: #2fd39a; --action-ink: #06231a; --focus: #2fd39a;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b141b; --surface: #112029; --panel: #14262f; --line: #263d4a;
    --ink: #e8f1f4; --muted: #9db0ba; --green: #2fd39a; --green-soft: #12382f; --amber: #f0a93a; --amber-soft: #3a2c12;
    --red: #ff8a8a; --action: #2fd39a; --action-ink: #06231a; --focus: #2fd39a; color-scheme: dark;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: 12px; top: -48px; background: var(--action); color: var(--action-ink); padding: 8px 14px; border-radius: 8px; z-index: 30; }
.skip:focus { top: 12px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gut)); margin: 0 auto; padding: 0 var(--gut); }
code, pre, kbd { font-family: var(--mono); font-size: .92em; }
:not(pre) > code { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .08em .35em; overflow-wrap: anywhere; }

/* header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 20px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 19px; letter-spacing: -.01em; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.top nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
.top nav a { text-decoration: none; color: var(--muted); }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.theme { appearance: none; border: 1px solid var(--line); background: var(--surface); color: var(--ink); width: 38px; height: 38px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.theme:hover { border-color: var(--green); }
.theme svg { width: 18px; height: 18px; }
.theme .sun { display: none; }
:root[data-theme="dark"] .theme .sun { display: block; } :root[data-theme="dark"] .theme .moon { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .theme .sun { display: block; } :root:not([data-theme="light"]) .theme .moon { display: none; } }
@media (max-width: 760px) { .top nav .hide-s { display: none; } .top nav { gap: 14px; } }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 20px; border-radius: 12px; font-weight: 600; font-size: 16px; text-decoration: none; border: 1px solid var(--action); background: var(--action); color: var(--action-ink); }
.btn:hover { color: var(--action-ink); filter: brightness(1.12); }
.btn.alt { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.alt:hover { color: var(--ink); border-color: var(--ink); filter: none; }

/* hero */
.hero { padding: clamp(48px, 9vw, 104px) 0 clamp(40px, 6vw, 72px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(28px, 4vw, 48px); align-items: center; }
.eyebrow { font: 600 13px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--green); margin: 0 0 18px; }
h1, h2, h3 { line-height: 1.1; letter-spacing: -.025em; margin: 0; }
h1 { font-size: clamp(34px, 4.6vw, 56px); font-weight: 700; text-wrap: balance; }
h2 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 700; text-wrap: balance; }
h3 { font-size: 20px; letter-spacing: -.01em; }
.lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--muted); max-width: 34em; margin: 22px 0 0; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.fine { margin: 18px 0 0; font-size: 14.5px; color: var(--muted); }
.hero .wrap > div, .refuse > *, .setup > *, .lanes > * { min-width: 0; }
@media (max-width: 880px) { .hero .wrap { grid-template-columns: minmax(0, 1fr); } }

/* terminal */
.term { background: var(--term-bg); border: 1px solid var(--term-edge); border-radius: 12px; overflow: hidden; color: var(--term-fg); box-shadow: 0 18px 40px -22px rgba(6, 20, 30, .55); }
.term-bar { display: flex; align-items: center; gap: 7px; padding: 0 16px; height: 37px; background: var(--term-bg); border-bottom: 1px solid var(--term-bar); }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--term-dot); }
.term-bar b { margin-left: 10px; font: 600 12.5px var(--font); color: #e3edf1; }
.term pre { margin: 0; padding: 14px 16px 18px; overflow-x: auto; font-size: 12px; line-height: 19px; tab-size: 4; -webkit-overflow-scrolling: touch; }
.term .l { display: block; min-height: 19px; white-space: pre; }
.term .p { color: var(--term-prompt); } .term .c { color: var(--term-cmd); font-weight: 600; } .term .d { color: var(--term-dim); }
.term .o { color: var(--term-ok); } .term .b { color: var(--term-bad); } .term .w { color: var(--term-warn); }
.js .term[data-play] .l { visibility: hidden; }
.js .term[data-play] .l.on { visibility: visible; }
.js .term[data-play] .l.on.typed .c { animation: type 0.9s steps(26, end) both; display: inline-block; overflow: hidden; white-space: pre; vertical-align: bottom; }
@keyframes type { from { max-width: 0; } to { max-width: 40ch; } }

/* sections */
section { padding: clamp(56px, 8vw, 104px) 0; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { max-width: 40em; margin-bottom: clamp(28px, 4vw, 48px); }
.sec-head p { color: var(--muted); font-size: 18px; margin: 16px 0 0; }
.sec-head .eyebrow { margin-bottom: 14px; }

/* two lanes */
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.lane { border-radius: var(--radius); padding: clamp(22px, 3vw, 32px); border: 1px solid var(--line); background: var(--surface); position: relative; overflow: hidden; }
.lane::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--c); }
.lane.managed { --c: var(--green); } .lane.unmanaged { --c: var(--amber); }
.lane h3 { font-size: 26px; color: var(--c); display: flex; align-items: center; gap: 10px; }
.lane .url { font: 500 13.5px var(--mono); margin: 14px 0 18px; padding: 10px 12px; background: var(--panel); border-radius: 8px; overflow-x: auto; white-space: nowrap; }
.lane ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.lane li { position: relative; padding-left: 26px; }
.lane li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.lane li.no::before { content: "✕"; color: var(--red); }
.lane .for { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15.5px; }
@media (max-width: 820px) { .lanes { grid-template-columns: minmax(0, 1fr); } }

/* refusal table */
.refuse { margin-top: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.rules { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.rules li { display: grid; grid-template-columns: minmax(0, 10.5em) 1fr; gap: 6px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.rules b { font-weight: 600; }
.rules span { color: var(--muted); }
@media (max-width: 880px) { .refuse { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 480px) { .rules li { grid-template-columns: 1fr; } }

/* steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.steps li { counter-increment: s; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: var(--bg); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--action); color: var(--action-ink); font: 700 14px var(--mono); margin-bottom: 14px; }
.steps h3 { font-size: 18px; margin-bottom: 8px; } .steps p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 980px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }
.diagram { margin-top: 36px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.diagram img { width: 100%; }
.pic-dark { display: none; }
:root[data-theme="dark"] .pic-dark { display: block; } :root[data-theme="dark"] .pic-light { display: none; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pic-dark { display: block; } :root:not([data-theme="light"]) .pic-light { display: none; } }

/* setup */
.setup { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.setup h3 { margin-bottom: 6px; } .setup p { color: var(--muted); font-size: 15.5px; margin: 0 0 14px; }
.code { position: relative; }
.code pre { margin: 0; padding: 16px 16px 16px; background: var(--term-bg); color: var(--term-fg); border: 1px solid var(--term-edge); border-radius: 12px; overflow-x: auto; font-size: 13px; line-height: 1.65; }
.copy { position: absolute; top: 8px; right: 8px; border: 1px solid var(--term-edge); background: var(--term-bar); color: #dbe6ea; border-radius: 8px; font: 600 12px var(--font); padding: 5px 10px; cursor: pointer; }
.copy:hover { border-color: var(--term-prompt); }
.cmt { color: var(--term-dim); }
@media (max-width: 880px) { .setup { grid-template-columns: minmax(0, 1fr); } }

/* facts */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.fact { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; background: var(--surface); }
.fact h3 { margin-bottom: 8px; } .fact p { margin: 0; color: var(--muted); font-size: 16px; }
.bench { margin-top: 24px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.bench div { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 22px; background: var(--surface); }
.bench strong { display: block; font-size: 34px; letter-spacing: -.03em; line-height: 1.1; }
.bench span { color: var(--muted); font-size: 15px; }
.note { color: var(--muted); font-size: 14.5px; margin: 14px 0 0; }
@media (max-width: 900px) { .facts { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .bench { grid-template-columns: 1fr; } }

/* faq */
.faq { max-width: 52em; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 20px 36px 20px 0; font-weight: 600; font-size: 18px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 16px; font-size: 26px; font-weight: 400; color: var(--green); }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 22px; color: var(--muted); max-width: 44em; }

/* close + footer */
.close { text-align: left; }
.close .code { max-width: 46em; margin-top: 26px; }
footer { border-top: 1px solid var(--line); padding: 36px 0 56px; color: var(--muted); font-size: 15px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }

/* motion: a hero entrance, one dealt moment, nothing when motion is reduced */
@media (prefers-reduced-motion: no-preference) {
  .js .enter { opacity: 0; transform: translateY(14px); animation: rise .7s cubic-bezier(.2, .7, .2, 1) forwards; }
  .js .enter.d1 { animation-delay: .08s; } .js .enter.d2 { animation-delay: .16s; } .js .enter.d3 { animation-delay: .26s; }
  @keyframes rise { to { opacity: 1; transform: none; } }
  .js .deal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
  .js .deal.in { opacity: 1; transform: none; }
  .js .deal:nth-child(2) { transition-delay: .12s; } .js .deal:nth-child(3) { transition-delay: .24s; } .js .deal:nth-child(4) { transition-delay: .36s; }
  .btn, .theme { transition: filter .15s, border-color .15s; }
}
