/* Ospalek – tokeny podle brand manuálu. Den = výchozí, Noc podle nastavení systému. */
:root {
  --surface: #F7F5FC;
  --surface-raised: #FFFFFF;
  --line: #E3DFF2;
  --ink: #2E3150;
  --ink-muted: #5E6180;
  --lavender: #C9C3EC;
  --lavender-ink: #5B4FB0;
  --lavender-soft: #ECE9FA;
  --on-lavender: #FFFFFF;
  --peach: #FFCFB3;
  --mint: #CDEBDD;
  --sky: #BFDDF2;
  --honey: #F6D98B;
  --on-pastel: #2E3150;
  --focus-ring: var(--lavender-ink);
  --night: #1C1E33;
  --night-raised: #262942;
  --night-ink: #EEEBFA;
  --night-muted: #B4B2CF;
  --radius-sm: 12px;
  --radius-md: 22px;
  --radius-lg: 32px;
  --radius-pill: 999px;
  --shadow-soft: 0 8px 24px rgba(46, 49, 80, .12);
  /* Plyš: vlákna fleecu, prošívání a polštářkový stín (brand/maskot-3d) */
  --felt: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .18 0 0 0 0 .19 0 0 0 0 .31 .16 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --felt-night: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .93 0 0 0 0 .92 0 0 0 0 .98 .1 0 0 0 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  --stitch: rgba(46, 49, 80, .2);
  --stitch-on-accent: rgba(255, 255, 255, .55);
  --stitch-night: rgba(238, 235, 250, .18);
  --shadow-plush: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -6px 14px rgba(46, 49, 80, .06), 0 2px 3px rgba(46, 49, 80, .06), 0 10px 22px rgba(46, 49, 80, .1);
  --shadow-pillow: inset 0 2px 0 rgba(255, 255, 255, .35), inset 0 -5px 10px rgba(0, 0, 0, .14), 0 6px 14px rgba(46, 49, 80, .18);
  /* Fredoka nemá ě, č, ř, ů, ň, ť, ď – nadpisy proto v Nunitu, Fredoka jen ve slově „ospalek“ v logu */
  --display: "Nunito", ui-rounded, system-ui, sans-serif;
  --logo: "Fredoka", "Nunito", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #1C1E33;
    --surface-raised: #262942;
    --line: #3A3D5C;
    --ink: #EEEBFA;
    --ink-muted: #B4B2CF;
    --lavender: #8F86D1;
    --lavender-ink: #C9C3EC;
    --lavender-soft: #2E2C52;
    --on-lavender: #1C1E33;
    --peach: #E8A486;
    --mint: #7FBFA3;
    --sky: #7BAED3;
    --honey: #E4C066;
    --on-pastel: #1C1E33;
    --night: #14162A;
    --night-raised: #22253D;
    --felt: var(--felt-night);
    --stitch: rgba(238, 235, 250, .18);
    --stitch-on-accent: rgba(28, 30, 51, .35);
    --shadow-plush: inset 0 1px 0 rgba(255, 255, 255, .06), inset 0 -6px 14px rgba(0, 0, 0, .18), 0 10px 22px rgba(0, 0, 0, .3);
    --shadow-pillow: inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -5px 10px rgba(0, 0, 0, .18), 0 6px 14px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
html, body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--body); -webkit-text-size-adjust: 100%; }
body { font-size: 17px; line-height: 1.6; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); line-height: 1.1; letter-spacing: -.015em; }
h1 { font-weight: 900; }
h2 { font-weight: 900; font-size: clamp(30px, 7vw, 46px); text-wrap: balance; }
h3 { font-weight: 800; font-size: 20px; line-height: 1.25; letter-spacing: 0; }
p { margin: 0; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; }
.lead { color: var(--ink-muted); font-size: 18px; line-height: 1.55; margin-top: 14px; max-width: 34em; }
.wordmark { font-family: var(--logo); font-weight: 600; text-transform: lowercase; color: var(--ink); }
.kid { color: var(--lavender-ink); background: var(--lavender-soft); border-radius: 8px; padding: 0 .18em; box-decoration-break: clone; -webkit-box-decoration-break: clone; animation: pop .45s ease-out; }
@keyframes pop { 0% { background: var(--honey); } 100% { background: var(--lavender-soft); } }

/* Tlačítka */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--lavender-ink); color: var(--on-lavender); text-decoration: none; font-weight: 900; font-size: 17px; line-height: 1.2; padding: 15px 24px; border-radius: var(--radius-pill); text-align: center; transition: transform .12s, box-shadow .12s; }
.btn:hover { box-shadow: var(--shadow-soft); transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn-sm { font-size: 15px; padding: 10px 18px; }
.btn-lg { font-size: 18px; padding: 17px 28px; }
.btn-xl { font-size: 20px; padding: 20px 30px; width: 100%; }
.btn-arrow { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.btn.center { display: flex; width: fit-content; margin: 40px auto 0; }

/* Navigace */
.nav { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 16px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin: 0; }
.brand img { width: 36px; height: 36px; }
.brand .wordmark { font-size: 26px; line-height: 1; }
.nav-links { display: none; gap: 28px; margin-left: auto; }
.nav-links a { text-decoration: none; color: var(--ink-muted); font-weight: 800; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }
.nav .btn { margin-left: auto; }

/* Hero */
.hero { padding: 32px 0 56px; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr); }
/* na mobilu: nadpis, jméno, hned obálky (aby byla změna vidět), pak tlačítko */
.hero-copy { display: contents; }
.shelf { order: 1; margin-top: 22px !important; }
.hero-cta { order: 2; }
.hero h1 { font-size: clamp(40px, 11vw, 76px); line-height: 1.02; text-wrap: balance; }
.hero-sub { font-size: 20px; color: var(--ink-muted); margin-top: 16px; font-weight: 600; }
.namebox { margin-top: 24px; background: var(--surface-raised); border-radius: var(--radius-lg); padding: 18px; box-shadow: var(--shadow-soft); }
.namebox label { display: block; font-weight: 800; font-size: 15px; color: var(--ink-muted); margin-bottom: 10px; }
.namebox-row { display: flex; flex-wrap: wrap; gap: 10px; }
.namebox input { flex: 1 1 180px; min-width: 0; font: 900 26px/1.2 var(--display); color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-md); padding: 12px 16px; }
.namebox input::placeholder { color: var(--ink-muted); opacity: .55; }
.namebox input:focus { outline: none; border-color: var(--lavender-ink); }
.gender { display: flex; background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius-pill); padding: 4px; flex: 0 0 auto; }
.gender button { font: 800 15px var(--body); color: var(--ink-muted); background: none; border: 0; border-radius: var(--radius-pill); padding: 10px 16px; cursor: pointer; }
.gender button[aria-pressed="true"] { background: var(--lavender-ink); color: var(--on-lavender); }
.hero-cta { margin-top: 20px; }
.hero-fine { margin-top: 12px; color: var(--ink-muted); font-size: 15px; font-weight: 700; text-align: center; }

/* Police s pohádkami na jméno */
.shelf { list-style: none; padding: 0 20px 8px; margin: 0 -20px; display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 20px; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.book { flex: 0 0 40%; scroll-snap-align: start; }
.book img { border-radius: var(--radius-md); box-shadow: var(--shadow-soft); aspect-ratio: 573 / 768; object-fit: cover; }
.book p { font-family: var(--display); font-weight: 800; font-size: 15px; line-height: 1.3; margin-top: 10px; }

/* Poslech – vždy noční pás */
.sec { padding: 72px 0; }
.listen { background: var(--night); color: var(--night-ink); }
.listen .lead { color: var(--night-muted); }
.listen-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.player { display: flex; gap: 16px; align-items: center; background: var(--night-raised); border-radius: var(--radius-lg); padding: 14px; }
.player-cover { width: 84px; border-radius: var(--radius-sm); flex: 0 0 auto; }
.player-main { flex: 1; min-width: 0; }
.player-t { font-weight: 900; font-size: 18px; line-height: 1.25; }
.player-d { color: var(--night-muted); font-size: 14px; font-weight: 600; margin-top: 2px; }
.player-ctrl { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.play { flex: 0 0 auto; width: 56px; height: 56px; border-radius: 50%; border: 0; background: #C9C3EC; color: #1C1E33; display: grid; place-items: center; cursor: pointer; }
.play svg { width: 26px; height: 26px; fill: currentColor; }
.play .i-pause, .play.playing .i-play { display: none; }
.play.playing .i-pause { display: block; }
.track { flex: 1; height: 8px; background: rgba(238, 235, 250, .15); border-radius: var(--radius-pill); overflow: hidden; cursor: pointer; }
.track-bar { width: 0; height: 100%; background: #F6D98B; transition: width .2s linear; }
.track-time { color: var(--night-muted); font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Stránka z pohádky */
.page-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: start; }
.town { display: block; font-weight: 800; font-size: 15px; color: var(--ink-muted); margin: 22px 0 8px; }
.town-input { width: 100%; max-width: 360px; font: 900 22px/1.2 var(--display); color: var(--ink); background: var(--surface-raised); border: 2px solid var(--line); border-radius: var(--radius-md); padding: 12px 16px; }
.town-input::placeholder { color: var(--ink-muted); opacity: .55; }
.town-input:focus { outline: none; border-color: var(--lavender-ink); }
.storypage { background: var(--surface-raised); border-radius: var(--radius-lg); padding: 28px 24px; box-shadow: var(--shadow-soft); font-size: 19px; line-height: 1.7; }
.storypage p + p { margin-top: 14px; }
.storypage .fade { -webkit-mask-image: linear-gradient(#000 20%, transparent); mask-image: linear-gradient(#000 20%, transparent); }

/* Jak to funguje */
.how { background: var(--surface-raised); }
.how h2 { text-align: center; max-width: 16em; margin: 0 auto; }
.how-steps { list-style: none; padding: 0; margin: 44px 0 0; display: grid; gap: 36px; }
.how-steps li { text-align: center; max-width: 320px; margin: 0 auto; }
.how-steps img { width: 180px; height: 135px; object-fit: contain; margin: 0 auto 14px; }
.how-steps p { color: var(--ink-muted); margin-top: 6px; }

/* Kategorie */
.moment-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 12px; }
.moment-list li { background: var(--c); color: var(--on-pastel); border-radius: var(--radius-lg); padding: 18px; display: flex; gap: 16px; align-items: center; }
.moment-list img { width: 72px; height: 72px; flex: 0 0 auto; background: rgba(255, 255, 255, .55); border-radius: 50%; padding: 6px; }
.moment-list p { font-size: 15px; line-height: 1.45; font-weight: 600; margin-top: 2px; }
.moment-list .kid { color: inherit; background: rgba(255, 255, 255, .55); animation: none; }

/* Cena */
.price-sec { background: var(--lavender-soft); }
.price-in { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.price-card { background: var(--surface-raised); border-radius: var(--radius-lg); padding: 22px; box-shadow: var(--shadow-soft); display: grid; gap: 4px; }
.price-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); font-weight: 800; }
.price-row b { font-family: var(--display); font-weight: 900; font-size: 26px; }
.price-row em { font-style: normal; font-size: 12px; font-weight: 900; letter-spacing: .04em; color: var(--on-pastel); background: var(--mint); border-radius: var(--radius-pill); padding: 3px 9px; margin-left: 6px; vertical-align: 2px; }
.price-per { color: var(--ink-muted); font-size: 15px; margin: 10px 4px 14px; }
.price-card .btn { width: 100%; }
.price-note { color: var(--ink-muted); font-size: 13px; margin: 10px 4px 0; }

/* FAQ */
.faq { margin-top: 28px; display: grid; gap: 10px; }
.faq details { background: var(--surface-raised); border-radius: var(--radius-md); padding: 0 20px; }
.faq summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; font-weight: 800; font-size: 18px; line-height: 1.35; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 10px; height: 10px; border: solid var(--lavender-ink); border-width: 0 3px 3px 0; transform: translateY(-70%) rotate(45deg); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq details p { color: var(--ink-muted); padding-bottom: 18px; }

/* Závěr */
.end { text-align: center; background: var(--night); color: var(--night-ink); }
.end-mascot { width: 200px; height: 200px; object-fit: contain; margin: 0 auto 24px; background: #ECE9FA; border-radius: 50%; padding: 26px 20px 30px; }
.end h2 { max-width: 14em; margin: 0 auto 28px; }
.end .kid { color: #F6D98B; background: rgba(246, 217, 139, .14); animation: none; }
.end .btn-xl { width: auto; max-width: 100%; background: #C9C3EC; color: #1C1E33; }
.btn .kid { color: inherit; background: rgba(255, 255, 255, .22); animation: none; }
.end .btn .kid { background: rgba(28, 30, 51, .1); }
.end-fine { color: var(--night-muted); font-size: 15px; font-weight: 700; margin: 22px 0 14px; }

/* Badge obchodů – černé jako oficiální */
.stores { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.store { position: relative; display: inline-flex; align-items: center; gap: 10px; min-width: 176px; height: 54px; padding: 0 16px 0 12px; background: #000; color: #fff; border: 1px solid #a6a6a6; border-radius: 12px; text-decoration: none; }
.store-logo { width: 26px; height: 26px; flex: 0 0 auto; }
.store-txt { display: flex; flex-direction: column; text-align: left; line-height: 1.1; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.store-txt small { font-size: 11px; }
.store-txt b { font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.soon { display: none; }
.store.is-soon { cursor: default; opacity: .9; }
.store.is-soon .soon { display: block; position: absolute; top: -10px; right: -8px; background: #F6D98B; color: #2E3150; font-weight: 900; font-size: 11px; letter-spacing: .04em; padding: 3px 9px; border-radius: var(--radius-pill); }

/* Patička */
.foot { background: var(--night); color: var(--night-muted); border-top: 1px solid rgba(238, 235, 250, .08); padding: 28px 0 110px; font-size: 14px; }
.foot-in { display: grid; gap: 8px; }
.foot .wordmark { color: var(--night-ink); font-size: 22px; }
.foot .brand { display: flex; align-items: center; gap: 8px; }

/* Lepicí výzva (mobil) */
.sticky-cta { position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); box-shadow: 0 -8px 24px rgba(46, 49, 80, .12); transform: translateY(110%); transition: transform .25s ease; }
.sticky-cta.show { transform: none; }
.sticky-cta .btn { width: 100%; font-size: 18px; }

/* Plyš – látkový povrch, prošívání a polštářky místo plochých karet */
html, body, .nav, .sticky-cta { background-image: var(--felt); }
.how, .price-sec { background-image: var(--felt); }
.listen, .end, .foot { background-image: var(--felt-night); }
.namebox, .storypage, .price-card, .faq details { background-image: var(--felt); box-shadow: var(--shadow-plush); outline: 2px dashed var(--stitch); outline-offset: -8px; }
.player { background-image: var(--felt-night); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .3); outline: 2px dashed var(--stitch-night); outline-offset: -8px; }
.moment-list li { background-image: var(--felt); box-shadow: var(--shadow-plush); outline: 2px dashed var(--stitch-on-accent); outline-offset: -8px; }
.btn, .play { box-shadow: var(--shadow-pillow); outline: 2px dashed var(--stitch-on-accent); outline-offset: -6px; }
.btn:hover { box-shadow: var(--shadow-pillow), var(--shadow-soft); }
.gender button[aria-pressed="true"] { box-shadow: var(--shadow-pillow); }
.namebox input, .town-input, .gender { box-shadow: inset 0 3px 8px rgba(46, 49, 80, .06); }
.book img { box-shadow: 0 2px 3px rgba(46, 49, 80, .08), 0 14px 28px rgba(46, 49, 80, .16); }
.brand img { border-radius: 50%; }
.how-steps img { filter: drop-shadow(0 8px 12px rgba(46, 49, 80, .18)); }
.moment-list img { width: 80px; height: 80px; padding: 4px; background: var(--felt), rgba(255, 255, 255, .6); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -4px 8px rgba(46, 49, 80, .1); }
.end-mascot { width: 240px; height: 240px; padding: 22px; background: var(--felt), #ECE9FA; box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -10px 22px rgba(46, 49, 80, .12), 0 16px 36px rgba(0, 0, 0, .35); outline: 2px dashed rgba(46, 49, 80, .2); outline-offset: -10px; }

a:focus-visible, button:focus-visible, summary:focus-visible, .btn:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

/* Tablet a výš */
@media (min-width: 640px) {
  .shelf { overflow: visible; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); }
  .how-steps { grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .moment-list { grid-template-columns: 1fr 1fr; }
  .player-cover { width: 110px; }
}

/* Desktop */
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav .btn { margin-left: 8px; }
  .hero { padding: 56px 0 96px; }
  .hero-in { grid-template-columns: 1fr 1fr; align-items: center; gap: 48px; }
  .hero-copy { display: block; }
  .shelf { margin-top: 0 !important; }
  .book p { font-size: 17px; }
  .hero-cta .btn-xl { width: auto; }
  .hero-fine { text-align: left; }
  .hero-in { grid-template-columns: .95fr 1.05fr; }
  .shelf { grid-template-columns: repeat(3, 1fr); gap: 30px; align-items: start; padding-top: 24px; }
  .book-1 { transform: rotate(-4deg) translateY(28px); }
  .book-2 { transform: scale(1.12); z-index: 2; position: relative; }
  .book-3 { transform: rotate(4deg) translateY(28px); }
  .book p { font-size: 15px; }
  .sec { padding: 112px 0; }
  .listen-in { grid-template-columns: 1fr 1.1fr; gap: 56px; }
  .page-in { grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: center; }
  .storypage { padding: 40px 44px; }
  .how-steps { position: relative; }
  .how-steps::before { content: ""; position: absolute; top: 68px; left: 18%; right: 18%; border-top: 3px dashed var(--line); z-index: 0; }
  .how-steps li { position: relative; z-index: 1; }
  .price-in { grid-template-columns: 1fr 420px; gap: 64px; }
  .sticky-cta { display: none; }
  .foot { padding-bottom: 40px; }
  .foot-in { grid-template-columns: auto 1fr auto; align-items: center; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .kid { animation: none; }
}
