/* Kelia Lab website. Brand: Gold 200 192 49 (#C8C031), Blue 1 155 186 (#019BBA),
   Burgundy 161 38 62 (#A1263E), Ink 31 42 51 (#1F2A33). */
:root {
  --ink: #1F2A33;
  --ink-2: #2B3945;
  --ink-text: #E6EAEE;
  --ink-muted: #B4BEC8;
  --text: #1F2A33;
  --muted: #55626F;
  --bg: #F6F7F9;
  --white: #FFFFFF;
  --line: #E2E5EA;
  --blue: #019BBA;
  --blue-dark: #00768E;   /* buttons and links: white text passes contrast */
  --burgundy: #A1263E;
  --gold: #C8C031;
  --display: 'Space Grotesk', 'Segoe UI', system-ui, sans-serif;
  --body: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 var(--body); }
img { max-width: 100%; height: auto; }
a { color: var(--blue-dark); }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { font-family: var(--display); margin: 0; text-wrap: balance; }
p, ul, ol { margin: 0; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 16px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(24px, env(safe-area-inset-left)); padding-right: max(24px, env(safe-area-inset-right)); }
.stack { display: flex; flex-direction: column; gap: 40px; }
.band { padding-block: 88px; }
.band-white { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.band-ink { background: var(--ink); color: var(--ink-text); }

/* Buttons */
.btn { display: inline-block; font-weight: 600; font-size: 16px; text-decoration: none; padding: 13px 22px; border-radius: 8px; border: 1px solid transparent; text-align: center; }
.btn-primary { background: var(--blue); color: var(--ink); }   /* exact brand blue; dark text keeps it readable */
.btn-primary:hover { background: var(--ink); color: var(--white); }
.btn-outline { border-color: var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-gold:hover { background: var(--white); color: var(--ink); }
.btn-outline-light { border-color: var(--ink-text); color: var(--ink-text); }
.btn-outline-light:hover { background: var(--ink-text); color: var(--ink); }

/* Header */
.site-header { background: var(--white); border-bottom: 3px solid var(--gold); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 12px; }
.brand { display: inline-block; text-decoration: none; }
/* kelialab-logo-header.svg: the K runs down to the tagline; the tagline spans from "Kelia" to "LAB". */
.brand img { display: block; height: 53px; width: auto; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
/* The four section links fade Gold -> Blue -> Burgundy across the bar (light tints keep the ink text readable). */
.nav a:not(.btn) { --a: .45; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; padding: 8px 14px; border-radius: 999px; transition: background-color .15s, box-shadow .15s; }
.nav a:not(.btn):nth-child(1) { background: linear-gradient(90deg, rgba(200,192,49,var(--a)), rgba(101,174,118,var(--a))); }
.nav a:not(.btn):nth-child(2) { background: linear-gradient(90deg, rgba(101,174,118,var(--a)), rgba(1,155,186,var(--a))); }
.nav a:not(.btn):nth-child(3) { background: linear-gradient(90deg, rgba(1,155,186,var(--a)), rgba(81,97,124,var(--a))); }
.nav a:not(.btn):nth-child(4) { background: linear-gradient(90deg, rgba(81,97,124,var(--a)), rgba(161,38,62,var(--a))); }
.nav a:not(.btn):hover, .nav a:not(.btn):focus-visible { --a: .58; box-shadow: 0 1px 0 rgba(31,42,51,.08); }
.nav .btn { font-size: 15px; padding: 10px 18px; }

/* Hero */
.hero { padding-block: 80px; }
.hero-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px; }
.hero-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.eyebrow { font-family: var(--mono); font-size: 13px; letter-spacing: .06em; text-transform: uppercase; color: var(--burgundy); }
.eyebrow.muted { color: var(--muted); }
.eyebrow.gold { color: var(--gold); }
h1 { font-weight: 700; font-size: clamp(36px, 5.2vw, 56px); line-height: 1.05; letter-spacing: -.02em; }
.lead { font-size: 19px; color: var(--muted); max-width: 540px; }
.actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero h1 .accent { color: var(--burgundy); }
.hero-demo { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.workflow { min-width: 0; background: var(--ink); color: var(--ink-text); border-radius: 14px; padding: 28px; font-family: var(--mono); font-size: 14px; display: flex; flex-direction: column; gap: 18px; border-top: 4px solid var(--blue); }
.workflow-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--ink-2); color: var(--ink-muted); }
.pill { background: rgba(1, 155, 186, .18); color: #7FD6E8; padding: 4px 10px; border-radius: 999px; font-size: 12px; }
.workflow-steps { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 13px; }
.workflow-steps li { display: flex; gap: 12px; align-items: flex-start; }
.workflow-steps .k { flex: 0 0 64px; color: #7FD6E8; }
.workflow-steps .k.trigger { color: var(--gold); }
.workflow-foot { padding-top: 16px; border-top: 1px solid var(--ink-2); color: var(--ink-muted); }

/* Section heads */
h2 { font-weight: 700; font-size: clamp(30px, 3.6vw, 38px); line-height: 1.15; letter-spacing: -.01em; }
.section-head { display: flex; flex-direction: column; gap: 12px; max-width: 660px; }
.section-head p { color: var(--muted); }
.narrow { max-width: 640px; }

/* Services */
.services { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.service { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; background: var(--bg); border-top: 4px solid var(--blue); }
.service:nth-child(3n+2) { border-top-color: var(--gold); }
.service:nth-child(3n) { border-top-color: var(--burgundy); }
.service h3 { font-size: 20px; }
/* Icons: one inline SVG sprite at the top of the page; each tile fades Gold -> Blue -> Burgundy like the menu. */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico-tile { width: 60px; height: 60px; border-radius: 16px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(200,192,49,.32), rgba(1,155,186,.24) 55%, rgba(161,38,62,.22)); }
.ico { width: 40px; height: 40px; display: block; }
.card .ico-tile { margin-bottom: 4px; }
.step-art { display: grid; place-items: center; height: 150px; border-radius: 18px; padding: 12px; background: linear-gradient(135deg, rgba(200,192,49,.26), rgba(1,155,186,.2) 55%, rgba(161,38,62,.18)); }
.step-art svg { width: 100%; max-width: 240px; height: 100%; }
/* Faint connected-dots pattern (echoes the K) behind the top of the page and the automate section. */
.hero, #automate { background-image: url("/assets/pattern-nodes.svg"); background-size: 240px 240px; }
.service p { color: var(--muted); font-size: 16px; }

/* Automation cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.card h3 { font-size: 20px; }
.card p:not(.when) { color: var(--muted); font-size: 16px; }
.automate-cta { background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 20px 24px; font-family: var(--display); font-size: 20px; font-weight: 600; line-height: 1.4; color: var(--text); }
.automate-cta a { color: var(--blue-dark); text-decoration: underline; text-underline-offset: 3px; white-space: nowrap; }
.automate-cta a:hover { color: var(--burgundy); }
.when { font-family: var(--mono); font-size: 13px; color: var(--blue-dark); }

/* Compare */
.compare { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.compare-box { border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.compare-box h3 { font-size: 24px; }
.compare-box ul { padding-left: 20px; display: flex; flex-direction: column; gap: 10px; }
.manual { background: var(--bg); border: 1px solid var(--line); }
.manual ul { color: var(--muted); }
.automated { background: var(--ink); color: var(--ink-text); }
.automated ul { color: var(--ink-muted); }

/* Steps */
.steps { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 32px; }
.steps li { display: flex; flex-direction: column; gap: 10px; }
.step-no { font-family: var(--mono); font-size: 14px; color: var(--burgundy); }
.steps h3 { font-size: 22px; }
.steps p { color: var(--muted); font-size: 16px; }

/* About */
.about-row { display: flex; flex-wrap: wrap; gap: 32px 56px; }
.about-row h2 { flex: 1 1 320px; }
.about-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 16px; color: var(--muted); }
.mono { font-family: var(--mono); font-size: 14px; color: var(--text); }
.pillars-title { color: var(--text); font-weight: 600; margin-bottom: -4px; }
.pillars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.pillars li { padding-left: 14px; border-left: 3px solid var(--gold); }
.pillars strong { display: block; color: var(--text); }

/* Contact */
.contact-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 32px; }
.contact-copy { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.contact-copy p { color: var(--ink-muted); }
.contact-actions { display: flex; flex-direction: column; gap: 10px; min-width: 240px; }
.contact-line { color: var(--ink-text); text-align: center; padding: 6px 0; }
.contact-line:hover { color: var(--gold); }

/* Footer */
.site-footer { padding-block: 26px; font-size: 14px; color: var(--muted); }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-row img { vertical-align: -4px; margin-right: 4px; }

@media (max-width: 640px) {
  .band { padding-block: 64px; }
  .hero { padding-block: 48px; }
  .nav { gap: 0 18px; }
  .contact-actions { width: 100%; }
}

/* ---------- Motion and accents (site.js adds the classes; nothing moves with "reduce motion" on) ---------- */
/* Hero workflow playing */
.workflow-steps li { transition: opacity .35s ease; }
.workflow-steps li.pending { opacity: .22; }
.workflow-steps li.active .k { color: var(--gold); }
.workflow-steps li.active span:last-child { color: #FFFFFF; }
.workflow .pill { transition: background-color .3s ease, color .3s ease; }
.workflow .pill.running { background: rgba(200,192,49,.2); color: var(--gold); }
.workflow-foot { transition: opacity .4s ease; }
.workflow.playing .workflow-foot { opacity: 0; }

/* Cards lift with a soft brand-colored glow; they fade up as they scroll into view */
.service, #automate .card, .compare-box, .steps li, .automate-cta { transition: opacity .6s ease, transform .6s ease, translate .2s ease, box-shadow .2s ease; }
.reveal { opacity: 0; transform: translateY(18px); }
.reveal.in { opacity: 1; transform: none; }
.service:hover, #automate .card:hover { translate: 0 -4px; box-shadow: 0 14px 30px rgba(1,155,186,.16); }
.service:nth-child(3n+2):hover { box-shadow: 0 14px 30px rgba(200,192,49,.26); }
.service:nth-child(3n):hover { box-shadow: 0 14px 30px rgba(161,38,62,.16); }

/* Gold -> Blue -> Burgundy bar under each section heading, matching the menu */
.band h2::after { content: ""; display: block; width: 72px; height: 4px; margin-top: 14px; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--blue), var(--burgundy)); }
h2.narrow::after { margin-top: 14px; }

/* Results (hidden in index.html until there is a real client result and quote) */
.results { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }
.result { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.result .metric { font-family: var(--display); font-size: 40px; font-weight: 700; color: var(--burgundy); line-height: 1.1; }
.result blockquote { margin: 0; font-size: 18px; color: var(--text); }
.result cite { font-style: normal; color: var(--muted); font-size: 14px; }

@media (prefers-reduced-motion: reduce) {
  .service:hover, #automate .card:hover { translate: none; }
}
