/* Barba Technologies — layout: left-aligned editorial grid, one bold moment (the before/after hero), quiet cards everywhere else. */
:root {
  --paper: #F3F5F8;      /* page ground, cool grey biased toward the cobalt */
  --surface: #FFFFFF;
  --ink: #0E1726;
  --muted: #566276;
  --line: #D8DEE8;
  --accent: #2952E3;     /* cobalt */
  --accent-ink: #FFFFFF;
  --accent-soft: #E6ECFD;
  --signal: #E89B0C;     /* amber cursor, used sparingly */
  --ok: #1D8A4E;
  --err: #C23A2B;

  --f-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --f-body: "Atkinson Hyperlegible", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2.1rem);
  --step-3: clamp(2.1rem, 1.5rem + 2.8vw, 3.6rem);
  --radius: 14px;
  --gutter: clamp(16px, 4vw, 40px);
  --maxw: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0A0F19; --surface: #111927; --ink: #E6EBF2; --muted: #93A0B4; --line: #223047;
    --accent: #7194FF; --accent-ink: #081022; --accent-soft: #16244A; --signal: #FFBE45;
    --ok: #4CC983; --err: #FF7A6B; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0A0F19; --surface: #111927; --ink: #E6EBF2; --muted: #93A0B4; --line: #223047;
  --accent: #7194FF; --accent-ink: #081022; --accent-soft: #16244A; --signal: #FFBE45;
  --ok: #4CC983; --err: #FF7A6B; color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 400 var(--step-0)/1.6 var(--f-body);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--f-display); line-height: 1.08; margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: var(--step-3); font-weight: 800; }
h2 { font-size: var(--step-2); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--accent); }
.mono { font-family: var(--f-mono); font-size: 0.8125rem; letter-spacing: 0.02em; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: 12px; top: -60px; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 12px; }

.eyebrow {
  font-family: var(--f-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 14px;
}
.lead { font-size: 1.15rem; color: var(--muted); max-width: 60ch; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 1rem/1 var(--f-body); text-decoration: none; cursor: pointer;
  padding: 15px 22px; border-radius: 999px; border: 1.5px solid transparent;
  transition: transform .15s ease, background-color .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--ink)); }
.btn--ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn--ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn--sm { padding: 10px 16px; font-size: 0.92rem; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.nav.is-scrolled { border-bottom-color: var(--line); }
.nav__inner { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); margin-right: auto; }
.brand__mark { width: 34px; height: 34px; flex: none; }
.mk-bg { fill: var(--accent); } .mk-fg { fill: var(--accent-ink); } .mk-cur { fill: var(--signal); }
.brand__name { font: 800 1.35rem/1 var(--f-display); letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 6px; }
.brand__sub { font: 400 0.7rem/1 var(--f-mono); letter-spacing: 0.08em; color: var(--muted); text-transform: uppercase; }
.nav__links { display: flex; align-items: center; gap: 22px; }
.nav__links a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 0.97rem; }
.nav__links a:not(.btn):hover { color: var(--accent); }
.nav__tools { display: flex; align-items: center; gap: 10px; }
.lang { display: flex; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.lang button {
  font: 600 0.75rem/1 var(--f-mono); letter-spacing: .04em; border: 0; background: transparent; color: var(--muted);
  padding: 7px 9px; border-radius: 999px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.menu { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; background: transparent; cursor: pointer; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.menu span { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform .2s; }
.menu[aria-expanded="true"] span:first-child { transform: translateY(4px) rotate(45deg); }
.menu[aria-expanded="true"] span:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu { display: inline-flex; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--surface); border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 20px; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line); }
  .nav__links .btn { margin-top: 14px; }
  .brand__sub { display: none; }
}

/* Hero */
.hero { padding-block: clamp(40px, 7vw, 96px) clamp(48px, 7vw, 100px); position: relative; overflow: hidden; }
.hero::before { /* faint engineering grid */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: -1;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 44px 44px; opacity: .45;
  -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
          mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%);
}
.hero__grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.hero__copy { min-width: 0; display: grid; gap: 22px; }
.hero__copy h1 { max-width: 15ch; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 4px; }
.hero__note { color: var(--muted); display: flex; align-items: center; gap: 10px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 22%, transparent); }

/* Before / after comparison */
.compare { --pos: 34%; margin: 0; min-width: 0; position: relative; }
.compare__frame {
  border-radius: 16px; overflow: hidden; background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 30px 60px -30px color-mix(in srgb, var(--ink) 45%, transparent);
}
.compare__chrome { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.compare__chrome i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.compare__chrome span { margin-left: 10px; color: var(--muted); background: var(--paper); padding: 4px 12px; border-radius: 999px; font-size: .72rem; }
.compare__stage { position: relative; aspect-ratio: 16 / 12; max-width: 100%; overflow: hidden; }
.pane { position: absolute; inset: 0; }
.pane--new { clip-path: inset(0 0 0 var(--pos)); }
.compare__handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 2px; background: var(--accent); transform: translateX(-1px); pointer-events: none; }
.compare__handle span {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; transform: translate(-50%, -50%);
  border-radius: 50%; background: var(--accent); box-shadow: 0 6px 18px -4px color-mix(in srgb, var(--accent) 70%, transparent);
}
.compare__handle span::before, .compare__handle span::after {
  content: ""; position: absolute; top: 50%; width: 0; height: 0; border: 6px solid transparent; transform: translateY(-50%);
}
.compare__handle span::before { left: 6px; border-right-color: var(--accent-ink); }
.compare__handle span::after { right: 6px; border-left-color: var(--accent-ink); }
.compare__tag { position: absolute; top: 12px; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; padding: 5px 9px; border-radius: 6px; pointer-events: none; }
.compare__tag--l { left: 12px; background: #000000b3; color: #FFFFFF; }
.compare__tag--r { right: 12px; background: var(--accent); color: var(--accent-ink); }
.compare__range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.compare__range:focus-visible + figcaption { color: var(--accent); }
.compare figcaption { text-align: center; color: var(--muted); margin-top: 12px; }

/* the "before" site: a deliberate period look, same in both themes */
.pane--old { background: #C0C0C0; color: #000000; font: 13px/1.35 "Times New Roman", Times, serif; display: flex; flex-direction: column; }
.old__marquee { background: #000080; color: #FFFF00; font: bold 15px/1 "Comic Sans MS", "Comic Neue", cursive; padding: 10px 0; overflow: hidden; white-space: nowrap; }
.old__marquee span { display: inline-block; padding-left: 100%; animation: marquee 11s linear infinite; }
@keyframes marquee { to { transform: translateX(-100%); } }
.old__body { display: grid; grid-template-columns: 30% 1fr; flex: 1; border: 3px ridge #FFFFFF; margin: 8px; background: #FFFFFF; }
.old__side { background: #008080; padding: 10px 8px; display: grid; align-content: start; gap: 8px; border-right: 3px ridge #C0C0C0; }
.old__side a { color: #FFFF00; font-weight: bold; text-decoration: underline; font-size: 12px; }
.old__main { padding: 12px; display: grid; align-content: start; gap: 12px; text-align: center; }
.old__h { font: bold 22px/1 "Times New Roman", serif; color: #FF0000; text-shadow: 2px 2px 0 #FFFF00; }
.old__uc {
  font: bold 12px/1 Arial, sans-serif; color: #000000; padding: 8px;
  background: repeating-linear-gradient(-45deg, #FFD700 0 10px, #000000 10px 20px);
}
.old__uc { color: #FFFFFF; text-shadow: 1px 1px 0 #000000, -1px -1px 0 #000000; }
.old__count b { font-family: "Courier New", monospace; background: #000000; color: #00FF00; padding: 2px 5px; letter-spacing: 2px; }

/* the "after" site uses the page's own tokens */
.pane--new { background: var(--surface); padding: 22px clamp(16px, 4%, 30px); display: grid; align-content: start; gap: 14px; }
.new__bar { display: flex; justify-content: space-between; align-items: center; font-family: var(--f-display); }
.new__pill { font-size: .66rem; color: var(--ok); border: 1px solid currentColor; padding: 3px 7px; border-radius: 999px; }
.new__h { font: 800 clamp(1.3rem, 1rem + 1.4vw, 1.9rem)/1.05 var(--f-display); letter-spacing: -.02em; margin-top: 8px; max-width: 13ch; }
.new__p { color: var(--muted); font-size: .92rem; max-width: 34ch; }
.new__btn { justify-self: start; background: var(--accent); color: var(--accent-ink); font-weight: 700; font-size: .9rem; padding: 10px 16px; border-radius: 999px; }
.new__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.new__stats span { background: var(--paper); border-radius: 10px; padding: 10px; display: grid; gap: 2px; }
.new__stats b { font-size: 1rem; color: var(--ink); }
.new__stats em { font-style: normal; font-size: .64rem; color: var(--muted); }

/* Sections */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section--alt { background: var(--surface); border-block: 1px solid var(--line); }
.sec-head { display: grid; gap: 12px; margin-bottom: clamp(32px, 5vw, 56px); max-width: 720px; }

/* Services */
.pillars { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.pillar {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(24px, 3.5vw, 40px); display: grid; gap: 14px; align-content: start; min-width: 0;
}
.pillar p { color: var(--muted); }
.ico { width: 40px; height: 40px; padding: 8px; border-radius: 10px; background: var(--accent-soft); stroke: var(--accent); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ticks { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 10px; }
.ticks li { display: flex; gap: 12px; align-items: baseline; }
.ticks li::before { content: "✓"; font: 700 .85rem/1 var(--f-mono); color: var(--accent); }
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 20px; border-top: 1px solid var(--line); }
.extra { padding: 26px 24px 4px 0; display: grid; gap: 8px; align-content: start; min-width: 0; }
.extra + .extra { padding-left: 24px; border-left: 1px solid var(--line); }
.extra p:not(.extra__k) { color: var(--muted); }
.extra__k { color: var(--signal); font-size: .74rem; }
.extra__k::before { content: "$ "; color: var(--muted); }

/* Process */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; position: relative; }
.step { display: grid; gap: 10px; align-content: start; padding-top: 22px; border-top: 2px solid var(--line); position: relative; min-width: 0; }
.step::before { content: ""; position: absolute; top: -2px; left: 0; width: 44px; height: 2px; background: var(--accent); }
.step__n { color: var(--accent); font-weight: 600; }
.step p { color: var(--muted); }

/* Credentials */
.featured {
  display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 48px); align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 4vw, 44px); margin-bottom: 40px;
}
.featured__badge { width: clamp(130px, 18vw, 200px); height: auto; background: #FFFFFF; border-radius: 12px; padding: 6px; border: 1px solid var(--line); }
.featured__body { display: grid; gap: 12px; min-width: 0; }
.featured__body > p:not(.mono) { color: var(--muted); max-width: 62ch; }
.featured__meta, .featured__v2 { color: var(--muted); }
.featured__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.certgroups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.certgroup { min-width: 0; }
.certgroup__h { font-size: 1.05rem; display: flex; gap: 10px; align-items: baseline; padding-bottom: 12px; border-bottom: 2px solid var(--ink); }
.certgroup__h .mono { color: var(--accent); }
.certs { list-style: none; margin: 0; padding: 0; }
.cert { display: flex; justify-content: space-between; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cert > div:first-child { min-width: 0; }
.cert__t { font-weight: 700; line-height: 1.3; }
.cert__m { color: var(--muted); margin-top: 4px; font-size: .74rem; }
.cert__a { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.cert__a a { font: 600 .74rem/1.4 var(--f-mono); text-decoration: none; }
.cert__a a:hover { text-decoration: underline; }

/* About */
.about { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.about__copy { display: grid; gap: 16px; min-width: 0; }
.about__copy p:not(.eyebrow) { color: var(--muted); max-width: 60ch; }
.principles { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.principles li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.principles li:first-child { border-top: 1px solid var(--line); }
.principles .mono { color: var(--signal); font-weight: 600; font-size: 1rem; }
.principles p { color: var(--muted); font-size: .97rem; }

/* Contact */
.contact { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact__intro { display: grid; gap: 16px; min-width: 0; }
.direct { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 0; }
.direct li { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.direct__k { color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .1em; }
.direct__v { font: 700 1.15rem/1.3 var(--f-display); color: var(--ink); text-decoration: none; overflow-wrap: anywhere; }
.direct__v:hover { color: var(--accent); }
.form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.5vw, 36px);
  min-width: 0;
}
.field { display: grid; gap: 6px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label { font-weight: 700; font-size: .92rem; }
.field input, .field select, .field textarea {
  width: 100%; font: 400 1rem/1.4 var(--f-body); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field [aria-invalid="true"] { border-color: var(--err); }
.hp { position: absolute; left: -9999px; }
.form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; }
.form__status { font-size: .95rem; min-width: 0; flex: 1 1 220px; }
.form__status.is-ok { color: var(--ok); }
.form__status.is-err { color: var(--err); }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 28px; color: var(--muted); font-size: .92rem; }
.foot__inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; justify-content: space-between; }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--accent); }

/* Responsive */
@media (max-width: 1000px) {
  .certgroups { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 32px; }
}
@media (max-width: 860px) {
  .hero__grid, .about, .contact { grid-template-columns: 1fr; }
  .pillars { grid-template-columns: 1fr; }
  .extras { grid-template-columns: 1fr; }
  .extra, .extra + .extra { padding: 22px 0 18px; border-left: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 620px) {
  .certgroups, .steps { grid-template-columns: 1fr; }
  .featured { grid-template-columns: 1fr; justify-items: start; }
  .form { grid-template-columns: 1fr; }
  .hero__ctas .btn { flex: 1 1 auto; }
  .compare__stage { aspect-ratio: 4 / 4.2; }
  .old__body { grid-template-columns: 34% 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .old__marquee span { padding-left: 12px; }
}
