:root {
  --radius: 0.5rem;
  --background: oklch(0.985 0.003 250);
  --foreground: oklch(0.18 0.04 255);
  --surface: oklch(0.97 0.005 250);
  --card: #ffffff;
  --card-foreground: var(--foreground);
  --primary: oklch(0.22 0.04 258);
  --primary-foreground: oklch(0.98 0.003 250);
  --secondary: oklch(0.94 0.01 250);
  --secondary-foreground: oklch(0.22 0.04 258);
  --muted: oklch(0.95 0.008 250);
  --muted-foreground: oklch(0.5 0.02 255);
  --accent: oklch(0.94 0.02 220);
  --accent-foreground: oklch(0.22 0.04 258);
  --destructive: oklch(0.6 0.22 25);
  --destructive-foreground: #fff;
  --border: oklch(0.9 0.01 250);
  --input: oklch(0.92 0.01 250);
  --ring: oklch(0.7 0.14 215);
  --energy: oklch(0.72 0.16 210);
  --energy-foreground: oklch(0.15 0.04 255);
  --grid: oklch(0.9 0.01 250);
  --shadow-card: 0 1px 0 0 var(--border), 0 24px 48px -24px rgba(0,0,0,.18);
}

html.dark {
  --background: oklch(0.16 0.03 258);
  --foreground: oklch(0.97 0.005 250);
  --surface: oklch(0.2 0.035 258);
  --card: oklch(0.22 0.04 258);
  --primary: oklch(0.97 0.005 250);
  --primary-foreground: oklch(0.18 0.04 255);
  --secondary: oklch(0.26 0.035 258);
  --muted: oklch(0.24 0.03 258);
  --muted-foreground: oklch(0.7 0.02 250);
  --accent: oklch(0.28 0.04 220);
  --border: oklch(0.3 0.03 258);
  --input: oklch(0.3 0.03 258);
  --energy: oklch(0.78 0.17 200);
  --energy-foreground: oklch(0.12 0.04 255);
  --grid: oklch(0.28 0.03 258);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }
ul { padding-left: 1.25rem; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: 4px; }

.container-x { max-width: 80rem; margin-inline: auto; padding-inline: 1.25rem; }
.section { padding-block: 6rem; border-top: 1px solid var(--border); }
.bg-surface { background: var(--surface); }
.bg-grid {
  background-image:
    linear-gradient(to right, var(--grid) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid) 1px, transparent 1px);
  background-size: 48px 48px;
}
.mono { font-family: "JetBrains Mono", ui-monospace, monospace; font-feature-settings: "tnum"; letter-spacing: -0.01em; }
.eyebrow { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.75rem; text-transform: uppercase; letter-spacing: .18em; color: var(--energy); margin-bottom: .75rem; }
.muted { color: var(--muted-foreground); }
.small { font-size: 0.875rem; }
h1, h2, h3 { color: var(--foreground); margin: 0 0 .75rem; }
h1 { font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; }
h2 { font-size: clamp(1.875rem, 2vw + 1rem, 2.25rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
h3 { font-size: 1.125rem; font-weight: 600; }
.accent { color: var(--energy); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .625rem 1.25rem; border-radius: var(--radius); font-weight: 500; border: 1px solid transparent; cursor: pointer; transition: opacity .2s, transform .2s, background .2s; font: inherit; }
.btn--primary { background: var(--primary); color: var(--primary-foreground); }
.btn--primary:hover { opacity: .9; }
.btn--ghost { background: color-mix(in oklch, var(--card) 60%, transparent); border: 1px solid var(--border); backdrop-filter: blur(6px); color: var(--foreground); }
.btn--ghost:hover { background: var(--card); }
.btn--wide { width: 100%; }
@media (min-width: 640px) { .btn--wide { width: auto; } }

.card { background: var(--card); border: 1px solid var(--border); border-radius: .75rem; box-shadow: var(--shadow-card); padding: 1.5rem; }

/* NAV */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 50; transition: background .2s, border-color .2s; }
.nav--scrolled { background: color-mix(in oklch, var(--background) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; padding-block: .75rem; gap: 1rem; }
.nav__logo { max-height: 40px; width: auto; object-fit: contain; }
.nav__links { display: none; gap: 1.25rem; }
.nav__links a { color: var(--muted-foreground); font-size: .9rem; }
.nav__links a:hover { color: var(--foreground); }
.nav__cta { display: none; }
.nav__toggle { background: transparent; border: 0; color: var(--foreground); padding: .5rem; cursor: pointer; }
.nav__toggle .icon--close { display: none; }
.nav__toggle[aria-expanded="true"] .icon--menu { display: none; }
.nav__toggle[aria-expanded="true"] .icon--close { display: block; }
.icon { width: 24px; height: 24px; }
.nav__mobile[hidden] { display: none !important; }
.nav__mobile {
  display: flex; flex-direction: column; gap: .125rem;
  padding: .5rem .875rem .75rem;
  background: color-mix(in oklch, var(--card) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transform-origin: top;
  animation: navSlide .22s ease-out;
}
.nav__mobile a { padding: .5rem .25rem; font-size: .875rem; color: var(--foreground); border-radius: .375rem; }
.nav__mobile a:hover { background: var(--surface); }
.nav__mobile .btn { margin-top: .375rem; padding: .5rem .875rem; font-size: .85rem; }
@keyframes navSlide {
  from { opacity: 0; transform: translateY(-6px) scaleY(.96); }
  to   { opacity: 1; transform: translateY(0)    scaleY(1); }
}
@media (min-width: 768px) {
  .nav__links { display: flex; }
  .nav__cta { display: block; }
  .nav__toggle { display: none; }
  .nav__mobile { display: none !important; }
}

/* HERO */
.hero { position: relative; min-height: 100vh; padding-top: 6rem; padding-bottom: 4rem; overflow: hidden; display: flex; align-items: center; }
.hero__bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; z-index: -3; }
html.dark .hero__bg { opacity: .5; }
.hero__overlay { position: absolute; inset: 0; z-index: -2; background: linear-gradient(180deg, var(--background), color-mix(in oklch, var(--background) 85%, transparent), var(--background)); }
.hero__grid { position: absolute; inset: 0; z-index: -1; opacity: .3; -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); mask-image: radial-gradient(ellipse at center, black 30%, transparent 75%); }
.hero__inner { display: grid; grid-template-columns: 1fr; gap: 3rem; width: 100%; }
@media (min-width: 1024px) { .hero__inner { grid-template-columns: 2fr 1fr; } }

.pill { display: inline-flex; align-items: center; gap: .5rem; padding: .375rem .75rem; border: 1px solid var(--border); border-radius: 999px; background: var(--card); font-size: .7rem; }
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--energy); box-shadow: 0 0 0 0 color-mix(in oklch, var(--energy) 50%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 color-mix(in oklch, var(--energy) 50%, transparent); } 50% { box-shadow: 0 0 0 8px transparent; } }
.hero h1 { margin-top: 1.25rem; }
.hero .lead { font-size: 1.125rem; color: var(--muted-foreground); max-width: 42rem; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.5rem 0 2rem; }
.hero__stats { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: .75rem; max-width: 34rem; }
.hero__stats > div { border-left: 2px solid var(--border); padding-left: .625rem; min-width: 0; }
.stat { font-size: 1.25rem; font-weight: 700; color: var(--foreground); line-height: 1.15; overflow-wrap: anywhere; }
.stat__label { font-size: .75rem; color: var(--muted-foreground); }
@media (min-width: 640px) {
  .hero__stats { gap: 1rem; }
  .hero__stats > div { padding-left: 1rem; }
  .stat { font-size: 1.75rem; }
  .stat__label { font-size: .8rem; }
}


.hero__right { display: flex; flex-direction: column; gap: 1rem; padding: 1.25rem; overflow: hidden; }
.email-img { display: inline-block; height: 1.05em; width: auto; vertical-align: -0.18em; user-select: none; -webkit-user-drag: none; pointer-events: none; }

/* Red ribbon */
.ribbon { position: relative; align-self: stretch; margin: -1.25rem -1.25rem 0; background: linear-gradient(90deg, #c1121f, #e63946); color: #fff; text-align: center; padding: .7rem 1.25rem; font-weight: 700; font-size: .95rem; letter-spacing: .01em; box-shadow: 0 6px 18px -8px rgba(230,57,70,.55); }
.ribbon__text { position: relative; z-index: 2; }
.ribbon__tail { position: absolute; top: 100%; width: 12px; height: 10px; background: #7a0a13; z-index: 1; }
.ribbon__tail--l { left: 0; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.ribbon__tail--r { right: 0; clip-path: polygon(0 0, 100% 0, 0 100%); }

/* Call CTA */
.call-cta { display: flex; flex-direction: column; align-items: center; gap: .15rem; text-decoration: none; padding: .75rem .5rem; border-radius: 12px; background: color-mix(in oklch, var(--energy) 8%, transparent); border: 1px solid color-mix(in oklch, var(--energy) 30%, transparent); transition: transform .2s, box-shadow .2s; margin-top: .5rem; }
.call-cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -14px color-mix(in oklch, var(--energy) 60%, transparent); }
.call-cta__label { font-size: .72rem; letter-spacing: .18em; color: var(--muted-foreground); font-weight: 600; }
.call-cta__num { font-size: 1.75rem; font-weight: 800; color: var(--foreground); letter-spacing: .02em; }

.auth-line { margin: 0; text-align: center; font-size: .875rem; color: var(--muted-foreground); line-height: 1.5; }
.auth-line strong { color: var(--foreground); font-weight: 600; }
.auth-logos { margin-top: .625rem; background: #fff; border-radius: 12px; padding: .75rem 1rem; display: flex; align-items: center; justify-content: space-around; gap: 1rem; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.auth-logo { background: transparent; border: 0; padding: 4px; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; transition: transform .15s ease, opacity .15s ease; }
.auth-logo:hover { transform: translateY(-1px); }
.auth-logo img { height: 34px; width: auto; display: block; object-fit: contain; }

/* Mind graph */
.mindgraph { position: relative; width: 100%; flex: 1 1 auto; min-height: 220px; margin-top: .25rem; container-type: inline-size; }
.mindgraph__lines { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; opacity: .75; }
.mindgraph__lines path { stroke-dasharray: 4 6; animation: mgFlow 8s linear infinite; }
@keyframes mgFlow { to { stroke-dashoffset: -100; } }
.mindgraph__center { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); width: 34%; aspect-ratio: 1/1; border-radius: 50%; background: var(--background); border: 2px solid color-mix(in oklch, var(--energy) 60%, transparent); box-shadow: 0 10px 30px -10px color-mix(in oklch, var(--energy) 40%, transparent); display: flex; align-items: center; justify-content: center; padding: .45rem; z-index: 2; }
.mindgraph__center img { width: 100%; height: 100%; object-fit: contain; }
.mg-node { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%,-50%); background: var(--background); border: 1px solid var(--border); color: var(--foreground); font-size: .72rem; font-weight: 600; padding: .3rem .55rem; border-radius: 999px; white-space: nowrap; box-shadow: 0 2px 6px -2px rgba(0,0,0,.08); z-index: 2; transition: transform .2s, border-color .2s, color .2s; }
.mg-node:hover { transform: translate(-50%,-50%) scale(1.08); border-color: var(--energy); color: var(--energy); }
@media (max-width: 640px) {
  .mg-node { font-size: .65rem; padding: .22rem .45rem; }
  .call-cta__num { font-size: 1.4rem; }
}

/* SERVICES */
.section__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; flex-wrap: wrap; }
.services-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 2rem; }
@media (min-width: 640px) { .services-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
.service { text-align: left; display: flex; flex-direction: column; transition: transform .2s, border-color .2s; }
.service:hover { transform: translateY(-2px); border-color: var(--energy); }
.service__icon { width: 44px; height: 44px; border-radius: .5rem; background: var(--primary); color: var(--primary-foreground); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; transition: background .2s; }
.service:hover .service__icon { background: var(--energy); color: var(--energy-foreground); }
.service h3 { margin-top: 0; margin-bottom: .5rem; line-height: 1.3; }
.service p { margin: 0; }

.scope { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 1024px) { .scope { grid-template-columns: 5fr 7fr; } }
.scope__list { list-style: none; padding: 0; display: grid; grid-template-columns: 1fr; gap: .5rem; }
@media (min-width: 640px) { .scope__list { grid-template-columns: 1fr 1fr; } }
.scope__list li { display: flex; align-items: flex-start; gap: .5rem; padding: .75rem; border: 1px solid var(--border); border-radius: .5rem; background: var(--background); font-size: .9rem; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--energy); margin-top: .5rem; flex-shrink: 0; }

/* B2B */
.b2b__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .b2b__grid { grid-template-columns: 5fr 7fr; align-items: start; } }
.pillars { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 1.5rem; }
.pillar { display: flex; gap: 1rem; align-items: flex-start; }
.pillar__icon { width: 40px; height: 40px; border-radius: .5rem; border: 1px solid var(--border); background: var(--card); color: var(--energy); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pillar h3 { margin-bottom: .25rem; }

.roi__head { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.5rem; }
.roi__badge { width: 44px; height: 44px; border-radius: .5rem; background: color-mix(in oklch, var(--energy) 20%, transparent); color: var(--energy); display: inline-flex; align-items: center; justify-content: center; }
.roi__inputs { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-bottom: 1.5rem; }
@media (min-width: 640px) { .roi__inputs { grid-template-columns: 1fr 1fr; } }
.roi__inputs label { display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; color: var(--muted-foreground); }
.roi__inputs input[type="range"] { accent-color: var(--energy); }
.roi__inputs output { color: var(--foreground); font-weight: 500; }
.roi__result { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; padding: 1.25rem; background: var(--surface); border-radius: .5rem; }
.roi__eur, .roi__kwh { font-size: 1.875rem; font-weight: 700; margin-top: .25rem; }
.roi__eur { color: var(--energy); }

/* CASES */
.filters { display: flex; gap: .5rem; flex-wrap: wrap; }
.filter { background: transparent; border: 1px solid var(--border); border-radius: 999px; padding: .375rem .875rem; font-size: .8rem; cursor: pointer; color: var(--foreground); font: inherit; transition: background .2s; }
.filter.is-active { background: var(--energy); color: var(--energy-foreground); border-color: var(--energy); }
.cases-grid { display: grid; grid-template-columns: 1fr; gap: 1.5rem; }
@media (min-width: 768px) { .cases-grid { grid-template-columns: 1fr 1fr; } }
.case { overflow: hidden; padding: 0; }
.case__media { position: relative; overflow: hidden; aspect-ratio: 16 / 10; }
.case__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s; }
.case:hover .case__media img { transform: scale(1.05); }
.case__chip { position: absolute; top: .75rem; left: .75rem; font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; padding: .25rem .5rem; background: rgba(0,0,0,.6); color: #fff; border-radius: 4px; }
.case__body { padding: 1.25rem; }
.case__loc { display: flex; align-items: center; gap: .35rem; color: var(--muted-foreground); font-size: .8rem; margin-bottom: .5rem; }
.case__specs { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .75rem; }
.case__specs span { font-family: "JetBrains Mono", monospace; font-size: 11px; letter-spacing: .05em; padding: .25rem .5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; color: var(--muted-foreground); }

/* CONTACT */
.contact__grid { display: grid; grid-template-columns: 1fr; gap: 3rem; }
@media (min-width: 1024px) { .contact__grid { grid-template-columns: 5fr 7fr; align-items: start; } }
.contact__list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.contact__list li { display: flex; gap: .75rem; align-items: flex-start; }
.contact__ico { width: 36px; height: 36px; border-radius: .5rem; background: var(--surface); color: var(--energy); display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 1rem; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
.field { display: flex; flex-direction: column; gap: .375rem; margin-bottom: 1rem; }
.field label { font-size: .875rem; font-weight: 500; }
.field input, .field select, .field textarea { border: 1px solid var(--input); border-radius: .375rem; padding: .625rem .875rem; background: var(--background); color: var(--foreground); font: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--energy); box-shadow: 0 0 0 3px color-mix(in oklch, var(--energy) 30%, transparent); }
.err { color: var(--destructive); font-size: .8rem; margin: 0; min-height: 1em; }
.alert { display: flex; align-items: center; gap: .5rem; padding: .75rem 1rem; border-radius: .5rem; margin-bottom: 1rem; font-size: .9rem; }
.alert[hidden] { display: none; }
.alert--success { background: color-mix(in oklch, var(--energy) 15%, transparent); border: 1px solid var(--energy); color: var(--foreground); }

/* Compact contact form */
#kontakt .card { padding: 1rem; }
#kontakt .field { margin-bottom: .5rem; gap: .25rem; }
#kontakt .field input,
#kontakt .field select,
#kontakt .field textarea { padding: .5rem .625rem; }
#kontakt .grid-2 { gap: .5rem; margin-bottom: .5rem; }
#kontakt .alert { margin-bottom: .5rem; padding: .5rem .75rem; }
#kontakt form > .muted.small { margin-top: .5rem; }

/* FAQ */
.faq__grid { display: grid; grid-template-columns: 1fr; gap: 2.5rem; }
@media (min-width: 1024px) { .faq__grid { grid-template-columns: 4fr 8fr; } }
.faq__list details { border-bottom: 1px solid var(--border); padding: 1rem 0; }
.faq__list summary { list-style: none; display: flex; align-items: flex-start; gap: 1rem; cursor: pointer; font-weight: 500; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list .idx { font-family: "JetBrains Mono", monospace; color: var(--energy); font-size: .875rem; padding-top: .1rem; }
.faq__list .q { flex: 1; }
.faq__list .chev { transition: transform .2s; color: var(--muted-foreground); flex-shrink: 0; }
.faq__list details[open] .chev { transform: rotate(180deg); }
.faq__list .answer { color: var(--muted-foreground); font-size: .9rem; line-height: 1.7; padding: .75rem 0 .25rem 2.5rem; }
.faq__list .answer p { margin: .5rem 0; }
.faq__list .answer ul { margin: .5rem 0; }

/* FOOTER */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding-block: 3.5rem; }
.footer__grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
@media (min-width: 768px) { .footer__grid { grid-template-columns: 5fr 2fr 2fr 2fr 1fr; } }
.footer__brand img { max-height: 48px; width: auto; }
.footer__links { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; font-size: .875rem; }
.footer__links a { color: var(--muted-foreground); }
.footer__links a:hover { color: var(--foreground); }
.footer__bottom { display: flex; flex-direction: column; gap: .5rem; padding-top: 1.5rem; margin-top: 2rem; border-top: 1px solid var(--border); }
@media (min-width: 768px) { .footer__bottom { flex-direction: row; justify-content: space-between; } }


@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* ============ Reveal on scroll ============ */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease-out, transform .7s ease-out; will-change: opacity, transform; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: .08s; }
.reveal-delay-2 { transition-delay: .16s; }
.reveal-delay-3 { transition-delay: .24s; }

/* Parallax layer */
.hero__bg { will-change: transform; transform: translate3d(0,0,0); }

/* Service card entrance stagger */
.service { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out, border-color .2s; }
.service.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal, .service { opacity: 1 !important; transform: none !important; transition: none !important; }
  .hero__bg { transform: none !important; }
}

/* ============ Modal / Lightbox ============ */
.modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; padding: 1rem; }
.modal[open] { display: flex; animation: modalFade .2s ease-out; }
.modal__backdrop { position: absolute; inset: 0; background: color-mix(in oklch, #000 65%, transparent); backdrop-filter: blur(6px); }
.modal__panel { position: relative; z-index: 1; background: var(--card); color: var(--foreground); border: 1px solid var(--border); border-radius: .75rem; box-shadow: 0 40px 80px -20px rgba(0,0,0,.4); max-width: 42rem; width: 100%; max-height: 88vh; overflow: auto; animation: modalPop .28s cubic-bezier(.2,.8,.2,1); }
.modal__panel--wide { max-width: 60rem; }
.modal__close { position: absolute; top: .75rem; right: .75rem; background: var(--surface); border: 1px solid var(--border); color: var(--foreground); width: 36px; height: 36px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2; transition: background .2s, transform .2s; }
.modal__close:hover { background: var(--card); transform: rotate(90deg); }
.modal__body { padding: 2rem 1.75rem 1.75rem; }
.modal__icon { width: 48px; height: 48px; border-radius: .5rem; background: var(--energy); color: var(--energy-foreground); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.modal__title { margin: 0 0 .5rem; font-size: 1.5rem; font-weight: 700; letter-spacing: -.01em; }
.modal__lead { color: var(--muted-foreground); margin: 0 0 1.25rem; }
.modal__list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .625rem; }
.modal__list li { display: flex; gap: .625rem; align-items: flex-start; font-size: .925rem; line-height: 1.55; }
.modal__list .dot { margin-top: .5rem; }
.modal__specs { display: grid; grid-template-columns: 1fr; gap: .5rem; padding-top: 1rem; border-top: 1px solid var(--border); }
@media (min-width: 640px) { .modal__specs { grid-template-columns: repeat(3, 1fr); } }
.modal__spec { background: var(--surface); border: 1px solid var(--border); border-radius: .5rem; padding: .625rem .75rem; }
.modal__spec .k { font-family: "JetBrains Mono", monospace; font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted-foreground); }
.modal__spec .v { font-weight: 600; font-size: .9rem; margin-top: .15rem; }

/* Lightbox for case images */
.modal__img { display: block; width: 100%; height: auto; max-height: 70vh; object-fit: cover; border-radius: .75rem .75rem 0 0; background: #000; }
.modal__caption { padding: 1.25rem 1.5rem 1.5rem; }
.modal__caption h3 { margin: 0 0 .25rem; }
.modal__caption .loc { color: var(--muted-foreground); font-size: .85rem; margin-bottom: .75rem; }

/* Make cards visibly clickable */
.service, .case { cursor: pointer; }
.service:focus-visible, .case:focus-visible { outline: 2px solid var(--energy); outline-offset: 3px; }
.case__media::after { content: "⤢"; position: absolute; top: .75rem; right: .75rem; width: 32px; height: 32px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14px; opacity: 0; transition: opacity .2s; }
.case:hover .case__media::after { opacity: 1; }

body.modal-open { overflow: hidden; }

@keyframes modalFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes modalPop { from { opacity: 0; transform: translateY(12px) scale(.97) } to { opacity: 1; transform: none } }

.modal:not([open]) { display: none !important; }

/* Compact contact form on mobile */
@media (max-width: 639px) {
  #kontakt .card { padding: 1rem; }
  #kontakt .field { margin-bottom: .625rem; gap: .25rem; }
  #kontakt .field input,
  #kontakt .field select,
  #kontakt .field textarea { padding: .5rem .625rem; }
  #kontakt .grid-2 { gap: .625rem; margin-bottom: .625rem; }
  #kontakt .alert { margin-bottom: .625rem; padding: .5rem .75rem; }
  #kontakt form > .muted.small { margin-top: .5rem; }
}

/* ============ Scroll progress bar ============ */
.scroll-progress { position: fixed; top: 0; left: 0; height: 3px; width: 0%; background: linear-gradient(90deg, var(--energy), color-mix(in oklch, var(--energy) 60%, #fff)); z-index: 60; transition: width .1s linear; pointer-events: none; }

/* ============ Back to top ============ */
.back-to-top { position: fixed; right: 1rem; bottom: 1rem; z-index: 55; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border); background: var(--card); color: var(--foreground); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0,0,0,.3); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s, background .2s; }
.back-to-top.is-visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover { background: var(--energy); color: var(--energy-foreground); border-color: var(--energy); }

/* ============ Toast ============ */
.toast { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%) translateY(20px); z-index: 200; background: var(--foreground); color: var(--background); padding: .625rem 1rem; border-radius: 999px; font-size: .875rem; box-shadow: 0 20px 40px -10px rgba(0,0,0,.4); opacity: 0; transition: opacity .25s, transform .25s; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ============ Copy button ============ */
.copy-btn { margin-left: .375rem; font-size: .7rem; font-family: "JetBrains Mono", monospace; text-transform: uppercase; letter-spacing: .08em; padding: .15rem .4rem; border-radius: 4px; background: transparent; border: 1px solid var(--border); color: var(--muted-foreground); cursor: pointer; transition: all .2s; }
.copy-btn:hover { color: var(--energy); border-color: var(--energy); }

/* ============ Magnetic buttons + tilt ============ */
.btn { will-change: transform; }
.card.service, .card.case, .card.roi { will-change: transform; transition: transform .25s ease-out, border-color .2s, box-shadow .25s; transform-style: preserve-3d; }
.card.service:hover, .card.case:hover, .card.roi:hover { box-shadow: 0 20px 50px -20px rgba(0,0,0,.35); }

/* ============ Count-up numbers ============ */
.stat[data-count] { font-variant-numeric: tabular-nums; }

/* ============ Typewriter caret ============ */
[data-typewriter] { display: inline-block; white-space: normal; max-width: 100%; overflow-wrap: anywhere; }
[data-typewriter]::after { content: "|"; display: inline-block; margin-left: 2px; color: var(--energy); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0 } }

/* ============ Gentle scroll-snap on hero -> next section ============ */
@media (min-width: 1px) {
  .hero { scroll-snap-align: start; scroll-snap-stop: normal; }
  .hero + section { scroll-snap-align: start; }
}
@media (hover: hover) and (pointer: fine) {
  html { scroll-snap-type: y proximity; }
}


/* ============ Animated hero grid drift ============ */
.hero__grid { animation: gridDrift 30s linear infinite; }
@keyframes gridDrift { from { background-position: 0 0, 0 0 } to { background-position: 48px 48px, 48px 48px } }

/* ============ Lightbox nav ============ */
.modal__nav { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; z-index: 3; transition: background .2s; }
.modal__nav:hover { background: rgba(0,0,0,.8); }
.modal__nav--prev { left: .75rem; }
.modal__nav--next { right: .75rem; }
.modal__img { cursor: zoom-in; transition: transform .3s ease; }
.modal__img.is-zoomed { cursor: zoom-out; transform: scale(1.5); }

@media (prefers-reduced-motion: reduce) {
  .hero__grid, [data-typewriter]::after { animation: none !important; }
}

/* Case project meta (Rok / Hodnota / Zákazník) */
.case__meta{display:grid;grid-template-columns:1fr;gap:.35rem;margin:.75rem 0 0;padding-top:.6rem;border-top:1px solid rgba(255,255,255,.08);font-size:.82rem}
.case__meta > div{display:grid;grid-template-columns:6.5rem 1fr;gap:.5rem;align-items:baseline}
.case__meta dt{margin:0;color:var(--foreground);font-weight:600;text-transform:uppercase;letter-spacing:.04em;font-size:.7rem}
.case__meta dd{margin:0;color:inherit;font-weight:600}
.case__meta--modal{font-size:.9rem}
.case__meta--modal > div{grid-template-columns:7rem 1fr}

/* Case gallery in modal */
.case-gallery__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.6rem;margin-top:1rem}
.case-gallery__thumb{position:relative;padding:0;border:1px solid rgba(255,255,255,.08);background:#111;border-radius:.6rem;overflow:hidden;cursor:zoom-in;aspect-ratio:4/3;transition:transform .15s ease,border-color .15s ease}
.case-gallery__thumb:hover{transform:translateY(-2px);border-color:rgba(255,255,255,.25)}
.case-gallery__thumb img{width:100%;height:100%;object-fit:cover;display:block}
.modal__panel--photo{background:#000}
.modal__nav--back{position:absolute;top:.75rem;left:.75rem;z-index:5}
.modal__caption--min{position:absolute;bottom:.75rem;left:50%;transform:translateX(-50%);background:rgba(0,0,0,.55);color:#fff;padding:.25rem .6rem;border-radius:.4rem;font-size:.8rem}
