/* site.css — reset + sekce stránky `/` (fáze 3, plán 02). Barvy/spacing/typografie
   POUZE přes tokens.css custom properties (WORKFLOW Tvrdé pravidlo 15) — žádné
   magické hex/px/font-weight hodnoty tady. */

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

/* Atribut hidden musí vždy vyhrát. Sekce .video-poster/.video-gate/.video-player mají
   display:flex, které by jinak přebilo UA pravidlo [hidden]{display:none} (stejná
   specificita, autorský styl vyhrává nad UA). Bez tohohle zůstane overlay "Video se
   načítá" viditelný přes poster/gate od načtení stránky a gate nejde odkliknout. */
[hidden] {
  display: none !important;
}

html {
  scroll-behavior: auto;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  color: var(--text);
  font-family: var(--font-sans);
  font-weight: var(--font-weight-normal);
  font-size: var(--text-lg);
  line-height: var(--leading-normal);
  background-color: var(--bg);
  background-image: radial-gradient(ellipse 80% 50% at 50% -4%, var(--glow-color) 0%, transparent 74%);
  -webkit-font-smoothing: antialiased;
}

/* Světlá stránka `/` (fáze 2, SCHVÁLENÁ 12.7.2026) — viz DESIGN-PLAYBOOK.md */
body.page-light {
  color: var(--ink);
  background-color: var(--page-bg);
  background-image: none;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; }

.hp-field {
  position: absolute; width: var(--hidden-size); height: var(--hidden-size);
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ============ GRAIN + VINĚTA (podpis brandu, dvouregistrový: papír vs. film) ============
   z-index musí být NAD obsahem sekcí — nalezený bug (02-01-SMER.md): sekce mají
   neprůhledné pozadí a vyšší z-index, jinak se grain/vignette nikdy nevykreslí. */
.page-light .grain {
  position: fixed; inset: 0; pointer-events: none; z-index: var(--z-page-grain);
  opacity: var(--grain-opacity-page);
  mix-blend-mode: overlay;
  background-repeat: repeat;
  background-size: var(--grain-size) var(--grain-size);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page-light .vignette {
  position: fixed; inset: 0; pointer-events: none; z-index: var(--z-page-vignette);
  background:
    radial-gradient(ellipse at 50% 100%, var(--page-vignette-shadow), transparent 65%),
    linear-gradient(to bottom, var(--page-vignette-glow), transparent 30%);
}

/* ============ SKELETON LOADER ============ */
.skeleton {
  position: fixed; inset: 0; z-index: var(--z-skeleton);
  background: var(--page-bg);
  display: flex; align-items: flex-start; justify-content: center;
  padding: var(--space-7) var(--space-5);
  transition: opacity var(--duration-base) var(--ease-reveal);
}
.skeleton-inner { width: 100%; max-width: var(--content-max-width); margin-top: var(--space-6); }
.skeleton-block {
  border-radius: var(--radius-sm);
  background: linear-gradient(100deg, var(--page-surface-1) 30%, var(--page-surface-2) 45%, var(--page-surface-1) 60%);
  background-size: 220% 100%;
  animation: skeleton-shimmer 1.3s ease-in-out infinite;
  margin-bottom: var(--space-4);
}
.skeleton-eyebrow { width: 55%; height: var(--skeleton-eyebrow-h); border-radius: var(--radius-sm); }
.skeleton-headline { width: 100%; height: var(--skeleton-headline-h); }
.skeleton-headline-short { width: 72%; }
.skeleton-video {
  width: 100%; aspect-ratio: 16 / 9; height: auto; border-radius: var(--radius-xl);
  /* Náznak tmavého ostrova od prvního renderu — VSL sekce je tmavá ve všech stavech. */
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-1) 45%, var(--surface-2) 60%);
  background-size: 220% 100%;
}
.skeleton-button { width: 45%; height: var(--touch-target-min); border-radius: var(--radius-md); }
@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -20% 0; }
}
.skeleton-hide { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .skeleton { display: none !important; }
}

/* ============ LAYOUT ZÁKLAD / STŘÍDÁNÍ SEKCÍ ============ */
.site-header, main section, footer {
  position: relative; z-index: var(--z-content);
  padding: var(--space-10) var(--space-5);
}
.site-header { padding-top: var(--space-8); padding-bottom: var(--space-8); background: var(--page-bg); }
.section-alt-a { background: var(--page-bg); }
.section-alt-b { background: var(--page-surface-1); }
.inner { max-width: var(--content-max-width); margin: 0 auto; }

/* ============ EYEBROW / H1 / SUBHEAD ============ */
.eyebrow {
  font-family: var(--font-sans); font-weight: var(--font-weight-heading); font-size: var(--text-xs);
  text-transform: uppercase; letter-spacing: var(--tracking-wide);
  color: var(--stone); margin: 0 0 var(--space-4);
}
h1 {
  font-family: var(--font-serif); font-weight: var(--font-weight-heading);
  font-size: var(--text-h1); line-height: var(--leading-tight);
  margin: 0 0 var(--space-5); color: var(--ink);
}
.h1-rule { width: var(--rule-width); height: var(--rule-height); background: var(--gold); border: 0; margin: 0 0 var(--space-6); }
.subheadline {
  font-size: var(--text-subheadline); line-height: var(--leading-relaxed);
  color: var(--ink); margin: 0; max-width: 52ch;
}
h2 {
  font-family: var(--font-serif); font-weight: var(--font-weight-heading); font-size: var(--text-h2);
  line-height: var(--leading-snug); margin: 0 0 var(--space-7); color: var(--ink);
}
h2.video-heading { font-size: var(--text-h2-video); margin: 0 0 var(--space-6); }
h3 { font-family: var(--font-sans); font-weight: var(--font-weight-heading); font-size: var(--text-h3); margin: 0 0 var(--space-2); color: var(--ink); }

/* ============ VSL SEKCE ============
   Signature prvek (02-01-SMER.md, kandidát A): video-container je trvalý tmavý
   „ostrov“ ve VŠECH třech stavech (poster/gate/player), ne jen po odemčení.
   Čerpá přímo z tmavé palety (--bg/--surface-1/--surface-2/--text/--text-muted/
   --accent), ne z paralelní sady — viz tokens.css. */
.vsl-wrap { max-width: var(--vsl-max-width); margin: 0 auto; }
.video-container {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: var(--radius-xl); overflow: hidden;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
  border: var(--border-hairline) solid var(--surface-1);
  box-shadow: 0 0 0 0 transparent;
  transition: border-color var(--duration-reveal) var(--ease-reveal), box-shadow var(--duration-reveal) var(--ease-reveal);
}
@media (prefers-reduced-motion: reduce) {
  .video-container { transition: none; }
}
.video-container.unlocked {
  /* Zlaté odemčení, dotek 3 z 3: potvrzující lem po odeslání gate formuláře. */
  border-color: var(--gold);
  box-shadow: 0 0 var(--space-7) var(--space-1) var(--gold-glow);
}
.video-grain {
  position: absolute; inset: 0; pointer-events: none; z-index: var(--z-video-grain);
  opacity: var(--grain-opacity);
  mix-blend-mode: overlay;
  background-repeat: repeat;
  background-size: var(--grain-size) var(--grain-size);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.4 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.video-poster {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
}
.play-button {
  /* Zlaté odemčení, dotek 1 z 3: gold prstenec kolem play tlačítka = pozvání. */
  width: var(--play-button-size); height: var(--play-button-size); border-radius: 50%;
  background: var(--bg); color: var(--accent);
  border: var(--border-hairline) solid var(--gold); display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform var(--duration-fast) var(--ease-reveal);
  box-shadow: 0 0 0 var(--space-2) var(--gold-ring);
}
.play-button:hover { transform: scale(1.06); }
.play-button:focus-visible { outline: var(--focus-outline-width) solid var(--gold); outline-offset: var(--focus-outline-offset); }
.play-button svg { width: var(--play-icon-size); height: var(--play-icon-size); margin-left: var(--space-1); }
.video-poster-label {
  position: absolute; bottom: var(--space-4); left: var(--space-4); right: var(--space-4);
  font-size: var(--text-sm); color: var(--text-muted); background: var(--label-scrim);
  padding: var(--space-2) var(--space-3); border-radius: var(--radius-sm); display: inline-block; width: fit-content;
}
.video-gate {
  position: absolute; inset: 0; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: var(--space-5);
}
.gate-form { width: 100%; max-width: var(--gate-form-max-width); }
.gate-form p.gate-intro { font-size: var(--text-base); color: var(--text-muted); margin: 0 0 var(--space-4); }
.gate-form label { display: block; font-size: var(--text-sm); color: var(--text-muted); margin-bottom: var(--space-3); }
.gate-form input {
  width: 100%; margin-top: var(--space-2); padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm); border: var(--border-hairline) solid var(--gold-border-soft);
  background: var(--surface-2); font-family: var(--font-sans); font-size: var(--text-md); color: var(--text);
}
.gate-form input:focus { outline: var(--focus-outline-width) solid var(--gold); outline-offset: var(--border-hairline); }
.gate-submit {
  /* Zlaté odemčení, dotek 2 z 3: jediné tlačítko na stránce v gold, okamžik závazku. */
  width: 100%; padding: var(--space-3); border: none; border-radius: var(--radius-md);
  background: var(--gold); color: var(--bg);
  font-family: var(--font-sans); font-weight: var(--font-weight-heading); font-size: var(--text-md); cursor: pointer;
  margin-top: var(--space-1);
}
.gate-submit:disabled { opacity: 0.6; cursor: progress; }
.gate-submit:focus-visible { outline: var(--focus-outline-width) solid var(--text); outline-offset: var(--focus-outline-offset); }
.video-player {
  position: absolute; inset: 0; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--accent); gap: var(--space-3); padding: var(--space-5); text-align: center;
}
.video-player .player-frame { position: absolute; inset: 0; }
.video-player .player-frame iframe { width: 100%; height: 100%; border: 0; }
.video-player p { margin: 0; font-size: var(--text-base); color: var(--accent); opacity: 0.85; }

/* Statický „video se připravuje" stav (/potvrzeno, V2 zatím neexistuje): jen text, žádné
   tlačítko, žádný fetch. Uvnitř .video-poster, dědí jeho flex centrování. */
.video-placeholder-text {
  margin: 0; max-width: 34ch; text-align: center;
  font-size: var(--text-base); color: var(--text-muted); padding: 0 var(--space-5);
}

.form-error {
  color: var(--gold); font-size: var(--text-sm); margin: var(--space-2) 0 0;
}

.chapters { list-style: none; margin: var(--space-5) 0 0; padding: 0; border-top: var(--border-hairline) solid var(--page-surface-2); }
.chapter-item { border-bottom: var(--border-hairline) solid var(--page-surface-2); }
.chapter-item[aria-current="true"] .chapter-button { color: var(--ink); background: var(--page-surface-1); }
.chapter-button {
  width: 100%; display: flex; justify-content: space-between; gap: var(--space-3);
  background: none; border: none; text-align: left; cursor: pointer;
  padding: var(--space-3) var(--space-2); font-size: var(--text-base); color: var(--text-faint);
}
.chapter-button:hover { background: var(--page-surface-1); }
.chapter-button:focus-visible { outline: var(--focus-outline-width) solid var(--gold); outline-offset: calc(-1 * var(--border-hairline)); }
.chapter-name { flex: 1; }
.chapter-num {
  /* Typografická mikro-hierarchie (02-01-SMER.md, kandidát D): číslo nese
     reálné pořadí videa, ne dekorace — oddělené do vlastního gold serif spanu. */
  font-family: var(--font-serif); color: var(--gold); font-weight: var(--font-weight-heading);
}
.chapter-time { color: var(--stone); font-variant-numeric: tabular-nums; }
.current-chapter-label { margin-top: var(--space-3); font-size: var(--text-sm); color: var(--stone); min-height: 1.2em; }

.cta-button {
  display: inline-block; margin-top: var(--space-7); padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md); background: var(--ink); color: var(--accent);
  font-family: var(--font-sans); font-weight: var(--font-weight-heading); font-size: var(--text-lg); text-decoration: none;
  text-align: center; min-height: var(--touch-target-min);
}
.cta-microcopy { margin: var(--space-3) 0 0; font-size: var(--text-sm); color: var(--text-faint); }
.cta-block { text-align: center; }

/* ============ SOCIAL PROOF ============ */
.hidden-until-testimonial { display: none; }
.testimonial-grid { display: grid; gap: var(--space-6); grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .testimonial-grid { grid-template-columns: repeat(3, 1fr); }
}
.testimonial-card { background: var(--page-surface-2); border-radius: var(--radius-lg); padding: var(--space-6); }
.placeholder-tag {
  font-size: var(--text-xs); font-weight: var(--font-weight-heading); letter-spacing: var(--tracking-normal);
  color: var(--stone); margin: 0 0 var(--space-3); text-transform: uppercase;
}
.testimonial-card blockquote { margin: 0 0 var(--space-4); font-size: var(--text-base); color: var(--ink); line-height: var(--leading-normal); }
.testimonial-name { margin: 0; font-weight: var(--font-weight-heading); font-size: var(--text-md); }
.testimonial-context { margin: var(--space-1) 0 0; font-size: var(--text-sm); color: var(--text-faint); }

/* ============ PROCES ============ */
.steps { display: grid; gap: var(--space-7); grid-template-columns: 1fr; }
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  /* 3-položkový variant (potvrzeno.njk „co si připravit", diky.njk „co s tím teď"):
     stejná grid mechanika jako .steps, jiný počet sloupců, ať nezbyde prázdná mezera. */
  .steps-3 { grid-template-columns: repeat(3, 1fr); }
}
.step-number {
  display: inline-block; font-family: var(--font-serif); font-weight: var(--font-weight-heading); font-size: var(--text-step-num);
  color: var(--gold); margin-bottom: var(--space-2);
}
.step p { margin: 0; font-size: var(--text-base); color: var(--text-faint); }

/* ============ FAQ ============ */
.faq-list { border-top: var(--border-hairline) solid var(--page-surface-2); }
.faq-list details { border-bottom: var(--border-hairline) solid var(--page-surface-2); padding: var(--space-4) 0; }
.faq-list summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
  align-items: center; gap: var(--space-3);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:focus-visible { outline: var(--focus-outline-width) solid var(--gold); outline-offset: var(--focus-outline-offset); }
.faq-list summary h3 { margin: 0; font-size: var(--text-lg); }
.faq-marker {
  color: var(--gold); font-size: var(--text-h3); flex-shrink: 0; display: inline-block;
  transition: transform var(--duration-fast) var(--ease-reveal);
}
.faq-list details[open] .faq-marker { transform: rotate(45deg); }
.faq-list p { margin: var(--space-3) 0 0; font-size: var(--text-base); color: var(--text-faint); max-width: 64ch; }

/* ============ APLIKACE ============ */
.application-form { max-width: var(--vsl-max-width); }
.application-subheadline { margin-bottom: var(--space-7) !important; }
.step-label {
  font-size: var(--text-xs); font-weight: var(--font-weight-heading); letter-spacing: var(--tracking-wide);
  text-transform: uppercase; color: var(--stone); margin: 0 0 var(--space-4);
}
.application-form label { display: block; margin-bottom: var(--space-5); font-size: var(--text-md); color: var(--stone); }
.application-form input[type="text"],
.application-form input[type="email"],
.application-form textarea {
  width: 100%; margin-top: var(--space-2); padding: var(--space-3) var(--space-3);
  border-radius: var(--radius-sm); border: var(--border-hairline) solid var(--page-surface-2);
  background: var(--page-surface-2); font-family: var(--font-sans); font-size: var(--text-md); color: var(--ink); resize: vertical;
}
.application-form input:focus,
.application-form textarea:focus { outline: var(--focus-outline-width) solid var(--gold); outline-offset: var(--border-hairline); }
.application-form textarea { min-height: calc(var(--space-10) * 1.6); }
.radio-group { margin-bottom: var(--space-6); }
.radio-group > span { display: block; font-size: var(--text-md); color: var(--stone); margin-bottom: var(--space-3); }
.radio-option { display: flex; align-items: center; gap: var(--space-2); font-size: var(--text-base); margin-bottom: var(--space-2); color: var(--ink); }
.application-submit {
  padding: var(--space-4) var(--space-6); border: none; border-radius: var(--radius-md); background: var(--ink);
  color: var(--accent); font-weight: var(--font-weight-heading); font-size: var(--text-md); cursor: pointer;
  min-height: var(--touch-target-min);
}
.application-submit:disabled { opacity: 0.6; cursor: progress; }
.result-box { background: var(--page-surface-2); border-radius: var(--radius-lg); padding: var(--space-6); margin-top: var(--space-2); }
.result-box p { margin: 0 0 var(--space-3); font-size: var(--text-base); color: var(--ink); }
.calendly-embed { border-radius: var(--radius-md); overflow: hidden; margin-top: var(--space-4); min-height: var(--calendly-height); }
.calendly-embed iframe { width: 100%; height: var(--calendly-height); border: 0; display: block; }
.calendly-loading { text-align: center; color: var(--text-faint); font-size: var(--text-base); padding: var(--space-7) 0; }

/* ============ SOCIAL LINKS (diky.njk) ============ */
.social-links { display: flex; gap: var(--space-4); flex-wrap: wrap; margin-top: var(--space-2); }
.social-link {
  display: inline-flex; align-items: center; padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md); border: var(--border-hairline) solid var(--page-surface-2);
  color: var(--ink); text-decoration: none; font-weight: var(--font-weight-heading);
  font-size: var(--text-md); min-height: var(--touch-target-min);
}
.social-link:hover { border-color: var(--gold); color: var(--gold); }
.social-link:focus-visible { outline: var(--focus-outline-width) solid var(--gold); outline-offset: var(--focus-outline-offset); }

/* ============ FOOTER ============ */
footer { background: var(--ink); color: var(--page-surface-1); text-align: center; padding: var(--space-7) var(--space-5); }
footer p { margin: 0 0 var(--space-2); font-size: var(--text-sm); color: var(--page-surface-1); opacity: 0.75; }
footer a { color: var(--accent); text-decoration: underline; }

/* ============ STICKY MOBILE CTA ============ */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-sticky-cta);
  background: var(--ink);
  padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom));
  display: none;
}
@media (max-width: 640px) {
  .sticky-cta:not([hidden]) { display: flex; align-items: center; justify-content: center; }
}
.sticky-cta a {
  color: var(--accent); text-decoration: none; font-weight: var(--font-weight-heading); font-size: var(--text-md);
  max-height: var(--touch-target-min); min-height: var(--touch-target-min);
  display: flex; align-items: center;
}

/* ============ SCROLL REVEAL ============ */
.reveal {
  opacity: 0; transform: translateY(var(--space-6));
  transition: opacity var(--duration-slow) var(--ease-reveal), transform var(--duration-slow) var(--ease-reveal);
}
.reveal.reveal-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal.reveal-visible { opacity: 1 !important; transform: none !important; transition: none !important; }
}
