/* Podstránky v11 (2026-11-07): projekty, praxe a 404 ve stylu nové úvodní stránky.
   Načítá se jako poslední, po style.css, demos.css, cases.css a site.css.
   Rozvržení, které staré styly řeší i pro mobil (mřížka ukázky, sloupce praxe), zde neměníme;
   kde rozvržení měníme, jsou tu i vlastní pravidla pro úzké obrazovky. */

:root { --text-section: clamp(2rem, 1.4rem + 2.2vw, 3.1rem); --header-h: 64px; }
html { scroll-padding-top: calc(var(--header-h) + 64px); }
body { font-size: 1.0625rem; line-height: 1.6; }

/* Postup čtení */

/* Drobečková navigace */
.breadcrumb { margin-block: 1.75rem .75rem; padding-block: .35rem; color: var(--muted); font-size: .9rem; text-decoration: none; }
.breadcrumb:hover { color: var(--accent); }

/* Úvod projektu a praxe */
.project-hero, .practice-hero { position: relative; isolation: isolate; }
.project-hero::before, .practice-hero::before { content: ""; position: absolute; z-index: -1; inset: -160px -50vw 0; 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: radial-gradient(ellipse 55% 75% at 35% 25%, var(--c-black-3) 15%, transparent 72%); mask-image: radial-gradient(ellipse 55% 75% at 35% 25%, var(--c-black-3) 15%, transparent 72%); pointer-events: none; }
.project-hero { grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: clamp(2rem, 5vw, 5rem); align-items: end; padding-bottom: var(--space-5); }
.project-hero h1, .practice-hero h1 { margin: .25rem 0 1.25rem; font-size: clamp(3rem, 1.9rem + 4.4vw, 5.6rem); font-weight: 700; line-height: .98; letter-spacing: -0.05em; }
.project-hero h1 > span { display: block; margin-top: 1rem; color: var(--muted); font-family: var(--font-display); font-size: clamp(1.35rem, 1rem + 1.3vw, 2.1rem); font-weight: 500; line-height: 1.2; letter-spacing: -0.03em; }
.project-hero .meta { color: var(--accent); font-size: .9rem; font-weight: 600; }
.project-lead { margin: .6rem 0 1.4rem; max-width: 56ch; color: var(--ink-soft); font-size: clamp(1.05rem, 1rem + .3vw, 1.2rem); line-height: 1.6; }
.tags { gap: .4rem; }
.tags span { padding: .2rem .7rem; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--surface); color: var(--ink-soft); font-size: .82rem; line-height: 1.6; }
.project-hero-actions { gap: .75rem 1.25rem; margin-top: 2rem; }
.project-hero-actions .button { display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.35rem; border-radius: 10px; font-size: .95rem; text-decoration: none; transition: background-color .2s ease, transform .2s var(--ease); }
.project-hero-actions .button:hover { transform: translateY(-1px); }
.hero-story-link { padding: .6rem 0; border-bottom: 1px solid var(--rule-strong); color: var(--ink); font-size: .95rem; }
.project-hero aside, .project-context { align-self: end; padding: 1.5rem; border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.project-hero aside p { margin: .9rem 0 1.1rem; color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }
.label, :root[data-theme="dark"] .label { padding: .25rem .7rem; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: .8rem; font-weight: 600; }
.label-outline, :root[data-theme="dark"] .label-outline { border: 1px solid var(--rule-strong); background: transparent; color: var(--ink-soft); }
.share-button, :root[data-theme="dark"] .share-button { display: inline-flex; gap: .5rem; padding: .5rem .85rem; border: 1px solid var(--rule-strong); border-radius: 8px; background: transparent; color: var(--ink); font-size: .85rem; font-weight: 600; transition: background-color .2s ease; }
.share-button:hover { background: var(--surface-2); }
.share-message { color: var(--accent); font-size: .85rem; }

/* Menu sekcí projektu: lepí se pod hlavičkou */
.project-nav { position: sticky; top: var(--header-h); z-index: 40; display: flex; gap: .3rem; max-width: none; padding-block: .5rem; padding-inline: max(var(--gutter), calc((100% - var(--max)) / 2)); border-block: 1px solid var(--rule); background: var(--header-bg); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); overflow-x: auto; scrollbar-width: none; }
.project-nav::-webkit-scrollbar { display: none; }
.project-nav a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 .85rem; border-radius: 8px; color: var(--muted); font-size: .9rem; text-decoration: none; white-space: nowrap; transition: color .2s ease, background-color .2s ease; }
.project-nav a:hover { color: var(--ink); }
.project-nav a.is-active { color: var(--ink); background: var(--surface-3); box-shadow: inset 0 0 0 1px var(--rule-strong); }

/* Nadpisy sekcí */
.section-heading { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: var(--space-4); align-items: end; margin-bottom: var(--space-4); }
.section-heading h2 { margin: 0; max-width: 16ch; font-size: var(--text-section); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; }
.section-heading > p { padding: 0; color: var(--muted); font-size: 1rem; line-height: 1.6; max-width: 52ch; }

/* Příběh */
.story-section { padding-block: var(--space-6) 0; }
.story-columns { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-5); margin-top: 0; }
.story-columns h2 { max-width: 14ch; font-size: var(--text-section); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; }
.story-columns p { max-width: 62ch; color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.story-columns .lead-text { margin-bottom: 1rem; color: var(--ink); font-size: clamp(1.1rem, 1rem + .35vw, 1.3rem); line-height: 1.55; }

/* Mřížky karet s tenkými linkami (kroky, principy) */
.project-journey, .principles { gap: 1px; margin-top: var(--space-4); background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.project-journey { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.principles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-journey li, .principles article { padding: clamp(1.4rem, 1rem + 1.2vw, 2rem); border-top: 0; background: var(--paper); transition: background-color .3s ease; }
.project-journey li:hover, .principles article:hover { background: var(--surface); }
.project-journey li > span, .principles article > span { color: var(--accent); font-family: var(--font-display); font-size: .9rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.project-journey h3, .principles h3 { margin: .9rem 0 .5rem; font-size: 1.25rem; font-weight: 650; line-height: 1.25; letter-spacing: -0.015em; }
.project-journey p, .principles p { max-width: none; color: var(--ink-soft); font-size: .98rem; line-height: 1.6; }

/* Ukázka */
.demo-section { padding-block: var(--space-6) 0; border-top: 0; }
.interactive-demo { position: relative; border: 1px solid var(--rule-strong); border-radius: 16px; background: var(--surface); box-shadow: 0 30px 80px -30px var(--c-black-a55); }
:root[data-theme="light"] .interactive-demo { box-shadow: 0 30px 70px -35px rgb(18 22 20 / 28%); }
.interactive-demo::before { content: ""; position: absolute; inset: 0 0 auto; z-index: 2; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .6; }
.interactive-top { padding: .75rem 1.25rem; border-bottom: 1px solid var(--rule); background: var(--surface-2); color: var(--muted); font-size: .85rem; }
.interactive-top .tiny-dot { width: 8px; height: 8px; background: var(--c-green-52); }
.interactive-stage { background: none; }
.interactive-stage .device-toolbar > span { color: var(--muted); font-size: .85rem; }
.interactive-stage .device-toolbar > div { gap: 2px; padding: 3px; border: 1px solid var(--rule-strong); border-radius: 10px; background: var(--surface-2); }
.interactive-stage .device-toolbar button { border-radius: 7px; color: var(--muted); font-size: .85rem; transition: color .2s ease, background-color .2s ease; }
.interactive-stage .device-toolbar button:hover { color: var(--ink); }
.interactive-stage .device-toolbar button[aria-pressed="true"] { background: var(--surface-3); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule-strong); }
.interactive-guide h3 { font-size: clamp(1.4rem, 1.1rem + .9vw, 1.75rem); font-weight: 700; line-height: 1.12; letter-spacing: -0.03em; }
.interactive-guide > p:not(.demo-boundary):not(.demo-announcer) { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }
.tour-shortcuts { border-top: 1px solid var(--rule); }
.tour-shortcuts button { gap: .75rem; padding: .8rem .5rem; border-bottom: 1px solid var(--rule); color: var(--ink); font-size: .95rem; transition: color .2s ease, background-color .2s ease; }
.tour-shortcuts button:hover { background: var(--surface-2); color: var(--accent); }
.tour-shortcuts span { color: var(--accent); font-family: var(--font-display); font-size: .85rem; font-weight: 600; }
.interactive-guide .demo-boundary { color: var(--muted); font-size: .85rem; line-height: 1.55; }
.demo-restart { color: var(--ink); font-size: .9rem; font-weight: 600; }
.demo-restart:hover { color: var(--accent); }
.demo-feedback { color: var(--muted); font-size: .9rem; }
.interactive-demo .transcript { padding: 0 1.25rem; border-top: 1px solid var(--rule); background: transparent; color: var(--ink-soft); font-size: .95rem; }
.interactive-demo .transcript summary { color: var(--ink); font-size: .95rem; font-weight: 600; }
.interactive-demo .transcript ol { font-size: .95rem; line-height: 1.6; }

/* Technika a rozhodnutí */
.technical-section { padding-block: var(--space-6) 0; border-top: 0; }
.technical-section > h2 { max-width: 18ch; margin: 0; font-size: var(--text-section); font-weight: 700; line-height: 1.05; letter-spacing: -0.04em; }
.decision-list { margin-top: var(--space-5); border-top: 1px solid var(--rule); }
.decision-list article { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: var(--space-4); padding: 1.35rem 0; border-bottom: 1px solid var(--rule); transition: background-color .25s ease, box-shadow .25s ease; }
.decision-list article:hover { background: var(--surface); box-shadow: -1rem 0 0 var(--surface), 1rem 0 0 var(--surface); }
.decision-list h3 { font-size: 1.15rem; font-weight: 650; line-height: 1.35; letter-spacing: -0.01em; }
.decision-list p { max-width: 62ch; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.case-study-notes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: var(--space-4); padding-top: 0; border-top: 0; }
.case-study-notes article { padding: clamp(1.4rem, 1rem + 1.2vw, 2rem); border: 1px solid var(--rule); border-radius: 14px; background: var(--surface); }
.case-study-notes h3 { margin: 0 0 .6rem; font-size: 1.35rem; font-weight: 650; letter-spacing: -0.02em; }
.case-study-notes p { max-width: none; color: var(--ink-soft); font-size: 1rem; line-height: 1.6; }
.source-panel { margin-top: 1.25rem; padding: 1.1rem 1.4rem; border: 1px dashed var(--rule-strong); border-radius: 12px; background: transparent; }
.source-panel p { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.6; }

/* Další projekt: velká karta, celá je odkaz */
.next-project.wrap { position: relative; width: calc(100% - 2 * var(--gutter)); max-width: var(--max); margin-top: var(--space-6); padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); overflow: hidden; transition: border-color .3s ease, translate .4s var(--ease); }
.next-project.wrap:hover { border-color: var(--rule-strong); }
.next-project.wrap:not(.tilt):hover { translate: 0 -3px; }
.next-project > span { color: var(--muted); font-size: .9rem; }
.next-project > a { display: block; margin-top: .5rem; font-size: clamp(2rem, 1.3rem + 3vw, 3.6rem); font-weight: 700; line-height: 1.05; letter-spacing: -0.045em; text-decoration: none; transition: color .2s ease; }
.next-project > a::after { content: ""; position: absolute; inset: 0; }
.next-project.wrap:hover > a { color: var(--accent); }

/* Hermes: provozní čísla a tok */
.ops-section, :root[data-theme="dark"] .ops-section { padding: clamp(1.5rem, 1rem + 3vw, 3rem); border-radius: 16px; background: var(--surface); }
.ops-heading h2 { font-size: var(--text-section); font-weight: 700; letter-spacing: -0.04em; }
.ops-heading > p:last-child, .hermes-lead { color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }
.ops-stats b, :root[data-theme="dark"] .ops-stats b, .ops-loop span, :root[data-theme="dark"] .ops-loop span, .ops-flow li:not(:last-child)::after, :root[data-theme="dark"] .ops-flow li:not(:last-child)::after { color: var(--accent); }
.ops-stats article { background: var(--paper); }
.ops-stats small, .ops-loop, .hermes-flow p, .hermes-credit p, .ops-insights p { color: var(--ink-soft); font-size: .95rem; line-height: 1.6; }
.ops-flow li { background: var(--surface-2); font-size: .9rem; }
.ops-insights article, :root[data-theme="dark"] .ops-insights article { border-top-color: var(--accent); }
.hermes-section { margin-top: var(--space-5); padding-top: var(--space-4); }
.hermes-mark { border-radius: 14px; }

/* Grunt: přehled s ilustrací */
.project-overview { border-color: var(--rule); border-radius: 16px; background: var(--surface); }
.project-overview p { color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }

/* Praxe */
.practice-hero { padding-block: .5rem var(--space-5); }
.practice-lead { color: var(--ink); font-size: clamp(1.2rem, 1rem + .9vw, 1.7rem); line-height: 1.45; letter-spacing: -0.01em; max-width: 44ch; }
.practice-hero > p:last-of-type { color: var(--muted); }
.practice-nav { gap: .5rem; margin-top: 1.75rem; }
.practice-nav a { padding: .45rem .95rem; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--ink-soft); font-size: .9rem; transition: color .2s ease, border-color .2s ease, background-color .2s ease; }
.practice-nav a:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--ink); }
.practice-case { padding: clamp(1.4rem, 1rem + 2.4vw, 2.75rem); border-radius: 16px; background: var(--surface); scroll-margin-top: calc(var(--header-h) + 24px); }
.practice-case > .meta { color: var(--accent); font-weight: 600; }
.practice-case > h2 { margin: .5rem 0 1.75rem; font-size: clamp(1.9rem, 1.3rem + 2vw, 2.8rem); font-weight: 700; line-height: 1.08; letter-spacing: -0.04em; }
.practice-case h3 { font-size: 1.1rem; font-weight: 650; letter-spacing: -0.01em; }
.practice-case p { color: var(--ink-soft); font-size: 1rem; line-height: 1.7; }
.practice-steps li > span { color: var(--accent); font-family: var(--font-display); font-weight: 600; }
.practice-steps h4 { font-size: 1.05rem; }
.practice-outcome { border-left-width: 2px; }
.practice-connections > div { border-color: var(--rule); border-radius: 10px; background: var(--surface-2); }
.practice-connections b { font-size: .95rem; }
.practice-connections span { color: var(--ink-soft); font-size: .9rem; }
.practice-workshops > ul > li { border-radius: 14px; background: var(--surface); }
.practice-workshops h3 { font-size: 1.3rem; font-weight: 650; letter-spacing: -0.02em; }
.practice-workshops li > p:last-child { color: var(--ink-soft); font-size: 1rem; line-height: 1.65; }
.practice-workshops .meta, .method-context { color: var(--accent); }

/* 404 */
.not-found h1 { font-size: clamp(3rem, 2rem + 5vw, 6rem); font-weight: 700; letter-spacing: -0.05em; line-height: 1; }

/* Světlo pod kurzorem (pages.js nastaví --mx, --my) */
.spot { position: relative; isolation: isolate; }
.spot::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), var(--accent-soft), transparent 60%); opacity: 0; transition: opacity .35s ease; pointer-events: none; }
.spot:hover::before { opacity: 1; }

/* Postupné odhalení (pages.js přidá .rv) */
/* v12: posun přes "translate", aby karta po odhalení mohla dostat náklon (.tilt v site.css používá "transform"). */
.js .rv { opacity: 0; translate: 0 18px; transition: opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s); }
.js .rv.is-in { opacity: 1; translate: none; }
.js .rv.tilt, .next-project.wrap.tilt { transition: opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s), transform .3s var(--ease), border-color .3s ease, box-shadow .3s ease; }

@media (max-width: 960px) {
  .project-hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); align-items: start; }
  .section-heading, .story-columns { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .project-journey, .principles { grid-template-columns: minmax(0, 1fr); }
  .decision-list article { grid-template-columns: minmax(0, 1fr); gap: .4rem; }
}
@media (max-width: 720px) {
  :root { --header-h: 58px; }
  .project-hero aside { display: block; }
  .project-hero aside p { margin: .8rem 0 1rem; }
  .case-study-notes { grid-template-columns: minmax(0, 1fr); }
  .decision-list article:hover { background: none; box-shadow: none; }
  .project-nav { gap: .2rem; padding-block: .4rem; }
  .project-nav a { padding: 0 .65rem; font-size: .85rem; }
}
@media (hover: none) {
  .spot::before { display: none; }
  .next-project.wrap:hover { translate: none; }
}
@media (prefers-reduced-motion: reduce) {
  .js .rv { opacity: 1; translate: none; }
}

/* Okno ukázky na úvodní stránce (?embed=): bez rámu a stínu */
html.embed .interactive-demo { box-shadow: none !important; }
html.embed .interactive-demo::before { display: none; }

/* Nástroje, kurzy, jazyky a vzdělání (v12, přesunuto z úvodní stránky; stejný vzhled jako tam) */
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: var(--radius); overflow: hidden; }
.facts > div { padding: var(--space-3); background: var(--surface); }
.facts dt { font-weight: 600; }
.facts dd { margin: .35rem 0 0; color: var(--muted); font-size: .95rem; }
@media (max-width: 720px) { .facts { grid-template-columns: minmax(0, 1fr); } }
