/* ==========================================================================
   Vincera – site styles
   Colours are defined once as variables below. Change a colour here and it
   changes everywhere on the site.
   ========================================================================== */

@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 Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/ibm-plex-sans-latin-600-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 {
  --c-navy: #14213D;          /* dark surfaces, headings */
  --c-teal: #14B8A6;          /* primary buttons, flow line */
  --c-teal-dark: #0F766E;     /* links, labels, icons on light backgrounds */
  --c-teal-light: #5EEAD4;    /* text on navy */
  --c-teal-tint: #DDF4F1;     /* highlighted surfaces */
  --c-text: #1B2333;          /* body text */
  --c-text-2: #3B4659;        /* secondary text */
  --c-text-3: #5A6578;        /* helper text */
  --c-text-on-navy: #C5CEDD;  /* body text on navy */
  --c-white: #FFFFFF;
  --c-surface: #EEF3FA;       /* light sections */
  --c-border: #E3E8F0;
  --c-border-strong: #C9D4E5;
  --c-grid-light: #DFE6F0;    /* grid on light surface */
  --c-grid-white: #F0F3F7;    /* grid on white */
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-text);
  font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}
.page { overflow-x: clip; }

a { color: var(--c-teal-dark); }
a:hover { color: var(--c-navy); }
:focus-visible { outline: 2px solid var(--c-teal); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -48px; z-index: 50;
  background: var(--c-teal); color: var(--c-navy); padding: 8px 16px; border-radius: 6px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 16px; }

/* ---------- Header and navigation ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--c-navy); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 16px; font-weight: 500; }
.nav-toggle {
  display: none; width: 44px; height: 44px; align-items: center; justify-content: center;
  background: none; border: 1px solid rgba(255,255,255,0.4); border-radius: 6px; cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .site-nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 18px;
    padding: 12px 24px 28px; background: var(--c-navy); border-top: 1px solid rgba(255,255,255,0.12);
  }
  .site-nav.is-open { display: flex; }
}

/* ---------- Background layers: grid texture and process flow ---------- */
.grid, .flow { position: absolute; pointer-events: none; }
/* The grid is centred so that its lines stay aligned with the flow at every width. */
.grid { top: 0; left: 50%; width: 3840px; height: 100%; margin-left: -1920px; }
.grid-usp { top: 112px; height: calc(100% - 112px); }
/* Desktop flow: drawn for a 1280 px wide layer, centred on the content. */
.flow-d { display: none; top: 0; left: 50%; width: 1280px; height: 100%; margin-left: -640px; }
/* Mobile flow: drawn for 390 px, stretched to the screen width by site.js. */
.flow-m { display: none; top: 0; left: 0; width: 390px; height: 100%; transform-origin: 0 0; transform: scaleX(var(--flow-sx, 1)); }
@media (min-width: 1200px) { .flow-d { display: block; } }
@media (max-width: 599px) { .flow-m { display: block; } }

/* ---------- Simple text pages (privacy policy, 404) ---------- */
.text-page { max-width: 760px; margin: 0 auto; padding: 72px 24px 96px; }
.text-page h1 { margin: 0 0 24px; font-size: clamp(30px, 6vw, 42px); line-height: 1.2; font-weight: 600; color: var(--c-navy); }
.text-page h2 { margin: 40px 0 12px; font-size: 22px; font-weight: 600; color: var(--c-navy); }
.text-page p, .text-page li { color: var(--c-text-2); }
.text-page ul { padding-left: 22px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Robot status box (start page) ---------- */
.bot-status { flex: 0 0 auto; font-size: 13px; border-radius: 99px; padding: 2px 10px; white-space: nowrap; }
.bot-status--running { font-weight: 600; color: var(--c-teal-dark); background: var(--c-teal-tint); padding: 3px 10px; }
.bot-status--done { font-weight: 500; color: var(--c-text-2); background: var(--c-white); border: 1px solid var(--c-border); }
.bot-status--waiting { font-weight: 500; color: var(--c-text-3); border: 1px dashed var(--c-border-strong); }

.live-badge[hidden] { display: none; }
.live-badge { display: inline-flex; align-items: center; gap: 7px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; font-weight: 500; color: var(--c-teal-dark); }
.live-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--c-teal); }
.live-dot::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--c-teal); animation: live-pulse 2s ease-out infinite; }
@keyframes live-pulse { from { transform: scale(1); opacity: 0.6; } to { transform: scale(2.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .live-dot::after { animation: none; } }
