/* =====================================================================
   Lukáš Šida — osobní web
   Moderní, responzivní styl. Barvy a rozměry se řídí proměnnými níže,
   takže vzhled celého webu změníte na jednom místě.
   ===================================================================== */

:root {
  /* Barvy – světlý režim */
  --bg:        #f6f3ee;   /* pozadí stránky (teplý papír) */
  --surface:   #ffffff;   /* karty a bloky */
  --surface-2: #efe9df;   /* jemně odlišené plochy */
  --ink:       #1e1b18;   /* hlavní text */
  --muted:     #6d655b;   /* doplňkový text */
  --line:      #e5ddd1;   /* linky a rámečky */
  --accent:    #b0673a;   /* hlavní akcentní barva (terakota) */
  --accent-ink:#8f4f28;   /* tmavší akcent pro text na světlé ploše */
  --accent-soft:#f4e7dc;  /* světlé podbarvení akcentu */

  /* Stavové barvy knih */
  --ok:     #2e7d5b;
  --ok-bg:  #e3f2ea;
  --warn:   #b07d1c;
  --warn-bg:#f7ecd2;
  --off:    #8a827a;
  --off-bg: #ece7e0;

  /* Typografie a rozměry */
  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --maxw: 1120px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 10px 30px rgba(30, 22, 14, 0.08);
  --shadow-lg: 0 24px 60px rgba(30, 22, 14, 0.14);
  --header-h: 68px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:        #141110;
    --surface:   #1e1a16;
    --surface-2: #251f1a;
    --ink:       #f1ebe2;
    --muted:     #b3a89a;
    --line:      #322a22;
    --accent:    #db8a58;
    --accent-ink:#e8a074;
    --accent-soft:#2a201a;
    --ok:     #67c99a;  --ok-bg:  #17281f;
    --warn:   #e0b357;  --warn-bg:#2a2113;
    --off:    #a99f93;  --off-bg: #241f19;
    --shadow: 0 10px 30px rgba(0,0,0,0.4);
    --shadow-lg: 0 24px 60px rgba(0,0,0,0.5);
  }
}
/* Ruční přepnutí (data-theme na <html>) má přednost před systémem */
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] {
  --bg:#141110; --surface:#1e1a16; --surface-2:#251f1a; --ink:#f1ebe2;
  --muted:#b3a89a; --line:#322a22; --accent:#db8a58; --accent-ink:#e8a074;
  --accent-soft:#2a201a; --ok:#67c99a; --ok-bg:#17281f; --warn:#e0b357;
  --warn-bg:#2a2113; --off:#a99f93; --off-bg:#241f19;
  --shadow:0 10px 30px rgba(0,0,0,.4); --shadow-lg:0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.12; font-weight: 600; letter-spacing: -.01em; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }
.section { padding: clamp(56px, 8vw, 104px) 0; }
.section--alt { background: var(--surface-2); }

.eyebrow {
  font-family: var(--font-sans);
  font-weight: 600; font-size: .8rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent-ink); margin: 0 0 12px;
}
.section h2 { font-size: clamp(1.8rem, 4.5vw, 2.9rem); margin: 0 0 .5em; }
.lead { font-size: clamp(1.05rem, 2.2vw, 1.22rem); color: var(--muted); max-width: 62ch; }

/* Tlačítka --------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--font-sans); font-weight: 600; font-size: .98rem;
  padding: .82em 1.4em; border-radius: 999px; border: 1.5px solid transparent;
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  min-height: 46px; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(176,103,58,.28); }
.btn-primary:hover { box-shadow: 0 12px 26px rgba(176,103,58,.4); color:#fff; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-ink); }
.btn-sm { padding: .6em 1.05em; font-size: .9rem; min-height: 40px; }

/* Hlavička / navigace --------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { font-family: var(--font-serif); font-weight: 600; font-size: 1.25rem; color: var(--ink); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; color: var(--accent-ink); }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  color: var(--ink); font-weight: 500; font-size: .96rem;
  padding: .5em .8em; border-radius: 10px; transition: background .15s, color .15s;
}
.nav-links a:hover { background: var(--surface-2); text-decoration: none; color: var(--accent-ink); }
.nav-tools { display: flex; align-items: center; gap: 8px; }

.theme-toggle, .nav-toggle {
  display: grid; place-items: center; width: 42px; height: 42px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 12px; cursor: pointer; font-size: 1.1rem; transition: background .15s, border-color .15s;
}
.theme-toggle:hover, .nav-toggle:hover { border-color: var(--accent); }
.nav-toggle { display: none; }

/* Mobilní menu ----------------------------------------------------- */
@media (max-width: 860px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed; inset: var(--header-h) 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: 12px 16px 20px; box-shadow: var(--shadow);
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
  }
  .nav-links.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav-links a { padding: .85em .7em; font-size: 1.05rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav-links li:last-child a { border-bottom: none; }
}

/* Hero ------------------------------------------------------------- */
.hero { position: relative; color: #fff; isolation: isolate; }
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(18,12,8,.6) 0%, rgba(18,12,8,.66) 55%, rgba(18,12,8,.82) 100%);
}
.hero h1, .hero p.lead, .hero .kicker { text-shadow: 0 2px 20px rgba(0,0,0,.6); }
.hero__inner { padding: clamp(80px, 16vw, 168px) 0 clamp(64px, 10vw, 110px); max-width: 760px; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 5rem); margin: 0 0 .2em; color:#fff; }
.hero .kicker { font-weight: 600; letter-spacing: .15em; text-transform: uppercase; font-size: .82rem; color: #f0d9c6; margin-bottom: 18px; }
.hero p.lead { color: #f3e9e0; max-width: 54ch; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,.1); }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
/* Na mobilu je banner oříznutý a jeho vlastní text by se křížil s nadpisem –
   proto výrazně ztmavíme pozadí a ukážeme spíš levou (portrétovou) část. */
@media (max-width: 760px) {
  .hero__bg img { object-position: 22% center; }
  .hero::after { background: linear-gradient(180deg, rgba(12,9,7,.84) 0%, rgba(12,9,7,.9) 100%); }
  .hero__inner { padding-top: clamp(56px, 14vw, 90px); }
}

/* O mně ------------------------------------------------------------ */
.about { display: grid; grid-template-columns: 340px 1fr; gap: clamp(28px, 5vw, 60px); align-items: start; }
.about__photo { position: relative; }
.about__photo img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.about__text p { margin: 0 0 1.05em; }
.about__text p:first-of-type { font-size: 1.12rem; }
.stats { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; flex: 1 1 120px; }
.stat b { font-family: var(--font-serif); font-size: 1.7rem; display: block; color: var(--accent-ink); line-height: 1; }
.stat span { font-size: .85rem; color: var(--muted); }
@media (max-width: 760px) { .about { grid-template-columns: 1fr; } .about__photo { max-width: 300px; margin: 0 auto; } }

/* Knihy ------------------------------------------------------------ */
.cat-title { font-family: var(--font-serif); font-size: 1.35rem; margin: 40px 0 18px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.cat-title:first-of-type { margin-top: 8px; }
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }
.book {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .2s ease;
}
.book:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.book__cover { position: relative; aspect-ratio: 3/4; background: var(--surface-2); overflow: hidden; }
.book__cover img { width: 100%; height: 100%; object-fit: cover; }
.book__cover img.landscape { object-fit: contain; padding: 10px; background: var(--surface-2); }
.badge {
  position: absolute; top: 12px; left: 12px; font-size: .72rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; padding: .38em .7em; border-radius: 999px;
  backdrop-filter: blur(4px);
}
.badge.ok   { background: var(--ok-bg);   color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.off  { background: var(--off-bg);  color: var(--off); }
.book__body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.book__body h4 { font-family: var(--font-serif); font-size: 1.28rem; margin: 0 0 2px; line-height: 1.15; }
.book__sub { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.book__desc { font-size: .95rem; margin: 0 0 14px; }
.book__meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.chip { font-size: .78rem; background: var(--surface-2); border: 1px solid var(--line); color: var(--muted); padding: .28em .7em; border-radius: 999px; }
.book__actions { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }

/* Značková sekce – LSI Publishing (Knihy) -------------------------- */
/* Barva pozadí = barva loga. Chcete-li jinou (např. černou), změňte
   jen hodnotu --brand-lsi níže. */
.section--brand-lsi { --brand-lsi: #28575d; background: var(--brand-lsi); color: #fff; }
.section--brand-lsi .eyebrow { color: #bfe3e0; }
.section--brand-lsi h2 { color: #fff; }
.section--brand-lsi .lead { color: rgba(255,255,255,.86); }
.section--brand-lsi .cat-title { color: #fff; border-color: rgba(255,255,255,.25); }
.brand-head { text-align: center; max-width: 760px; margin: 0 auto; }
.brand-head .lead { margin-left: auto; margin-right: auto; }
.brand-logo {
  width: min(320px, 74%); height: auto; margin: 0 auto 22px; display: block;
  border-radius: 16px; box-shadow: var(--shadow-lg);
}

/* Značková sekce – Vzpomínky ožívají (Restaurování) ---------------- */
.section--brand-vzpominky {
  position: relative; isolation: isolate; color: #fff;
  background-size: cover; background-position: center right; background-repeat: no-repeat;
}
.section--brand-vzpominky::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, rgba(16,12,20,.93) 0%, rgba(16,12,20,.7) 50%, rgba(16,12,20,.34) 100%);
}
.section--brand-vzpominky h2 { color: #fff; }
.section--brand-vzpominky .eyebrow { color: #f0d9c6; }
.brand-vz-content { max-width: 600px; }
.brand-vz-content p { color: rgba(255,255,255,.92); }
.section--brand-vzpominky .feature-list li::before { color: #fff; }
.section--brand-vzpominky .btn-ghost { color: #fff; border-color: rgba(255,255,255,.55); }
.section--brand-vzpominky .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.12); color: #fff; }
@media (max-width: 640px) {
  .section--brand-vzpominky { background-position: center; }
  .section--brand-vzpominky::before { background: linear-gradient(160deg, rgba(16,12,20,.9) 0%, rgba(16,12,20,.78) 100%); }
}

/* Restaurování / Vzpomínky ---------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
.split__media img { border-radius: var(--radius); box-shadow: var(--shadow-lg); width: 100%; }
.feature-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.feature-list li { padding-left: 30px; position: relative; }
.feature-list li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); font-weight: 700; }

/* Aplikace --------------------------------------------------------- */
.apps { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
@media (max-width: 820px) { .apps { grid-template-columns: 1fr; } }
.app-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.app-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--accent), #e0a06a);
}
.app-card__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.app-card__head img { width: 62px; height: 62px; border-radius: 14px; box-shadow: var(--shadow); }
.app-card__head h3 { font-size: 1.5rem; margin: 0; }
.app-card__head .tag { font-size: .8rem; color: var(--accent-ink); font-weight: 600; }
.app-card p { margin: 0 0 16px; }
.app-card ul { margin: 0 0 20px; padding-left: 1.1em; color: var(--muted); font-size: .95rem; }
.app-card .btn-row { margin-top: auto; display: flex; flex-wrap: wrap; gap: 10px; }
.pill-new { display: inline-block; background: var(--accent-soft); color: var(--accent-ink); font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: .3em .7em; border-radius: 999px; margin-left: 6px; vertical-align: middle; }

/* Kontakt ---------------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 18px; margin-top: 30px; }
.contact-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 24px; text-align: center; }
.contact-card .ico { font-size: 1.6rem; }
.contact-card b { display: block; margin: 10px 0 4px; font-family: var(--font-serif); font-size: 1.05rem; }
.contact-card a { font-size: 1.05rem; word-break: break-word; }

/* Patička ---------------------------------------------------------- */
.site-footer { background: var(--surface-2); border-top: 1px solid var(--line); padding: 40px 0; margin-top: 0; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.footer-inner .muted { color: var(--muted); font-size: .9rem; }
.social { display: flex; gap: 10px; }
.social a { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 1.15rem; }
.social a:hover { border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }

/* Jemné animace při scrollu ---------------------------------------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* Odkaz zpět (podstránky) ------------------------------------------ */
.back-link { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; margin-bottom: 20px; }

/* Karta knihy – kliknutelnost a „lupa" ----------------------------- */
.book { cursor: pointer; }
.book:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.book__zoom {
  position: absolute; left: 50%; bottom: 14px; transform: translate(-50%, 8px);
  background: rgba(20,14,9,.82); color: #fff; font-size: .82rem; font-weight: 600;
  padding: .5em 1em; border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s;
  pointer-events: none; backdrop-filter: blur(4px);
}
.book:hover .book__zoom, .book:focus-visible .book__zoom { opacity: 1; transform: translate(-50%, 0); }

/* ===================== MODÁLNÍ OKNO (detail knihy) ================= */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(18,12,7,.62); backdrop-filter: blur(3px); animation: fadeIn .2s ease; }
.modal__dialog {
  position: relative; z-index: 1; max-width: 980px; width: calc(100% - 32px);
  max-height: calc(100vh - 48px); margin: 24px auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg);
  overflow: auto; display: grid; grid-template-columns: 1.05fr 1fr;
  animation: popIn .26s cubic-bezier(.2,.7,.3,1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .modal__backdrop, .modal__dialog { animation: none; } }

.modal__close {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 42px; height: 42px;
  border-radius: 50%; border: none; background: var(--surface); color: var(--ink);
  font-size: 1.1rem; cursor: pointer; box-shadow: var(--shadow); display: grid; place-items: center;
  transition: transform .12s, background .15s;
}
.modal__close:hover { transform: rotate(90deg); background: var(--accent); color: #fff; }

.modal__media { background: var(--surface-2); padding: 20px; position: sticky; top: 0; }
.modal__stage {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  display: grid; place-items: center; padding: 12px; min-height: 300px;
}
.modal__stage img { max-width: 100%; max-height: 56vh; object-fit: contain; border-radius: 6px; }
.modal__thumbs { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.modal__thumbs img {
  width: 62px; height: 62px; object-fit: cover; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; opacity: .72; transition: opacity .15s, border-color .15s;
}
.modal__thumbs img:hover { opacity: 1; }
.modal__thumbs img.active { opacity: 1; border-color: var(--accent); }

.modal__info { padding: 30px 30px 26px; overflow: auto; }
.modal__info .badge { position: static; display: inline-block; margin-bottom: 12px; }
.modal__info h3 { font-size: 1.7rem; margin: 0 0 2px; }
.modal__sub { color: var(--muted); margin: 0 0 18px; }
.modal__h { font-family: var(--font-serif); font-size: 1.1rem; margin: 22px 0 10px; }
.modal__info .feature-list li { font-size: .95rem; }
.modal__info #modal-text p { font-size: .96rem; margin: 0 0 .9em; }
.modal__params { margin: 20px 0 0; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 4px 16px; }
.modal__params summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
.modal__params table { width: 100%; border-collapse: collapse; margin-bottom: 10px; }
.modal__params th, .modal__params td { text-align: left; padding: 7px 0; font-size: .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.modal__params th { color: var(--muted); font-weight: 500; width: 45%; }
.modal__params tr:last-child th, .modal__params tr:last-child td { border-bottom: none; }
.modal__note { margin-top: 18px; background: var(--accent-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; font-size: .9rem; }
.modal__actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; }

@media (max-width: 780px) {
  .modal__dialog { grid-template-columns: 1fr; margin: 12px auto; width: calc(100% - 20px); max-height: calc(100vh - 24px); }
  .modal__media { position: static; padding: 16px; }
  .modal__stage img { max-height: 44vh; }
  .modal__info { padding: 22px 20px 24px; }
}
