/* VelFlow — shared styles
   Signature: the "focus frame" — four corner brackets, like a camera
   viewfinder snapping onto whatever matters on the page. Used large in
   the hero, small and dormant on interactive rows until you touch them. */

@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Space Grotesk";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/space-grotesk-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --ink: #15161a;
  --ink-2: #1b1d22;
  --ink-3: #202329;
  --paper: #e9e6de;
  --muted: #8b8f98;
  --muted-2: #5c6068;
  --brass: #c08a3e;
  --brass-soft: #c08a3e99;
  --steel: #6e8aa3;
  --line: #2a2c33;

  --display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 760px;
  --edge: clamp(20px, 5vw, 56px);
}

* { box-sizing: border-box; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.mono {
  font-family: var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

img { max-width: 100%; display: block; }

:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 3px;
}

/* ---------- layout shell ---------- */

.shell {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--edge);
}

.site-header {
  padding: 28px var(--edge) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: calc(var(--wrap) + var(--edge) * 2);
  margin: 0 auto;
}

.brand {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  color: var(--paper);
}

.brand:hover { color: var(--brass); }

.site-header nav a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-decoration: none;
  color: var(--muted);
  transition: color 0.15s ease;
}

.site-header nav a:hover { color: var(--paper); }

.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 96px;
  padding: 28px var(--edge) 40px;
}

.site-footer .shell,
.site-footer.no-shell-wrap {
  max-width: calc(var(--wrap) + var(--edge) * 2);
  margin: 0 auto;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  align-items: baseline;
  justify-content: space-between;
}

.site-footer .foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

.site-footer a {
  color: var(--muted);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
}

.site-footer a:hover { color: var(--brass); }

.site-footer .fine { color: var(--muted-2); font-family: var(--mono); font-size: 0.7rem; }

/* ---------- focus frame (signature element) ---------- */

.frame {
  position: relative;
}

.corner {
  position: absolute;
  width: 22px;
  height: 22px;
  pointer-events: none;
  transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease, border-color 0.2s ease;
}

.corner--tl { top: -14px; left: -14px; border-top: 2px solid var(--brass); border-left: 2px solid var(--brass); }
.corner--tr { top: -14px; right: -14px; border-top: 2px solid var(--brass); border-right: 2px solid var(--brass); }
.corner--bl { bottom: -14px; left: -14px; border-bottom: 2px solid var(--brass); border-left: 2px solid var(--brass); }
.corner--br { bottom: -14px; right: -14px; border-bottom: 2px solid var(--brass); border-right: 2px solid var(--brass); }

/* hero frame: corners drift in from further out and settle — an autofocus snap.
   Pure CSS (no JS dependency) so the frame always renders even if a script
   is blocked or fails. */
.frame--hero .corner { animation: focus-snap 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) 0.1s both; }
.frame--hero .corner--tl { --fx: -16px; --fy: -16px; }
.frame--hero .corner--tr { --fx: 16px; --fy: -16px; }
.frame--hero .corner--bl { --fx: -16px; --fy: 16px; }
.frame--hero .corner--br { --fx: 16px; --fy: 16px; }

@keyframes focus-snap {
  from { opacity: 0; transform: translate(var(--fx), var(--fy)); }
  to { opacity: 1; transform: translate(0, 0); }
}

/* interactive frame: dormant/small until hovered or focused */
.frame--live .corner { opacity: 0.35; width: 12px; height: 12px; }
.frame--live .corner--tl { top: -8px; left: -8px; }
.frame--live .corner--tr { top: -8px; right: -8px; }
.frame--live .corner--bl { bottom: -8px; left: -8px; }
.frame--live .corner--br { bottom: -8px; right: -8px; }

.frame--live:hover .corner,
.frame--live:focus-visible .corner {
  opacity: 1;
  width: 20px;
  height: 20px;
  border-color: var(--steel);
}
.frame--live:hover .corner--tl, .frame--live:focus-visible .corner--tl { top: -12px; left: -12px; }
.frame--live:hover .corner--tr, .frame--live:focus-visible .corner--tr { top: -12px; right: -12px; }
.frame--live:hover .corner--bl, .frame--live:focus-visible .corner--bl { bottom: -12px; left: -12px; }
.frame--live:hover .corner--br, .frame--live:focus-visible .corner--br { bottom: -12px; right: -12px; }

@media (prefers-reduced-motion: reduce) {
  .corner { transition: none; }
  .frame--hero .corner { animation: none; opacity: 1; transform: translate(0, 0); }
}

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

.hero {
  padding: 108px var(--edge) 88px;
}

.hero .frame { padding: 4px 6px; display: inline-block; }

.eyebrow {
  color: var(--muted);
  margin: 0 0 22px;
}

h1.display {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 0 0 26px;
}

.lede {
  max-width: 46ch;
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0;
}

/* ---------- build log ---------- */

.builds { padding: 0 var(--edge) 40px; }

.build-log {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.build-entry { border-bottom: 1px solid var(--line); }

.build-link {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 6px;
  text-decoration: none;
  color: inherit;
}

.build-index {
  color: var(--muted-2);
  width: 2.4ch;
  flex: none;
}

.build-info { flex: 1; min-width: 0; }

.build-info h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.15rem;
  margin: 0 0 4px;
}

.build-info p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.build-status {
  flex: none;
  color: var(--brass);
}

.build-entry--placeholder {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 26px 6px;
  color: var(--muted-2);
}
.build-entry--placeholder .build-info p { color: var(--muted-2); margin: 0; font-size: 0.92rem; }

@media (max-width: 560px) {
  .build-link, .build-entry--placeholder { gap: 14px; }
  .build-status { display: none; }
}

/* ---------- generic content sections (used on carsnap pages) ---------- */

section.block {
  padding: 0 var(--edge) 64px;
}

section.block h2.h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.4rem;
  margin: 0 0 20px;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 18px;
}

.steps li {
  display: flex;
  gap: 16px;
  align-items: baseline;
}

.steps .n {
  font-family: var(--mono);
  color: var(--brass);
  font-size: 0.85rem;
  flex: none;
  width: 2ch;
}

.steps p { margin: 0; color: var(--muted); }
.steps strong { color: var(--paper); font-weight: 500; }

.status-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--brass);
  border: 1px solid var(--brass-soft);
  padding: 6px 12px;
  border-radius: 999px;
}

.btn-disabled {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--muted-2);
  border: 1px solid var(--line);
  padding: 12px 18px;
  border-radius: 4px;
  cursor: not-allowed;
}

.link-row {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.link-row a {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  color: var(--steel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- legal / plain content pages ---------- */

.legal {
  padding: 64px var(--edge) 40px;
}

.legal h1.display { font-size: clamp(1.9rem, 5vw, 2.6rem); margin-bottom: 18px; }

.legal .notice {
  border: 1px solid var(--line);
  background: var(--ink-2);
  padding: 16px 18px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 44px;
}

.legal h2 {
  font-family: var(--display);
  font-weight: 500;
  font-size: 1.1rem;
  margin: 36px 0 10px;
}

.legal p, .legal li { color: var(--muted); font-size: 0.95rem; }
.legal strong { color: var(--paper); }
.legal ul { padding-left: 1.2em; }
