/* Vinvent Ltd — project styles.
   Theme lives in :root; base.css stays untouched so it can be upgraded. */

/* Self-hosted fonts (SIL OFL) — no third-party requests */
@font-face {
  font-family: "Space Grotesk"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../assets/fonts/space-grotesk-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../assets/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
}

:root {
  --font-display: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --accent: #9c430c;            /* copper — passes 6.2:1 on --bg */
  --accent-contrast: #ffffff;
  --bg: #fbfaf7;
  --bg-subtle: #f4f1ea;
  --surface: #ffffff;
  --text: #111513;
  --text-muted: #5d625f;
  --border: #e4e0d6;
  --radius-m: 6px;
  --radius-l: 10px;

  /* Always-dark "board" surfaces (hero, CTA band) */
  --board: #0e1311;
  --board-2: #151d1a;
  --board-line: #1a2320;
  --board-text: #eef0ec;
  --board-muted: #b9c2bc;
  --copper: #e2843a;
  --led: #4ade80;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --accent: #e8924f;
    --accent-contrast: #111513;
    --bg: #0f1312;
    --bg-subtle: #151a18;
    --surface: #171d1b;
    --text: #eceee9;
    --text-muted: #a2aaa5;
    --border: #27302c;
  }
}

/* --- Type moves ----------------------------------------------------------- */
h1, h2, h3 { font-weight: 600; letter-spacing: -0.025em; }
.eyebrow, .code {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
}
.code { font-size: var(--step--1); color: var(--accent); }

/* base.css resets margins on classed lists with higher specificity than
   .stack; restore the stack rhythm for them. */
.stack > * + ul[class], .stack > * + ol[class] { margin-block-start: var(--flow, var(--space-s)); }

/* --- Header --------------------------------------------------------------- */
.site-header { background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(8px); }
.site-header__inner { padding-block: var(--space-2xs); }
.site-logo { font-weight: 600; display: inline-flex; align-items: center; gap: 0.5rem; min-height: var(--tap); font-size: var(--step-1); }
.site-logo svg { width: 28px; height: 28px; flex: none; }
.mark-v { stroke: var(--accent); }
.site-nav ul { align-items: center; }
.site-nav .btn { font-size: var(--step--1); padding: 0.55em 1.1em; color: var(--accent-contrast); }
@media (max-width: 30rem) { .nav-cta { display: none; } }

/* --- Hero (board) --------------------------------------------------------- */
.board {
  background-color: var(--board);
  background-image:
    linear-gradient(var(--board-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--board-line) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
  color: var(--board-text);
  --accent: var(--copper);
  --accent-contrast: #111513;
  --text-muted: var(--board-muted);
  --border: #34403b;
  --text: var(--board-text);
  --bg-subtle: var(--board-2);
}
.board a:hover { color: var(--copper); }
.board .btn:hover { color: #111513; }
.board .btn--secondary:hover { color: var(--board-text); }
.hero__grid { display: grid; gap: var(--space-xl); align-items: center; }
@media (min-width: 60rem) { .hero__grid { grid-template-columns: 1.2fr 1fr; } }
.hero h1 { font-size: clamp(2.2rem, 1.5rem + 2.4vw, 3.25rem); max-width: 20ch; }
.hero h1 em { font-style: normal; color: var(--copper); }
.hero .lead { max-width: 52ch; }
.hero__stack { font-family: var(--font-mono); font-size: var(--step--1); color: var(--board-muted); }
.hero-figure svg { width: 100%; height: auto; }

/* SVG diagram animation — base.css disables it under reduced motion */
.flow { stroke-dasharray: 6 10; animation: flow 1.4s linear infinite; }
@keyframes flow { to { stroke-dashoffset: -32; } }
.led { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: 0.25; } }
.pulse { animation: blink 1.8s ease-in-out infinite; }

/* --- Service index (spec-sheet grid, shared borders) ---------------------- */
.svc-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr));
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
}
.svc-index > a {
  display: grid; align-content: start; gap: var(--space-2xs);
  padding: var(--space-m);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  background: var(--surface);
  transition: background var(--transition);
}
.svc-index > a:hover { background: var(--bg-subtle); color: inherit; }
.svc-index h3 { font-size: var(--step-1); }
.svc-index p { color: var(--text-muted); font-size: var(--step--1); line-height: 1.55; }

/* --- Layer stack ---------------------------------------------------------- */
.split { display: grid; gap: var(--space-xl); align-items: start; }
@media (min-width: 56rem) { .split { grid-template-columns: 1fr 1fr; } }
.layers { display: grid; gap: 6px; padding-left: var(--space-m); border-left: 3px solid var(--accent); }
.layers li {
  display: grid; grid-template-columns: 7.5rem 1fr; gap: var(--space-s); align-items: center;
  padding: var(--space-s) var(--space-m);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-m);
}
.layers b { font-family: var(--font-mono); font-weight: 500; font-size: var(--step--1); color: var(--accent); text-transform: uppercase; letter-spacing: 0.06em; }
.layers span { color: var(--text-muted); font-size: var(--step--1); }
@media (max-width: 26rem) { .layers li { grid-template-columns: 1fr; gap: 0; } }

/* --- Steps ---------------------------------------------------------------- */
.steps { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr)); counter-reset: step; }
.steps li { counter-increment: step; border-top: 2px solid var(--text); padding-top: var(--space-s); }
.steps li::before { content: "0" counter(step); display: block; font-family: var(--font-mono); color: var(--accent); font-size: var(--step--1); margin-bottom: var(--space-2xs); }
.steps h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }
.steps p { color: var(--text-muted); font-size: var(--step--1); }

/* --- Tags ----------------------------------------------------------------- */
.tags { gap: var(--space-2xs); }
.tags li { font-family: var(--font-mono); font-size: var(--step--1); padding: 0.35em 0.8em; border: 1px solid var(--border); border-radius: var(--radius-full); background: var(--surface); }

/* --- FAQ ------------------------------------------------------------------ */
.faq { border-top: 1px solid var(--border); max-width: 48rem; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; list-style: none; min-height: var(--tap);
  display: flex; justify-content: space-between; align-items: center; gap: var(--space-s);
  padding-block: var(--space-s); font-family: var(--font-display); font-weight: 600; font-size: var(--step-1);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-family: var(--font-mono); color: var(--accent); font-size: 1.4em; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding-bottom: var(--space-m); color: var(--text-muted); }

/* --- CTA band ------------------------------------------------------------- */
.cta-band h2 { max-width: 22ch; }

/* --- Services page -------------------------------------------------------- */
.jump { gap: var(--space-2xs); }
.jump a { font-size: var(--step--1); padding-inline: 0.9em; border: 1px solid var(--border); border-radius: var(--radius-full); text-decoration: none; background: var(--surface); }
.svc { scroll-margin-top: 4.5rem; }
.svc .split { gap: var(--space-l); }
.ticks li { position: relative; padding-left: 1.6em; }
.ticks li + li { margin-top: var(--space-2xs); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 0.55em; width: 0.6em; height: 0.6em; border: 2px solid var(--accent); border-radius: 2px; }
.fit { border-left: 3px solid var(--accent); padding-left: var(--space-s); font-weight: 500; }

/* --- About ---------------------------------------------------------------- */
.principles > div { border-top: 1px solid var(--border); padding-top: var(--space-s); }
.principles h3 { font-size: var(--step-1); margin-bottom: var(--space-2xs); }
.principles p { color: var(--text-muted); }

/* --- Contact -------------------------------------------------------------- */
.contact-grid { display: grid; gap: var(--space-xl); }
@media (min-width: 56rem) { .contact-grid { grid-template-columns: 1.4fr 1fr; } }
.form { display: grid; gap: var(--space-m); }
.form .row { display: grid; gap: var(--space-m); grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.field textarea { min-height: 9rem; resize: vertical; }
.hp { display: none; }
.aside-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-l); padding: var(--space-l); }
.aside-card a { overflow-wrap: anywhere; }

/* --- Footer --------------------------------------------------------------- */
.footer-grid { display: grid; gap: var(--space-l); grid-template-columns: repeat(auto-fit, minmax(min(11rem, 100%), 1fr)); }
.site-footer h2 { font-size: var(--step--1); font-family: var(--font-mono); font-weight: 500; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text); margin-bottom: var(--space-3xs); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul a { text-decoration: none; }
.site-footer ul a:hover { color: var(--accent); }
.legal { max-width: none; margin-top: var(--space-l); padding-top: var(--space-m); border-top: 1px solid var(--border); }
