/* gitfig.com page styles (2026-08-29).
   The palette (--field, --ink, --muted, --accent, --hair, --f-*) and the plugin
   recreations (.pl-*) come from shared/plugin.css, the same file the Community
   listing frames use. This file adds only what a scrolling page needs: layout,
   type scale, controls, and the .stage/.shot containers that scale fragments. */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --line: #222222;              /* page hairlines */
  --control: var(--hair);       /* #3f3f46, control borders */
  --control-hover: #52525b;
  --surface: #141414;           /* input field, shared with the docs dark theme */
  --accent-hover: #0b87e0;      /* src/ui/styles/main.css:119 */
  --font-head: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --fs-h1: clamp(36px, 3.75vw, 54px);
  --fs-h2: clamp(30px, 2.5vw, 36px);
  --fs-h3: clamp(28px, 2.5vw, 36px);
  --container: 1248px;          /* 1200 inside the gutters: 120px margins at 1440 */
  --gutter: 24px;
  --section: clamp(64px, 3rem + 4.5vw, 120px);
  --block-gap: clamp(48px, 2rem + 4vw, 96px);
}

html { -webkit-text-size-adjust: 100%; }
body {
  font: 400 16px/1.5 var(--font-body);
  background: var(--field);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
[hidden] { display: none !important; }

/* focus: one crisp ring; the 2px gap keeps it readable on black */
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }
.btn:focus-visible { border-radius: 6px; }
input:focus-visible { outline: none; border-color: var(--accent); }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 14px; background: var(--field); border: 1px solid var(--accent); border-radius: 6px;
  font-size: 14px;
}
.skip:focus { top: 16px; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

/* ------------------------------------------------------------- type */
.eyebrow {
  font: 600 13px/1 var(--font-body);
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
}
h1, h2, h3 { font-weight: 600; letter-spacing: -0.02em; overflow-wrap: anywhere; }
.h1 { font: 600 var(--fs-h1)/1.1 var(--font-head); letter-spacing: -0.02em; margin-top: 20px; }
.cap-headline { font: 600 var(--fs-h3)/1.15 var(--font-head); letter-spacing: -0.02em; margin-top: 14px; max-width: 16em; text-wrap: balance; }
.support { font-size: 18px; line-height: 28px; color: var(--muted); margin-top: 16px; max-width: 32em; }
.lead { font-size: clamp(17px, 1rem + 0.3vw, 20px); line-height: 1.5; color: var(--muted); margin-top: 20px; max-width: 30em; }

/* ------------------------------------------------------------- controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: 6px; border: 1px solid transparent;
  font: 500 15px/1 var(--font-body); white-space: nowrap; cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.btn--primary { background: var(--accent); color: #ffffff; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--control); }
.btn--secondary:hover { border-color: var(--control-hover); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn:disabled { background: var(--control); border-color: var(--control); color: var(--muted); cursor: default; }

/* ------------------------------------------------------------- nav */
.nav { height: 64px; border-bottom: 1px solid var(--line); }
.nav .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.lockup { display: flex; align-items: center; gap: 10px; font: 700 20px/1 var(--font-head); letter-spacing: -0.01em; color: var(--ink); }
.lockup img { width: 28px; height: 28px; }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { font-size: 15px; color: var(--muted); transition: color 0.12s; }
.nav-links a:not(.btn):hover { color: var(--ink); }

/* ------------------------------------------------------------- hero */
.hero { position: relative; overflow: clip; padding: clamp(56px, 2rem + 4vw, 96px) 0 var(--section); }
.hero .container { position: relative; }
.hero .container::before {
  content: ''; position: absolute; pointer-events: none; z-index: -1;
  left: -20%; top: -40%; width: clamp(600px, 62vw, 1100px); aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle,
    rgba(13, 153, 255, 0.12) 0%, rgba(13, 153, 255, 0.08) 25%, rgba(13, 153, 255, 0.045) 45%,
    rgba(13, 153, 255, 0.015) 60%, rgba(13, 153, 255, 0) 70%);
}
.hero { isolation: isolate; }
.hero-mark { display: block; width: 96px; height: 96px; margin-bottom: 28px; }
.hero-mark img { width: 96px; height: 96px; border-radius: 20px; border: 1px solid var(--line); }  /* the animation sits on #000; the hairline keeps the tile legible on the field */
.hero-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.hero-grid > * { min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

/* ------------------------------------------------------------- stages: fragments on the page */
.stage {
  --pl-zoom: 1;
  min-width: 0; display: flex; flex-direction: column; align-items: flex-start;
}
.shot {
  width: fit-content; max-width: 100%; margin: 0; overflow: hidden; pointer-events: none;
  border: 1px solid var(--f-border); border-radius: 12px; background: var(--f-bg);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.40), 0 1px 3px rgba(0, 0, 0, 0.50);
}
.shot--float { border: 0; border-radius: 0; background: transparent; box-shadow: none; overflow: visible; }
.shot--tall { min-height: calc(275px * var(--pl-zoom)); }           /* room for the open branch menu (frame 07: 440 / 1.6) */
.shot--pane .pane-zoom { width: 500px; height: auto; }              /* frame 05: 900 / 1.8 */
.shot--pane .pane { height: auto; }
.shot--pane[data-pane="styles"] .pane-zoom { width: 356px; }        /* frame 08: 640 / 1.8 */
.shot .code { display: block; }

.cluster { display: flex; flex-direction: column; align-items: flex-start; width: fit-content; max-width: 100%; }
.stage--float .shot--float { align-self: flex-end; margin-top: calc(12px * var(--pl-zoom)); }
.stage--over .shot--float { align-self: flex-end; margin-top: calc(-40px * var(--pl-zoom)); position: relative; z-index: 1; }
.stage--stack { gap: calc(16px * var(--pl-zoom)); }
.stage--pair { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: calc(24px * var(--pl-zoom)); }

/* no-JS defaults; js/site.js refines --pl-zoom from the measured width */
@media (min-width: 1100px) {
  .stage[data-w="480"] { --pl-zoom: 1.2; }
  .stage[data-w="560"] { --pl-zoom: 1.19; }
  .stage[data-w="700"] { --pl-zoom: 1.4; }
  .stage[data-w="860"], .stage[data-w="880"] { --pl-zoom: 1.35; }
}

/* ------------------------------------------------------------- sections and blocks */
.section { padding: var(--section) 0; border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(40px, 1rem + 3vw, 64px); }
.blocks { display: grid; gap: var(--block-gap); }
.block { display: grid; gap: 40px; }
.block > * { min-width: 0; }
.block--s { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; }
.block--t .copy { max-width: 42rem; }

/* details */
.details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 40px; }
.detail { border-top: 1px solid var(--line); padding-top: 20px; }
.detail h3 { font: 500 16px/24px var(--font-body); letter-spacing: 0; color: var(--ink); }
.detail p { font-size: 15px; line-height: 24px; color: var(--muted); margin-top: 8px; }

/* ------------------------------------------------------------- closer */
.closer { text-align: center; padding: var(--section) 0; border-top: 1px solid var(--line); }
.closer h2 { font: 600 var(--fs-h2)/1.15 var(--font-head); letter-spacing: -0.02em; }
.closer-links { display: grid; width: fit-content; gap: 16px; margin: 40px auto 0; text-align: left; }
.closer-link {
  display: grid; grid-template-columns: 20px 100px minmax(0, 1fr); align-items: center; gap: 16px;
  font-size: 16px; line-height: 24px;
}
.closer-link .i { width: 20px; height: 20px; color: var(--muted); }
.closer-link .label { color: var(--ink); font-weight: 500; }
.closer-link .url { color: var(--muted); overflow-wrap: anywhere; transition: color 0.12s; }
.closer-link:hover .url { color: var(--ink); }

/* ------------------------------------------------------------- subscribe form */
.subscribe { width: 100%; max-width: 440px; text-align: left; }
.closer .subscribe { display: block; margin: 64px auto 0; }
.subscribe--quiet { margin-top: 40px; max-width: 420px; }
.subscribe label { display: block; font-size: 13px; line-height: 20px; color: var(--muted); margin-bottom: 8px; }
.form-row { display: flex; gap: 8px; }
.form-row input {
  flex: 1; min-width: 0; height: 44px; padding: 0 14px;
  background: var(--surface); border: 1px solid var(--control); border-radius: 6px; color: var(--ink);
  font-size: 15px; transition: border-color 0.12s;
}
.form-row input::placeholder { color: var(--muted); opacity: 0.7; }
.form-row input:disabled { color: var(--muted); }
.subscribe--quiet .form-row input, .subscribe--quiet .btn { height: 40px; }
.form-status { margin-top: 10px; font-size: 14px; line-height: 20px; color: var(--muted); min-height: 20px; }
.subscribe[data-state="error"] .form-status, .subscribe[data-state="invalid"] .form-status { color: var(--f-red); }
.subscribe[data-state="done"] .form-status { color: var(--ink); }
.form-status:focus-visible { outline: none; }

/* ------------------------------------------------------------- footer */
.footer { border-top: 1px solid var(--line); padding: 40px 0; font-size: 14px; color: var(--muted); }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.footer a { transition: color 0.12s; }
.footer a:hover { color: var(--ink); }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1099.98px) {
  .hero-grid, .block--s { grid-template-columns: minmax(0, 1fr); }
  .hero-grid { gap: 48px; }
  .block--s { gap: 40px; align-items: start; }
  .details { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) {
  .nav-links { gap: 20px; }
  .nav-links .nav-community { display: none; }
}
@media (max-width: 599.98px) {
  .hero-mark, .hero-mark img { width: 72px; height: 72px; border-radius: 16px; }
  .hero-mark { margin-bottom: 24px; }
  .details { grid-template-columns: minmax(0, 1fr); }
  .actions .btn, .form-row { width: 100%; }
  .stage { --pl-zoom: 0.75; }
  .stage--pair { flex-direction: column; }
  .stage--over .shot--float { align-self: flex-start; margin-top: calc(-24px * var(--pl-zoom)); }
  .stage--float .shot--float { align-self: flex-start; }
  /* the plugin reflows to its 480px floor and hides relative times there */
  .pl--560, .pl--700 { width: 480px; }
  .pl-ready-time { display: none; }
  /* the hero card keeps its size and clips at the section edge: the one bleed on the page */
  .hero .shot { max-width: none; }
  .closer-link { grid-template-columns: 20px minmax(0, 1fr); }
  .closer-link .url { grid-column: 2; }
  .footer .container { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
