/* =========================================================
   CODECYBER — v5 (balíček karet a titulky lícované na šířku)
   Balíček čtyř karet, které se při posouvání skládají na sebe,
   a titulky lícované na šířku osou šířky variabilního písma.
   ========================================================= */

@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap;
  src: url("fonts/archivo-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Nastavení lícování čte skript; registrace zajistí, že clamp() dostane jako pixely. */
@property --fit-max { syntax: "<length>"; inherits: false; initial-value: 240px; }
@property --fit-lh { syntax: "<number>"; inherits: false; initial-value: 0.98; }

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;
  --cobalt: #2d43dc;
  --ink: #0c1233;
  --sun: #ffd84d;
  --paper: #f3f5fa;
  --night: #060920;               /* stůl pod kartami */

  --m: 8px;                       /* rám kolem karet */
  --r: 30px;                      /* zaoblení karet */
  --pad: clamp(18px, 3.4vw, 60px);
  --stage-min: 200px;

  --hero-bg: var(--sun); --hero-title: var(--ink); --hero-fg: var(--ink); --hero-fg2: #3d3a36; --hero-mark: var(--cobalt);
  --hero-rule: var(--ink); --hero-btn: var(--ink); --hero-btn-fg: var(--sun); --hero-btn-h: var(--cobalt); --hero-btn-fg-h: #fff;
  --hero-focus: var(--cobalt); --hero-hover: rgba(12, 18, 51, .1);
  --svc-bg: var(--ink);
  --proc-bg: var(--paper); --proc-fg: var(--ink); --proc-fg2: #4b5273; --proc-accent: var(--cobalt); --proc-rule: rgba(12, 18, 51, .2);
  --card-edge: transparent;

  --font: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --hero-bg: var(--ink); --hero-title: var(--sun); --hero-fg: #eceefa; --hero-fg2: #b9bfdc; --hero-mark: var(--sun);
  --hero-rule: rgba(255, 216, 77, .6); --hero-btn: var(--sun); --hero-btn-fg: var(--ink); --hero-btn-h: #fff; --hero-btn-fg-h: var(--ink);
  --hero-focus: var(--sun); --hero-hover: rgba(255, 255, 255, .12);
  --svc-bg: #1a2260;
  --proc-bg: #0d1232; --proc-fg: #eceefa; --proc-fg2: #a3aacb; --proc-accent: #8f9cff; --proc-rule: rgba(236, 238, 250, .22);
  --card-edge: rgba(255, 255, 255, .07);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; min-width: 300px; overflow-x: clip;
  background: var(--night); color: #fff;
  font-family: var(--font); font-size: 17px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
svg, img { display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--focus, #fff); outline-offset: 3px; border-radius: 4px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.skip { position: fixed; top: -80px; left: 16px; z-index: 300; padding: 12px 18px; border-radius: 999px; background: #fff; color: var(--ink); font-weight: 600; transition: top .2s; }
.skip:focus { top: 16px; }

/* ---------- Balíček karet ---------- */
.deck { display: flex; flex-direction: column; padding: var(--m); }
.card {
  position: relative; flex: none; overflow: clip;
  min-height: calc(100vh - 2 * var(--m)); min-height: calc(100svh - 2 * var(--m));
  border-radius: var(--r); background: var(--bg); color: var(--fg);
  box-shadow: inset 0 0 0 1px var(--card-edge);
}
.card ~ .card { margin-top: var(--m); }
.card ::selection { background: var(--fg); color: var(--bg); }
.anchor { display: block; height: 0; }
.dwell { flex: none; height: 0; }
/* Skládání zapíná skript: karta drží u horního okraje, vyšší karta až po dočtení u spodního. */
.js-deck .card {
  position: sticky; top: min(var(--m), calc(100vh - var(--h, 100vh) - var(--m))); top: min(var(--m), calc(100svh - var(--h, 100svh) - var(--m)));
  transform-origin: 50% calc(100% - 50vh + var(--m)); transform-origin: 50% calc(100% - 50svh + var(--m));
  will-change: transform;
}
.card-shade { position: absolute; inset: 0; z-index: 5; background: var(--night); opacity: 0; pointer-events: none; }
.card-in { width: 100%; max-width: 1560px; margin-inline: auto; }

/* ---------- Lícované titulky ---------- */
.fit { display: block; }
.fit-out { display: block; -webkit-user-select: none; user-select: none; }
.fit-line { display: block; width: max-content; white-space: nowrap; transform-origin: 0 50%; }
.fit.is-fit .fit-src { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.fit-measure { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: pre; font-size: 200px; line-height: 1; }
.fit-measure > span { display: inline-block; }
.fit-warm { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; white-space: nowrap; }
.is-measuring > .fit { display: none; }
/* Než skript titulek nalícuje, zůstane skrytý; kdyby selhal, po chvíli se ukáže běžně vysazený. */
.js .fit[data-fit]:not(.is-ready) { visibility: hidden; animation: fit-fallback 0s linear 2.5s forwards; }
@keyframes fit-fallback { to { visibility: visible; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; flex: none;
  min-height: 56px; padding: 0 28px; border-radius: 999px; background: var(--btn); color: var(--btn-fg);
  font-size: 17px; font-weight: 650; white-space: nowrap; transition: background-color .2s, color .2s;
}
.btn:hover { background: var(--btn-h); color: var(--btn-fg-h); }
.btn .ic { width: 19px; height: 19px; }
.icon-copy { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; transition: background-color .2s; }
.icon-copy:hover { background: var(--hover); }
.copy-icons { position: relative; width: 18px; height: 18px; flex: none; }
.copy-icons .ic { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity .2s, transform .3s var(--ease); }
.copy-icons .ic-done { opacity: 0; transform: scale(.5); }
.is-done .ic-copy { opacity: 0; transform: scale(.5); }
.is-done .ic-done { opacity: 1; transform: none; }

/* ---------- Karta 1: firma ---------- */
.card-hero {
  --bg: var(--hero-bg); --fg: var(--hero-fg); --fg2: var(--hero-fg2); --title: var(--hero-title); --mark: var(--hero-mark); --rule: var(--hero-rule);
  --btn: var(--hero-btn); --btn-fg: var(--hero-btn-fg); --btn-h: var(--hero-btn-h); --btn-fg-h: var(--hero-btn-fg-h);
  --focus: var(--hero-focus); --hover: var(--hero-hover);
  display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(var(--stage-min), 1fr) auto auto;
  padding: 0 var(--pad) clamp(16px, 2.8vh, 30px);
}
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: clamp(60px, 10vh, 88px); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-size: 19px; font-weight: 800; font-stretch: 125%; line-height: 1; }
.brand-mark { width: 28px; height: 28px; color: var(--mark); }
.nav { display: flex; gap: clamp(18px, 2.4vw, 34px); margin-left: auto; margin-right: 10px; }
.nav a { padding: 8px 0; font-size: 15.5px; font-weight: 550; text-decoration: underline transparent 2px; text-underline-offset: 6px; transition: text-decoration-color .2s; }
.nav a:hover { text-decoration-color: currentColor; }
.tools { display: flex; align-items: center; gap: 2px; }
.lang-switch { display: inline-flex; }
.lang-switch button { min-width: 38px; height: 40px; font-size: 14.5px; font-weight: 500; opacity: .6; transition: opacity .2s; }
.lang-switch button:hover { opacity: 1; }
.lang-switch button[aria-pressed="true"] { opacity: 1; font-weight: 800; text-decoration: underline 2px; text-underline-offset: 6px; }
.theme-toggle { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; transition: background-color .2s; }
.theme-toggle:hover { background: var(--hover); }
.theme-toggle .ic-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }

.stage { display: flex; align-items: flex-end; min-width: 0; min-height: 0; }
.hero-title { width: 100%; min-width: 0; color: var(--title); font-size: clamp(40px, 8.4vw, 132px); font-weight: 740; line-height: .98; text-wrap: balance; }
.hero-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px 48px; margin-top: clamp(12px, 2.4vh, 28px); }
.hero-lead { max-width: 33em; font-size: clamp(16.5px, 1.3vw, 20px); line-height: 1.5; color: var(--fg2); text-wrap: pretty; }
.strip {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2px 28px;
  margin-top: clamp(12px, 2.4vh, 26px); padding-top: 10px; border-top: 2px solid var(--rule);
  font-size: 15.5px; font-weight: 500; font-variant-numeric: tabular-nums;
}
.strip b { font-weight: 800; font-stretch: 112%; }
.strip-mail { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; }
.strip-mail a { text-decoration: underline 2px; text-underline-offset: 4px; }
.strip-mail a:hover { color: var(--mark); }

/* ---------- Společné pro karty s textem ---------- */
.card-services, .card-process, .card-contact { display: flex; flex-direction: column; justify-content: center; padding: clamp(52px, 10vh, 116px) var(--pad); }
.section-title { max-width: 19em; font-size: clamp(28px, 3.3vw, 52px); font-weight: 700; font-stretch: 108%; line-height: 1.06; letter-spacing: -.018em; text-wrap: balance; }
.section-lead { margin-top: 16px; max-width: 34em; font-size: clamp(16.5px, 1.3vw, 19px); color: var(--fg2); text-wrap: pretty; }

/* ---------- Karta 2: služby — aplikace nahoře, servery pod nimi ---------- */
.card-services { --bg: var(--svc-bg); --fg: #fff; --fg2: #b9bfdc; --accent: var(--sun); --rule: rgba(255, 255, 255, .22); --focus: var(--sun); }
.bands { margin-top: clamp(30px, 5vh, 58px); border-bottom: 2px solid var(--rule); }
.band {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 4.5fr) minmax(0, 4.5fr); align-items: start;
  gap: 20px clamp(24px, 3.2vw, 56px); padding-block: clamp(22px, 3.4vh, 38px); border-top: 2px solid var(--rule);
}
.band-title { --fit-max: clamp(56px, 7.4vw, 104px); margin-top: -.06em; color: var(--accent); font-size: clamp(40px, 5vw, 72px); font-weight: 800; line-height: 1; }
.svc h4 { font-size: clamp(19px, 1.5vw, 23px); font-weight: 650; line-height: 1.22; }
.svc p { margin-top: 8px; font-size: 16.5px; color: var(--fg2); }
.svc .scope { font-size: 15px; font-weight: 600; color: var(--fg); }

/* ---------- Karta 3: postup — linka, která se plní posouváním ---------- */
.card-process { --bg: var(--proc-bg); --fg: var(--proc-fg); --fg2: var(--proc-fg2); --accent: var(--proc-accent); --rule: var(--proc-rule); --focus: var(--proc-accent); }
.steps-wrap { position: relative; margin-top: clamp(40px, 8vh, 88px); }
.steps-wrap::before, .steps-wrap::after, .steps-fill { position: absolute; top: 9px; left: 0; height: 2px; }
.steps-wrap::before { content: ""; width: 75%; background: var(--accent); }
.steps-wrap::after { content: ""; left: 75%; right: calc(-1 * var(--pad)); background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px); }
.steps-fill { width: 75%; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; }
.steps { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.steps li { position: relative; padding: 44px 28px 0 0; }
.steps li::before { content: ""; position: absolute; z-index: 1; top: 0; left: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 6px var(--bg); transition: background-color .35s, box-shadow .35s; }
.step-no { display: block; font-size: clamp(44px, 5vw, 80px); font-weight: 800; font-stretch: 125%; line-height: 1; color: var(--accent); font-variant-numeric: lining-nums; transition: color .35s; }
.steps h3 { margin-top: 14px; font-size: clamp(18px, 1.5vw, 22px); font-weight: 650; line-height: 1.25; transition: opacity .35s; }
.steps p { margin-top: 8px; font-size: 16px; color: var(--fg2); transition: opacity .35s; }
/* S běžícím skriptem je výchozí stav „ještě nedošlo“ a kroky se rozsvěcují podle posunu. */
.steps-wrap.js-steps::before { background: var(--rule); }
.steps-wrap.js-steps::after { background: repeating-linear-gradient(90deg, var(--rule) 0 8px, transparent 8px 16px); }
.steps-wrap.js-steps.is-done::after { background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 16px); }
.js-steps li:not(.is-on)::before { background: var(--bg); box-shadow: inset 0 0 0 2px var(--fg2), 0 0 0 6px var(--bg); }
.js-steps li:not(.is-on) .step-no { color: color-mix(in srgb, var(--fg) 20%, transparent); }
.js-steps li:not(.is-on) h3, .js-steps li:not(.is-on) p { opacity: .5; }

/* ---------- Karta 4: kontakt ---------- */
.card-contact {
  --bg: var(--cobalt); --fg: #fff; --fg2: rgba(255, 255, 255, .87); --accent: var(--sun); --rule: rgba(255, 255, 255, .28);
  --btn: #fff; --btn-fg: var(--ink); --btn-h: var(--sun); --btn-fg-h: var(--ink); --focus: var(--sun); --hover: rgba(255, 255, 255, .14);
  padding-bottom: 0;
}
.card-contact .card-in { margin-block: auto; }
.mail-big { --fit-max: 250px; margin-top: clamp(26px, 6vh, 72px); font-size: clamp(26px, 8.4vw, 150px); font-weight: 760; line-height: 1; transition: color .25s; }
.mail-big:hover { color: var(--accent); }
.contact-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 28px 48px; margin-top: clamp(26px, 5vh, 56px); }
.contact-address { font-size: 16px; line-height: 1.5; color: var(--fg2); font-variant-numeric: tabular-nums; }
.contact-address b { color: var(--fg); }
.contact-address a { color: var(--fg); text-decoration: underline rgba(255, 255, 255, .55) 1.5px; text-underline-offset: 4px; }
.contact-address a:hover { text-decoration-color: var(--accent); }
.footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; width: 100%; max-width: 1560px; margin-inline: auto; margin-top: clamp(32px, 6vh, 64px); padding-block: 18px 22px; border-top: 1px solid var(--rule); font-size: 14.5px; color: var(--fg2); font-variant-numeric: tabular-nums; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 250; display: flex; align-items: center; gap: 10px; padding: 13px 20px 13px 16px;
  border-radius: 999px; font-size: 15px; font-weight: 550; color: #fff; background: var(--ink); box-shadow: 0 0 0 2px var(--sun), 0 18px 40px -14px rgba(6, 9, 32, .7);
  transform: translate(-50%, 200%); visibility: hidden; transition: transform .45s var(--ease), visibility 0s .45s; pointer-events: none;
}
.toast .ic { width: 18px; height: 18px; color: var(--sun); }
.toast.is-on { transform: translate(-50%, 0); visibility: visible; transition-delay: 0s; }

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .strip { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 24px; }
  .strip > :nth-child(1) { grid-area: 1 / 1; }
  .strip > :nth-child(4) { grid-area: 1 / 2; text-align: right; }
  .strip > :nth-child(2) { grid-area: 2 / 1; }
  .strip > :nth-child(3) { grid-area: 2 / 2; text-align: right; }
  .band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-title { grid-column: 1 / -1; max-width: 560px; --fit-max: clamp(64px, 20vw, 132px); }
}
@media (max-width: 860px) {
  /* Svisle: slabá linka pod vším, každý krok po rozsvícení dokreslí svůj úsek k dalšímu. */
  .steps-wrap::before, .steps-wrap::after, .steps-fill { display: none; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { content: ""; position: absolute; left: 9px; top: 10px; bottom: 0; width: 2px; background: var(--rule); }
  .steps li { padding: 0 0 34px 46px; }
  .steps li::after { content: ""; position: absolute; left: 9px; top: 10px; bottom: -10px; width: 2px; background: var(--accent); transform-origin: 50% 0; transition: transform .5s var(--ease); }
  .steps li:last-child { padding-bottom: 30px; }
  .steps li:last-child::after { bottom: 0; background: repeating-linear-gradient(180deg, var(--accent) 0 8px, transparent 8px 16px); }
  .js-steps li:not(.is-on)::after { transform: scaleY(0); }
  .step-no { margin-top: -6px; }
}
@media (max-width: 760px) {
  :root { --m: 6px; --r: 22px; --stage-min: min(45vh, 380px); }
  .nav { display: none; }
  .tools { margin-left: auto; }
  .brand { font-size: 17px; }
  .hero-foot { flex-direction: column; align-items: stretch; }
  .hero-lead { font-size: 16px; }
  .strip { font-size: 14.5px; }
  .band { grid-template-columns: 1fr; }
  .contact-foot { flex-direction: column; align-items: flex-start; }
  .contact-foot .btn { align-self: stretch; }
}
@media (max-width: 560px) {
  .strip > :nth-child(3) { grid-area: 3 / 1 / 4 / 3; text-align: left; }
}
@supports (height: 1svh) {
  @media (max-width: 760px) { :root { --stage-min: min(45svh, 380px); } }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
}
