/* Společný základ webu v11 (2026-11-07): písma, barvy světlého a tmavého režimu, hlavička, kontakt, patička.
   Načítá se na všech stránkách jako poslední, takže přebíjí starší styly podstránek.
   Písma: Archivo a IBM Plex Sans, licence SIL OFL 1.1 (assets/fonts/OFL-*.txt), z balíčků @fontsource-variable 5.3.0.
   Vzor: tmavé plochy a tenké linky (Linear), přesnost bez stínů (BMW); viz github.com/voltagent/awesome-design-md. */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/archivo-latin-ext-wght-normal.woff2") format("woff2-variations");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 100 900; font-display: swap;
  src: url("fonts/archivo-latin-wght-normal.woff2") format("woff2-variations");
  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; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-ext-wght-normal.woff2") format("woff2-variations");
  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-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-wght-normal.woff2") format("woff2-variations");
  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; }
@font-face { font-family: "IBM Plex Sans"; font-style: italic; font-weight: 100 700; font-display: swap;
  src: url("fonts/ibm-plex-sans-latin-wght-italic.woff2") format("woff2-variations");
  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; }


/* Barvy. Výchozí je tmavý režim (grafit, tenké linky, jedna signální barva: jantar jako andon).
   Světlý režim přepíná theme.js přes data-theme="light". Hloubku dělají plochy a linky, ne stíny. */
:root {
  --paper: #0b0d0c;
  --surface: #121513;
  --surface-2: #181c1a;
  --surface-3: #1f2421;
  --ink: #eef1ec;
  --ink-soft: #c9cfc9;
  --muted: #98a19b;
  --rule: #232826;
  --rule-strong: #353c38;
  --accent: #f5b83d;
  --accent-ink: #171204;
  --accent-soft: rgb(245 184 61 / 12%);
  --cta-bg: var(--accent);
  --cta-ink: var(--accent-ink);
  --cta-hover: #ffd27a;
  --grid-line: rgb(238 241 236 / 4.5%);
  --white: var(--surface);
  --shadow: 0 0 0 1px var(--rule);
  --header-bg: rgb(11 13 12 / 72%);
  --font-display: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --text-small: 0.9rem;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2.5rem;
  --space-5: 4rem;
  --space-6: clamp(5rem, 3.5rem + 5vw, 8.5rem);
  --gutter: clamp(1.1rem, 0.4rem + 3vw, 3rem);
  --max: 1200px;
  --radius: 12px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: dark;
}
:root[data-theme="dark"] {
  --paper: #0b0d0c; --surface: #121513; --surface-2: #181c1a; --surface-3: #1f2421;
  --ink: #eef1ec; --ink-soft: #c9cfc9; --muted: #98a19b; --rule: #232826; --rule-strong: #353c38;
  --accent: #f5b83d; --accent-ink: #171204; --accent-soft: rgb(245 184 61 / 12%);
  --cta-bg: var(--accent); --cta-ink: var(--accent-ink); --cta-hover: #ffd27a;
  --white: var(--surface); --grid-line: rgb(238 241 236 / 4.5%); --header-bg: rgb(11 13 12 / 72%);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --paper: #f6f7f5; --surface: #ffffff; --surface-2: #eff1ee; --surface-3: #e6e9e5;
  --ink: #121614; --ink-soft: #2c332f; --muted: #545c57; --rule: #dde1dd; --rule-strong: #c4cac5;
  --accent: #8a5100; --accent-ink: #ffffff; --accent-soft: rgb(214 140 20 / 14%);
  --cta-bg: #121614; --cta-ink: #ffffff; --cta-hover: #2c332f;
  --white: var(--surface); --grid-line: rgb(18 22 20 / 5%); --header-bg: rgb(246 247 245 / 78%);
  color-scheme: light;
}

/* Základ */
html, body { overflow-x: clip; }
body { background: var(--paper); color: var(--ink); font-family: var(--font-body); font-synthesis: none; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font-family: inherit; }
h1, h2, h3, h4 { font-family: var(--font-display) !important; letter-spacing: -0.025em; overflow-wrap: break-word; min-width: 0; }
code, pre, kbd, samp { font-family: var(--font-mono) !important; }
::selection { background: var(--accent); color: var(--accent-ink); }
:where(a, button, summary, select, input, textarea, [tabindex]):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.wrap { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); box-sizing: border-box; }
.meta { margin-top: 0.4rem; color: var(--muted); font-size: var(--text-small); font-weight: 500; letter-spacing: 0; text-transform: none; }
.skip-link { position: absolute; left: var(--space-2); top: -4rem; padding: var(--space-1) var(--space-2); background: var(--ink); color: var(--paper); z-index: 60; }
.skip-link:focus-visible { top: var(--space-2); }

/* Přechod mezi stránkami (v12): hlavička stojí, obsah se prolne a lehce zvedne.
   Prohlížeče bez podpory stránku prostě načtou. */
@view-transition { navigation: auto; }
.sk-header { view-transition-name: sk-header; }
::view-transition-group(sk-header) { animation-duration: 0s; }
::view-transition-old(root) { animation: sk-page-out .18s ease both; }
::view-transition-new(root) { animation: sk-page-in .38s var(--ease) both; }
@keyframes sk-page-out { to { opacity: 0; } }
@keyframes sk-page-in { from { opacity: 0; transform: translateY(10px); } }

/* Přechod mezi režimy: kruh z tlačítka (theme.js přidá .vt-theme jen na dobu přepnutí) */
.vt-theme .sk-header { view-transition-name: none; }
.vt-theme::view-transition-old(root), .vt-theme::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.vt-theme::view-transition-new(root) { animation: sk-reveal .55s var(--ease); }
@keyframes sk-reveal { from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); } to { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); } }

/* Ukazatel čtení (fx.js) */
.read-progress { position: fixed; inset: 0 0 auto; z-index: 60; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* Světlo v záhlaví stránky (fx.js): na počítači jde za kurzorem, na dotykové obrazovce pomalu pluje.
   Pohybuje se jen transformací, takže prohlížeč nepřekresluje stránku. */
.hero-glow { position: absolute; z-index: -1; left: 68%; top: 30%; width: 0; height: 0; pointer-events: none; transition: transform 1.1s var(--ease); }
.hero-glow > span { position: absolute; left: -330px; top: -330px; width: 660px; height: 660px; border-radius: 50%; background: radial-gradient(circle, var(--accent-soft) 0%, rgb(245 184 61 / 5%) 38%, transparent 68%); opacity: .9; will-change: transform; animation: sk-drift 18s ease-in-out infinite alternate; }
.hero-glow.is-following { transition-duration: .45s; }
.hero-glow.is-following > span { animation-play-state: paused; opacity: 1; }
.hero-glow.is-off > span { animation-play-state: paused; }
@keyframes sk-drift { from { transform: translate(-6%, -4%) scale(1); } to { transform: translate(10%, 12%) scale(1.12); } }

/* Karty se lehce naklopí ke kurzoru (fx.js nastaví --rx a --ry) */
.tilt { transform: perspective(1100px) translateY(var(--lift, 0px)) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease; }
.tilt:hover { --lift: -4px; box-shadow: 0 22px 44px -30px rgb(0 0 0 / 60%); }
:root[data-theme="light"] .tilt:hover { box-shadow: 0 22px 44px -30px rgb(18 22 20 / 30%); }

/* Tlačítka */
.sk-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem; box-sizing: border-box;
  min-height: 48px; padding: 0 1.35rem;
  border: 1px solid var(--cta-bg); border-radius: 10px;
  background: var(--cta-bg); color: var(--cta-ink);
  font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s var(--ease);
}
.sk-button:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); transform: translateY(-1px); }
.sk-button:active { transform: translateY(1px); }
.sk-button-quiet { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.sk-button-quiet:hover { background: var(--surface-2); color: var(--ink); border-color: var(--muted); }
.sk-button svg { flex: none; }
/* Tlačítka a odkazy ze starších podstránek */
.button { border-radius: 10px; font-weight: 600; letter-spacing: 0; }
.button-dark { background: var(--cta-bg); border-color: var(--cta-bg); color: var(--cta-ink); }
.button-dark:hover { background: var(--cta-hover); border-color: var(--cta-hover); color: var(--cta-ink); }
:root[data-theme="dark"] .button-dark:hover { background: var(--cta-hover); color: var(--cta-ink); }
.text-link, .hero-story-link, .breadcrumb { text-underline-offset: 0.25em; }
.sk-link { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
.sk-link:hover { text-decoration-thickness: 2px; }

/* Hlavička: lepí se nahoře, poloprůhledná */
.sk-header { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding-block: .85rem; max-width: none; padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); background: var(--header-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid transparent; transition: border-color .25s ease; }
.sk-header.is-scrolled { border-bottom-color: var(--rule); }
.sk-brand { display: grid; grid-template-columns: 30px auto; align-items: center; column-gap: .75rem; color: var(--ink); text-decoration: none; line-height: 1.2; }
.sk-brand::before { content: ""; grid-row: 1 / span 2; width: 30px; height: 30px; border-radius: 8px; background: url("favicon.svg?v=11") center / 30px no-repeat; transition: transform .4s var(--ease); }
.sk-brand:hover::before { transform: rotate(-8deg); }
.sk-brand strong { display: block; grid-column: 2; font-family: var(--font-display); font-size: 1.05rem; font-weight: 650; letter-spacing: -0.01em; }
.sk-brand span { display: block; grid-column: 2; color: var(--muted); font-size: .82rem; }
.sk-nav { display: flex; align-items: center; gap: 1.6rem; font-size: 0.95rem; }
.sk-nav > a:not(.sk-button) { position: relative; color: var(--muted); text-decoration: none; padding-block: .4rem; transition: color .2s ease; }
.sk-nav > a:not(.sk-button)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.sk-nav > a:not(.sk-button):hover, .sk-nav > a[aria-current], .sk-nav > a.is-active { color: var(--ink); }
.sk-nav > a:not(.sk-button):hover::after, .sk-nav > a.is-active::after { transform: scaleX(1); }
.sk-nav .sk-button { min-height: 40px; padding-inline: 1rem; font-size: .92rem; }
.sk-lang { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 8px; overflow: hidden; }
.sk-lang a { padding: 0.3rem 0.6rem; color: var(--muted); font-size: .82rem; text-decoration: none; }
.sk-lang a:hover { color: var(--ink); }
.sk-lang a[aria-current] { background: var(--ink); color: var(--paper); }
.sk-theme { display: inline-grid; place-items: center; width: 38px; height: 38px; margin-right: -.6rem; padding: 0; border: 1px solid var(--rule-strong); border-radius: 10px; background: transparent; color: var(--ink); cursor: pointer; transition: background-color .2s ease, transform .3s var(--ease); }
.sk-theme:hover { background: var(--surface-2); }
.sk-theme:active { transform: rotate(-20deg) scale(.95); }
.sk-back { display: inline-block; margin-top: var(--space-2); color: var(--muted); font-size: var(--text-small); }

/* Kontakt */
.sk-contact { position: relative; margin-top: var(--space-6); padding-block: var(--space-6); background: var(--surface); border-top: 1px solid var(--rule); color: var(--ink); overflow: hidden; isolation: isolate; }
.sk-contact::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(var(--grid-line) 1px, transparent 1px), linear-gradient(90deg, var(--grid-line) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: linear-gradient(180deg, #000, transparent 85%); mask-image: linear-gradient(180deg, #000, transparent 85%); }
.sk-contact-grid { display: grid; grid-template-columns: minmax(0, 270px) minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-4); align-items: start; }
.sk-portrait { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: var(--radius); border: 1px solid var(--rule-strong); object-fit: cover; background: var(--surface-2); }
.sk-contact h2 { margin: 0; color: var(--ink); font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.6rem); font-weight: 650; line-height: 1.04; letter-spacing: -0.035em; max-width: 16ch; }
.sk-contact p { margin: 0; max-width: 50ch; color: var(--ink-soft); }
.sk-mail { display: inline-block; margin-top: var(--space-4); color: var(--ink); font-family: var(--font-display); font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem); font-weight: 650; letter-spacing: -0.02em; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 0.22em; overflow-wrap: anywhere; }
.sk-mail:hover { color: var(--accent); }
.sk-mail, .sk-phone { display: table; }
.sk-phone { display: inline-block; margin-top: var(--space-2); color: var(--ink); font-family: var(--font-display); font-size: clamp(1.15rem, 1rem + 0.8vw, 1.5rem); font-weight: 600; font-variant-numeric: tabular-nums; text-decoration: none; }
.sk-phone:hover { text-decoration: underline; text-underline-offset: 0.2em; }
.sk-secondary { display: block; margin-top: var(--space-3); color: var(--ink); }
.sk-secondary:hover { color: var(--accent); }
.sk-phone + .sk-secondary { margin-top: var(--space-3); }

/* Patička */
.sk-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-2) var(--space-4); padding-block: var(--space-4); color: var(--muted); font-size: var(--text-small); border-top: 1px solid var(--rule); }
.sk-footer nav { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.sk-footer a { color: inherit; }
.sk-footer a:hover { color: var(--ink); }
.sk-contact + .sk-footer { border-top: 0; }

/* Vysvětlivky pojmů (terms.js) */
.portfolio-term { white-space: nowrap; }
.tags span.portfolio-term { display: inline; padding: 0; border: 0; border-radius: 0; background: none; font: inherit; line-height: inherit; }
.term-help { position: relative; top: -0.45em; display: inline-flex; width: 12px; height: 14px; padding: 0; margin-left: 1px; border: 0; background: none; color: var(--muted); font: 500 10px/1 var(--font-body); cursor: pointer; }
.term-help::before { content: ""; position: absolute; inset: -6px; }
.term-tip { position: fixed; z-index: 70; width: max-content; max-width: min(352px, calc(100vw - 24px)); padding: 14px 16px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink); box-shadow: 0 16px 40px rgb(0 0 0 / 28%); font-size: var(--text-small); line-height: 1.5; }
.term-tip strong { display: block; margin-bottom: 4px; }
.term-tip p { margin: 0; }

@media (max-width: 1100px) {
  .sk-contact-grid { grid-template-columns: minmax(0, 240px) minmax(0, 1fr); }
  .sk-portrait { grid-row: 1 / span 2; }
  .sk-contact h2 { max-width: 20ch; }
}
@media (max-width: 960px) {
  .sk-contact-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .sk-portrait { grid-row: auto; width: 168px; }
}
@media (max-width: 860px) {
  .sk-nav { gap: 1.1rem; }
  .sk-brand span { display: none; }
  .sk-nav > a[href$="#o-mne"] { display: none; }
}
@media (max-width: 720px) {
  .sk-header { gap: .6rem; padding-block: .6rem; }
  .sk-nav > a[href$="#projekty"] { display: none; }
  .sk-nav { gap: .7rem; font-size: 0.92rem; }
  .sk-nav .sk-button { min-height: 38px; padding-inline: .8rem; }
  .sk-theme { margin-right: 0; width: 36px; height: 36px; }
}
@media (max-width: 560px) {
  .sk-brand { grid-template-columns: 30px; }
  .sk-brand strong, .sk-brand span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
}
@media (max-width: 360px) {
  .sk-lang a { padding-inline: .4rem; }
  .sk-nav { gap: .45rem; }
  .sk-nav > a[href*="praxe"], .sk-nav > a[href$="#zkusenosti"] { display: none; }
}

/* Starší podstránky v tmavém režimu: plochy a linky z nových barev */
:root[data-theme="dark"] .project-hero, :root[data-theme="dark"] .story-section { color: var(--ink); }
.interactive-demo, .source-panel, .case-study-notes article, .decision-list article { border-color: var(--rule) !important; }

.practice-context p + p { margin-top: .75rem; }

/* Ukázka A3 (úvod a praxe) */
.a3-figure { margin: var(--space-4) 0; }
.a3-figure img { display: block; width: 100%; height: auto; border: 1px solid var(--rule-strong); border-radius: var(--radius); }
.a3-figure figcaption { margin-top: .75rem; max-width: 70ch; color: var(--muted); font-size: var(--text-small); line-height: 1.5; }
.a3-figure .sk-link { white-space: nowrap; }

/* Schéma principu SMED (praxe) */
.smed-scheme { margin: var(--space-4) 0; max-width: 46rem; }
.smed-scheme figcaption { margin-bottom: var(--space-2); color: var(--muted); font-size: var(--text-small); }
.smed-row { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr); gap: var(--space-2); align-items: center; margin-top: var(--space-1); }
.smed-label { font-size: var(--text-small); font-weight: 600; }
.smed-track { display: flex; gap: 2px; min-height: 56px; }
.smed-track > span { display: flex; align-items: center; box-sizing: border-box; min-width: 0; padding: 0.4rem var(--space-2); font-size: var(--text-small); line-height: 1.3; }
.smed-stop { background: var(--ink); color: var(--paper); }
.smed-run { background: var(--accent-soft); color: var(--ink); border: 1px solid var(--accent); }
.smed-gain { border: 1px dashed var(--muted); color: var(--muted); }
.smed-track .w100 { flex: 100 1 0; } .smed-track .w45 { flex: 45 1 0; } .smed-track .w35 { flex: 35 1 0; } .smed-track .w20 { flex: 20 1 0; }

/* Živé okno ukázky: stránka s ?embed= ukáže jen zařízení s aplikací */
html.embed, html.embed body { margin: 0; background: transparent !important; overflow: hidden; }
html.embed body > :not(main), html.embed main > :not(#ukazka) { display: none !important; }
html.embed #ukazka { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: none !important; }
html.embed #ukazka > :not(.interactive-demo), html.embed .interactive-top, html.embed .transcript, html.embed .interactive-guide, html.embed .device-toolbar, html.embed .demo-feedback { display: none !important; }
html.embed .interactive-demo { border: 0 !important; border-radius: 0 !important; background: transparent !important; overflow: visible !important; }
html.embed .interactive-layout { display: block !important; padding: 0 !important; }
html.embed .interactive-stage { padding: 0 !important; background: none !important; }
html.embed .show-device { margin: 0 auto !important; filter: none !important; }
html.embed .show-desktop .show-bezel { padding: 0 !important; background: none !important; border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
html.embed .show-desktop .show-base, html.embed .show-desktop .bezel-camera { display: none !important; }
html.embed .show-phone { padding: 4px 6px 8px; }

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