/* =========================================================================
   site.css — Štyria mačkatieri
   Vizuál z obálky: zelenomodrá, broskyňová, pruhovaná oranžová perina, pierka.
   Hravý, ale čitateľný pre rodičov. Farby a písma sú v :root.
   ========================================================================= */

:root {
    --bg: #fbf6ee;
    --bg-2: #f3ebdd;
    --surface: #ffffff;
    --teal: #2f8270;
    --teal-dark: #1f5c4f;
    --peach: #f8c08f;
    --rust: #d4562b;
    --rust-hover: #b8441d;
    --text: #2e2a26;
    --heading: #1e3d36;
    --muted: #6d665d;
    --border: #e6dccb;
    --on-accent: #fff;

    --font-display: 'Baloo 2', 'Trebuchet MS', system-ui, sans-serif;
    --font-body: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;

    --maxw: 1120px;
    --header-h: 64px;
    --radius: 14px;
    --tr: .25s ease;
    --shadow: 0 14px 40px rgba(31, 92, 79, .16);
    --shadow-sm: 0 4px 14px rgba(31, 92, 79, .12);

    --cc-btn-primary-bg: #d4562b;
    --cc-btn-primary-hover-bg: #b8441d;
    --cc-toggle-on-bg: #2f8270;
}

*, *::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.08rem; 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(--rust); text-decoration: none; transition: color var(--tr); }
a:hover { color: var(--rust-hover); }
p + p { margin-top: 1em; }
strong { color: var(--heading); font-weight: 800; }
:focus-visible { outline: 3px solid var(--rust); 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: 700; color: var(--heading); line-height: 1.08; }
h1 { font-size: clamp(2.6rem, 7vw, 4.4rem); }
h2 { font-size: clamp(2rem, 4.6vw, 2.9rem); margin-bottom: 1rem; }
h3 { font-size: 1.45rem; margin-bottom: .3rem; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 780px; }
section { padding: clamp(3.2rem, 7vw, 5.5rem) 0; position: relative; }
.section-alt { background: var(--bg-2); }
.section-teal { background: var(--teal); color: #eef7f4; }
.section-teal h2, .section-teal h3 { color: #fff; }
.eyebrow { display: inline-block; font-weight: 800; font-size: .82rem; letter-spacing: .14em; text-transform: uppercase; color: var(--rust); margin-bottom: .6rem; }
.section-teal .eyebrow { color: var(--peach); }
.muted { color: var(--muted); }
.lead { font-size: 1.22rem; }
.center { text-align: center; }

/* --- Tlačidlá ------------------------------------------------------------ */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 50px; padding: .65rem 1.4rem; font: 800 1rem/1.2 var(--font-body); border-radius: 999px; border: 2px solid transparent; cursor: pointer; transition: background var(--tr), color var(--tr), border-color var(--tr), transform .15s; text-align: center; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--rust); color: var(--on-accent); }
.btn-primary:hover { background: var(--rust-hover); color: var(--on-accent); }
.btn-ghost { border-color: var(--teal); color: var(--teal-dark); background: transparent; }
.btn-ghost:hover { background: var(--teal); color: #fff; }
.btn-block { width: 100%; }
.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(251, 246, 238, .95); 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-weight: 800; font-size: 1.5rem; color: var(--heading); }
.logo span { color: var(--rust); }
.site-nav { display: flex; align-items: center; gap: 1.4rem; }
.site-nav a { color: var(--text); font-weight: 700; font-size: .98rem; }
.site-nav a:hover { color: var(--rust); }
.site-nav .nav-cta { background: var(--rust); color: #fff; padding: .45rem 1rem; border-radius: 999px; }
.site-nav .nav-cta:hover { background: var(--rust-hover); color: #fff; }
.menu-toggle { display: none; background: none; border: 0; color: var(--heading); cursor: pointer; padding: .5rem; }
.menu-toggle svg { width: 28px; height: 28px; }
@media (max-width: 860px) {
    .menu-toggle { display: block; }
    .site-header { background: rgba(251, 246, 238, .97); 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); }
    .site-nav .nav-cta { margin-top: .8rem; text-align: center; border-bottom: 0; }
}

/* --- Hero ---------------------------------------------------------------- */
.hero { padding: calc(var(--header-h) + clamp(1.5rem, 5vw, 3.5rem)) 0 clamp(2.5rem, 6vw, 4.5rem); overflow: hidden; }
.hero::before { /* jemné pierka v pozadí */
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background: radial-gradient(70% 60% at 85% 30%, rgba(47,130,112,.16), transparent 70%), radial-gradient(50% 50% at 10% 90%, rgba(248,192,143,.35), transparent 70%);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(1.5rem, 5vw, 4rem); align-items: center; }
.hero h1 { margin-bottom: .6rem; }
.hero h1 .accent { color: var(--teal); }
.hero-sub { font-size: clamp(1.1rem, 2.2vw, 1.28rem); max-width: 34rem; margin-bottom: 1.4rem; }
.hero-cover { justify-self: center; width: min(100%, 400px); position: relative; }
.hero-cover img { filter: drop-shadow(0 22px 30px rgba(31,92,79,.28)); }
.badge-sign {
    position: absolute; right: -.6rem; top: 12%; width: 128px; height: 128px; border-radius: 50%;
    background: var(--rust); color: #fff; display: grid; place-items: center; text-align: center;
    font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; line-height: 1.1; padding: .8rem;
    transform: rotate(10deg); box-shadow: var(--shadow-sm);
}
.badge-award { position: absolute; left: -.4rem; bottom: 6%; width: 92px; }

.hero-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; max-width: 32rem; margin-bottom: 1.2rem; }
.tile { display: flex; align-items: center; gap: .65rem; min-height: 58px; padding: .6rem .9rem; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); color: var(--heading); font-weight: 800; font-size: .98rem; line-height: 1.2; box-shadow: var(--shadow-sm); transition: border-color var(--tr), transform .15s; }
.tile:hover { border-color: var(--teal); color: var(--heading); transform: translateY(-2px); }
.tile svg { width: 30px; height: 30px; flex: none; color: var(--rust); }
.hero-buy { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem 1rem; }
.hero-buy span { color: var(--muted); font-size: .95rem; }

@media (max-width: 600px) {
    .hero { padding-top: calc(var(--header-h) + .9rem); padding-bottom: 5.5rem; }
    .hero-grid { grid-template-columns: 112px 1fr; column-gap: 1rem; row-gap: 0; align-items: start; }
    .hero-grid > div:first-child { display: contents; }
    .hero-cover { grid-column: 1; grid-row: 1 / span 2; width: 112px; order: 0; }
    .badge-sign, .badge-award { display: none; }
    .hero .eyebrow { grid-column: 2; grid-row: 1; font-size: .7rem; margin-bottom: .2rem; }
    .hero h1 { grid-column: 2; grid-row: 2; font-size: 2.2rem; margin-bottom: .6rem; }
    .hero-sub, .hero-tiles, .hero-buy { grid-column: 1 / -1; }
    .hero-sub { font-size: 1.02rem; line-height: 1.5; margin: .7rem 0 .9rem; }
    .hero-tiles { gap: .45rem; }
    .tile { min-height: 50px; font-size: .86rem; padding: .45rem .6rem; gap: .5rem; }
    .tile svg { width: 24px; height: 24px; }
    .hero-buy { display: none; }
}

/* --- Ukážky -------------------------------------------------------------- */
.samples { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; margin-top: 1.6rem; }
@media (max-width: 760px) { .samples { grid-template-columns: 1fr; } }
.panel { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 1.8rem); box-shadow: var(--shadow-sm); }
.panel h3 { color: var(--heading); }
.audio-frame { width: 100%; height: 200px; border: 0; border-radius: 10px; margin-top: .8rem; background: var(--bg-2); }
.panel .btn-row { margin-top: 1rem; }
.pdf-pages { display: flex; gap: .5rem; margin-top: .8rem; }

/* --- O knihe ------------------------------------------------------------- */
.two-col { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: start; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; } }
.counters { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; margin-top: 1.6rem; }
.counter { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); text-align: center; padding: .8rem .3rem; }
.counter b { display: block; font-family: var(--font-display); font-size: 2.1rem; line-height: 1; color: var(--teal); }
.counter span { font-size: .85rem; color: var(--muted); }
@media (max-width: 520px) { .counters { grid-template-columns: repeat(2, 1fr); } }
.cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; align-items: end; }
.cats figure { text-align: center; }
.cats img { height: 120px; width: auto; margin: 0 auto .4rem; }
.cats figcaption { font-family: var(--font-display); font-weight: 700; color: var(--heading); line-height: 1.1; }
.cats figcaption small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .78rem; color: var(--muted); }

/* --- Čo sa deti dozvedia -------------------------------------------------- */
.learn { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: .8rem; margin-top: 1.4rem; }
.learn li { list-style: none; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); border-radius: var(--radius); padding: .9rem 1rem; display: flex; gap: .7rem; align-items: flex-start; }
.learn li svg { width: 26px; height: 26px; flex: none; color: var(--peach); margin-top: .1rem; }

/* --- Kapitoly ------------------------------------------------------------ */
details.chapters { margin-top: 1.4rem; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
details.chapters summary { cursor: pointer; font-weight: 800; color: var(--heading); }
details.chapters ol { columns: 2 240px; column-gap: 2rem; margin: .8rem 0 0 1.4rem; }
details.chapters li { padding: .15rem 0; break-inside: avoid; }

/* --- Recenzie ------------------------------------------------------------ */
.reviews { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; margin-top: 1.6rem; }
.review { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 1.3rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); }
.review::before { content: '„'; font-family: Georgia, serif; font-size: 3rem; line-height: .5; color: var(--rust); }
.review p { flex: 1; margin-top: .6rem; }
.review footer { margin-top: .9rem; font-size: .88rem; color: var(--muted); }
.review footer a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.award-strip { display: flex; align-items: center; gap: 1rem; justify-content: center; margin-top: 1.8rem; text-align: left; }
.award-strip img { width: 76px; }

/* --- Hra so Žabkom (prevzatá z pôvodného webu, bez jQuery) --------------- */
.game-wrap { display: grid; place-items: center; margin-top: 1.4rem; }
#obalka { width: 100%; max-width: 360px; aspect-ratio: 360 / 500; position: relative; background: #298069; margin: auto; overflow: hidden; border-radius: 6px; box-shadow: 10px 10px 0 rgba(0,0,0,.12); touch-action: manipulation; }
#obalka #autor h2 { font: 400 1.15rem/1 var(--font-body); color: #fff; text-align: center; margin-top: 15px; }
#macky { position: absolute; left: 10%; right: 10%; bottom: 15%; width: 80%; display: flex; }
#macky img { width: 20%; height: auto; margin-left: 2%; transition: margin-top .1s; }
#macky img:hover { margin-top: -5px; }
#jazyk { position: absolute; width: 2%; height: 1.4%; top: 68.8%; left: 76.1%; }
#perina { position: absolute; bottom: -20px; left: -5%; width: 110%; height: auto; }
#nadpis { position: absolute; width: 80%; top: 14%; left: 10%; }
#nadpis img { position: absolute; width: 100%; height: auto; }
#skrabance { opacity: 0; animation: drop-in 1s 2s ease-out forwards; }
@keyframes drop-in { 0% { opacity: 0; transform: translateY(-120%); } 60% { opacity: 1; transform: translateY(8%); } 100% { opacity: 1; transform: none; } }
@keyframes snowflakes-fall { 0% { top: -20%; } 100% { top: 100%; } }
@keyframes snowflakes-shake { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(80px); } }
.snowflake { position: absolute; top: -20%; z-index: 5; user-select: none; cursor: pointer; animation-name: snowflakes-fall, snowflakes-shake; animation-duration: 10s, 3s; animation-timing-function: linear, ease-in-out; animation-iteration-count: infinite, infinite; animation-play-state: running, running; }
.snowflake:nth-of-type(1) { left: 10%; animation-delay: 1s, 1s; }
.snowflake:nth-of-type(2) { left: 20%; animation-delay: 6s, .5s; }
.snowflake:nth-of-type(3) { left: 30%; animation-delay: 4s, 2s; }
.snowflake:nth-of-type(4) { left: 40%; animation-delay: 2s, 2s; }
.snowflake:nth-of-type(5) { left: 50%; animation-delay: 8s, 3s; }
.snowflake:nth-of-type(6) { left: 60%; animation-delay: 6s, 2s; }
.snowflake:nth-of-type(7) { left: 70%; animation-delay: 2.5s, 1s; }
.snowflake:nth-of-type(8) { left: 80%; animation-delay: 1s, 0s; }
.snowflake:nth-of-type(9) { left: 90%; animation-delay: 3s, 1.5s; }
.snowflake:nth-of-type(10) { left: 25%; animation-delay: 2s, 0s; }
.paused, .lickpaused { animation-play-state: paused !important; }
.game-score { text-align: center; margin-top: .8rem; font-weight: 800; color: var(--teal-dark); min-height: 1.6em; }
@media (prefers-reduced-motion: reduce) { .snowflake { animation-duration: 20s, 6s; } }

/* --- Autorka ------------------------------------------------------------- */
.author { display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(1.5rem, 5vw, 3.5rem); align-items: center; }
.author-photo img { border-radius: 50%; box-shadow: var(--shadow); max-width: 300px; margin: 0 auto; border: 8px solid #fff; }
.interview { margin-top: 1.2rem; background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; }
.interview audio { width: 100%; margin-top: .6rem; }
@media (max-width: 760px) { .author { grid-template-columns: 1fr; } .author-photo img { max-width: 220px; } }

/* --- Kúpiť --------------------------------------------------------------- */
.buy-main { display: grid; grid-template-columns: auto 1fr; gap: 1.6rem; align-items: center; background: var(--surface); border: 3px solid var(--rust); border-radius: 20px; padding: clamp(1.2rem, 3vw, 2rem); box-shadow: var(--shadow); max-width: 860px; margin: 1.6rem auto 0; text-align: left; }
.buy-main img { width: 150px; }
.buy-main .price { font-family: var(--font-display); font-size: 2.6rem; line-height: 1; color: var(--rust); margin: .3rem 0 .6rem; }
.buy-main ul { margin: .4rem 0 1rem 1.2rem; }
@media (max-width: 640px) { .buy-main { grid-template-columns: 1fr; text-align: center; } .buy-main img { margin: 0 auto; width: 130px; } .buy-main ul { text-align: left; } }
.buy-more { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: .8rem; max-width: 860px; margin: 1rem auto 0; }
.buy-alt { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius); padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; }
.buy-alt .t { font-weight: 800; color: var(--heading); }
.buy-alt .d { font-size: .92rem; color: var(--muted); flex: 1; }
.buy-note { text-align: center; margin-top: 1.2rem; color: var(--muted); font-size: .92rem; }

/* --- Novinky, zdieľanie, pätička ----------------------------------------- */
.subscribe { max-width: 460px; margin: 1rem auto 0; text-align: left; }
.subscribe input[type="email"] { width: 100%; min-height: 50px; padding: .6rem 1rem; font: inherit; border: 2px solid var(--border); border-radius: 999px; background: #fff; margin-bottom: .7rem; }
.subscribe input[type="email"]:focus { border-color: var(--teal); 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(--teal); width: 18px; height: 18px; flex: none; }
.subscribe .hp { position: absolute; left: -9999px; }
.form-msg { margin-top: .7rem; font-size: .92rem; min-height: 1.4em; }
.subscribe.is-done .form-msg { color: var(--teal); }
.subscribe.is-error .form-msg { color: var(--rust); }
.share-row { display: flex; justify-content: center; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.share-btn { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2px solid var(--border); color: var(--heading); cursor: pointer; }
.share-btn:hover { border-color: var(--teal); }
.share-btn svg { width: 20px; height: 20px; }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--heading); color: #fff; padding: .55rem 1rem; border-radius: 99px; font-size: .9rem; transition: all .3s; z-index: 950; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.site-footer { border-top: 1px solid var(--border); padding: 2.2rem 0 6rem; 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; }
@media (min-width: 861px) { .site-footer { padding-bottom: 2.2rem; } }

/* --- Lepkavá lišta Kúpiť (mobil) ----------------------------------------- */
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 850; padding: .6rem 1rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 2px solid var(--border); display: flex; align-items: center; gap: .8rem; transform: translateY(110%); transition: transform .35s ease; }
.sticky-buy.show { transform: none; }
.sticky-buy img { width: 40px; border-radius: 3px; }
.sticky-buy .t { flex: 1; font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; line-height: 1.1; color: var(--heading); }
.sticky-buy .t small { display: block; font-family: var(--font-body); font-weight: 600; font-size: .78rem; color: var(--muted); }
.sticky-buy .btn { min-height: 44px; padding: .45rem 1.1rem; font-size: .95rem; }
@media (min-width: 861px) { .sticky-buy { display: none; } }

/* --- Textová podstránka -------------------------------------------------- */
.page { padding-top: calc(var(--header-h) + 3rem); padding-bottom: 3rem; }
.page h2 { font-size: 1.8rem; margin: 2rem 0 .7rem; }
.page ul { padding-left: 1.3rem; margin: .8rem 0; }
