/* nijak.cz – úvodní stránka: nit, animace a projekty */
:root {
  --accent: #3a8f45;           /* jedina signalni barva: zelena loga Thanatolog */
  --accent-rgb: 58, 143, 69;
  --bg: #07080a;
  --surface: #0e1013;
  --surface-2: #13161a;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.14);
  --text: #eceef1;
  --text-2: #a7adb7;
  --text-3: #6d737d;
  --head: 'Inter Tight', 'Segoe UI', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --ease-click: cubic-bezier(0.2, 1.4, 0.4, 1);
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--head);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 1rem; top: -3rem; z-index: 100; background: var(--accent); color: #04130d; padding: 0.5rem 0.9rem; border-radius: 8px; font-weight: 600; text-decoration: none; transition: top 0.2s; }
.skip:focus { top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(var(--wrap), 100% - 4.5rem); margin: 0 auto; position: relative; }

/* --- pozadi: jemna mrizka a zrnitost --- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.35;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, #000 30%, transparent 80%);
}
.bg-grain {
  position: fixed; inset: -50%; z-index: 60; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* --- tlacitka --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
  height: 2.5rem; padding: 0 1.05rem; border-radius: 999px;
  font: 500 0.92rem/1 var(--head); letter-spacing: -0.01em; text-decoration: none; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--text); background: transparent;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.3s;
  will-change: transform;
}
.btn-lg { height: 3.1rem; padding: 0 1.45rem; font-size: 1rem; }
.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.35); background: rgba(255, 255, 255, 0.04); }
.btn-accent { background: var(--accent); color: #04130d; border-color: transparent; font-weight: 600; box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5), 0 8px 30px -10px rgba(var(--accent-rgb), 0.6); }
.btn-accent:hover { box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.18), 0 10px 40px -8px rgba(var(--accent-rgb), 0.75); }

/* --- karty s okrajem, ktery se rozsviti od kurzoru --- */
.glow {
  --mx: 50%; --my: 50%; --ga: 0;
  border: 1px solid transparent;
  background:
    linear-gradient(var(--surface), var(--surface)) padding-box,
    radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--accent-rgb), calc(0.55 * var(--ga))), transparent 60%) border-box,
    linear-gradient(var(--line), var(--line)) border-box;
  transition: --ga 0.3s;
}
.glow:hover { --ga: 1; }
@property --ga { syntax: '<number>'; inherits: true; initial-value: 0; }

.glass {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.02));
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border: 1px solid var(--line-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 30px 80px -30px rgba(0, 0, 0, 0.8), 0 0 60px -20px rgba(var(--accent-rgb), 0.25);
}

.eyebrow, .p-index {
  font: 500 0.75rem/1.4 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 1rem;
}

/* --- uvodni pocitadlo --- */
.intro { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: var(--bg); transition: opacity 0.4s; }
.intro-done .intro { display: none; }
.intro-pill {
  display: inline-flex; align-items: center; gap: 0.55rem;
  height: 2.4rem; padding: 0 1rem; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--surface);
  font: 500 0.95rem/1 var(--mono); color: var(--text); letter-spacing: 0.06em;
  box-shadow: 0 0 40px -10px rgba(var(--accent-rgb), 0.4);
  transform-origin: center;
}
.intro-count { min-width: 3ch; text-align: right; font-variant-numeric: tabular-nums; }
.intro-skip { position: absolute; bottom: 2rem; right: 2rem; background: none; border: 1px solid var(--line-2); color: var(--text-2); border-radius: 999px; padding: 0.45rem 0.9rem; font: 500 0.75rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; cursor: pointer; }
.intro-skip:hover { color: var(--text); border-color: rgba(255, 255, 255, 0.35); }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px rgba(var(--accent-rgb), 0.9); flex-shrink: 0; }

/* --- navigace --- */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; display: flex; justify-content: center; padding: 0; transition: padding 0.4s var(--ease-click); }
.nav-inner {
  width: 100%; max-width: 100%; display: flex; align-items: center; gap: 1.5rem;
  padding: 0.9rem 1.5rem; border: 1px solid transparent; border-radius: 0;
  transition: max-width 0.5s var(--ease-click), border-radius 0.5s, background 0.3s, border-color 0.3s, padding 0.4s;
}
.nav.scrolled { padding: 0.7rem 1rem 0; }
.nav.scrolled .nav-inner {
  max-width: 1080px; border-radius: 999px; padding: 0.5rem 0.6rem 0.5rem 1.1rem;
  background: rgba(14, 16, 19, 0.72); border-color: rgba(var(--accent-rgb), 0.45);
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 50px -20px rgba(0, 0, 0, 0.8), 0 0 30px -12px rgba(var(--accent-rgb), 0.6);
}
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; font-size: 1.05rem; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 1.9rem; height: 1.15rem; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface); }
.nav-links { display: flex; gap: 1.3rem; margin-left: auto; }
.nav-links a { font-size: 0.9rem; color: var(--text-2); text-decoration: none; transition: color 0.2s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { display: flex; gap: 0.5rem; align-items: center; }
.nav-toggle { display: none; width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; cursor: pointer; position: relative; }
.nav-toggle .bars, .nav-toggle .bars::before, .nav-toggle .bars::after { position: absolute; left: 50%; width: 1rem; height: 1.5px; background: var(--text); transform: translateX(-50%); content: ''; transition: transform 0.3s, opacity 0.2s; }
.nav-toggle .bars { top: 50%; }
.nav-toggle .bars::before { top: -5px; left: 0; transform: none; }
.nav-toggle .bars::after { top: 5px; left: 0; transform: none; }
.nav-toggle[aria-expanded="true"] .bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .bars::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .bars::after { transform: translateY(-5px) rotate(-45deg); }
@media (max-width: 980px) {
  .nav-links { position: fixed; top: 4.2rem; left: 1rem; right: 1rem; flex-direction: column; gap: 0; margin: 0; padding: 0.5rem; border-radius: 18px; background: rgba(14, 16, 19, 0.95); border: 1px solid var(--line-2); backdrop-filter: blur(16px); opacity: 0; transform: translateY(-8px); pointer-events: none; transition: opacity 0.25s, transform 0.3s var(--ease-click); }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 0.8rem 0.9rem; border-radius: 10px; font-size: 1rem; }
  .nav-links a:hover { background: rgba(255, 255, 255, 0.04); }
  .nav-toggle { display: inline-block; }
  .nav-actions { margin-left: auto; }
  .nav-actions .btn-ghost { display: none; }
}

/* --- nit --- */
.thread-layer { position: absolute; top: 0; left: 0; width: 100%; z-index: 1; pointer-events: none; overflow: hidden; }
#thread { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: visible; }
#thread path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* nit v zelene barve loga Thanatolog (#3a8f45), proudi jako voda / vitr */
:root { --flow: #3a8f45; --flow-rgb: 58, 143, 69; --flow-hi: #7fd88a; }
#thread .t-core { stroke: url(#threadGrad); stroke-width: 1.4; }
/* zare: zacatek plynule vybledne (gradient), konce bez zakulaceni, aby nevznikal "ovál" */
#thread .t-glow1 { stroke: url(#threadGrad); stroke-opacity: 0.3; stroke-width: 7; stroke-linecap: butt; }
#thread .t-glow2 { stroke: url(#threadGrad); stroke-opacity: 0.07; stroke-width: 40; stroke-linecap: butt; }
#thread .t-mask { stroke: #fff; stroke-width: 120; }
#threadGrad .g0 { stop-color: var(--flow); stop-opacity: 0; }
#threadGrad .g1, #threadGrad .g2 { stop-color: var(--flow); stop-opacity: 1; }
#thread .t-flow path { stroke-linecap: round; animation: flow linear infinite; }
#thread .t-flow .s0 { stroke: var(--flow); stroke-opacity: 0.8; stroke-width: 2; stroke-dasharray: 90 50 30 70; animation-duration: 6s; }
#thread .t-flow .s1 { stroke: var(--flow); stroke-opacity: 0.6; stroke-width: 1.6; stroke-dasharray: 150 90; animation-duration: 9s; }
#thread .t-flow .s2 { stroke: var(--flow-hi); stroke-opacity: 1; stroke-width: 2.6; stroke-dasharray: 1 23; animation-duration: 4s; }
#thread .t-flow .s3 { stroke: var(--flow-hi); stroke-opacity: 0.85; stroke-width: 1.8; stroke-dasharray: 18 120 4 58; animation-duration: 5s; }
#thread .t-flow .s4 { stroke: var(--flow); stroke-opacity: 0.4; stroke-width: 5; stroke-dasharray: 220 180; animation-duration: 12s; }
#thread .t-flow .s5 { stroke: var(--flow-hi); stroke-opacity: 0.7; stroke-width: 1.4; stroke-dasharray: 60 40 2 48; animation-duration: 7s; }
#thread .t-flow .s6 { stroke: var(--flow); stroke-opacity: 0.35; stroke-width: 8; stroke-dasharray: 300 100; animation-duration: 15s; }
@keyframes flow { to { stroke-dashoffset: -1200; } }
@media (prefers-reduced-motion: reduce) { #thread .t-flow path { animation: none; } }
.tnode {
  position: absolute; z-index: 3; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--bg); border: 1.5px solid rgba(255, 255, 255, 0.22);
  transition: border-color 0.4s, box-shadow 0.4s, background 0.4s;
  pointer-events: none;
}
.tnode::after { content: ''; position: absolute; inset: 2px; border-radius: 50%; background: transparent; transition: background 0.4s; }
.tnode.lit { border-color: var(--flow-hi); box-shadow: 0 0 0 4px rgba(var(--flow-rgb), 0.25), 0 0 22px rgba(var(--flow-rgb), 0.95); }
.tnode.lit::after { background: var(--flow-hi); }

main, .foot { position: relative; z-index: 2; }

/* --- hero --- */
.hero { padding: 9rem 0 6rem; min-height: 100vh; display: flex; align-items: center; }
.hero > .wrap { min-width: 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 4rem; align-items: center; }
.hero h1 { font-weight: 600; font-size: clamp(2.6rem, 6.4vw, 5.6rem); line-height: 0.98; letter-spacing: -0.04em; margin: 0; }
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--text-2); }
.hero-sign { font: 500 0.85rem var(--mono); color: var(--accent); letter-spacing: 0.04em; margin: 1.1rem 0 0; }
.hero-sub { color: var(--text-2); font-size: 1.12rem; max-width: 34rem; margin: 1.4rem 0 2rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 0.7rem; }
.hero-visual { position: relative; perspective: 1400px; }
.hero-visual > .tnode { left: -1.6rem; top: 50%; }
.window { border-radius: 18px; padding: 0 0 1rem; transform: rotateY(-14deg) rotateX(7deg); transform-style: preserve-3d; will-change: transform; }
.win-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--line); font: 500 0.75rem var(--mono); color: var(--text-2); }
.win-bar span { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.win-bar b { font-weight: 500; margin-left: 0.6rem; }
.win-bar .live { margin-left: auto; font-style: normal; color: var(--accent); display: inline-flex; align-items: center; gap: 0.35rem; }
.win-bar .live::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.flow { list-style: none; margin: 0; padding: 1rem 1.1rem 0.4rem; display: grid; gap: 0.15rem; }
.flow li { position: relative; display: flex; align-items: center; gap: 0.8rem; padding: 0.42rem 0.6rem; border-radius: 10px; transition: background 0.4s; }
.flow li::before { content: ''; position: absolute; left: calc(0.6rem + 6px); top: -0.45rem; height: 0.9rem; width: 1px; background: var(--line-2); }
.flow li:first-child::before { display: none; }
.flow li.done::before, .flow li.on::before { background: var(--accent); box-shadow: 0 0 6px var(--accent); }
.flow i { width: 13px; height: 13px; border-radius: 50%; border: 1.5px solid rgba(255, 255, 255, 0.25); flex-shrink: 0; transition: all 0.35s var(--ease-click); }
.flow li.done i { border-color: rgba(var(--accent-rgb), 0.6); background: rgba(var(--accent-rgb), 0.25); }
.flow li.on { background: rgba(var(--accent-rgb), 0.07); }
.flow li.on i { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 14px var(--accent); transform: scale(1.15); }
.flow li a { display: flex; align-items: center; gap: 0.8rem; flex: 1; color: inherit; text-decoration: none; }
.flow li:hover { background: rgba(var(--accent-rgb), 0.1); }
.flow li a:hover strong, .flow li a:focus-visible strong { color: var(--flow-hi); }
.flow li a::after { content: '→'; margin-left: auto; font-size: 0.9rem; color: var(--flow-hi); opacity: 0; transform: translateX(-6px); transition: opacity 0.25s, transform 0.25s; }
.flow li.on a::after, .flow li a:hover::after { opacity: 1; transform: none; }
.flow strong { display: block; font-weight: 600; font-size: 0.95rem; letter-spacing: -0.01em; }
.flow small { display: block; font: 400 0.72rem var(--mono); color: var(--text-3); }
.log { margin: 0.6rem 1.1rem 0; padding: 0.7rem 0.8rem; height: 6.9rem; overflow: hidden; border-radius: 10px; background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); font: 400 0.7rem/1.6 var(--mono); color: var(--text-3); display: flex; flex-direction: column; justify-content: flex-end; }
.log div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logIn 0.4s var(--ease-click); }
.log div b { color: var(--accent); font-weight: 500; }
.log div:last-child { color: var(--text-2); }
@keyframes logIn { from { opacity: 0; transform: translateY(6px); } }
@media (max-width: 900px) {
  .hero { padding: 7.5rem 0 4rem; min-height: 0; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 3rem; }
  .window { transform: none; }
  .hero-visual > .tnode { left: -1.6rem; top: -1.6rem; }
}

/* --- sekce obecne --- */
section { position: relative; }
.section-head { position: relative; display: flex; flex-wrap: wrap; align-items: end; gap: 0.4rem 1rem; margin-bottom: 1.6rem; }
.section-head .eyebrow { width: 100%; margin: 0; }
.section-head h2 { margin: 0; font-weight: 600; font-size: clamp(1.8rem, 3.6vw, 2.6rem); letter-spacing: -0.03em; line-height: 1.05; }
.section-head h2 a { text-decoration: none; }
.section-head h2 a:hover { color: var(--accent); }
.section-head > .tnode { left: -1.6rem; top: 0.4rem; }

/* --- blog --- */
.blog { padding: 3rem 0 4rem; }
.blog-strip { position: relative; }
/* sipky po stranach pasu */
.strip-btn {
  position: absolute; z-index: 3; top: calc(50% - 0.35rem); transform: translateY(-50%);
  display: grid; place-items: center; width: 3.2rem; height: 3.2rem; padding: 0; border-radius: 50%;
  border: 1px solid rgba(var(--flow-rgb), 0.7); background: rgba(14, 16, 19, 0.88); color: var(--flow-hi);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); cursor: pointer;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 18px rgba(var(--flow-rgb), 0.3);
  transition: opacity 0.25s, border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease-click);
}
.strip-btn svg { width: 1.4rem; height: 1.4rem; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.strip-btn.prev { left: -1.2rem; }
.strip-btn.next { right: -1.2rem; }
.strip-btn:hover:not(:disabled) { border-color: var(--flow-hi); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.5), 0 0 26px rgba(var(--flow-rgb), 0.6); }
.strip-btn:active:not(:disabled) { transform: translateY(-50%) scale(0.92); }
.strip-btn:disabled { opacity: 0; pointer-events: none; }
@media (max-width: 760px) {
  .strip-btn { width: 2.8rem; height: 2.8rem; }
  .strip-btn.prev { left: -0.9rem; }
  .strip-btn.next { right: -0.9rem; }
}
.blog-strip-track { display: flex; gap: 1rem; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0.3rem 0.1rem 1rem; scrollbar-width: none; cursor: grab; }
.blog-strip-track::-webkit-scrollbar { display: none; }
.blog-strip-track.dragging { cursor: grabbing; scroll-snap-type: none; }
.blog-strip-track.dragging a { pointer-events: none; }
.post-slide {
  --mx: 50%; --my: 50%; --ga: 0;
  flex: 0 0 min(340px, 84%); scroll-snap-align: start; display: flex; flex-direction: column;
  padding: 1.25rem 1.3rem 1.2rem; border-radius: 16px; text-decoration: none; min-height: 15rem;
  border: 1px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box, radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--accent-rgb), calc(0.55 * var(--ga))), transparent 60%) border-box, linear-gradient(var(--line), var(--line)) border-box;
  transition: --ga 0.3s, transform 0.35s var(--ease-click);
}
.post-slide:hover { --ga: 1; transform: translateY(-3px); }
.post-slide time { font: 500 0.72rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.post-slide h3 { font-weight: 600; font-size: 1.25rem; letter-spacing: -0.02em; line-height: 1.2; margin: 0.6rem 0 0.6rem; }
.post-slide p { margin: 0; color: var(--text-2); font-size: 0.92rem; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.post-slide .more { margin-top: auto; padding-top: 0.9rem; font: 500 0.78rem var(--mono); color: var(--accent); }

/* --- cisla --- */
.stats { padding: 3rem 0 5rem; }
.stats .wrap > .tnode { left: -1.6rem; top: 50%; }
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.8rem; }
.stat { border-radius: 16px; padding: 1.2rem 1.1rem; min-height: 8.5rem; display: flex; flex-direction: column; justify-content: space-between; }
.stat b { font: 500 clamp(1.7rem, 3vw, 2.3rem)/1 var(--mono); letter-spacing: -0.04em; color: var(--text); font-variant-numeric: tabular-nums; }
.stat:first-child b { color: var(--accent); }
.stat span { font-size: 0.85rem; color: var(--text-2); line-height: 1.35; }
@media (max-width: 1000px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- projekty --- */
.project { padding: 7rem 0; }
.project-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4.5rem; align-items: center; }
.project.flip .p-copy { order: 2; }
.p-index { color: var(--accent); }
.project h2 { margin: 0 0 1rem; font-weight: 600; font-size: clamp(2.6rem, 6vw, 4.8rem); letter-spacing: -0.045em; line-height: 0.95; }
.project h2 a { text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size 0.45s var(--ease-click); }
.project h2 a:hover { background-size: 100% 2px; }
.p-body { color: var(--text-2); font-size: 1.1rem; max-width: 33rem; margin: 0 0 1.5rem; }
.chips { list-style: none; padding: 0; margin: 0 0 1.8rem; display: flex; flex-wrap: wrap; gap: 0.45rem; }
.chips a { display: inline-block; padding: 0.38rem 0.8rem; border-radius: 999px; border: 1px solid var(--line-2); font-size: 0.85rem; color: var(--text-2); text-decoration: none; transition: border-color 0.2s, color 0.2s, background 0.2s; }
.chips a:hover { border-color: rgba(var(--accent-rgb), 0.6); color: var(--text); background: rgba(var(--accent-rgb), 0.06); }
.p-link { display: inline-flex; align-items: center; gap: 0.5rem; font: 500 0.9rem var(--mono); color: var(--accent); text-decoration: none; letter-spacing: 0.02em; }
.p-link span { transition: transform 0.35s var(--ease-click); }
.p-link:hover span { transform: translateX(5px); }
.p-visual { position: relative; }
.p-visual > .tnode { left: -1.8rem; top: 50%; }
.project.flip .p-visual > .tnode { left: auto; right: -1.8rem; margin: -6px -6px 0 0; }
.p-visual > a { display: block; border-radius: 22px; overflow: hidden; text-decoration: none; position: relative; }
.p-visual canvas { display: block; width: 100%; height: 100%; }
.orb { aspect-ratio: 1 / 1; background: radial-gradient(circle at 50% 50%, #10141c 0%, var(--surface) 70%) padding-box, radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--accent-rgb), calc(0.55 * var(--ga))), transparent 60%) border-box, linear-gradient(var(--line), var(--line)) border-box !important; }
/* Slunce bez karty: okraje plynule prechazeji do cerne stranky */
.p-visual > a.orb-sun { background: none !important; border: 0; border-radius: 0; overflow: visible; }
.orb-sun canvas {
  transform: scale(1.12);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 36%, rgba(0, 0, 0, 0.6) 54%, transparent 71%);
  mask-image: radial-gradient(circle at 50% 50%, #000 36%, rgba(0, 0, 0, 0.6) 54%, transparent 71%);
}
.wide { aspect-ratio: 16 / 11; background: #050407 padding-box, radial-gradient(260px circle at var(--mx) var(--my), rgba(var(--accent-rgb), calc(0.55 * var(--ga))), transparent 60%) border-box, linear-gradient(var(--line), var(--line)) border-box !important; }
.books { display: grid !important; grid-template-columns: repeat(4, 1fr); gap: 0.8rem; padding: 1.4rem; align-items: end; }
.books img { width: 100%; height: auto; aspect-ratio: 3 / 4.3; object-fit: cover; border-radius: 8px; box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8); transition: transform 0.5s var(--ease-click); }
.books img:nth-child(odd) { transform: translateY(-14px) rotate(-2deg); }
.books img:nth-child(even) { transform: translateY(6px) rotate(2deg); }
.books:hover img { transform: translateY(-4px) rotate(0); }
.logo-card { display: grid !important; place-items: center; padding: 2.4rem; aspect-ratio: 4 / 3; }
.logo-card img { width: min(62%, 300px); height: auto; border-radius: 16px; filter: grayscale(0.15) contrast(1.05); transition: transform 0.6s var(--ease-click); }
.logo-card:hover img { transform: scale(1.04) rotate(-1deg); }
.ticker { display: flex !important; flex-direction: column; gap: 0.9rem; padding: 2rem 2rem 1.8rem; }
.tk-label { font: 500 0.75rem var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-3); }
.tk-value { font: 500 clamp(1.9rem, 4.2vw, 3rem)/1.05 var(--mono); color: var(--accent); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; margin-bottom: 0.6rem; overflow-wrap: anywhere; }
.tk-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-top: 0.75rem; border-top: 1px solid var(--line); }
.tk-row b { font: 500 1.05rem var(--mono); color: var(--text); }
.tk-row small { color: var(--text-2); font-size: 0.85rem; text-align: right; }
.pi-card { display: grid !important; grid-template-rows: auto auto auto; gap: 1.2rem; padding: 2rem; aspect-ratio: 4 / 3; align-content: center; }
.pi-glyph { font: 600 clamp(5rem, 11vw, 8rem)/0.8 var(--head); color: var(--accent); text-shadow: 0 0 40px rgba(var(--accent-rgb), 0.45); }
.pi-digits { font: 400 0.95rem/1.5 var(--mono); color: var(--text-3); white-space: nowrap; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, #000 70%, transparent); mask-image: linear-gradient(90deg, #000 70%, transparent); }
.pi-elements { display: grid; grid-template-columns: repeat(8, 1fr); gap: 0.4rem; }
.pi-elements span { aspect-ratio: 1; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line-2); font: 600 0.95rem var(--head); color: var(--text-2); transition: all 0.4s var(--ease-click); }
.pi-elements span.on { border-color: var(--accent); color: #04130d; background: var(--accent); box-shadow: 0 0 18px rgba(var(--accent-rgb), 0.6); transform: translateY(-3px); }
@media (max-width: 900px) {
  .project { padding: 4.5rem 0; }
  .project-grid { grid-template-columns: 1fr; gap: 2.2rem; }
  .project.flip .p-copy { order: 0; }
  .p-visual > .tnode, .project.flip .p-visual > .tnode { left: -1.6rem; right: auto; top: -1.2rem; margin: -6px 0 0 -6px; }
  .books { padding: 1rem; gap: 0.5rem; }
}

/* --- zaver --- */
.final { padding: 8rem 0 9rem; text-align: center; }
.final-inner { display: flex; flex-direction: column; align-items: center; }
.final h2 { margin: 0; font-weight: 600; font-size: clamp(2.8rem, 8vw, 6rem); letter-spacing: -0.05em; line-height: 0.95; }
.final p { color: var(--text-2); font-size: 1.15rem; max-width: 32rem; margin: 1.2rem 0 4.5rem; }
.final-cta { position: relative; display: grid; place-items: center; width: 280px; height: 280px; }
.final-cta .ring { position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(var(--accent-rgb), 0.15); opacity: 0; transition: opacity 0.8s, box-shadow 0.8s, border-color 0.8s; }
.final-cta.lit .ring { opacity: 1; border-color: rgba(var(--flow-rgb), 0.7); box-shadow: 0 0 60px rgba(var(--flow-rgb), 0.45), inset 0 0 60px rgba(var(--flow-rgb), 0.25); animation: ringPulse 3s ease-in-out infinite; }
@keyframes ringPulse { 50% { box-shadow: 0 0 90px rgba(var(--flow-rgb), 0.6), inset 0 0 70px rgba(var(--flow-rgb), 0.32); } }
.tnode-final { left: 50%; top: 0; }
.final-cta .btn { position: relative; z-index: 2; }

/* --- paticka --- */
.foot { border-top: 1px solid var(--line); padding: 3.5rem 0 2rem; background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015)); }
.foot-cols { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2.2rem 1.5rem; }
.foot h3 { font: 500 0.75rem var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-3); margin: 0 0 1rem; }
.foot h3 a { font-size: inherit; color: var(--flow-hi); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.foot a { color: var(--text-2); text-decoration: none; font-size: 0.88rem; }
.foot a:hover { color: var(--text); }
.foot li.sub { padding-left: 0.75rem; border-left: 1px solid rgba(var(--flow-rgb), 0.45); }
.foot li.sub a { font-size: 0.82rem; color: var(--text-3); }
.foot li.sub a:hover { color: var(--text); }
@media (max-width: 1100px) { .foot-cols { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.foot-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line); font-size: 0.85rem; color: var(--text-3); }
.status { display: inline-flex; align-items: center; gap: 0.55rem; font: 500 0.78rem var(--mono); color: var(--text-2); }
.status .dot { animation: pulse 2s infinite; }
@media (max-width: 700px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* --- vstup sekci: dokud JS nespusti animaci, jsou prvky skryte --- */
.js .reveal [data-r] { opacity: 0; }
.no-anim .reveal [data-r] { opacity: 1 !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.15s !important; }
  .window { transform: none; }
}
