/* ============================================================
   OFFON s.r.o. – styly (verze 2)
   Barevná paleta a rozměry jsou v proměnných níže.
   ============================================================ */

:root {
    /* Hlavní paleta */
    --red: #e11d2a;
    --red-hover: #c9141f;
    --red-soft: #fdeced;
    --red-light: #ff6b74;
    --green: #22c55e;

    --ink: #0f1217;
    --ink-2: #2a2f37;
    --gray: #5b6472;
    --gray-2: #8a94a3;
    --line: #e8ebf0;
    --line-2: #d6dbe3;
    --bg: #ffffff;
    --bg-soft: #f6f7f9;
    --surface: #ffffff;
    --nav-glass: rgba(255, 255, 255, .8);

    --dark: #0c0e12;

    --radius-sm: 12px;
    --radius: 20px;
    --radius-lg: 28px;
    --shadow-sm: 0 1px 2px rgba(15, 18, 23, .05), 0 2px 8px rgba(15, 18, 23, .04);
    --shadow: 0 14px 34px -16px rgba(15, 18, 23, .22);
    --shadow-lg: 0 34px 80px -30px rgba(15, 18, 23, .32);

    --maxw: 1200px;
    --ease: cubic-bezier(.22, 1, .36, 1);
    --ease-io: cubic-bezier(.65, 0, .35, 1);
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
    --font-tech: 'Space Grotesk', 'Inter', system-ui, sans-serif;

    color-scheme: light;
}

/* Tmavý režim – jen po přepnutí, web se vždy otevírá světlý */
[data-theme="dark"] {
    --red-soft: #3a1519;
    --ink: #eef1f5;
    --ink-2: #cdd3dc;
    --gray: #9aa4b2;
    --gray-2: #6e7885;
    --line: #242b35;
    --line-2: #333b47;
    --bg: #0d1014;
    --bg-soft: #12161c;
    --surface: #161b22;
    --nav-glass: rgba(13, 16, 20, .78);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45);
    --shadow: 0 14px 34px -16px rgba(0, 0, 0, .75);
    --shadow-lg: 0 34px 80px -30px rgba(0, 0, 0, .85);

    color-scheme: dark;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}
body.menu-open { overflow: hidden; }

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 24px; }

.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;
}

.skip-link {
    position: absolute; left: 12px; top: -60px; z-index: 300;
    background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
    transition: top .2s var(--ease);
}
.skip-link:focus { top: 12px; }

/* Přepnutí den / noc – kruhové „rozsvícení" (View Transitions) */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 { color: var(--ink); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; }
h2 { font-size: clamp(2rem, 4.2vw, 3.25rem); line-height: 1.04; letter-spacing: -.04em; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -.015em; }

.eyebrow {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
    font-family: var(--font-tech); font-size: .82rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
    color: var(--red);
}
.eyebrow::before { content: ''; width: 22px; height: 2px; border-radius: 2px; background: currentColor; }
.accent { color: var(--red); }

/* ---------- Tlačítka ---------- */
.btn {
    position: relative; isolation: isolate; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 24px; border-radius: 999px; border: 1.5px solid transparent;
    font: 600 .95rem/1 var(--font); white-space: nowrap;
    transition: transform .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease), box-shadow .3s var(--ease);
}
.btn svg { width: 18px; height: 18px; flex-shrink: 0; transition: transform .3s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn:active { transform: scale(.97); }
.btn-sm { padding: 10px 18px; font-size: .9rem; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { padding: 16px 30px; font-size: 1rem; }

.btn-primary {
    background: var(--red); color: #fff;
    box-shadow: 0 10px 24px -10px rgba(225, 29, 42, .75), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.btn-primary:hover {
    background: var(--red-hover); transform: translateY(-2px);
    box-shadow: 0 16px 30px -12px rgba(225, 29, 42, .85), inset 0 1px 0 rgba(255, 255, 255, .2);
}
/* světelný odlesk přes tlačítko */
.btn-primary::after {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, .38) 50%, transparent 70%);
    transform: translateX(-120%); transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }

.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); transform: translateY(-2px); }

.btn-outline-light { background: rgba(255, 255, 255, .04); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { background: #fff; color: #111; border-color: #fff; transform: translateY(-2px); }

/* ---------- Drobné prvky ---------- */
.led {
    position: relative; flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%;
    background: var(--green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .18), 0 0 10px rgba(34, 197, 94, .7);
}
.led::after {
    content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--green);
    animation: ledPing 2.4s var(--ease) infinite;
}
@keyframes ledPing {
    0% { transform: scale(1); opacity: .7; }
    80%, 100% { transform: scale(3.2); opacity: 0; }
}

.status-pill {
    display: inline-flex; align-items: center; gap: 10px; padding: 8px 16px 8px 14px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font-size: .86rem; font-weight: 600; color: var(--ink-2);
}

.icon-btn {
    position: relative; display: inline-grid; place-items: center; flex-shrink: 0;
    width: 42px; height: 42px; border-radius: 50%;
    border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2);
    transition: color .25s var(--ease), border-color .25s var(--ease), background-color .25s var(--ease);
}
.icon-btn:hover { color: var(--red); border-color: var(--red); }
.icon-btn svg { width: 19px; height: 19px; transition: transform .6s var(--ease); }

.copy-btn {
    flex-shrink: 0; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px;
    border: 1px solid var(--line); background: var(--surface); color: var(--gray);
    transition: color .2s var(--ease), border-color .2s var(--ease), transform .2s var(--ease);
}
.copy-btn:hover { color: var(--red); border-color: var(--red); }
.copy-btn:active { transform: scale(.92); }
.copy-btn svg { width: 17px; height: 17px; }
.copy-btn .i-check { display: none; }
.copy-btn.is-done { color: #16a34a; border-color: #16a34a; }
.copy-btn.is-done .i-copy { display: none; }
.copy-btn.is-done .i-check { display: block; animation: pop .35s var(--ease); }
@keyframes pop { from { transform: scale(.4); } }

/* Logo je PNG s černým písmem – na tmavém pozadí dostane bílý podklad */
[data-theme="dark"] .nav-logo img,
[data-theme="dark"] .hc-logo,
[data-theme="dark"] .f-logo {
    box-sizing: content-box; background: #fff; padding: 4px 10px; border-radius: 10px;
}

/* ============================================================
   NAVIGACE
   ============================================================ */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; padding: 14px 16px 0; pointer-events: none; }
.nav-shell {
    pointer-events: auto; position: relative;
    display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
    max-width: var(--maxw); margin-inline: auto; padding: 10px 12px 10px 24px;
    border: 1px solid transparent; border-radius: 999px;
    transition: max-width .7s var(--ease), padding .5s var(--ease), background-color .4s var(--ease), border-color .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.is-scrolled .nav-shell {
    max-width: 1040px; padding: 8px 8px 8px 20px;
    background: var(--nav-glass); border-color: var(--line);
    box-shadow: 0 12px 36px -18px rgba(15, 18, 23, .3);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
}

.nav-logo { justify-self: start; display: inline-flex; }
.nav-logo img { height: 42px; width: auto; transition: height .5s var(--ease); }
.nav.is-scrolled .nav-logo img { height: 36px; }

.nav-links { position: relative; display: flex; align-items: center; gap: 2px; }
.nav-pill {
    position: absolute; left: 0; top: 0; width: 0; height: 100%; border-radius: 999px; pointer-events: none;
    background: var(--bg-soft); border: 1px solid var(--line); opacity: 0;
    transition: transform .5s var(--ease), width .5s var(--ease), opacity .3s var(--ease);
}
.nav-link {
    position: relative; z-index: 1; padding: 9px 18px; border-radius: 999px;
    font-size: .95rem; font-weight: 500; color: var(--ink-2); transition: color .25s var(--ease);
}
.nav-link:hover, .nav-link.is-active { color: var(--ink); }
.nav-link.is-active::after {
    content: ''; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px;
    border-radius: 50%; background: var(--red);
}

.nav-actions { justify-self: end; display: flex; align-items: center; gap: 8px; }

.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
.theme-toggle:hover svg { transform: rotate(-25deg); }

.menu-btn { display: none; }
.menu-btn span {
    position: absolute; left: 50%; width: 18px; height: 2px; margin-left: -9px; border-radius: 2px;
    background: currentColor; transition: transform .45s var(--ease), top .45s var(--ease);
}
.menu-btn span:nth-child(1) { top: calc(50% - 4.5px); }
.menu-btn span:nth-child(2) { top: calc(50% + 2.5px); }
.menu-btn[aria-expanded="true"] span { top: calc(50% - 1px); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { transform: rotate(-45deg); }

/* ---------- Mobilní menu: rozbalí se kruhem od tlačítka ---------- */
.mobile-menu {
    --mx: calc(100% - 40px);
    --my: 40px;
    position: fixed; inset: 0; z-index: 90;
    display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
    padding: 112px 24px 32px; background: var(--bg); overflow-y: auto;
    clip-path: circle(0px at var(--mx) var(--my)); visibility: hidden;
    transition: clip-path .7s var(--ease-io), visibility 0s linear .7s;
}
.mobile-menu.is-open {
    clip-path: circle(150vmax at var(--mx) var(--my)); visibility: visible;
    transition: clip-path .7s var(--ease-io), visibility 0s;
}
.mm-links { display: grid; }
.mm-link {
    display: flex; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line);
    font-size: clamp(2.2rem, 11vw, 3.2rem); font-weight: 800; line-height: 1.1; letter-spacing: -.045em; color: var(--ink);
    opacity: 0; transform: translateY(30px);
    transition: opacity .5s var(--ease), transform .6s var(--ease), color .2s var(--ease);
}
.mm-link span { font-family: var(--font-tech); font-size: .85rem; font-weight: 600; letter-spacing: .06em; color: var(--red); }
.mm-link:hover { color: var(--red); }
.mobile-menu.is-open .mm-link { opacity: 1; transform: none; }
.mobile-menu.is-open .mm-link:nth-child(1) { transition-delay: .18s; }
.mobile-menu.is-open .mm-link:nth-child(2) { transition-delay: .24s; }
.mobile-menu.is-open .mm-link:nth-child(3) { transition-delay: .30s; }
.mm-foot { display: grid; gap: 16px; opacity: 0; transform: translateY(20px); transition: opacity .5s var(--ease), transform .6s var(--ease); }
.mobile-menu.is-open .mm-foot { opacity: 1; transform: none; transition-delay: .38s; }
.mm-foot .btn { width: 100%; }
.mm-mail { text-align: center; font-weight: 600; color: var(--gray); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; flex-direction: column; justify-content: center;
    min-height: 720px; min-height: min(100svh, 960px);
    padding: 128px 0 112px;
    border-bottom: 1px solid var(--line);
}
.hero-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hero-aurora {
    position: absolute; inset: -15%;
    background:
        radial-gradient(38% 34% at 76% 30%, rgba(225, 29, 42, .15), transparent 70%),
        radial-gradient(26% 26% at 14% 82%, rgba(225, 29, 42, .07), transparent 70%);
    animation: aurora 16s ease-in-out infinite alternate;
}
@keyframes aurora { to { transform: translate3d(-3%, 4%, 0) scale(1.08); } }

.hero-dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(var(--line-2) 1.2px, transparent 1.6px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 65% 60% at 72% 42%, #000 15%, transparent 72%);
    mask-image: radial-gradient(ellipse 65% 60% at 72% 42%, #000 15%, transparent 72%);
}
/* body pod kurzorem se rozsvítí */
.hero-dots.is-lit {
    background-image: radial-gradient(var(--red) 1.4px, transparent 1.8px);
    -webkit-mask-image: radial-gradient(200px circle at var(--hx, -999px) var(--hy, -999px), #000, transparent 75%);
    mask-image: radial-gradient(200px circle at var(--hx, -999px) var(--hy, -999px), #000, transparent 75%);
    opacity: .7;
}

/* Plošné spoje s impulzy (hero i výzva) */
.circuits { position: absolute; inset: 0; width: 100%; height: 100%; }
.circuits .traces path { fill: none; stroke: var(--line-2); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.circuits .vias circle { fill: var(--bg); stroke: var(--line-2); stroke-width: 1.5; }
.circuits .pulses path {
    fill: none; stroke: var(--red); stroke-linecap: round; stroke-linejoin: round;
    stroke-dasharray: 9 191; stroke-dashoffset: 9;
    animation: pulseRun var(--t, 7s) linear var(--delay, 0s) infinite;
}
.circuits .pulses .halo { stroke-width: 8; opacity: .14; }
.circuits .pulses .core { stroke-width: 2; }
@keyframes pulseRun { to { stroke-dashoffset: -191; } }

.hero-inner { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr); gap: 56px; align-items: center; }
.hero-copy { max-width: 640px; }

.hero-title { font-size: clamp(2.15rem, 4.7vw, 4.3rem); line-height: 1.02; letter-spacing: -.045em; margin: 26px 0 24px; }
.hero-title .line { display: block; overflow: hidden; padding: .1em 0 .14em; margin: -.1em 0 -.14em; }
.hero-title .line-in { display: inline-block; }
.js .hero-title .line-in { animation: lineUp 1.1s var(--ease) var(--d, 0s) backwards; }
@keyframes lineUp { from { transform: translateY(120%); } }

/* Střídající se slovo v nadpisu + „nabíjecí" linka pod ním */
.rotator { display: inline-grid; justify-items: start; color: var(--red); }
.rot-item { grid-area: 1 / 1; position: relative; white-space: nowrap; opacity: 0; }
.rot-item.is-active { opacity: 1; }
.js .rot-item {
    transform: translateY(.55em); filter: blur(8px);
    transition: opacity .55s var(--ease), transform .75s var(--ease), filter .55s var(--ease);
}
.js .rot-item.is-active { transform: none; filter: none; }
.js .rot-item.is-leaving { opacity: 0; transform: translateY(-.55em); filter: blur(8px); }
.rot-item::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -.04em; height: .075em; border-radius: 99px;
    background: currentColor; opacity: .25; transform: scaleX(0); transform-origin: left center;
}
.rot-item.is-charging::after { animation: charge var(--rot-time, 3s) linear forwards; }
.rot-item.is-leaving::after { transform: scaleX(1); }
@keyframes charge { to { transform: scaleX(1); } }

.hero-lead { font-size: clamp(1.05rem, 1.45vw, 1.2rem); color: var(--gray); max-width: 46ch; margin-bottom: 34px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 46px; }

.hero-stats { display: flex; flex-wrap: wrap; row-gap: 16px; }
.hero-stats > div { display: flex; flex-direction: column-reverse; padding: 2px 28px; border-left: 1px solid var(--line-2); }
.hero-stats > div:first-child { padding-left: 0; border-left: 0; }
.hero-stats dd { font-size: 1.75rem; font-weight: 800; line-height: 1.1; letter-spacing: -.035em; color: var(--ink); font-variant-numeric: tabular-nums; }
.hero-stats dt { font-size: .86rem; color: var(--gray); }

.js [data-intro] { animation: introUp 1s var(--ease) var(--d, 0s) backwards; }
@keyframes introUp { from { opacity: 0; transform: translateY(26px); filter: blur(6px); } }

/* Kontaktní karta s obíhajícím světlem a náklonem za myší */
.hero-visual { position: relative; display: flex; justify-content: center; perspective: 1400px; }
.hero-visual::before {
    content: ''; position: absolute; inset: 8% 4%; z-index: -1; border-radius: 50%;
    background: radial-gradient(closest-side, rgba(225, 29, 42, .2), transparent);
    filter: blur(36px); animation: breathe 6s ease-in-out infinite alternate;
}
@keyframes breathe { to { transform: scale(1.08); opacity: .7; } }

@property --beam { syntax: '<angle>'; inherits: false; initial-value: 0deg; }

.hero-card {
    --rx: 0deg;
    --ry: 0deg;
    position: relative; width: 100%; max-width: 430px; padding: 30px 30px 26px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transform: rotateX(var(--rx)) rotateY(var(--ry));
    transition: transform .8s var(--ease);
}
.hero-card.is-tilting { transition: transform .15s linear; }
.hero-card::before {
    content: ''; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
    background: conic-gradient(from var(--beam), transparent 0% 68%, var(--red) 90%, var(--red-light) 95%, transparent 100%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: beam 5s linear infinite;
}
@keyframes beam { to { --beam: 360deg; } }

.hc-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 28px; }
.hc-logo { height: 44px; width: auto; }
.hc-chip {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; white-space: nowrap;
    background: var(--bg-soft); border: 1px solid var(--line); font-size: .78rem; font-weight: 700; color: var(--ink-2);
}
.hc-label {
    display: block; font-family: var(--font-tech); font-size: .78rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--gray-2);
}
.hc-phone {
    display: inline-block; margin-top: 6px; padding-bottom: 2px;
    font-size: clamp(2rem, 3.4vw, 2.5rem); font-weight: 800; line-height: 1.1; letter-spacing: -.03em; color: var(--ink);
    background: linear-gradient(var(--red), var(--red)) 0 100% / 0 3px no-repeat;
    transition: background-size .45s var(--ease), color .25s var(--ease);
}
.hc-phone:hover { color: var(--red); background-size: 100% 3px; }
.hc-phone2 { display: block; margin-top: 4px; font-weight: 600; color: var(--gray); transition: color .2s var(--ease); }
.hc-phone2:hover { color: var(--red); }

.hc-list { display: grid; gap: 11px; margin: 24px 0; padding: 22px 0; border-block: 1px dashed var(--line-2); }
.hc-list li { display: flex; align-items: center; gap: 12px; font-size: .97rem; font-weight: 500; color: var(--ink-2); }
.hc-list li::before {
    content: ''; flex-shrink: 0; width: 18px; height: 18px; border-radius: 50%;
    background: var(--red) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 10px no-repeat;
    box-shadow: 0 4px 10px -4px rgba(225, 29, 42, .7);
}
.js .hc-list li { animation: introUp .8s var(--ease) calc(.95s + var(--i, 0) * .09s) backwards; }

.hc-mail {
    display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 16px;
    background: var(--bg-soft); border: 1px solid var(--line); font-weight: 600; color: var(--ink);
    transition: border-color .25s var(--ease);
}
.hc-mail svg { width: 19px; height: 19px; flex-shrink: 0; color: var(--red); }
.hc-mail .arrow { margin-left: auto; color: var(--gray-2); transition: transform .3s var(--ease), color .3s var(--ease); }
.hc-mail:hover { border-color: var(--red); }
.hc-mail:hover .arrow { transform: translateX(4px); color: var(--red); }

/* Ikona myši – pobídka ke scrollování */
.scroll-cue {
    position: absolute; left: 50%; bottom: 30px; width: 26px; height: 42px; margin-left: -13px;
    border: 2px solid var(--line-2); border-radius: 14px; transition: border-color .3s var(--ease);
}
.scroll-cue:hover { border-color: var(--red); }
.scroll-cue span {
    position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px; border-radius: 2px;
    background: var(--red); animation: cue 1.8s var(--ease) infinite;
}
@keyframes cue {
    0% { opacity: 0; transform: translateY(-4px); }
    30% { opacity: 1; }
    100% { opacity: 0; transform: translateY(14px); }
}

/* ============================================================
   SEKCE obecně
   ============================================================ */
.section { position: relative; padding: clamp(84px, 11vw, 140px) 0; }
.section-head {
    display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: end; gap: 20px 64px;
    margin-bottom: clamp(40px, 5vw, 64px);
}
.section-head h2 { max-width: 15ch; }
.section-head > p { justify-self: end; max-width: 44ch; color: var(--gray); font-size: 1.08rem; }

/* Světlo, které na kartách sleduje kurzor (okraj + jemná záře uvnitř) */
.spot { --mx: -999px; --my: -999px; position: relative; isolation: isolate; }
.spot::before {
    content: ''; position: absolute; inset: -1px; z-index: 2; border-radius: inherit; padding: 1px; pointer-events: none;
    background: radial-gradient(240px circle at var(--mx) var(--my), rgba(225, 29, 42, .85), transparent 65%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0; transition: opacity .4s var(--ease);
}
.spot::after {
    content: ''; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
    background: radial-gradient(380px circle at var(--mx) var(--my), rgba(225, 29, 42, .07), transparent 60%);
    opacity: 0; transition: opacity .4s var(--ease);
}
[data-spotlight]:hover .spot::before,
[data-spotlight]:hover .spot::after { opacity: 1; }

/* ============================================================
   SLUŽBY – bento mřížka
   ============================================================ */
.bento {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
    grid-template-areas:
        "a a b c"
        "a a d e"
        "f g h h";
}
.svc-a { grid-area: a; }
.svc-b { grid-area: b; }
.svc-c { grid-area: c; }
.svc-d { grid-area: d; }
.svc-e { grid-area: e; }
.svc-f { grid-area: f; }
.svc-g { grid-area: g; }
.svc-h { grid-area: h; }

.svc {
    display: flex; flex-direction: column; min-height: 230px; padding: 26px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.svc:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.svc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: auto; padding-bottom: 26px; }
.svc-icon {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 15px;
    background: var(--red-soft); color: var(--red);
    transition: background-color .35s var(--ease), color .35s var(--ease), transform .5s var(--ease);
}
.svc-icon svg { width: 26px; height: 26px; }
.svc:hover .svc-icon { background: var(--red); color: #fff; transform: rotate(-8deg) scale(1.06); }
.svc-num { font-family: var(--font-tech); font-size: .85rem; font-weight: 600; letter-spacing: .06em; color: var(--gray-2); transition: color .3s var(--ease); }
.svc:hover .svc-num { color: var(--red); }
.svc h3 { margin-bottom: 8px; transition: color .3s var(--ease); }
.svc:hover h3 { color: var(--red); }
.svc p { color: var(--gray); font-size: .95rem; line-height: 1.55; }

/* velká karta */
.svc-a {
    padding: 34px;
    background: radial-gradient(120% 90% at 100% 100%, var(--red-soft), transparent 55%), var(--surface);
}
.svc-a .svc-top { margin-bottom: 0; }
.svc-a h3 { font-size: clamp(1.55rem, 2.5vw, 2.1rem); letter-spacing: -.035em; margin-bottom: 12px; }
.svc-a p { max-width: 34ch; font-size: 1.03rem; }
.svc-tags { display: flex; flex-wrap: wrap; align-items: flex-start; align-self: start; gap: 8px; margin-top: 20px; }
.svc-tags li {
    padding: 6px 13px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface);
    font-size: .82rem; font-weight: 600; color: var(--ink-2);
}
.svc-art { width: 100%; max-width: 380px; margin: auto 0 -10px auto; padding-top: 14px; }

/* karta-výzva */
.svc-cta {
    overflow: hidden; border: 0; background: var(--red); color: #fff;
    box-shadow: 0 18px 40px -20px rgba(225, 29, 42, .8);
}
.svc-cta:hover { box-shadow: 0 24px 48px -20px rgba(225, 29, 42, .9); }
.svc-cta .svc-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.svc-cta:hover .svc-icon { background: #fff; color: var(--red); }
.svc-cta .svc-num, .svc-cta:hover .svc-num { color: rgba(255, 255, 255, .8); }
.svc-cta h3, .svc-cta:hover h3 { color: #fff; }
.svc-cta p { color: rgba(255, 255, 255, .85); }
.svc-cta-body { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.svc-go {
    flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px;
    background: #fff; color: var(--red); font-size: .95rem; font-weight: 700; transition: transform .35s var(--ease);
}
.svc-go svg { width: 18px; height: 18px; }
.svc-cta:hover .svc-go { transform: translateX(4px); }
.svc-bolt {
    position: absolute; right: -24px; top: -36px; z-index: -1; width: 220px; height: 220px;
    color: rgba(255, 255, 255, .09); transform: rotate(12deg);
    transition: transform .8s var(--ease), color .5s var(--ease);
}
.svc-cta:hover .svc-bolt { transform: rotate(4deg) scale(1.06); color: rgba(255, 255, 255, .15); }
.svc-cta.spot::before { inset: 0; background: radial-gradient(240px circle at var(--mx) var(--my), rgba(255, 255, 255, .95), transparent 65%); }
.svc-cta.spot::after { background: radial-gradient(380px circle at var(--mx) var(--my), rgba(255, 255, 255, .14), transparent 60%); }

/* ---------- Ilustrace domu: vodiče, světla, zásuvky ---------- */
.house .h-line { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.house .h-ground { fill: none; stroke: var(--line-2); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 2 7; }
.house .h-panel { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.6; }
.house .h-panel-lines { fill: none; stroke: var(--gray-2); stroke-width: 1.4; stroke-linecap: round; }
.house .wire { fill: none; stroke: var(--red); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
.house .junction { fill: var(--red); }
.house .flow { fill: none; stroke: #fff; stroke-width: 1.2; stroke-linecap: round; stroke-dasharray: 3 9; opacity: .85; }
.house .lamp-halo { fill: #fbbf24; opacity: .3; transform-box: fill-box; transform-origin: center; }
.house .lamp-body { fill: #fde68a; stroke: #f59e0b; stroke-width: 1.8; }
.house .lamp-x { fill: none; stroke: #d97706; stroke-width: 1.6; stroke-linecap: round; }
.house .sock-body { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.6; }
.house .sock-led { fill: var(--green); }

/* výchozí „vypnutý" stav, dokud se karta neobjeví */
.js .house .wire { stroke-dashoffset: 1; }
.js .house .junction, .js .house .flow { opacity: 0; }
.js .house .lamp-halo { opacity: 0; }
.js .house .lamp-body { fill: var(--surface); stroke: var(--gray-2); }
.js .house .lamp-x { stroke: var(--gray-2); }
.js .house .sock-led { fill: var(--line-2); }

.js .is-in .house .wire { animation: draw var(--dur, .8s) var(--ease-io) var(--w, 0s) forwards; }
.js .is-in .house .junction { animation: fadeIn .3s ease var(--w, 0s) forwards; }
.js .is-in .house .flow { animation: flowIn .6s ease 2.1s forwards, flowRun 1.4s linear 2.1s infinite; }
.js .is-in .house .lamp-body { animation: lampBody .5s ease var(--w) forwards; }
.js .is-in .house .lamp-x { animation: lampX .5s ease var(--w) forwards; }
.js .is-in .house .lamp-halo { animation: haloIn .6s var(--ease) var(--w) forwards, haloPulse 2.4s ease-in-out calc(var(--w) + .6s) infinite alternate; }
.js .is-in .house .sock-led { animation: ledOn .4s ease var(--w) forwards; }

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes flowIn { to { opacity: .85; } }
@keyframes flowRun { to { stroke-dashoffset: -24; } }
@keyframes lampBody { to { fill: #fde68a; stroke: #f59e0b; } }
@keyframes lampX { to { stroke: #d97706; } }
@keyframes haloIn { from { opacity: 0; transform: scale(.4); } to { opacity: .32; transform: scale(1); } }
@keyframes haloPulse { from { opacity: .32; transform: scale(1); } to { opacity: .14; transform: scale(1.15); } }
@keyframes ledOn { to { fill: var(--green); } }

/* ============================================================
   O NÁS
   ============================================================ */
.about { background: var(--bg-soft); }
.about-grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: 72px; align-items: start; }
.about-intro { position: sticky; top: 120px; }
.about-intro > p { max-width: 44ch; margin-top: 18px; color: var(--gray); font-size: 1.08rem; }

.about-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.about-tags li {
    padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
    font-size: .85rem; font-weight: 600; color: var(--ink-2);
}

/* Časová osa – linka se při scrollu „nabíjí" a body se rozsvěcují */
.timeline { position: relative; padding-left: 56px; }
.tl-track { position: absolute; left: 19px; top: 30px; bottom: 30px; width: 2px; border-radius: 2px; background: var(--line-2); overflow: hidden; }
.tl-fill {
    position: absolute; inset: 0; transform-origin: top; transform: scaleY(var(--p, 0));
    background: linear-gradient(180deg, var(--red-light), var(--red));
}
.tl-list { display: grid; gap: 22px; }
.tl-item { position: relative; }
.tl-node {
    position: absolute; left: -56px; top: 26px; display: grid; place-items: center; width: 40px; height: 40px;
    border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2);
    transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.tl-node::after {
    content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--line-2);
    transition: background-color .5s var(--ease), transform .5s var(--ease);
}
.tl-item.is-on .tl-node { border-color: var(--red); box-shadow: 0 0 0 6px rgba(225, 29, 42, .12), 0 0 24px rgba(225, 29, 42, .35); }
.tl-item.is-on .tl-node::after { background: var(--red); transform: scale(1.15); }
.tl-card {
    padding: 26px 28px; border-radius: var(--radius); background: var(--surface);
    border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    transition: border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.tl-item.is-on .tl-card { border-color: rgba(225, 29, 42, .3); box-shadow: var(--shadow); }
.tl-when { display: inline-block; margin-bottom: 8px; font-family: var(--font-tech); font-size: .9rem; font-weight: 700; letter-spacing: .04em; color: var(--red); }
.tl-card h3 { font-size: 1.3rem; margin-bottom: 6px; }
.tl-card p { color: var(--gray); }

/* ============================================================
   KONTAKT
   ============================================================ */
.mail-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.mail-card {
    display: flex; flex-direction: column; padding: 26px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
    transition: transform .45s var(--ease), box-shadow .45s var(--ease);
}
.mail-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.mc-icon {
    display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 20px; border-radius: 14px;
    background: var(--red-soft); color: var(--red);
    transition: background-color .35s var(--ease), color .35s var(--ease), transform .5s var(--ease);
}
.mc-icon svg { width: 24px; height: 24px; }
.mail-card:hover .mc-icon { background: var(--red); color: #fff; transform: rotate(-8deg); }
.mail-card h3 { margin-bottom: 6px; }
.mail-card p { margin-bottom: 22px; color: var(--gray); font-size: .95rem; }
.mc-row {
    display: flex; align-items: center; gap: 8px; margin-top: auto; padding: 6px 6px 6px 16px;
    border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line);
}
.mc-addr { flex: 1; min-width: 0; font-weight: 700; color: var(--ink); overflow-wrap: anywhere; transition: color .2s var(--ease); }
.mc-addr:hover { color: var(--red); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.contact-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.panel { padding: 26px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.panel-title {
    margin-bottom: 16px; font-family: var(--font-tech); font-size: .8rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--gray-2);
}
.phone-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); }
.phone-row:first-of-type { padding-top: 0; border-top: 0; }
.phone-row:last-child { padding-bottom: 0; }
.pr-label { display: block; font-size: .84rem; color: var(--gray); }
.pr-num { font-size: 1.45rem; font-weight: 800; letter-spacing: -.02em; color: var(--ink); transition: color .2s var(--ease); }
.phone-row.is-main .pr-num { font-size: 1.9rem; }
.pr-num:hover { color: var(--red); }

.company dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 22px; }
.company dt { color: var(--gray); font-size: .9rem; }
.company dd { font-weight: 600; color: var(--ink); }


/* ============================================================
   PATIČKA
   ============================================================ */
.footer { position: relative; overflow: hidden; padding-top: 72px; background: var(--bg-soft); border-top: 1px solid var(--line); }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1.25fr 1.25fr; gap: 40px; }
.f-logo { height: 46px; width: auto; margin-bottom: 18px; }
.f-brand p { max-width: 34ch; margin-bottom: 18px; color: var(--gray); }
.f-col h4 {
    margin-bottom: 16px; font-family: var(--font-tech); font-size: .8rem; font-weight: 600;
    letter-spacing: .14em; text-transform: uppercase; color: var(--gray-2);
}
.f-col ul { display: grid; gap: 10px; }
.f-col li { font-size: .95rem; color: var(--ink-2); overflow-wrap: anywhere; }
.f-col a {
    background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
    transition: background-size .35s var(--ease), color .2s var(--ease);
}
.f-col a:hover { color: var(--red); background-size: 100% 1px; }

.footer-bottom {
    margin-top: 56px;
    display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
    padding-top: 22px; padding-bottom: 28px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--gray);
}

/* ---------- Zpět nahoru + oznámení ---------- */
.to-top {
    position: fixed; right: 20px; bottom: 20px; z-index: 80; display: grid; place-items: center;
    width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); box-shadow: var(--shadow);
    opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
    transition: opacity .35s var(--ease), transform .35s var(--ease), color .2s var(--ease);
}
.to-top.is-visible { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { color: var(--red); }
.tt-ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.tt-ring circle { fill: none; stroke-width: 2.5; }
.tt-bg { stroke: var(--line); }
.tt-bar { stroke: var(--red); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 100; }
.tt-arrow { position: relative; width: 20px; height: 20px; transition: transform .3s var(--ease); }
.to-top:hover .tt-arrow { transform: translateY(-3px); }

.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 120; padding: 12px 20px; border-radius: 999px;
    background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .92rem; font-weight: 600;
    opacity: 0; transform: translate(-50%, 20px); pointer-events: none;
    transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ============================================================
   ANIMACE PŘI SCROLLU
   ============================================================ */
.js [data-reveal] { opacity: 0; }
.js [data-reveal].is-in { opacity: 1; animation: revealUp 1s var(--ease) var(--d, 0s) backwards; }
@keyframes revealUp {
    from { opacity: 0; transform: translateY(32px); filter: blur(8px); }
    to { opacity: 1; transform: none; filter: none; }
}

/* ============================================================
   RESPONZIVITA
   ============================================================ */
@media (max-width: 1080px) {
    .hero-inner { gap: 36px; }
    .hero-card { padding: 26px 24px 22px; }
    .scroll-cue { display: none; }

    .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "a a" "b c" "d e" "f g" "h h"; }
    /* velká karta přes celou šířku: text vlevo, ilustrace vpravo */
    .svc-a { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto auto auto 1fr; column-gap: 28px; }
    .svc-a > * { grid-column: 1; }
    .svc-a .svc-top { padding-bottom: 22px; }
    .svc-a .svc-art { grid-column: 2; grid-row: 1 / 5; align-self: end; margin: 0 0 -10px; padding-top: 0; }
    .about-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
    .about-intro { position: static; }
    .contact-col { grid-template-columns: minmax(0, 1fr); }
    .footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
    .hero { min-height: 0; padding: 120px 0 96px; }
    .hero-inner { grid-template-columns: minmax(0, 1fr); gap: 56px; }
    .hero-title { font-size: clamp(2.15rem, 7.4vw, 4rem); }
    .hero-visual { justify-content: flex-start; }
    .hero-card { max-width: 520px; }
}

@media (max-width: 860px) {
    .nav-shell { grid-template-columns: 1fr auto; }
    .nav-links { display: none; }
    .menu-btn { display: inline-grid; }
    .nav-call { width: 42px; height: 42px; padding: 0; }
    .nav-call span { display: none; }

    .section-head { grid-template-columns: minmax(0, 1fr); }
    .section-head > p { justify-self: start; }
    .mail-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 560px) {
    .container { padding-inline: 18px; }
    .nav { padding: 10px 10px 0; }
    .nav-shell, .nav.is-scrolled .nav-shell { padding: 7px 7px 7px 16px; }
    .nav-logo img, .nav.is-scrolled .nav-logo img { height: 34px; }

    .hero { padding: 108px 0 80px; }
    .hero-title { font-size: clamp(2.15rem, 11vw, 3rem); }
    .hero-actions .btn { flex: 1 1 100%; }
    .hero-stats > div { padding: 2px 16px; }
    .hero-stats dd { font-size: 1.4rem; }
    .hero-card { padding: 24px 20px 20px; }

    .bento { grid-template-columns: minmax(0, 1fr); grid-template-areas: "a" "b" "c" "d" "e" "f" "g" "h"; }
    .svc { min-height: 0; }
    .svc-a { display: flex; padding: 26px; }
    .svc-a .svc-art { margin: auto 0 -10px auto; padding-top: 14px; }
    .svc-cta-body { flex-direction: column; align-items: flex-start; }

    .timeline { padding-left: 48px; }
    .tl-track { left: 16px; }
    .tl-node { left: -48px; width: 34px; height: 34px; top: 24px; }
    .tl-card { padding: 22px; }

    .phone-row.is-main .pr-num { font-size: 1.6rem; }
    .company dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .company dd { margin-bottom: 10px; }
    .footer-top { grid-template-columns: minmax(0, 1fr); }
    .to-top { right: 14px; bottom: 14px; }
}

/* ---------- Omezení pohybu (nastavení systému) ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important; animation-iteration-count: 1 !important;
        transition-duration: .001ms !important; animation-delay: 0s !important;
    }
    .circuits .pulses, .house .flow { display: none; }
    .js [data-reveal] { opacity: 1; }
}
