/* =========================================================================
   site.css — Alexandra Pavelková (stránka autorky)
   Svetlý, nadčasový vizuál: papier, atrament, tlmená červená.
   Knižné mikrostránky (napr. Dom) majú vlastný výrazný štýl.
   ========================================================================= */

:root {
    --bg: #f7f3ec;
    --bg-2: #efe8dc;
    --surface: #fffdf9;
    --text: #2b2723;
    --heading: #1a1714;
    --muted: #6e665c;
    --border: #e1d7c7;
    --accent: #9b2226;
    --accent-hover: #7a191c;
    --on-accent: #fff;

    --font-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --maxw: 1120px;
    --header-h: 64px;
    --radius: 4px;
    --tr: .25s ease;
    --shadow: 0 14px 40px rgba(60, 40, 20, .14);
    --shadow-sm: 0 4px 14px rgba(60, 40, 20, .1);

    /* lišta súhlasu s cookies (CMP) */
    --cc-btn-primary-bg: #9b2226;
    --cc-btn-primary-hover-bg: #7a191c;
    --cc-toggle-on-bg: #9b2226;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); font-size: 1.0625rem; line-height: 1.7; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--accent-hover); }
p + p { margin-top: 1em; }
strong { color: var(--heading); font-weight: 600; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; color: var(--heading); line-height: 1.1; }
h1 { font-size: clamp(2.8rem, 7vw, 4.6rem); letter-spacing: -.01em; }
h2 { font-size: clamp(2.1rem, 4.5vw, 3rem); margin-bottom: 1.2rem; }
h3 { font-size: 1.65rem; margin-bottom: .35rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 760px; }
section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-alt { background: var(--bg-2); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--accent); margin-bottom: .8rem; }
.muted { color: var(--muted); }
.lead { font-size: 1.22rem; color: var(--heading); }

/* --- Tlačidlá ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 46px; padding: .6rem 1.3rem; font: 600 .95rem/1.2 var(--font-body); letter-spacing: .03em; border-radius: var(--radius); border: 1.5px solid transparent; cursor: pointer; transition: background var(--tr), color var(--tr), border-color var(--tr); text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--heading); color: var(--heading); background: transparent; }
.btn-ghost:hover { background: var(--heading); color: var(--bg); }
.btn-sm { min-height: 38px; padding: .4rem .9rem; font-size: .88rem; }
.btn-row { display: flex; flex-wrap: wrap; gap: .6rem; }

/* --- Hlavička ------------------------------------------------------------ */
.site-header { position: fixed; inset: 0 0 auto 0; height: var(--header-h); z-index: 800; transition: background var(--tr), box-shadow var(--tr); }
.site-header.scrolled { background: rgba(247, 243, 236, .94); backdrop-filter: blur(8px); box-shadow: 0 1px 0 var(--border); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.logo { font-family: var(--font-display); font-size: 1.55rem; font-weight: 600; color: var(--heading); letter-spacing: .01em; }
.logo:hover { color: var(--heading); }
.site-nav { display: flex; gap: 1.6rem; align-items: center; }
.site-nav a { color: var(--text); font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--accent); }
.site-nav .nav-cta { color: var(--accent); font-weight: 600; }
.menu-toggle { display: none; background: none; border: 0; color: var(--heading); cursor: pointer; padding: .5rem; }
.menu-toggle svg { width: 26px; height: 26px; }
@media (max-width: 820px) {
    .menu-toggle { display: block; }
    .site-header { background: rgba(247, 243, 236, .96); box-shadow: 0 1px 0 var(--border); }
    .site-nav { position: absolute; top: var(--header-h); left: 0; right: 0; display: none; flex-direction: column; align-items: stretch; gap: 0; background: var(--surface); padding: .4rem 1.25rem 1rem; box-shadow: var(--shadow-sm); }
    .site-nav.open { display: flex; }
    .site-nav a { padding: .8rem 0; border-bottom: 1px solid var(--border); }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: calc(var(--header-h) + clamp(2rem, 6vw, 4rem)) 0 clamp(3rem, 7vw, 5rem); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { margin-bottom: 1rem; }
.hero-tagline { font-family: var(--font-display); font-style: italic; font-size: clamp(1.4rem, 3vw, 1.8rem); color: var(--accent); margin-bottom: 1.2rem; line-height: 1.3; }
.hero .lead { margin-bottom: 1.8rem; max-width: 34rem; }
.hero-photo { position: relative; justify-self: center; max-width: 440px; }
.hero-photo img { border-radius: 3px; box-shadow: var(--shadow); }
.hero-photo::before { content: ''; position: absolute; inset: 1.2rem -1.2rem -1.2rem 1.2rem; border: 1.5px solid var(--accent); border-radius: 3px; z-index: -1; }
@media (max-width: 820px) { .hero-grid { grid-template-columns: 1fr; } .hero-photo { max-width: 320px; order: -1; } }

/* --- Novinka ------------------------------------------------------------- */
.news { background: #141214; color: #ece8e2; }
.news h2, .news h3 { color: #fff; }
.news .eyebrow { color: #ff5a5f; }
.news-grid { display: grid; grid-template-columns: 260px 1fr; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.news-cover img { box-shadow: 0 18px 50px rgba(0,0,0,.6), 0 0 60px rgba(224,38,44,.25); transform: rotate(-1.5deg); }
.news p { color: #d6d1ca; }
.news .btn-primary { background: #e0262c; }
.news .btn-primary:hover { background: #ff3a40; }
.news .btn-ghost { border-color: #ece8e2; color: #ece8e2; }
.news .btn-ghost:hover { background: #ece8e2; color: #141214; }
@media (max-width: 700px) { .news-grid { grid-template-columns: 1fr; } .news-cover { max-width: 200px; } }

/* --- Knihy --------------------------------------------------------------- */
.books { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2rem 1.5rem; margin-top: 2rem; }
.book { display: flex; flex-direction: column; }
/* obálky majú rôzny pomer strán: rámček 2:3, obálka zarovnaná dole, nič sa neoreže */
.book-cover { aspect-ratio: 2 / 3; margin-bottom: 1rem; position: relative; }
.book-cover img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: 2px; box-shadow: var(--shadow-sm); }
.cover-ph { /* zástupná obálka, kým nie je skutočná */
    width: 100%; height: 100%; border-radius: 2px; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; justify-content: space-between; padding: 1.4rem 1.2rem;
    color: #fff; background: var(--ph, #555); font-family: var(--font-display);
}
.cover-ph b { font-size: 1.9rem; line-height: 1.05; font-weight: 600; }
.cover-ph span { font-size: .95rem; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.book-meta { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.book p { font-size: .98rem; flex: 1; }
.book .btn-row { margin-top: 1rem; }
.book-note { font-size: .88rem; color: var(--muted); margin-top: .9rem; font-style: italic; }

.biblio { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.biblio h3 { font-size: 1.5rem; }
.biblio ul { list-style: none; columns: 2 280px; column-gap: 2rem; margin-top: .8rem; }
.biblio li { break-inside: avoid; padding: .3rem 0; border-bottom: 1px dotted var(--border); font-size: .96rem; }
.biblio li span { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .5rem; }

/* --- O autorke ----------------------------------------------------------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.about-photo img { border-radius: 50%; box-shadow: var(--shadow); max-width: 340px; margin: 0 auto; }
.about-quote { margin-top: 1.8rem; font-family: var(--font-display); font-style: italic; font-size: 1.5rem; line-height: 1.35; color: var(--heading); border-left: 2px solid var(--accent); padding-left: 1.2rem; }
.about-quote footer { font-family: var(--font-body); font-style: normal; font-size: .85rem; color: var(--muted); margin-top: .5rem; }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } .about-photo img { max-width: 240px; } }

/* --- Ocenenia ------------------------------------------------------------ */
.awards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; margin-top: 1.8rem; }
.award { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; padding: 1.3rem 1.3rem 1.2rem; }
.award .year { font-family: var(--font-display); font-size: 2rem; color: var(--accent); line-height: 1; }
.award h3 { font-size: 1.35rem; margin: .4rem 0 .3rem; }
.award p { font-size: .93rem; color: var(--muted); }
details.more-awards { margin-top: 1.6rem; }
details.more-awards summary { cursor: pointer; color: var(--accent); font-weight: 600; }
details.more-awards ul { margin: 1rem 0 0 1.2rem; }
details.more-awards li { margin: .3rem 0; }

/* --- Novinky e-mailom ------------------------------------------------------ */
.subscribe-box { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: clamp(1.4rem, 4vw, 2.4rem); text-align: center; }
.subscribe { max-width: 460px; margin: 1.2rem auto 0; text-align: left; }
.subscribe input[type="email"] { width: 100%; min-height: 48px; padding: .6rem .9rem; font: inherit; border: 1px solid var(--border); border-radius: var(--radius); background: #fff; margin-bottom: .7rem; }
.subscribe input[type="email"]:focus { border-color: var(--accent); outline: none; }
.subscribe .check { display: flex; gap: .6rem; font-size: .86rem; color: var(--muted); margin-bottom: 1rem; }
.subscribe .check input { margin-top: .3rem; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.subscribe .hp { position: absolute; left: -9999px; }
.subscribe .btn { width: 100%; }
.form-msg { margin-top: .7rem; font-size: .92rem; min-height: 1.4em; }
.subscribe.is-done .form-msg { color: #2e7d32; }
.subscribe.is-error .form-msg { color: var(--accent); }

/* --- Pätička -------------------------------------------------------------- */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; font-size: .9rem; color: var(--muted); }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.footer-links a, .footer-links button { color: var(--muted); background: none; border: 0; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.footer-links a:hover, .footer-links button:hover { color: var(--heading); }

/* --- Textová podstránka ---------------------------------------------------- */
.page { padding-top: calc(var(--header-h) + 3rem); padding-bottom: 3rem; }
.page h2 { font-size: 1.9rem; margin: 2rem 0 .7rem; }
.page ul { padding-left: 1.3rem; margin: .8rem 0; }
.todo { background: #ffe9a8; padding: 0 .3rem; border-radius: 3px; }
