/* git-into-gsoc site. Tokens come from brand/tokens.css (generated). */

@font-face {
  font-family: "Gig Pixel";
  src: url("brand/font/GigPixel.woff2") format("woff2"), url("brand/font/GigPixel.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* Gig Pixel cells are exactly 1/16 em: these sizes land on whole pixels. */
:root {
  --px-2: 32px;
  --px-3: 48px;
  --px-4: 64px;
  --px-5: 80px;
  --px-6: 96px;
  --measure: 62ch;
  --gutter: clamp(16px, 4vw, 40px);
  --wrap: 1120px;
  color-scheme: light dark;
}
[data-theme="light"] { color-scheme: light; }
[data-theme="dark"] { color-scheme: dark; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--gig-font-sans);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv05";
}

a { color: var(--accent-text); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2.5px; }
:focus-visible { outline: 3px solid var(--cursor); outline-offset: 3px; }

.pixel {
  font-family: var(--gig-font-pixel);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: 0;
  text-transform: lowercase;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
h2.pixel { font-size: var(--px-3); line-height: 1; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1em; max-width: var(--measure); }
code, pre, kbd { font-family: var(--gig-font-mono); font-size: 0.94em; }
p code { background: var(--bg-2); padding: 0.1em 0.35em; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- nav ------------------------------------------------------------------- */
.nav {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0;
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--fg); text-decoration: none; }
.brand .tile { width: 36px; height: 36px; flex: none; }
.brand .name { font-size: var(--px-2); line-height: 1; margin-top: 4px; }
.nav-links { display: flex; align-items: center; gap: 20px; margin: 0; padding: 0; list-style: none; }
.nav-links a { color: var(--fg); text-decoration: none; font-weight: 500; }
.nav-links a:hover { text-decoration: underline; }
.theme-toggle {
  appearance: none; border: 1.5px solid var(--line); background: transparent; color: var(--fg);
  font: inherit; font-weight: 500; padding: 6px 12px; border-radius: 999px; cursor: pointer;
}
.theme-toggle:hover { border-color: var(--fg); }
@media (max-width: 640px) {
  .brand .name { display: none; }
  .nav-links { gap: 14px; font-size: 0.95rem; }
}
@media (max-width: 420px) { .nav-links .optional { display: none; } }

/* --- hero --------------------------------------------------------------------- */
/* A touch lighter than merge (#7A5AF8): ink body text on it reaches 4.6:1 (WCAG AA). */
.hero { background: #8466F9; color: var(--gig-ink); padding: clamp(40px, 7vw, 96px) 0 clamp(48px, 7vw, 104px); }
.hero .grid { display: grid; min-width: 0; grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.hero h1 { font-size: clamp(var(--px-2), 6.2vw, var(--px-5)); line-height: 1; margin: 0 0 24px; max-width: 12ch; }
.hero .lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.5; max-width: 52ch; margin-bottom: 28px; color: var(--gig-ink); }
.hero .mark { width: min(100%, 380px); height: auto; display: block; margin-inline: auto; }
.hero .mark .g { fill: var(--gig-ink); }
.hero .mark .cursor { fill: var(--gig-open); animation: var(--gig-blink); }
.hero .after { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-top: 18px; }
.hero .after a { color: var(--gig-ink); font-weight: 600; }
.hero .fine { font-size: 0.9rem; color: var(--gig-ink); margin: 0; }
@media (max-width: 860px) {
  .hero .grid { grid-template-columns: minmax(0, 1fr); }
  .hero .mark { width: min(60%, 260px); margin: 0; order: -1; }
}

/* --- terminal block ------------------------------------------------------------- */
.term {
  min-width: 0;
  background: var(--gig-ink); color: var(--gig-paper);
  border-radius: var(--gig-radius-lg); overflow: hidden;
  box-shadow: 0 1px 0 rgba(21, 18, 30, 0.25) inset;
  max-width: 640px;
}
.term-bar { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; background: var(--gig-ink-2); font-size: 0.85rem; color: var(--gig-mute-on-ink); }
.term pre { margin: 0; padding: 18px 20px 20px; overflow-x: auto; line-height: 1.6; font-size: 0.95rem; tab-size: 2; }
.term pre + pre { padding-top: 0; font-size: 0.85rem; }
.term pre.out { font-size: 0.8rem; line-height: 1.5; }
.term b { font-weight: 600; }
.term .c { color: var(--gig-mute-on-ink); }
.term .k { color: var(--gig-open); }
.term .v { color: var(--gig-merge-soft); }
.term .w { color: var(--gig-warn); }
.term .d { color: var(--gig-danger); }
.copy {
  appearance: none; border: 1.5px solid var(--gig-ink-3); background: transparent; color: var(--gig-paper);
  font: inherit; font-size: 0.85rem; font-weight: 500; padding: 4px 10px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.copy:hover { border-color: var(--gig-paper); }
.copy svg { width: 14px; height: 14px; fill: currentColor; }
.copy[data-done="1"] { color: var(--gig-open); border-color: var(--gig-open); }

/* --- sections ---------------------------------------------------------------- */
.section { padding: clamp(56px, 8vw, 112px) 0; }
.section + .section { border-top: 1.5px solid var(--line); }
.section-head { margin-bottom: clamp(24px, 4vw, 48px); }
.section-head p { margin-top: 16px; color: var(--fg-2); font-size: 1.05rem; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
@media (max-width: 860px) { .two { grid-template-columns: minmax(0, 1fr); } }

/* install tabs, inside the terminal bar */
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tabs [role="tab"] {
  appearance: none; border: 1.5px solid transparent; background: transparent; color: var(--gig-mute-on-ink);
  font: inherit; font-size: 0.85rem; font-weight: 500; padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.tabs [role="tab"]:hover { color: var(--gig-paper); }
.tabs [role="tab"][aria-selected="true"] { color: var(--gig-paper); border-color: var(--gig-ink-3); background: var(--gig-ink); }
.hero p code { background: rgba(21, 18, 30, 0.14); color: var(--gig-ink); }

/* first run: four questions */
.first-run .two { align-items: center; }
.steps { margin: 0 0 1em; padding-left: 1.3em; max-width: var(--measure); }
.steps li { margin-bottom: 0.6em; }
.demo { margin: 0; }
.demo img { width: 100%; height: auto; display: block; border-radius: var(--gig-radius-lg); }
.demo figcaption { font-size: 0.85rem; color: var(--fg-2); margin-top: 10px; }

/* failure mode */
.fail .term { max-width: none; }
.fail .lede { font-size: 1.1rem; }
.fail ul { padding-left: 1.2em; margin: 0 0 1em; max-width: var(--measure); }
.fail li { margin-bottom: 0.5em; }

/* journey */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 24px; counter-reset: step; }
.journey li { border-top: 3px solid var(--line); padding-top: 14px; position: relative; }
.journey li::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  font-family: var(--gig-font-pixel); font-size: var(--px-2); line-height: 1; color: var(--accent); display: block; margin-bottom: 10px;
}
.journey li:nth-child(1) { border-top-color: var(--accent); }
.journey .ico { width: 28px; height: 28px; fill: var(--fg); display: block; margin-bottom: 10px; }
.journey h3 { margin-bottom: 6px; }
.journey p { font-size: 0.95rem; color: var(--fg-2); margin: 0 0 8px; }
.journey a { font-size: 0.9rem; }
@media (max-width: 1080px) { .journey { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .journey { grid-template-columns: minmax(0, 1fr); } }

/* house rules: a sticker wall */
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.rule { display: grid; grid-template-columns: minmax(180px, 280px) minmax(0, 1fr); gap: 24px; align-items: center; }
.rule img { width: 100%; height: auto; display: block; }
.rule:nth-child(1) img { transform: rotate(-2deg); }
.rule:nth-child(2) img { transform: rotate(1.5deg); }
.rule:nth-child(3) img { transform: rotate(-1deg); }
.rule:nth-child(4) img { transform: rotate(2deg); max-width: 120px; }
.rule p { margin: 0; }
@media (max-width: 600px) { .rule { grid-template-columns: minmax(0, 1fr); gap: 10px; } .rule img { max-width: 260px; } }

/* assistants */
.assist .term { max-width: none; }
.clients { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; padding: 0; list-style: none; }
.clients li { border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 12px; font-size: 0.9rem; }

/* --- footer -------------------------------------------------------------------- */
.footer { background: var(--gig-ink); color: var(--gig-paper); padding: 48px 0 40px; }
.footer .cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.footer p { color: var(--gig-mute-on-ink); font-size: 0.92rem; }
.footer a { color: var(--gig-paper); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer .tagline { font-size: var(--px-2); color: var(--gig-paper); margin: 0 0 16px; line-height: 1; }
.footer .tagline .cursor { display: inline-block; width: 0.375em; height: 0.75em; background: var(--gig-open); vertical-align: -0.05em; margin-left: 0.2em; animation: var(--gig-blink); }
@media (max-width: 700px) { .footer .cols { grid-template-columns: minmax(0, 1fr); } }

/* --- brand page --------------------------------------------------------------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; }
.swatch { border-radius: var(--gig-radius-lg); padding: 14px; min-height: 120px; display: flex; flex-direction: column; justify-content: flex-end; border: 1.5px solid var(--line); }
.swatch b { font-weight: 600; }
.swatch code { font-size: 0.85rem; }
/* Neither ink nor paper reaches 4.5:1 on merge itself, so its labels sit on ink chips. */
.swatch.chips > * { align-self: flex-start; background: var(--gig-ink); color: var(--gig-paper); padding: 1px 6px; border-radius: 4px; margin-top: 3px; opacity: 1; }
.specimen { font-size: var(--px-3); margin: 0 0 12px; overflow-wrap: anywhere; }
.specimen.small { font-size: var(--px-2); color: var(--fg-2); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.gallery li { border: 1.5px solid var(--line); border-radius: var(--gig-radius-lg); padding: 14px; background: var(--bg-2); }
.gallery li.light { background: var(--gig-paper); color: var(--gig-ink); border-color: var(--gig-paper-3); }
.gallery li.light a { color: var(--gig-merge-deep); }
.gallery li.dark { background: var(--gig-ink); }
.gallery li.dark a { color: var(--gig-paper); }
.gallery li.wide { grid-column: span 2; }
@media (max-width: 420px) { .gallery { grid-template-columns: minmax(0, 1fr); } .gallery li.wide { grid-column: auto; } }
.gallery li.violet { background: #8466F9; color: var(--gig-ink); } /* as .hero: AA contrast for ink text */
.gallery li.violet a, .gallery li.violet figcaption { color: var(--gig-ink); }
.gallery img { width: 100%; height: 96px; object-fit: contain; display: block; }
.gallery figcaption { font-size: 0.85rem; color: var(--fg-2); margin-top: 8px; }
.gallery li.dark figcaption { color: var(--gig-paper); }
.gallery li.light figcaption { color: var(--gig-mute); }
.icons { display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; list-style: none; }
.icons li { display: grid; justify-items: center; gap: 6px; font-size: 0.8rem; color: var(--fg-2); width: 72px; }
.icons svg { width: 36px; height: 36px; fill: var(--fg); }
.dont { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 18px 40px; }
.dont ul { padding-left: 1.2em; margin: 0; }
.dont li { margin-bottom: 0.4em; }
.construction { background: var(--bg-2); border-radius: var(--gig-radius-lg); padding: 24px; display: grid; place-items: center; }
.construction svg { width: min(100%, 420px); height: auto; }
