/* tf-snag — wes-key.dev
   Single-page static site. Dark, terminal-forward. No build step. */

:root {
  --bg:          #0a0c10;
  --bg-raised:   #12161d;
  --bg-term:     #0d1117;
  --border:      #222933;
  --border-soft: #1b212a;
  --text:        #e6edf3;
  --muted:       #9aa4b2;
  --accent:      #7c5cff;
  --accent-2:    #a894ff;
  --accent-soft: rgba(124, 92, 255, 0.12);
  --amber:       #f0b429;
  --green:       #3fb950;
  --red:         #f85149;
  --blue:        #6cb6ff;

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

  --wrap: 1080px;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--accent-soft);
  color: var(--accent-2);
  padding: 0.12em 0.4em;
  border-radius: 5px;
}

em { font-style: normal; color: var(--accent-2); }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap.narrow { max-width: 760px; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 12, 16, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.01em;
}
.wordmark img { display: block; border-radius: 6px; }
.header-nav {
  display: flex;
  align-items: center;
  gap: 26px;
}
.header-nav a { color: var(--muted); font-size: 0.92rem; white-space: nowrap; }
.header-nav a:hover { color: var(--text); text-decoration: none; }
.header-nav .btn { color: var(--text); }

/* four links plus the button: tighten, then drop the longest, before stacking */
@media (max-width: 1060px) {
  .header-nav { gap: 18px; }
}
@media (max-width: 900px) {
  .header-nav a[href="#adopt"] { display: none; }
}
@media (max-width: 640px) {
  .header-nav a:not(.btn) { display: none; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform 0.06s ease, background 0.15s ease, border-color 0.15s ease;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: #6b4aff; }
.btn-ghost {
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--accent); background: var(--accent-soft); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 32px;
}
.center-row { justify-content: center; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  padding: 96px 0 64px;
  overflow: hidden;
  border-bottom: 1px solid var(--border-soft);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 20% 0%, rgba(124, 92, 255, 0.16), transparent 70%),
    radial-gradient(50% 50% at 95% 10%, rgba(108, 182, 255, 0.08), transparent 70%);
  pointer-events: none;
}
.hero-inner { position: relative; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}
h1 {
  font-size: clamp(2.3rem, 5.4vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.025em;
  margin: 0 0 24px;
  max-width: 20ch;
  text-wrap: balance;
}
.lede {
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  color: var(--muted);
  max-width: 60ch;
  margin: 0;
}

/* ---------- terminal ---------- */

.terminal {
  margin-top: 44px;
  background: var(--bg-term);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #0b0f16;
  border-bottom: 1px solid var(--border-soft);
}
.terminal-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #30363d;
}
.terminal-bar em {
  margin-left: 12px;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: #6e7681;
}
.terminal-body {
  margin: 0;
  padding: 20px 22px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.86rem;
  line-height: 1.7;
}
.terminal-body.wrap-lines code { white-space: pre-wrap; }
.terminal-body code {
  background: none;
  color: #c9d1d9;
  padding: 0;
  border-radius: 0;
  font-size: inherit;
  white-space: pre;
}

.c-head { color: var(--amber); font-weight: 700; }
.c-warn { color: var(--amber); }
.c-old  { color: var(--red); }
.c-new  { color: var(--green); }
.c-add  { color: var(--green); }
.c-del  { color: var(--red); }
.c-dim  { color: #6e7681; }
.c-key  { color: var(--blue); }
.c-bold { color: var(--text); font-weight: 700; }

/* ---------- bands ---------- */

.band {
  padding: 84px 0;
  border-bottom: 1px solid var(--border-soft);
}
.band.alt { background: var(--bg-raised); }

.band h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.3rem);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
}
.section-lede {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 65ch;
  margin: 0 0 44px;
}
.big {
  font-size: 1.2rem;
  line-height: 1.6;
  margin: 0 0 24px;
}
.big:last-child { margin-bottom: 0; }
.muted { color: var(--muted); }

/* ---------- problem pillars ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.grid-4 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.pillar {
  background: var(--bg-raised);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.band.alt .pillar { background: var(--bg-term); }
.pillar h3 {
  font-size: 1.12rem;
  margin: 0 0 12px;
  line-height: 1.35;
}
.pillar p { margin: 0; color: var(--muted); font-size: 0.98rem; }

@media (max-width: 860px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ---------- feature rows ---------- */

.feature {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 44px;
  align-items: center;
  margin-top: 40px;
}
.feature + .feature { margin-top: 64px; }
.feature.reverse .feature-text { order: 2; }
.feature-text h3 {
  font-size: 1.3rem;
  margin: 0 0 14px;
}
.feature-text h3 code {
  background: none;
  padding: 0;
  color: var(--accent-2);
}
.tag-new {
  display: inline-block;
  vertical-align: 0.18em;
  margin-left: 10px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(124, 92, 255, 0.45);
  color: var(--accent-2);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.feature-text p { margin: 0 0 12px; }
.feature-terminal { margin-top: 0; }

@media (max-width: 860px) {
  .feature, .feature.reverse .feature-text { grid-template-columns: 1fr; order: unset; }
  .feature { gap: 24px; }
}

/* ---------- compare ---------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.compare-col {
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 26px 26px 26px 24px;
  background: var(--bg-term);
}
.compare-col.win {
  border-color: rgba(124, 92, 255, 0.4);
  background: linear-gradient(180deg, var(--accent-soft), transparent 60%), var(--bg-term);
}
.compare-col h3 {
  margin: 0 0 16px;
  font-size: 1.1rem;
}
.compare-col.win h3 { color: var(--accent-2); }
.compare-col ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.compare-col li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 12px;
  color: var(--muted);
  font-size: 0.98rem;
}
.compare-col li:last-child { margin-bottom: 0; }
.compare-col li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  color: var(--red);
  font-weight: 700;
}
.compare-col.win li::before {
  content: "\2713";
  color: var(--green);
}

@media (max-width: 760px) {
  .compare { grid-template-columns: 1fr; }
}

/* ---------- azure devops section ---------- */

.step-h {
  font-size: 1.15rem;
  margin: 48px 0 16px;
  letter-spacing: -0.01em;
}
.step-h + .terminal { margin-top: 0; }

.callout {
  margin-top: 32px;
  padding: 18px 20px;
  border: 1px solid rgba(240, 180, 41, 0.35);
  background: rgba(240, 180, 41, 0.08);
  border-radius: 10px;
  font-size: 0.96rem;
  line-height: 1.6;
}
.callout strong { color: var(--amber); }

.surfaces-wrap { overflow-x: auto; }
.surfaces {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}
.surfaces th,
.surfaces td {
  text-align: left;
  padding: 13px 16px 13px 0;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: top;
  color: var(--muted);
}
.surfaces th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
}
.surfaces td:first-child {
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  padding-right: 28px;
}
.surfaces td:nth-child(2) code { white-space: nowrap; }

.flags { margin: 0; }
.flags dt {
  font-family: var(--mono);
  font-size: 0.9rem;
  color: var(--accent-2);
  margin-top: 18px;
}
.flags dt:first-child { margin-top: 0; }
.flags dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.flags-note { margin-top: 28px; font-size: 0.92rem; }

.ci-p { margin: 28px 0 14px; color: var(--muted); font-size: 0.96rem; }

.shot { margin: 28px 0 0; }

.shot-stage {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-term);
}
.shot-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border-soft);
}
.shot-zoom { display: flex; align-items: center; gap: 6px; }
.zbtn {
  font-family: var(--mono);
  font-size: 0.95rem;
  line-height: 1;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 7px;
  cursor: pointer;
}
.zbtn:hover { border-color: var(--accent); background: var(--accent-soft); }
.shot-hint { color: var(--accent-2); white-space: nowrap; font-size: 0.8rem; margin-left: 6px; }

.shot-viewport {
  overflow: auto;
  max-height: min(72vh, 640px);
  cursor: grab;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}
.shot-viewport.is-panning { cursor: grabbing; user-select: none; }
.shot-viewport:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.shot-viewport img {
  display: block;
  width: calc(100% * var(--z, 1));
  max-width: none;
  height: auto;
  transition: width 0.18s ease;
}

.ext-feature { margin-top: 64px; }
.ext-feature .feature-text h3 { font-size: 1.15rem; }
.feature.reverse.ext-feature { grid-template-columns: 1.15fr 0.85fr; }
@media (max-width: 860px) {
  .feature.reverse.ext-feature { grid-template-columns: 1fr; }
}
.ext-wide .shot { margin-top: 20px; }
/* show the whole register at fit so both tables are visible */
.ext-wide .shot-viewport { max-height: none; }

.shot-static {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.12s;
}
.shot-static:hover { border-color: var(--accent); }
.shot-static img { display: block; width: 100%; max-width: 100%; height: auto; }
.feature > * { min-width: 0; }

.shot figcaption {
  margin-top: 12px;
  font-size: 0.9rem;
  color: var(--muted);
}
.shot figcaption strong { color: var(--text); font-weight: 600; }

/* ---------- closer ---------- */

.closer { padding: 96px 0; }
.closer h2 { margin-bottom: 12px; }

/* ---------- footer ---------- */

.site-footer {
  padding: 32px 0;
  background: var(--bg);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--muted);
}
.footer-inner span:first-child { color: var(--text); }
.footer-inner span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.footer-inner span:first-child img { display: block; border-radius: 4px; }

/* ---------- motion ---------- */

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