/* Isolated prototype: the website's navy, gold, Manrope and Playfair identity. */
:root {
  color-scheme: dark;
  --navy: #080f22;
  --navy-soft: #101b32;
  --gold: #d5b354;
  --gold-hover: #e4c57c;
  --gold-ink: #80683f;
  --gold-text: #5e4b29;
  --paper: #f8f9fb;
  --cream: #f6f1e5;
  --ink: #172238;
  --muted: #3d4860;
  --line-dark: #ffffff20;
  --line-light: #17223820;
  --sans: "Manrope", system-ui, sans-serif;
  --serif: "Playfair Display", Georgia, serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--navy); color: var(--paper); font: 450 16px/1.75 var(--sans); -webkit-font-smoothing: antialiased; }
body, button, a { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4, p, figure, dl, dd, blockquote { margin: 0; }
h1, h2, h3, h4 { font-weight: 450; }
p { text-wrap: pretty; }
svg { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 5px; }
.section-paper :focus-visible { outline-color: var(--ink); }
::selection { background: var(--gold); color: var(--navy); }
[hidden] { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: min(1200px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
em { font-style: italic; color: var(--gold); }
.section-paper em { color: var(--gold-ink); }

.button { display: inline-flex; align-items: center; justify-content: center; gap: .5em; min-height: 50px; padding: 12px 26px; border: 1px solid transparent; border-radius: 99px; font-size: 15px; font-weight: 700; line-height: 1.4; text-decoration: none; white-space: nowrap; transition: background .2s, border-color .2s, color .2s, opacity .2s; }
.button svg { width: 1em; height: 1em; }
.button-gold { background: var(--gold); color: var(--navy); }
.button-outline { border-color: #d5b35466; color: var(--gold); background: transparent; }
@media (hover: hover) and (pointer: fine) {
  .button-gold:hover { background: var(--gold-hover); }
  .button-outline:hover { background: #d5b35412; border-color: var(--gold); }
}
.button:active { opacity: .8; }


/* Intro */
.intro { padding-block: clamp(28px, 6vw, 64px) clamp(20px, 3vw, 34px); text-align: center; }
.intro h1 { margin-top: 18px; font: 450 clamp(40px, 6vw, 76px)/1.08 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.intro .lead { max-width: 40em; margin: 20px auto 0; color: #cdd3df; font-size: clamp(16px, 1.3vw, 18px); }

/* 3D stage */
.book { padding-bottom: clamp(48px, 7vw, 88px); }
.book-stage-3d {
  position: relative; width: min(1320px, 100% - 2 * var(--gutter)); margin-inline: auto; aspect-ratio: 16 / 9; min-height: 360px; max-height: 78vh;
  overflow: hidden; border-radius: 28px; border: 1px solid #ffffff14;
  background: radial-gradient(ellipse at 50% 46%, #1d2d4f 0%, #111d38 38%, var(--navy) 78%);
  touch-action: manipulation; user-select: none; -webkit-user-select: none;
}
.book-canvas { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity .6s ease; touch-action: pan-y pinch-zoom; }
.is-ready .book-canvas { opacity: 1; }
/* Hidden (also from assistive tech) unless the 3D book is unavailable. */
.book-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 4%; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s; }
.is-fallback .book-fallback { opacity: 1; visibility: visible; }
/* While the 3D book loads: the dimmed book picture and a real progress bar.
   The bar fades in only after a moment, so a fast load never flashes it. */
.is-loading .book-fallback { visibility: visible; opacity: .22; filter: blur(3px); }
.book-loading { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; transition: opacity .3s; animation: loading-in .5s ease .35s both; }
@keyframes loading-in { from { opacity: 0; } }
.book-loading-label { color: var(--paper); font: 450 clamp(22px, 2.4vw, 30px)/1.2 var(--serif); letter-spacing: -.02em; }
.book-loading-bar { width: min(260px, 70%); height: 3px; overflow: hidden; border-radius: 3px; background: #ffffff1f; }
.book-loading-bar span { display: block; width: 100%; height: 100%; background: var(--gold); transform: scaleX(var(--progress, .04)); transform-origin: left; transition: transform .4s ease; }
.book-loading-percent { margin-top: -6px; color: var(--gold); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .08em; }
.book-loading-note { max-width: 26em; color: #aeb6c6; font-size: 13px; opacity: 0; transition: opacity .4s; }
.book-loading.is-slow .book-loading-note { opacity: 1; }
.book-loading[hidden] { display: none; }
.is-ready .book-loading, .is-fallback .book-loading { opacity: 0; pointer-events: none; }
.book-tooltip { position: absolute; z-index: 3; left: 0; top: 0; max-width: 260px; padding: 9px 14px; border-radius: 12px; background: #080f22eb; border: 1px solid #d5b35440; color: var(--paper); font-size: 13px; line-height: 1.35; pointer-events: none; transform: translate(-50%, calc(-100% - 18px)); box-shadow: 0 10px 30px #00000059; white-space: nowrap; }
.book-tooltip strong { display: block; font: 500 16px/1.25 var(--serif); }
.book-tooltip span { color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }

.book-back { position: absolute; z-index: 3; top: 16px; left: 16px; display: inline-flex; align-items: center; gap: .5em; min-height: 44px; padding: 10px 18px; border: 1px solid #d5b35466; border-radius: 99px; background: #080f22e6; color: var(--gold); font-size: 14px; font-weight: 700; }
.book-back svg { width: 1em; height: 1em; }
@media (hover: hover) and (pointer: fine) { .book-back:hover { border-color: var(--gold); } }
.book-controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 22px; }
.book-nav { display: inline-grid; place-items: center; width: 50px; height: 50px; padding: 0; border: 1px solid #d5b35466; border-radius: 50%; background: transparent; color: var(--gold); transition: background .2s, border-color .2s, opacity .2s; }
.book-nav svg { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .book-nav:not(:disabled):hover { background: #d5b35412; border-color: var(--gold); } }
.book-nav:disabled { opacity: .3; cursor: default; }
[data-book-toggle] { min-width: 200px; }
/* In-stage guidance: a page chip while browsing, person controls while reading. */
.book-hud { position: absolute; z-index: 3; left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; padding-inline: 16px; pointer-events: none; }
.book-hud [hidden] { display: none; }
.book-chip { max-width: 100%; padding: 8px 16px; border: 1px solid #ffffff1a; border-radius: 99px; background: #080f22d9; color: #c9cfdb; font-size: 13px; line-height: 1.4; text-align: center; backdrop-filter: blur(6px); }
.book-chip strong { color: var(--paper); font-weight: 600; }
.book-readbar { display: flex; align-items: center; gap: 4px; max-width: 100%; padding: 5px; border: 1px solid #d5b35466; border-radius: 99px; background: #080f22eb; pointer-events: auto; backdrop-filter: blur(6px); }
.book-readbar-step { display: grid; place-items: center; flex: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--gold); cursor: pointer; transition: background .2s, opacity .2s; }
.book-readbar-step svg { width: 20px; height: 20px; }
.book-readbar-step:disabled { opacity: .3; cursor: default; }
@media (hover: hover) and (pointer: fine) { .book-readbar-step:not(:disabled):hover { background: #d5b35418; } }
.book-readbar-name { display: flex; align-items: baseline; gap: 10px; min-width: 0; padding-inline: 8px; white-space: nowrap; }
.book-readbar-name strong { overflow: hidden; color: var(--paper); font: 500 17px/1.2 var(--serif); text-overflow: ellipsis; }
.book-readbar-name span { color: #aeb6c6; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.book-readbar-keys { display: none; padding: 0 14px 0 12px; border-left: 1px solid #ffffff1f; color: #8f99ad; font-size: 12px; font-weight: 600; white-space: nowrap; }
@media (hover: hover) and (pointer: fine) { .book-readbar-keys { display: block; } }
.is-fallback .book-controls, .is-fallback .book-hud { display: none; }
/* Phones: the book as a picture, a note under the intro, the stories as cards (kniha.js). */
.book-static { display: none; max-width: 30em; margin: 18px auto 0; color: var(--gold); font-size: 15px; font-weight: 600; }
.book-static .button { margin-top: 16px; }
.book-is-static .book-static { display: block; }
.is-static .book-fallback { opacity: 1; visibility: visible; }
/* Just the picture with rounded corners, without the 3D stage box around it. */
.is-static .book-stage-3d { aspect-ratio: auto; min-height: 0; max-height: none; border: 0; border-radius: 0; background: none; overflow: visible; }
.is-static .book-fallback { position: static; display: block; height: auto; padding: 0; border-radius: 20px; }
.is-static .book-loading, .is-static .book-controls, .is-static .book-hud { display: none; }

/* Progress */
.progress { border-block: 1px solid var(--line-dark); background: var(--navy-soft); }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); }
.stats > div { padding: 30px 24px; text-align: center; }
.stats > div + div { border-left: 1px solid var(--line-dark); }
.stats dt { color: var(--gold); font: 450 clamp(34px, 4vw, 48px)/1.1 var(--serif); letter-spacing: -.03em; }
.stats dd { margin-top: 6px; color: #cdd3df; font-size: 14px; }

/* People */
.section-paper { background: var(--paper); color: var(--ink); color-scheme: light; }
.section-paper .eyebrow { color: var(--gold-text); }
.people { padding-block: clamp(64px, 8vw, 108px); }
.people-heading { max-width: 46em; margin-bottom: 40px; }
.people-heading h2 { margin-top: 18px; font: 450 clamp(34px, 3.6vw, 50px)/1.15 var(--serif); letter-spacing: -.035em; text-wrap: balance; }
.people-heading p:last-child { margin-top: 16px; color: var(--muted); }
.spread-title { display: flex; align-items: center; gap: 18px; margin: 46px 0 24px; color: var(--gold-text); font-size: 12px; font-weight: 700; letter-spacing: .19em; text-transform: uppercase; }
.spread-title::after { content: ''; flex: 1; height: 1px; background: var(--line-light); }
.people-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 22px; }
/* The card's header (photo, field, name, life) sits on royal blue, like the 3D
   stage; the story runs full width on white below it. */
.profile { position: relative; isolation: isolate; display: grid; grid-template-columns: 120px minmax(0, 1fr); grid-template-rows: 1fr auto auto auto 1fr; column-gap: 22px; padding: 0 24px 24px; border: 1px solid var(--line-light); border-radius: 20px; background: #fff; }
.profile::before { content: ''; z-index: -1; grid-area: 1 / 1 / 6 / -1; margin-inline: -24px; background: radial-gradient(ellipse at 25% 0%, #1d2d4f 0%, #111d38 75%); }
.profile-body { display: contents; }
.profile-photo { position: relative; grid-area: 1 / 1 / 6 / 2; align-self: start; margin-block: 22px; padding: 7px; }
.profile-photo::before { content: ''; position: absolute; inset: 0; border: 1px solid #c9a646; border-radius: 45% 45% 8px 8px / 16% 16% 8px 8px; }
.profile-photo img { width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 45% 45% 6px 6px / 16% 16% 6px 6px; background: #e8e2d4; }
.profile-field { grid-area: 2 / 2; overflow-wrap: anywhere; hyphens: auto; color: var(--gold); font-size: 12px; font-weight: 700; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; }
.profile-name { grid-area: 3 / 2; margin-top: 4px; color: var(--paper); font: 500 26px/1.2 var(--serif); letter-spacing: -.02em; }
.profile-meta { grid-area: 4 / 2; margin-top: 2px; color: #c9cfdb; font-size: 14px; }
.profile-summary, .profile-motto, .profile-story, .profile-more { grid-column: 1 / -1; }
.profile-summary { margin-top: 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.profile-motto { margin-top: 12px; padding-left: 14px; border-left: 2px solid #c9a646; color: var(--ink); font: 500 16px/1.65 var(--sans); }
.profile-motto cite { display: block; margin-top: 4px; font: 600 13px/1.5 var(--sans); font-style: normal; color: var(--muted); }
.profile-motto cite::before { content: '— '; }
.profile-more { justify-self: start; display: inline-flex; align-items: center; gap: .45em; margin-top: 14px; padding: 6px 0; border: 0; background: none; color: var(--ink); font-size: 14px; font-weight: 700; }
.profile-more svg { width: 1em; height: 1em; transform: rotate(90deg); transition: transform .3s; }
.profile.is-open .profile-more svg { transform: rotate(-90deg); }
@media (hover: hover) and (pointer: fine) { .profile-more:hover { text-decoration: underline; text-underline-offset: 5px; } }
/* "Celý príbeh" unrolls the full story in place of the summary (kniha.js). */
.profile { overflow: hidden; }
.profile-story { display: none; margin-top: 20px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.profile-story p + p { margin-top: 10px; }
.profile.is-open .profile-summary { display: none; }
.profile.is-open .profile-story { display: block; }

/* Call to action */
.cta { padding-block: clamp(64px, 8vw, 104px); text-align: center; }
.cta h2 { font: 450 clamp(36px, 4vw, 56px)/1.12 var(--serif); letter-spacing: -.035em; }
.cta p { max-width: 36em; margin: 18px auto 30px; color: #cdd3df; }
.site-footer { padding-block: 28px 40px; border-top: 1px solid var(--line-dark); color: #aeb6c6; font-size: 13px; }
.site-footer p + p { margin-top: 6px; }
.site-footer a { color: var(--paper); }


@media (max-width: 860px) {
  .people-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .book-stage-3d { aspect-ratio: 4 / 5; max-height: 72vh; border-radius: 20px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stats > div + div { border-left: 0; border-top: 1px solid var(--line-dark); }
  .stats > div { padding: 20px 16px; }
  .profile { grid-template-columns: 104px minmax(0, 1fr); column-gap: 16px; padding: 0 18px 18px; }
  .profile::before { margin-inline: -18px; }
  .profile-photo { margin-block: 18px; }
  .profile-name { font-size: 22px; }
  .profile-summary, .profile-story { margin-top: 18px; }
  [data-book-toggle] { min-width: 0; }
}
/* Landscape phones: the stage and its controls fit on one screen. */
@media (orientation: landscape) and (max-height: 520px) {
  .book-stage-3d { min-height: 0; max-height: calc(100vh - 96px); max-height: calc(100svh - 96px); }
}
@media (max-width: 380px) {
  .profile { grid-template-columns: 88px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .book-canvas, .book-fallback, .book-loading, .book-loading-bar span, .button, .book-nav { transition: none; }
  .book-loading { animation: none; }
}
