/* Konsultant.io — solo redesign, dual-theme (light default + dark)
   Cyan accent, JetBrains Mono display + Inter body. Ivica Panic. */

:root {
  /* LIGHT (default) */
  --bg: #ffffff;
  --surface: hsl(210 40% 97%);
  --surface-2: hsl(210 40% 93%);
  --text: hsl(222 47% 11%);
  --text-soft: hsl(215 16% 42%);
  --line: hsl(214 32% 88%);
  --accent: hsl(193 96% 29%);
  --accent-deep: hsl(193 96% 23%);
  --accent-ink: #ffffff;
  --r: 0.5rem;

  --max: 1120px;
  --measure: 66ch;
  --f-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --f-body: "Inter", system-ui, -apple-system, sans-serif;

  --step--1: clamp(0.82rem, 0.79rem + 0.14vw, 0.9rem);
  --step-0: clamp(0.98rem, 0.95rem + 0.18vw, 1.08rem);
  --step-1: clamp(1.15rem, 1.06rem + 0.45vw, 1.42rem);
  --step-2: clamp(1.45rem, 1.28rem + 0.9vw, 2rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.8vw, 2.9rem);
  --step-4: clamp(2.4rem, 1.85rem + 2.9vw, 4.1rem);
}

html.dark {
  --bg: hsl(222 47% 5%);
  --surface: hsl(222 47% 8%);
  --surface-2: hsl(217 33% 12%);
  --text: hsl(210 40% 98%);
  --text-soft: hsl(215 20% 64%);
  --line: hsl(217 33% 18%);
  --accent: hsl(190 95% 50%);
  --accent-deep: hsl(190 95% 42%);
  --accent-ink: hsl(222 47% 5%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-body);
  font-size: var(--step-0);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color .2s ease, color .2s ease;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }

h1, h2, h3, .display {
  font-family: var(--f-mono);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.045em;
  word-spacing: -0.16em;
  margin: 0;
}
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.02em; }

p { margin: 0 0 1rem; max-width: var(--measure); }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }

.lead { font-size: var(--step-1); line-height: 1.5; color: var(--text); font-family: var(--f-body); }
.muted { color: var(--text-soft); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.2) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; min-height: 66px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--f-mono); font-weight: 800; font-size: 1.05rem; letter-spacing: -0.04em; color: var(--text); }
.brand:hover { text-decoration: none; color: var(--text); }
.brand .mark { width: 1.2em; height: 1.2em; color: var(--accent); flex: none; }
.brand .wm { word-spacing: -0.06em; }
.brand .g { color: var(--accent); }

.head-right { display: flex; align-items: center; gap: 14px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a { font-family: var(--f-mono); font-weight: 500; font-size: 0.9rem; color: var(--text-soft); letter-spacing: -0.02em; word-spacing: -0.08em; }
.nav a:hover { color: var(--accent); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); }
.nav a.btn, .nav a.btn:hover { color: var(--accent-ink); }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-weight: 600; font-size: 0.9rem; letter-spacing: -0.01em;
  padding: 11px 20px; border-radius: var(--r); border: 1px solid var(--accent);
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--accent-ink); text-decoration: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent); }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); border-color: var(--text-soft); box-shadow: none; }
.btn.lg { padding: 14px 26px; font-size: 0.98rem; }

.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; padding: 0; cursor: pointer;
  background: transparent; color: var(--text-soft);
  border: 1px solid var(--line); border-radius: var(--r);
  transition: color .18s ease, border-color .18s ease, background .18s ease;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; display: block; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: block; }
html.dark .theme-toggle .sun { display: block; }
html.dark .theme-toggle .moon { display: none; }

.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--text); }
.nav-toggle svg { display: block; }

/* ---------- hero (text) ---------- */
.hero { padding: clamp(56px, 9vw, 120px) 0 clamp(40px, 6vw, 76px); }
.hero h1 { max-width: 16ch; }
.hero .lead { margin-top: 24px; max-width: 48ch; color: var(--text-soft); }
.hero .lead strong { color: var(--text); font-weight: 600; }
.hero .cta-row { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- hero (photo) — always a dark band, both themes ---------- */
.hero-photo {
  position: relative;
  min-height: min(90vh, 780px);
  display: flex; align-items: center;
  padding: clamp(72px, 12vw, 140px) 0;
  color: hsl(210 40% 98%);
  background-color: hsl(222 47% 6%);
  background-image:
    radial-gradient(1200px 600px at 78% 20%, hsl(190 95% 50% / 0.12), transparent 60%),
    linear-gradient(90deg, hsl(222 47% 4% / 0.94) 0%, hsl(222 47% 5% / 0.80) 40%, hsl(222 47% 6% / 0.40) 100%),
    url('images/hero.jpg');
  background-size: cover, cover, cover;
  background-position: center, center, center right;
  border-bottom: 1px solid var(--line);
}
.hero-photo h1 { max-width: 17ch; color: hsl(210 40% 98%); }
.hero-photo .lead { max-width: 46ch; color: hsl(214 30% 82%); }
.hero-photo .lead strong { color: #fff; }
.eyebrow { font-family: var(--f-mono); font-size: 0.82rem; font-weight: 500; color: var(--accent); margin-bottom: 20px; }
.eyebrow::before { content: "// "; opacity: 0.7; }
.hero-photo .eyebrow { color: hsl(190 95% 62%); }
.hero-photo .btn.ghost { color: #fff; border-color: hsl(0 0% 100% / 0.5); }
.hero-photo .btn.ghost:hover { background: hsl(0 0% 100% / 0.12); border-color: #fff; color: #fff; }

.proofbar { margin-top: clamp(38px, 6vw, 64px); padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px 40px; }
.hero-photo .proofbar { border-top-color: hsl(0 0% 100% / 0.22); }
.proofbar .item { font-family: var(--f-mono); }
.proofbar .num { font-weight: 800; font-size: 1.5rem; letter-spacing: -0.03em; color: var(--text); }
.proofbar .lbl { display: block; font-size: 0.82rem; color: var(--text-soft); font-weight: 500; margin-top: 3px; }
.hero-photo .proofbar .num { color: #fff; }
.hero-photo .proofbar .lbl { color: hsl(214 25% 76%); }

/* ---------- sections ---------- */
.section { padding: clamp(48px, 8vw, 100px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { max-width: 40ch; margin-bottom: clamp(28px, 4vw, 52px); }
.section-head .kicker { font-family: var(--f-mono); font-weight: 600; font-size: 0.85rem; color: var(--accent); margin-bottom: 14px; }
.section-head .kicker::before { content: "// "; opacity: 0.7; }
.section-head p { color: var(--text-soft); margin-top: 14px; }

.outcomes { display: grid; gap: 0; }
.outcome { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px 48px; padding: 30px 0; border-top: 1px solid var(--line); align-items: start; }
.outcome:last-child { border-bottom: 1px solid var(--line); }
.outcome h3 { max-width: 18ch; color: var(--text); }
.outcome p { margin: 0; color: var(--text-soft); }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; counter-reset: step; }
.step { counter-increment: step; padding-top: 18px; border-top: 1px solid var(--line); }
.step .n { font-family: var(--f-mono); font-weight: 800; font-size: 0.95rem; color: var(--accent); display: block; margin-bottom: 14px; }
.step .n::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { margin: 0; color: var(--text-soft); font-size: var(--step--1); line-height: 1.55; }

.quotes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.quote { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.quote blockquote { margin: 0 0 18px; font-size: 1rem; line-height: 1.55; color: var(--text); }
.quote .who { font-family: var(--f-mono); font-weight: 700; font-size: 0.95rem; color: var(--text); }
.quote .role { color: var(--text-soft); font-size: 0.85rem; }

.badges { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.badge { font-family: var(--f-mono); font-weight: 500; font-size: 0.85rem; padding: 10px 15px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: var(--text); }
.badge b { color: var(--accent); font-weight: 700; }

.slot { border: 1px dashed color-mix(in srgb, var(--accent) 55%, var(--line)); background: color-mix(in srgb, var(--accent) 7%, var(--bg)); border-radius: var(--r); padding: 24px 26px; color: var(--text-soft); }
.slot strong { color: var(--text); font-family: var(--f-mono); }

.cta-band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cta-band .wrap { padding-block: clamp(52px, 8vw, 92px); }
.cta-band h2 { color: var(--text); max-width: 20ch; }
.cta-band p { color: var(--text-soft); max-width: 46ch; margin-top: 16px; }
.cta-band .btn { margin-top: 28px; }

.prose { max-width: 66ch; }
.prose p { color: var(--text-soft); }
.prose strong { color: var(--text); }
.prose h2 { font-size: var(--step-2); margin: 44px 0 14px; color: var(--text); }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.1em; }
.prose li { margin-bottom: 6px; color: var(--text-soft); }

.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label { font-family: var(--f-mono); font-weight: 600; font-size: 0.85rem; color: var(--text); }
.field input, .field textarea { font-family: var(--f-body); font-size: 1rem; color: var(--text); padding: 11px 13px; border: 1px solid var(--line); border-radius: var(--r); background: var(--bg); }
.field input::placeholder, .field textarea::placeholder { color: var(--text-soft); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-top: 1px solid var(--line); color: var(--text); }
.contact-list li:first-child { border-top: 0; }
.contact-list .k { font-family: var(--f-mono); font-weight: 600; font-size: 0.82rem; color: var(--text-soft); display: block; margin-bottom: 2px; }

.site-foot { border-top: 1px solid var(--line); padding: 46px 0; background: var(--bg); }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 22px; }
.site-foot .brand { font-size: 1rem; }
.foot-links { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.foot-links a { color: var(--text-soft); font-family: var(--f-mono); font-size: 0.85rem; }
.foot-links a:hover { color: var(--accent); text-decoration: none; }
.copy { color: var(--text-soft); font-size: 0.82rem; width: 100%; margin-top: 8px; }

.reveal { opacity: 0; transform: translateY(12px); }
.reveal.in { opacity: 1; transform: none; transition: opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion: reduce) { .reveal, .reveal.in { opacity: 1; transform: none; transition: none; } * { scroll-behavior: auto !important; } }

@media (max-width: 860px) {
  .outcome { grid-template-columns: 1fr; gap: 8px; }
  .steps { grid-template-columns: 1fr 1fr; gap: 24px; }
  .quotes { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 620px) {
  .nav { position: fixed; inset: 66px 0 auto 0; flex-direction: column; align-items: flex-start; gap: 2px; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 24px 20px; display: none; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 0; width: 100%; font-size: 1rem; }
  .nav .btn { margin-top: 8px; }
  .nav-toggle { display: inline-flex; }
  .steps { grid-template-columns: 1fr; }
  .hero-photo {
    min-height: min(94vh, 720px);
    background-image:
      radial-gradient(700px 420px at 82% 14%, hsl(190 95% 50% / 0.10), transparent 60%),
      linear-gradient(180deg, hsl(222 47% 5% / 0.42) 0%, hsl(222 47% 5% / 0.62) 46%, hsl(222 47% 5% / 0.88) 100%),
      url('images/hero.jpg');
    background-size: cover, cover, cover;
    background-position: center, center, 74% 16%;
  }
}

/* case studies */
.cases { display: grid; gap: 0; }
.case { display: grid; grid-template-columns: minmax(0,0.85fr) minmax(0,2fr); gap: 20px 48px; padding: 40px 0; border-top: 1px solid var(--line); align-items: start; }
.case:last-child { border-bottom: 1px solid var(--line); }
.case-head .sector { font-family: var(--f-mono); font-weight: 600; font-size: 0.82rem; color: var(--accent); margin-bottom: 12px; }
.case-head .sector::before { content: "// "; opacity: 0.7; }
.case-head h3 { font-size: var(--step-2); }
.case-head .ctx { color: var(--text-soft); margin-top: 8px; font-size: 0.95rem; }
.case-body .part { padding: 15px 0; border-top: 1px solid var(--line); }
.case-body .part:first-child { border-top: 0; padding-top: 0; }
.case-body .part .k { font-family: var(--f-mono); font-weight: 700; font-size: 0.78rem; color: var(--text); display: block; margin-bottom: 6px; }
.case-body .part p { margin: 0; color: var(--text-soft); }
@media (max-width: 860px) { .case { grid-template-columns: 1fr; gap: 14px; padding: 32px 0; } }

/* faq */
.faq { display: grid; gap: 0; }
.faq-item { padding: 26px 0; border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item h3 { font-size: 1.12rem; margin-bottom: 10px; }
.faq-item p { margin: 0; color: var(--text-soft); max-width: 72ch; }

/* client marquee */
.marquee-label { font-family: var(--f-mono); font-weight: 600; font-size: 0.85rem; color: var(--accent); margin: 0 0 20px; }
.marquee-label::before { content: "// "; opacity: 0.7; }
.marquee { overflow: hidden; border-block: 1px solid var(--line); padding: 22px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: inline-flex; gap: 56px; white-space: nowrap; will-change: transform; animation: marquee 26s linear infinite; }
.marquee-track span { font-family: var(--f-mono); font-weight: 700; font-size: 1.15rem; color: var(--text); letter-spacing: -0.03em; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* cookie consent banner */
.cookie-banner { position: fixed; right: 16px; bottom: 16px; z-index: 100;
  width: min(360px, calc(100vw - 32px)); display: none; flex-direction: column; gap: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 16px 18px; box-shadow: 0 12px 34px rgba(0,0,0,.24); }
.cookie-banner.show { display: flex; }
.cookie-banner p { margin: 0; font-size: 0.88rem; color: var(--text-soft); }
.cookie-banner a { color: var(--accent); }
.cookie-actions { display: flex; gap: 10px; width: 100%; }
.cookie-banner .btn { padding: 9px 16px; font-size: 0.85rem; }
.cookie-actions .btn { flex: 1; }
@media (max-width: 520px) { .cookie-banner { right: 12px; left: 12px; bottom: 12px; width: auto; } }
