/* viafurba public site — landing, login, portals. Dark, Barlow Condensed + IBM
   Plex Mono, alpine red accent. Self-hosted fonts: no third-party requests. */

@font-face { font-family: 'Barlow Condensed'; font-weight: 400; font-display: swap; src: url(fonts/barlow-condensed-400.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 500; font-display: swap; src: url(fonts/barlow-condensed-500.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 600; font-display: swap; src: url(fonts/barlow-condensed-600.woff2) format('woff2'); }
@font-face { font-family: 'Barlow Condensed'; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-700.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 400; font-display: swap; src: url(fonts/ibm-plex-mono-400.woff2) format('woff2'); }
@font-face { font-family: 'IBM Plex Mono'; font-weight: 500; font-display: swap; src: url(fonts/ibm-plex-mono-500.woff2) format('woff2'); }

:root {
  /* Width of the centred content column. The top bar and footer align their
     contents to this too, so the page reads as one column, not three. */
  --page-max:    1120px;

  --bg:          #07090b;
  --bg-2:        #0c0f13;
  --card:        #13171d;
  --card-hov:    #1a1f27;
  --border:      #252b35;
  --border-hov:  #3a4250;
  --text:        #f4f5f7;
  --text-mute:   #aab0ba;
  --text-dim:    #717885;
  --accent:      #c1121f;           /* brand: chrome only */
  --accent-hov:  #d81e2c;
  --accent-soft: #ff5c66;           /* brand red lifted for text on near-black */
  --ok:          #3ecf8e;
  --warn:        #f2b650;
  --danger:      #ff6b7d;
  --radius: 10px;
  --sans: 'Barlow Condensed', 'Arial Narrow', system-ui, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.site {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text);
  font: 400 18px/1.45 var(--sans); letter-spacing: .01em;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent-soft); outline-offset: 2px; }

/* ---- top bar ------------------------------------------------------------ */
.bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  height: 64px;
  padding: 0 clamp(16px, 3vw, 28px);
  border-bottom: 1px solid var(--border); background: rgb(7 9 11 / .85);
  position: sticky; top: 0; z-index: 5; backdrop-filter: blur(8px);
}
/* The triangle stands in for the first A of VIAFURBA, so the wordmark reads
   VI▲FURBA. gap is 0 — the glyphs must sit together like letters, not like a
   logo beside a word — and .peak carries its own side margins to mimic the
   tracking. The accessible name comes from aria-label on the link. */
.wordmark {
  display: inline-flex; align-items: center; gap: 0; text-decoration: none;
  font-weight: 700; font-size: 20px; letter-spacing: 3px;
}
.peak { background: var(--accent); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
/* Sized in em so it tracks the wordmark font-size; cap-height rather than full
   em so it sits like a capital letter next to V, I, F. */
.wordmark .peak { width: .70em; height: .72em; margin: 0 3px 0 1px; flex: none; }
.bar-actions { display: flex; align-items: center; gap: 10px; }

.lang { display: inline-flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; }
.lang button {
  font: 500 13px var(--mono); letter-spacing: .06em; color: var(--text-dim);
  background: none; border: 0; padding: 7px 10px; cursor: pointer;
}
.lang button[aria-pressed="true"] { color: var(--text); background: var(--card-hov); }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  font: 600 15px var(--sans); letter-spacing: .04em; text-decoration: none; cursor: pointer;
  border-radius: 7px; padding: 9px 16px; border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 17px; height: 17px; flex: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hov); }
.btn-ghost { border-color: var(--border-hov); color: var(--text); background: transparent; }
.btn-ghost:hover { background: var(--card); }
.btn:disabled { opacity: .55; cursor: default; }

/* ---- hero --------------------------------------------------------------- */
.hero { position: relative; overflow: hidden; padding: clamp(72px, 12vw, 150px) 16px 40px; text-align: center; }
.ridge { position: absolute; inset: auto 0 0 0; width: 100%; height: 55%; pointer-events: none; }
.ridge path { fill: none; stroke-linejoin: round; }
.ridge .r1 { stroke: #1a1f27; stroke-width: 1.5; }
.ridge .r2 { stroke: #232a34; stroke-width: 1.5; }
.ridge .r3 { stroke: rgb(193 18 31 / .55); stroke-width: 1.5; }
.hero > *:not(.ridge) { position: relative; }

.eyebrow {
  display: inline-block; font: 500 12px var(--mono); letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-soft); margin-bottom: 18px;
}
h1 { margin: 0; font-weight: 600; line-height: 1.02; letter-spacing: -.005em; }
.hero h1 { font-size: clamp(46px, 8vw, 88px); }
.hero h1 .accent { color: var(--accent-soft); display: block; }
.lead { color: var(--text-mute); max-width: 680px; margin: 22px auto 0; font-size: clamp(18px, 2.2vw, 21px); }

/* ---- product cards ------------------------------------------------------ */
.section { max-width: 1040px; width: 100%; margin: 0 auto; padding: 0 16px; }
.products { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 48px; }
@media (max-width: 760px) { .products { grid-template-columns: 1fr; } }
.product {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px 22px; display: grid; grid-template-columns: 38px 1fr; gap: 4px 14px;
  transition: border-color .15s, background .15s;
}
.product:hover { border-color: var(--border-hov); background: var(--card-hov); }
.product-icon {
  grid-row: span 3; width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center;
  background: rgb(193 18 31 / .14); color: var(--accent-soft);
}
.product-icon svg { width: 20px; height: 20px; }
.product-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.product h2 { margin: 0; font-size: 22px; font-weight: 600; }
.tag { font: 400 11.5px var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--text-dim); }
.product p { margin: 6px 0 0; color: var(--text-mute); font-size: 17px; }
.badge {
  font: 500 11px var(--mono); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap;
  padding: 3px 8px; border-radius: 20px; border: 1px solid var(--border-hov); color: var(--text-mute);
}
.badge-pilot { border-color: rgb(242 182 80 / .45); color: var(--warn); }
.badge-live  { border-color: rgb(62 207 142 / .45); color: var(--ok); }

.cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 36px 0 12px; }

.why { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 64px auto 72px; }
@media (max-width: 760px) { .why { grid-template-columns: 1fr; } }
.why div { border-top: 2px solid var(--accent); padding-top: 12px; color: var(--text-mute); font-size: 17px; }

/* ---- footer ------------------------------------------------------------- */
.foot {
  margin-top: auto; border-top: 1px solid var(--border);
  padding: 18px clamp(16px, 3vw, 28px);
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  color: var(--text-dim); font-size: 14px;
}
.foot a { color: var(--text-mute); }
.foot .mono { font: 400 12px var(--mono); letter-spacing: .08em; }

/* ---- login / portals / error cards ------------------------------------- */
.center-card { flex: 1; display: flex; flex-direction: column; align-items: center; padding: clamp(40px, 8vw, 96px) 16px; }
.card { width: 100%; max-width: 720px; }
.card.narrow { max-width: 440px; }
.card h1 { font-size: clamp(40px, 6vw, 56px); }
.card .lead { margin: 14px 0 0; text-align: left; }
.card .wordmark { margin-bottom: 28px; }
.muted { color: var(--text-mute); }

.form { margin-top: 28px; display: grid; gap: 10px; }
.form label { font: 500 12px var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-dim); }
.input {
  width: 100%; font: 500 20px var(--sans); letter-spacing: .02em; color: var(--text);
  background: var(--card); border: 1px solid var(--border-hov); border-radius: 8px; padding: 12px 14px;
}
.input:focus { outline: none; border-color: var(--accent-soft); }
.input.code { font: 500 28px var(--mono); letter-spacing: .5em; text-align: center; padding-left: calc(14px + .5em); }
.form .btn { padding: 12px 16px; font-size: 17px; margin-top: 6px; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--card); border: 1px solid var(--border); color: var(--text-mute); font-size: 16px; }
.note.error { border-color: rgb(255 107 125 / .45); color: var(--danger); }
.linkish { background: none; border: 0; color: var(--text-mute); font: inherit; font-size: 16px; text-decoration: underline; cursor: pointer; padding: 0; justify-self: start; }
.hint { margin-top: 28px; color: var(--text-dim); font-size: 15px; }

.search { margin: 28px 0 14px; }
.portal-list { display: grid; gap: 10px; margin-top: 24px; }
.search + .portal-list { margin-top: 0; }
.portal {
  display: flex; align-items: center; gap: 14px; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px;
  transition: border-color .15s, background .15s;
}
.portal:hover { border-color: var(--border-hov); background: var(--card-hov); }
.portal .peak { width: 22px; height: 19px; flex: none; }
.portal-name { font-size: 21px; font-weight: 600; }
.portal-host { font: 400 12.5px var(--mono); color: var(--text-dim); letter-spacing: .04em; }
.portal-go { margin-left: auto; color: var(--text-mute); font-weight: 600; white-space: nowrap; }
.who { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-top: 20px; color: var(--text-dim); font-size: 15px; }
[hidden] { display: none !important; }

/* Phones: the header keeps wordmark + language + an icon-only access button. */
@media (max-width: 480px) {
  .wordmark { letter-spacing: 2px; font-size: 18px; }
  .btn-access span { display: none; }
  .btn-access { padding: 9px 11px; }
}

/* ── One-pager layout ─────────────────────────────────────────────────────────
   The landing and login pages are meant to fit the viewport without scrolling.
   That is only enforced where there is room for it: below 600px tall, or on
   narrow phones, the content would have to shrink past legibility, so scrolling
   is allowed back in rather than clipping the contact button off the bottom. */
.onepager { min-height: 100dvh; display: flex; flex-direction: column; }
.onepager-main { flex: 1; display: flex; flex-direction: column; justify-content: center;
                 gap: clamp(22px, 4vh, 52px); padding: clamp(16px, 3vh, 40px) clamp(20px, 4vw, 48px);
                 max-width: var(--page-max); margin: 0 auto; width: 100%; }

@media (min-width: 900px) and (min-height: 620px) {
  .onepager { height: 100dvh; overflow: hidden; }
}

.hero-compact { padding: 0; }
.hero-compact h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.05; margin: 10px 0 0; }
.hero-compact .lead { margin: clamp(14px, 2vh, 22px) auto 0; max-width: 68ch;
                      font-size: clamp(15px, 1.15vw, 18px); line-height: 1.55; }

/* What we offer — three lifecycle stages across, one column on a phone. Three
   rather than four leaves each card room to breathe at one-pager height. */
.offer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
         gap: clamp(14px, 1.6vw, 22px); }
.offer .product { padding: clamp(18px, 2.4vh, 26px); display: flex; flex-direction: column; }
.offer .product h2 { font-size: clamp(18px, 1.4vw, 22px); }
.offer .product p { font-size: clamp(14px, 1.02vw, 16px); margin-top: 8px; line-height: 1.5; }
.offer .product-head { gap: 8px; margin-top: 12px; }
.offer .tag { margin-top: 4px; }

@media (max-width: 860px) { .offer { grid-template-columns: 1fr; gap: 12px; }
                            .offer .product { padding: 16px; } }

/* Single call to action, centred. Was a two-column row with a strapline beside
   it; with the strapline gone, centring reads as deliberate rather than as a
   button that lost its partner. */
.closing { display: flex; align-items: center; justify-content: center; }

.foot-compact { padding-block: 10px; }

/* ── Language dropdown ────────────────────────────────────────────────────────
   Replaces the DE/EN button pair. Styled to match .btn rather than a raw select,
   but it stays a native <select> so it gets the OS picker on mobile. */
.lang-select { display: inline-flex; }
.lang-select select {
  appearance: none; -webkit-appearance: none;
  font: inherit; font-size: 13px; letter-spacing: .04em;
  color: var(--text-mute); background: transparent;
  border: 1px solid var(--border); border-radius: 7px;
  padding: 7px 26px 7px 10px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 11px center, right 6px center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.lang-select select:hover { color: var(--text); border-color: var(--border-hov); }
.lang-select select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* The popup list is OS-rendered; give it readable colours in dark mode. */
.lang-select option { background: var(--card); color: var(--text); }

.btn-back { margin-top: 18px; width: 100%; justify-content: center; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── References ───────────────────────────────────────────────────────────────
   Added after the one-pager constraint was dropped: three reference cards cannot
   fit a no-scroll viewport alongside the hero and services, and the credibility
   they buy is worth more than the lack of a scrollbar. `.onepager` is still used
   by the login page, which has room for it. */
.refs { border-top: 1px solid var(--border); padding-top: clamp(24px, 4vh, 44px); }
.refs-h {
  margin: 0 0 clamp(14px, 2vh, 22px);
  font: 500 13px var(--mono); letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-dim);
}
.ref-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: clamp(14px, 1.6vw, 22px); }
.ref { border-left: 2px solid var(--accent); padding-left: clamp(12px, 1.2vw, 18px); }
.ref h3 { margin: 0; font-size: clamp(16px, 1.25vw, 19px); font-weight: 600; }
.ref p  { margin: 8px 0 0; color: var(--text-mute);
          font-size: clamp(13px, .98vw, 15px); line-height: 1.5; }
.ref .tag { margin-top: 3px; }

@media (max-width: 860px) { .ref-grid { grid-template-columns: 1fr; gap: 18px; } }

/* The landing page scrolls again, so give the column normal vertical rhythm
   instead of the viewport-centred one-pager spacing. */
body.site:not(.onepager) .onepager-main { justify-content: flex-start;
                                          padding-block: clamp(28px, 5vh, 64px); }
