/* =========================================================
   Hookly — autorizované phishingové simulace
   ========================================================= */

/* ---------- font ---------- */

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("assets/fonts/schibsted-grotesk-latin-ext.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, 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: "Schibsted Grotesk";
  src: url("assets/fonts/schibsted-grotesk-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
  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;
}

/* ---------- tokens ---------- */

:root {
  --paper: #F7F8F4;
  --paper-2: #EDEFE9;
  --panel: #FEFFFC;
  --ink: #151719;
  --ink-rgb: 21, 23, 25;
  --text-2: #4B504D;
  --muted: #696E6A;
  --back-stroke: #A9B0AB;
  --coral: #E8543F;
  --coral-bright: #F0684F;
  --coral-deep: #C9432F;
  --coral-text: #B03D2B;
  --signal-soft: #CDD6D0;
  --line: rgba(var(--ink-rgb), 0.16);
  --line-soft: rgba(var(--ink-rgb), 0.08);
  --header-bg: rgba(247, 248, 244, 0.92);
  --header-shadow: rgba(21, 23, 25, 0.035);

  --header-h: 72px;
  --shell: 1180px;
  --radius: 6px;
  --focus-ring: var(--coral-deep);

  --font: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  caret-color: var(--coral-text);
}

::selection {
  background: var(--coral);
  color: var(--ink);
}

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb {
  background: #C9C2B4;
  border: 3px solid var(--paper-2);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover { background: var(--coral); }

html { scrollbar-color: #C9C2B4 var(--paper-2); scrollbar-width: thin; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.06;
  text-wrap: balance;
}

h1 { font-size: clamp(2.3rem, 4.4vw, 4.6rem); letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(1.85rem, 3vw, 2.7rem); }
h3 { font-size: clamp(1.15rem, 1.5vw, 1.4rem); letter-spacing: -0.02em; line-height: 1.2; }

p { margin: 0; }

a { color: inherit; text-underline-offset: 4px; text-decoration-thickness: 1.5px; }

ul, ol { margin: 0; padding: 0; list-style: none; }

[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 3px;
}

.shell {
  width: min(100% - 44px, var(--shell));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  font-weight: 650;
  padding: 10px 18px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top 0.18s ease;
}
.skip-link:focus-visible { top: 12px; }

/* ---------- actions ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font: inherit;
  font-weight: 650;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.btn-primary {
  background: var(--coral);
  color: var(--ink);
}
.btn-primary:hover { background: var(--coral-bright); transform: translateY(-1px); }
.btn-primary:active { transform: none; }

.btn-sm { padding: 10px 18px; font-size: 0.95rem; }

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 4px 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(var(--ink-rgb), 0.4);
  text-underline-offset: 6px;
  text-decoration-thickness: 1.5px;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}
.text-link:hover { color: var(--coral-text); text-decoration-color: var(--coral); }

.inline-link {
  color: inherit;
  font-weight: 650;
  text-decoration: underline;
  text-decoration-color: var(--coral);
  text-underline-offset: 4px;
}
.inline-link:hover { color: var(--coral-text); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s ease;
}
.site-header.is-scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 8px 28px var(--header-shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: var(--header-h);
}

/* logo je maska původního 1:1 souboru, takže funguje i v tmavém režimu */
.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: block;
  width: 88px;
  height: 34px;
  background: var(--ink);
  -webkit-mask: url("assets/hookly-logo.png") center / contain no-repeat;
  mask: url("assets/hookly-logo.png") center / contain no-repeat;
}
.brand-mark::after {
  content: "";
  position: absolute;
  left: 11.5%;
  right: 16.2%;
  bottom: 12%;
  height: 4.4%;
  background: var(--coral);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 40px;
  height: 40px;
  flex: none;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
  view-transition-name: theme-toggle;
}
.theme-toggle:hover { border-color: var(--coral); color: var(--coral-text); }
.theme-toggle svg {
  position: absolute;
  width: 18px;
  height: 18px;
  transition: opacity 0.22s ease, transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
.icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }
.icon-sun { opacity: 0; transform: rotate(-90deg) scale(0.68); }
:root[data-theme="dark"] .icon-moon { opacity: 0; transform: rotate(90deg) scale(0.68); }
:root[data-theme="dark"] .icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}
::view-transition-old(root) { z-index: 9997; }
::view-transition-new(root) { z-index: 9998; }
::view-transition-group(theme-toggle) { z-index: 10001; }
::view-transition-old(theme-toggle) { animation: theme-control-out 0.24s ease-in both; }
::view-transition-new(theme-toggle) { animation: theme-control-in 0.46s cubic-bezier(0.22, 1, 0.36, 1) both; }

@keyframes theme-control-out {
  to { opacity: 0; transform: rotate(55deg) scale(0.76); }
}
@keyframes theme-control-in {
  from { opacity: 0; transform: rotate(-55deg) scale(0.76); }
  to { opacity: 1; transform: rotate(0deg) scale(1); }
}

.site-nav { display: flex; align-items: center; gap: 30px; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-list a {
  text-decoration: none;
  font-size: 1rem;
  font-weight: 550;
  color: var(--ink);
  padding: 9px 4px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.nav-list a:hover { border-bottom-color: var(--coral); color: var(--coral-text); }

.nav-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1.5px solid rgba(var(--ink-rgb), 0.35);
  border-radius: var(--radius);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 9px 16px;
  cursor: pointer;
}
.nav-bars { display: inline-flex; flex-direction: column; gap: 5px; width: 18px; }
.nav-bars span {
  display: block;
  height: 2px;
  background: currentColor;
  transition: transform 0.25s ease;
}
body.nav-open .nav-bars span:first-child { transform: translateY(3.5px) rotate(45deg); }
body.nav-open .nav-bars span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ---------- bands ---------- */

.band { position: relative; padding: clamp(72px, 9vw, 124px) 0; }

.band-paper { background: var(--paper); color: var(--ink); }
.band-tint  { background: var(--paper-2); color: var(--ink); }

.band-paper p, .band-tint p { color: var(--text-2); }
.band-paper h2, .band-tint h2,
.band-paper h3, .band-tint h3 { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  background: var(--paper);
  overflow: clip;
  min-height: calc(100svh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(48px, 7vw, 84px) 0 clamp(56px, 7vw, 88px);
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.06fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
  width: min(100% - 44px, 1280px);
}

.hero h1 { max-width: 640px; }

.hero-lead {
  margin-top: 26px;
  max-width: 46ch;
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.6;
  color: var(--text-2);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 26px;
  margin-top: 36px;
}

.hero-art { position: relative; }
.story { width: 100%; height: auto; display: block; overflow: visible; }

/* ---------- hero illustration ---------- */

.story .ground {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.14);
  stroke-width: 3;
  stroke-linecap: round;
}

.story .shadow { fill: rgba(var(--ink-rgb), 0.06); }

/* končetiny: jedna spojitá linka od ramene přes loket k zápěstí */
.story .limb {
  fill: none;
  stroke: var(--ink);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.story .limb-back { stroke: var(--back-stroke); }

.story .torso {
  fill: none;
  stroke: var(--coral);
  stroke-width: 17;
  stroke-linecap: round;
}
.story .head {
  fill: var(--paper);
  stroke: var(--ink);
  stroke-width: 4;
}
.story .hair { fill: var(--coral); }

/* ruka: zaoblená dlaň navazuje na zápěstí, palec je samostatný tah */
.story .hand .palm,
.story .hand-back .palm {
  fill: var(--ink);
  stroke: var(--ink);
  stroke-width: 2;
  stroke-linejoin: round;
}
.story .hand .thumb,
.story .hand-back .thumb {
  fill: none;
  stroke: var(--ink);
  stroke-width: 4.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.story .hand-back .palm { fill: var(--back-stroke); stroke: var(--back-stroke); }
.story .hand-back .thumb { stroke: var(--back-stroke); }

.story .panel {
  fill: var(--panel);
  stroke: var(--ink);
  stroke-width: 3;
}

/* simulovaná stránka: miniaturní firemní přihlášení */
.story .card-rule {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.16);
  stroke-width: 1.6;
}
.story .card-url { fill: rgba(var(--ink-rgb), 0.07); }
.story .card-demo,
.story .card-title,
.story .card-text,
.story .btn-label {
  font-family: var(--font);
  pointer-events: none;
  user-select: none;
}
.story .card-demo {
  font-size: 5.6px;
  font-weight: 600;
  letter-spacing: 0.06em;
  fill: rgba(var(--ink-rgb), 0.58);
}
.story .card-title {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  fill: var(--ink);
}
.story .card-text {
  font-size: 6.4px;
  font-weight: 500;
  fill: rgba(var(--ink-rgb), 0.62);
}
.story .card-dots circle { fill: rgba(var(--ink-rgb), 0.55); }
.story .field {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.34);
  stroke-width: 1.8;
}
.story .field-hit {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.4;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}
.story .scr-btn { fill: var(--coral-deep); }
.story .btn-label {
  fill: #FFFDF8;
  font-size: 7.4px;
  font-weight: 650;
  letter-spacing: 0.01em;
  opacity: 0;
}
.story .btn-check {
  fill: none;
  stroke: #FFFDF8;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

/* doručený e-mail */
.story .mail-body {
  fill: var(--panel);
  stroke: var(--ink);
  stroke-width: 3;
}
.story .mail-flap {
  fill: none;
  stroke: var(--coral-deep);
  stroke-width: 5;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.story .mail-fold {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.28);
  stroke-width: 2.5;
  stroke-linecap: round;
}

/* report */
.story .clip { fill: var(--coral); }
.story .rep-line { fill: rgba(var(--ink-rgb), 0.28); }
.story .rep-line-title { fill: rgba(var(--ink-rgb), 0.55); }
.story .rep-pill {
  fill: none;
  stroke: var(--coral);
  stroke-width: 2.4;
}
.story .rep-check {
  fill: none;
  stroke: var(--coral);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 0;
}

/* signál: jediná čistá linka, žádné uzly ani koncové kroužky; bez stálé stopy */
.story .sig-head,
.story .sig-tail {
  fill: none;
  stroke: var(--coral);
  stroke-linecap: round;
  opacity: 0;
}
.story .sig-head { stroke-width: 3.2; }
.story .sig-tail { stroke-width: 2.2; }
.story .sig-head-1 { stroke-dasharray: 14 240; stroke-dashoffset: 14; }
.story .sig-tail-1 { stroke-dasharray: 38 240; stroke-dashoffset: 38; }
.story .sig-head-2 { stroke-dasharray: 14 480; stroke-dashoffset: 14; }
.story .sig-tail-2 { stroke-dasharray: 44 480; stroke-dashoffset: 44; }

.story .labels text {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 550;
  fill: var(--muted);
  letter-spacing: -0.01em;
}

/* parallax */
.pl {
  transition: transform 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
  transform: translate(calc(var(--mx, 0) * 9px), calc(var(--my, 0) * 9px));
}
.pl-fg { transform: translate(calc(var(--mx, 0) * 13px), calc(var(--my, 0) * 13px)); }

/* ---------- sekvence (16 s): e-mail → signál → simulovaná stránka → potvrzení → report ---------- */

.seq-mail,
.seq-page,
.seq-board,
.seq-button {
  transform-box: fill-box;
  transform-origin: center;
}

.seq-mail { animation: storyMail 16s cubic-bezier(0.22, 0.61, 0.36, 1) infinite; }
.mail-bob { animation: storyBob 7s ease-in-out infinite alternate; }
.seq-page { animation: storyPage 16s ease-in-out infinite; }
.seq-button { animation: storyButton 16s ease-in-out infinite; }
.seq-board { animation: storyBoard 16s ease-in-out infinite; }

.story .sig-head-1 { animation: storyHead1 16s cubic-bezier(0.3, 0.1, 0.2, 1) infinite, storyFade1 16s linear infinite; }
.story .sig-tail-1 { animation: storyTail1 16s cubic-bezier(0.3, 0.1, 0.2, 1) infinite, storyFadeTail1 16s linear infinite; }
.story .sig-head-2 { animation: storyHead2 16s cubic-bezier(0.45, 0, 0.35, 1) infinite, storyFade2 16s linear infinite; }
.story .sig-tail-2 { animation: storyTail2 16s cubic-bezier(0.45, 0, 0.35, 1) infinite, storyFadeTail2 16s linear infinite; }

.story .field-hit { animation: storyField 16s ease-in-out infinite; }
.story .btn-label { animation: storyLabel 16s ease-in-out infinite; }
.story .btn-check { animation: storyCheck 16s ease-in-out infinite; }
.story .rep-pill,
.story .rep-line-pill { animation: storyPill 16s ease-in-out infinite; }
.story .rep-check { animation: storyRepCheck 16s ease-in-out infinite; }

/* pauza, když je hero mimo obrazovku nebo je záložka skrytá (řídí script.js) */
.hero-art.is-paused .story * { animation-play-state: paused; }

/* e-mail dorazí, dlouho drží a na konci se klidně rozplyne; stálé tvary se nehýbou */
@keyframes storyMail {
  0% { transform: translate(-22px, 0); opacity: 0; }
  5%, 90% { transform: translate(0, 0); opacity: 1; }
  96% { transform: translate(6px, 0); opacity: 0; }
  100% { transform: translate(-22px, 0); opacity: 0; }
}
@keyframes storyBob {
  from { transform: translateY(-3px); }
  to { transform: translateY(3px); }
}

/* signál 1: e-mail → stránka, zpomalí a dosedne do pole */
@keyframes storyHead1 {
  0%, 13% { stroke-dashoffset: 14; }
  25%, 100% { stroke-dashoffset: -92; }
}
@keyframes storyTail1 {
  0%, 13% { stroke-dashoffset: 38; }
  25%, 100% { stroke-dashoffset: -68; }
}
@keyframes storyFade1 {
  0%, 13% { opacity: 0; }
  15%, 24.2% { opacity: 1; }
  27.5%, 100% { opacity: 0; }
}
@keyframes storyFadeTail1 {
  0%, 13% { opacity: 0; }
  16%, 23% { opacity: 0.4; }
  26.5%, 100% { opacity: 0; }
}

/* signál 2: stránka → report, pomalejší a tišší */
@keyframes storyHead2 {
  0%, 44% { stroke-dashoffset: 14; }
  62%, 100% { stroke-dashoffset: -324; }
}
@keyframes storyTail2 {
  0%, 44% { stroke-dashoffset: 44; }
  62%, 100% { stroke-dashoffset: -294; }
}
@keyframes storyFade2 {
  0%, 44% { opacity: 0; }
  46%, 58% { opacity: 0.85; }
  61%, 100% { opacity: 0; }
}
@keyframes storyFadeTail2 {
  0%, 44% { opacity: 0; }
  47%, 57% { opacity: 0.35; }
  60.5%, 100% { opacity: 0; }
}

/* stránka signál přijme: jemné dosednutí, pak potvrzení kliknutí */
@keyframes storyPage {
  0%, 24% { transform: translateY(0); }
  27.5% { transform: translateY(1.8px); }
  32%, 100% { transform: translateY(0); }
}
@keyframes storyField {
  0%, 25% { stroke-dashoffset: 100; opacity: 1; }
  31%, 90% { stroke-dashoffset: 0; opacity: 1; }
  95% { stroke-dashoffset: 0; opacity: 0; }
  95.1%, 100% { stroke-dashoffset: 100; opacity: 0; }
}
@keyframes storyButton {
  0%, 33% { transform: translateY(0) scale(1); }
  35.5% { transform: translateY(1px) scale(0.985); }
  39%, 100% { transform: translateY(0) scale(1); }
}
@keyframes storyLabel {
  0%, 35% { opacity: 0.9; }
  38%, 91% { opacity: 0; }
  96%, 100% { opacity: 0.9; }
}
@keyframes storyCheck {
  0%, 36% { stroke-dashoffset: 100; opacity: 1; }
  42%, 90% { stroke-dashoffset: 0; opacity: 1; }
  95% { stroke-dashoffset: 0; opacity: 0; }
  95.1%, 100% { stroke-dashoffset: 100; opacity: 0; }
}

/* report: signál dorazí, stránka se zlehka zvedne a nález se potvrdí */
@keyframes storyBoard {
  0%, 59% { transform: translateY(0); }
  63% { transform: translateY(-2.5px); }
  69%, 100% { transform: translateY(0); }
}
@keyframes storyPill {
  0%, 61% { opacity: 0; }
  66%, 90% { opacity: 1; }
  95%, 100% { opacity: 0; }
}
@keyframes storyRepCheck {
  0%, 64% { stroke-dashoffset: 100; opacity: 1; }
  70%, 90% { stroke-dashoffset: 0; opacity: 1; }
  95% { stroke-dashoffset: 0; opacity: 0; }
  95.1%, 100% { stroke-dashoffset: 100; opacity: 0; }
}

/* ---------- proč hookly ---------- */

.proc-grid {
  display: grid;
  gap: clamp(36px, 6vw, 84px);
  align-items: start;
}

.proc-copy h2 { max-width: 17ch; }

.lead {
  margin-top: 26px;
  font-size: clamp(1.05rem, 1.35vw, 1.18rem);
  line-height: 1.6;
  max-width: 52ch;
  color: var(--text-2) !important;
}

.proc-notes {
  margin-top: 34px;
  display: grid;
  gap: 22px;
  max-width: 58ch;
}
.proc-notes p {
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.proc-notes strong { color: var(--ink); font-weight: 650; }

/* ---------- ukázka práce: kompaktní automatický karusel ---------- */

.artifact-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 30px;
  padding-bottom: clamp(28px, 3.5vw, 44px);
  border-bottom: 1px solid var(--line);
}
.artifact-tag { color: var(--muted); font-size: 1rem; }

.carousel { margin-top: clamp(34px, 4vw, 56px); }

.carousel-stage { overflow: hidden; }

.carousel-track {
  display: flex;
  transition: transform 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(24px, 3vw, 44px);
}

.carousel-figure {
  grid-column: 1 / span 5;
  margin: 0;
  min-width: 0;
  max-width: 500px;
}

.art-cap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 20px;
  margin-bottom: 14px;
}
.art-kind {
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--ink);
}
.art-note {
  font-size: 0.92rem;
  color: var(--coral-text);
  text-decoration: underline;
  text-decoration-color: rgba(232, 84, 63, 0.55);
  text-underline-offset: 4px;
}

/* Miniatura e-mailu: velký dokument je zmenšený uvnitř kompaktního rámu. */
.carousel-frame {
  position: relative;
  height: 500px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-2);
  box-shadow: 0 18px 50px rgba(24, 23, 20, 0.07);
}

.carousel-preview {
  position: absolute;
  top: 0;
  left: 50%;
  display: block;
  width: 680px;
  height: 1080px;
  margin-left: -340px;
  border: 0;
  background: var(--paper-2);
  pointer-events: none;
  transform: scale(0.46);
  transform-origin: top center;
}

.slide-side {
  grid-column: 7 / span 6;
  margin-top: clamp(42px, 5vw, 74px);
  display: grid;
  gap: clamp(28px, 3vw, 40px);
  align-content: start;
  max-width: 610px;
}

.slide-context {
  font-size: 1rem;
  line-height: 1.55;
}

.art-block { border-top: 1px solid var(--line); padding-top: 18px; }
.art-block .art-kind { display: block; margin-bottom: 14px; }

.rule-list { display: grid; gap: 12px; margin: 0; padding: 0; }

.rule-list li {
  position: relative;
  padding-left: 30px;
  color: var(--text-2);
  font-size: 1rem;
  line-height: 1.5;
}
.rule-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 16px;
  height: 1.5px;
  background: var(--coral);
}

/* ovládání karuselu */
.carousel-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 20px;
  margin-top: clamp(20px, 2.5vw, 30px);
}

.carousel-arrows { display: flex; gap: 10px; }

.carousel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--back-stroke);
  border-radius: 50%;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.carousel-arrow:hover { background: var(--panel); border-color: var(--ink); }

.carousel-dots { display: flex; align-items: center; gap: 1px; }

.carousel-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.carousel-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--back-stroke);
  transition: background-color 0.2s ease, transform 0.2s ease;
}
.carousel-dot:hover::before { background: var(--muted); }
.carousel-dot[aria-current="true"]::before {
  background: var(--coral);
  transform: scale(1.35);
}

.carousel-auto {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 156px;
}

.carousel-progress {
  position: relative;
  display: block;
  width: 72px;
  height: 2px;
  overflow: hidden;
  background: var(--line);
}

.carousel-progress > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--coral);
  transform: scaleX(0);
  transform-origin: left center;
}

.carousel-progress > span.is-running {
  animation: carousel-progress 6500ms linear forwards;
}

@keyframes carousel-progress {
  to { transform: scaleX(1); }
}

.carousel-toggle {
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 0.2s ease;
}
.carousel-toggle:hover { color: var(--ink); }

.carousel-counter {
  margin: 0 0 0 auto;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ---------- služby: jedna souvislá systémová cesta ---------- */

.services { overflow: clip; }

.services-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 18px 40px;
  margin-bottom: clamp(34px, 5vw, 62px);
}
.services-head h2 { max-width: 18ch; }
.services-head > p {
  max-width: 36ch;
  padding-bottom: 4px;
  color: var(--muted);
  font-size: 1rem;
}

.chapter {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(24px, 3vw, 44px);
  row-gap: 22px;
  align-items: start;
  border-top: 1px solid var(--line);
  padding: clamp(38px, 4.8vw, 64px) 0;
}

.chapter:first-of-type { border-top-color: var(--ink); }

.chapter-fig {
  position: relative;
  min-height: 168px;
  display: grid;
  place-items: center;
  isolation: isolate;
}
.chapter-fig::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(var(--line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-soft) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 20%, transparent 72%);
}
.chapter-fig svg { width: 100%; height: auto; max-width: 218px; display: block; }
.fig-line {
  fill: none;
  stroke: rgba(var(--ink-rgb), 0.58);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.fig-accent {
  fill: none;
  stroke: var(--coral-text);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.chapter-b .fig-accent rect { fill: rgba(232, 84, 63, 0.14); }
.chapter-a .fig-accent circle { fill: var(--coral); stroke: none; }
.chapter-c .fig-accent circle { fill: var(--coral); stroke: none; }
.chapter-c .retest-loop { stroke-dasharray: 42; stroke-dashoffset: 0; }

.chapter h3 { margin-bottom: 14px; }
.chapter p { max-width: 56ch; }

.chapter-a .chapter-fig { grid-column: 1 / span 3; }
.chapter-a .chapter-body { grid-column: 5 / span 6; }
.chapter-a h3,
.chapter-b h3,
.chapter-c h3 { font-size: clamp(1.45rem, 2.15vw, 1.9rem); letter-spacing: -0.03em; }

.chapter-b .chapter-body { grid-column: 2 / span 4; }
.chapter-b .chapter-fig { grid-column: 8 / span 3; justify-self: end; }
.chapter-b .chapter-fig svg { max-width: 190px; }
.chapter-b p { font-size: 1.02rem; }

.chapter-c .chapter-fig { grid-column: 1 / span 3; }
.chapter-c .chapter-body { grid-column: 5 / span 7; }
.chapter-meta {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--text-2) !important;
  border-top: 1px solid var(--line);
  padding-top: 14px;
  max-width: 46ch;
}

/* ---------- proces ---------- */

.process-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px 30px;
  margin-bottom: clamp(34px, 4vw, 54px);
}
.process-head p { color: var(--muted); max-width: 46ch; }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(22px, 3vw, 38px);
}

.steps::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--line);
}

.step {
  position: relative;
  padding-top: 64px;
}
.step-num {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 0.83rem;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.step:first-child .step-num { border-color: var(--coral); color: var(--coral-text); }
.step h3 { margin-bottom: 10px; }
.step p { color: var(--text-2); font-size: 1rem; }

/* ---------- kontakt ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: clamp(36px, 6vw, 76px);
  align-items: start;
}

.contact-copy h2 { max-width: 12ch; }

.contact-lead {
  margin-top: 24px;
  font-size: clamp(1.05rem, 1.35vw, 1.18rem);
  line-height: 1.6;
  color: var(--text-2);
  max-width: 42ch;
}

.contact-facts { margin-top: 30px; display: grid; gap: 14px; }
.contact-facts li {
  padding-left: 26px;
  position: relative;
  color: var(--text-2);
}
.contact-facts li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.7em;
  width: 14px;
  height: 2px;
  background: var(--coral);
}

/* formulář otevřeně na stránce — jen vlasová linka, žádná krabička */
.contact-panel {
  border-top: 2px solid var(--ink);
  padding-top: clamp(22px, 3vw, 32px);
}

.form-notice {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  padding-top: 14px;
  margin-bottom: 26px;
}

.form-title { margin-bottom: 22px; }

.form { display: grid; gap: 18px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.field-group { display: grid; gap: 8px; }
.field-group label { font-size: 0.95rem; font-weight: 600; color: var(--ink); }
.field-group .opt { color: var(--muted); font-weight: 450; }

.field-group input,
.field-group select,
.field-group textarea {
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  border: 1.5px solid rgba(var(--ink-rgb), 0.28);
  border-radius: var(--radius);
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}
.field-group textarea { resize: vertical; min-height: 92px; }

.field-group input::placeholder,
.field-group textarea::placeholder { color: var(--muted); }

.field-group input:hover,
.field-group select:hover,
.field-group textarea:hover { border-color: rgba(var(--ink-rgb), 0.55); }

.field-group input:focus-visible,
.field-group select:focus-visible,
.field-group textarea:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 2px;
  border-color: var(--coral);
}

.field-group select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
                    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 21px) 55%, calc(100% - 15px) 55%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 42px;
}
.field-group select option { background: var(--panel); color: var(--ink); }

.form-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 22px;
  margin-top: 6px;
}

.form-done h3 { margin-bottom: 18px; }
.form-done:focus-visible { outline: 3px solid var(--coral); outline-offset: 6px; }

.summary { display: grid; gap: 0; margin-bottom: 26px; }
.summary div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 6px 20px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}
.summary dt { font-weight: 650; color: var(--ink); font-size: 0.97rem; }
.summary dd { margin: 0; color: var(--text-2); font-size: 0.97rem; overflow-wrap: anywhere; }

.form-reset { min-height: 40px; }

.form-done-text { color: var(--text-2); margin-bottom: 22px; }

.field-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: start;
}
.field-consent input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--coral-deep);
}
.field-consent input:focus-visible { outline: 3px solid var(--coral); outline-offset: 2px; }
.field-consent label { font-size: 0.95rem; line-height: 1.5; color: var(--text-2); }

.form-error {
  color: var(--coral-text);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
}

.field-group [aria-invalid="true"] { border-color: var(--coral-text); }

.btn[disabled] { opacity: 0.6; cursor: progress; transform: none; }

/* ---------- footer ---------- */

.site-footer {
  background: var(--paper-2);
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding: clamp(44px, 5vw, 64px) 0 34px;
}

.footer-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.footer-brand { position: relative; }
.footer-mark { width: 78px; height: 30px; margin-bottom: 18px; }
.footer-brand p { color: var(--text-2); max-width: 34ch; }

.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: flex-start; }
.footer-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 550;
  border-bottom: 2px solid transparent;
  padding-bottom: 8px;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.footer-nav a:hover { border-bottom-color: var(--coral); color: var(--coral-text); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding-top: 24px;
  font-size: 0.93rem;
}

/* ---------- úvodní otevření stránky ---------- */

html.intro-pending { overflow: hidden; }
html.intro-seen .intro { display: none; }

.intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
}
.intro-panel {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50.5%;
  background: var(--paper-2);
}
.intro-panel-left {
  left: 0;
  animation: intro-panel-left 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards 2.1s;
}
.intro-panel-right {
  right: 0;
  animation: intro-panel-right 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards 2.1s;
}
.intro-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  animation: intro-center-out 0.3s ease forwards 2s;
}
.intro-logo {
  font-family: var(--font);
  font-size: clamp(42px, 7vw, 76px);
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  opacity: 0;
  transform: translateY(14px);
  animation: intro-logo-in 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards 0.15s;
}
.intro-line {
  position: relative;
  display: block;
  width: min(360px, 66vw);
  height: 4px;
}
.intro-line i {
  position: absolute;
  top: 0;
  width: 50%;
  height: 100%;
  background: var(--coral);
}
.intro-line-l {
  left: 0;
  transform-origin: right center;
  transform: scaleX(0);
  animation: intro-draw-left 0.5s ease forwards 0.9s,
    intro-line-out-left 0.55s cubic-bezier(0.76, 0, 0.24, 1) forwards 1.5s;
}
.intro-line-r {
  right: 0;
  transform-origin: left center;
  transform: scaleX(0);
  animation: intro-draw-right 0.5s ease forwards 0.9s,
    intro-line-out-right 0.55s cubic-bezier(0.76, 0, 0.24, 1) forwards 1.5s;
}

@keyframes intro-panel-left { to { transform: translateX(-100%); } }
@keyframes intro-panel-right { to { transform: translateX(100%); } }
@keyframes intro-center-out { to { opacity: 0; } }
@keyframes intro-logo-in { to { opacity: 1; transform: none; } }
@keyframes intro-draw-left { to { transform: scaleX(1); } }
@keyframes intro-draw-right { to { transform: scaleX(1); } }
@keyframes intro-line-out-left {
  from { transform: translateX(0) scaleX(1); }
  to { transform: translateX(-320%) scaleX(1); }
}
@keyframes intro-line-out-right {
  from { transform: translateX(0) scaleX(1); }
  to { transform: translateX(320%) scaleX(1); }
}

/* ---------- volitelné tmavé téma ---------- */

:root[data-theme="dark"] {
  color-scheme: dark;
  --paper: #121413;
  --paper-2: #1A1D1B;
  --panel: #202421;
  --ink: #F3F5F1;
  --ink-rgb: 243, 245, 241;
  --text-2: #C2C7C3;
  --muted: #9BA29D;
  --back-stroke: #747D78;
  --coral-text: #FF8879;
  --signal-soft: #35403A;
  --header-bg: rgba(18, 20, 19, 0.9);
  --header-shadow: rgba(0, 0, 0, 0.24);
}

:root[data-theme="dark"] ::selection { color: #151719; }
:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: #515954;
  border-color: var(--paper-2);
}
:root[data-theme="dark"] .carousel-frame { box-shadow: 0 18px 50px rgba(0, 0, 0, 0.22); }
:root[data-theme="dark"] .btn-primary { color: #151719; }

/* ---------- responsive ---------- */

@media (max-width: 1040px) {
  .contact-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps::before { display: none; }

  .carousel-figure { grid-column: 1 / span 6; }
  .slide-side { grid-column: 7 / span 6; margin-top: 44px; }

  .chapter-a .chapter-body,
  .chapter-b .chapter-body,
  .chapter-c .chapter-body { grid-column: 1 / span 7; }
  .chapter-a .chapter-fig { grid-column: 9 / span 4; }
  .chapter-b .chapter-fig { grid-column: 9 / span 4; }
  .chapter-c .chapter-fig { grid-column: 9 / span 4; }
}

/* hero zůstává ve dvou sloupcích od ~740px, kompaktnější */
@media (min-width: 740px) and (max-width: 1040px) {
  .hero {
    min-height: calc(100svh - var(--header-h));
    padding: clamp(36px, 4.5vw, 60px) 0 clamp(40px, 4.5vw, 64px);
  }
  .hero-grid {
    grid-template-columns: 46fr 54fr;
    gap: clamp(24px, 3vw, 44px);
  }
  .hero h1 { max-width: none; }
  .hero-art { max-width: 100%; justify-self: end; }
}

@media (max-width: 739px) {
  .hero { min-height: 0; padding: clamp(36px, 8vw, 56px) 0 clamp(40px, 8vw, 60px); }
  .hero-grid { grid-template-columns: 1fr; gap: clamp(22px, 4vw, 30px); }
  .hero h1 { max-width: 20ch; }
  .hero-art { max-width: 620px; }
  .story .labels text { font-size: 18px; }
  .carousel-figure { grid-column: 1 / -1; width: 100%; max-width: 500px; }
  .slide-side { grid-column: 1 / -1; margin-top: 34px; }
  .carousel-frame { height: 455px; }
  .carousel-preview { transform: scale(0.42); }
  .carousel-counter { width: auto; }
}

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }

  .site-nav {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    z-index: 99;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 14px 22px 26px;
    transform: translateY(-14px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s;
  }
  body.nav-open .site-nav {
    transform: none;
    opacity: 1;
    visibility: visible;
  }
  body.nav-open { overflow: hidden; }

  .nav-list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav-list a {
    display: block;
    padding: 15px 2px;
    font-size: 1.15rem;
    border-bottom: 1px solid var(--line);
  }
  .nav-list a:hover { border-bottom-color: var(--coral); }
  .nav-cta { margin-top: 18px; text-align: center; }
}

@media (max-width: 760px) {
  .field-row { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; gap: 0; }
  .steps::before {
    display: block;
    top: 20px;
    bottom: 38px;
    left: 20px;
    right: auto;
    width: 1px;
    height: auto;
  }
  .step { min-height: 126px; padding: 4px 0 34px 64px; }

  .summary div { grid-template-columns: 1fr; gap: 2px; }

  .chapter {
    grid-template-columns: 1fr;
    row-gap: 18px;
  }
  .chapter-a .chapter-fig,
  .chapter-b .chapter-fig,
  .chapter-c .chapter-fig,
  .chapter-a .chapter-body,
  .chapter-b .chapter-body,
  .chapter-c .chapter-body { grid-column: 1 / -1; }
  .chapter-b .chapter-fig { order: -1; justify-self: start; }
  .chapter-fig svg { max-width: 170px; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 36px, var(--shell)); }
  .hero-grid { width: min(100% - 36px, 1280px); }

  .hero-actions { flex-direction: column; align-items: stretch; gap: 6px; }
  .hero-actions .btn { width: 100%; }
  .hero-actions .text-link { justify-content: center; }

  .artifact-head { flex-direction: column; align-items: flex-start; }
  .process-head { flex-direction: column; align-items: flex-start; }
  .footer-top { flex-direction: column; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.intro-pending { overflow: auto; }
  .intro { display: none !important; }

  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .pl, .pl-fg { transform: none !important; }

  /* hero scéna se neotáčí: ukáže klidový, kompletní stav (e-mail → stránka → report) */
  .seq-mail, .mail-bob, .seq-page, .seq-button, .seq-board,
  .story .sig-head, .story .sig-tail,
  .story .field-hit, .story .btn-label, .story .btn-check,
  .story .rep-pill, .story .rep-line-pill, .story .rep-check {
    animation: none !important;
  }
  .story .sig-head, .story .sig-tail { opacity: 0; }
  .story .field-hit, .story .btn-check, .story .rep-check { stroke-dashoffset: 0; opacity: 1; }
  .story .btn-label { opacity: 0; }
  .story .rep-pill, .story .rep-line-pill { opacity: 1; }
}
