/* Vovobooks: one stylesheet for the whole site. */
:root {
  --sea: #0b7285;
  --sea-d: #0b3d4a;
  --sea-l: #e3f4f6;
  --coral: #e8590c;
  --coral-d: #c2410c;
  --sun: #ffd43b;
  --sand: #fff8e7;
  --ink: #1f2a30;
  --muted: #5b6b73;
  --line: #e5dcc6;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 6px 22px rgba(11, 61, 74, .12);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font: 17px/1.6 var(--font); color: var(--ink); background: var(--sand); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--sea); text-underline-offset: 3px; }
a:hover { color: var(--coral-d); }
h1, h2, h3 { line-height: 1.2; color: var(--sea-d); margin: 0 0 .5em; font-weight: 800; }
h1 { font-size: clamp(1.9rem, 4.5vw, 2.8rem); }
h2, .h2 { font-size: clamp(1.45rem, 3vw, 1.9rem); }
h3, .h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.narrow { max-width: 760px; }
.small { font-size: .88rem; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--sea-d); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { left: 0; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; border-radius: 6px; }

/* ---------- Buttons and chips ---------- */
.btn { display: inline-block; background: var(--coral); color: #fff; font-weight: 800; text-decoration: none;
  padding: .55rem 1.15rem; border-radius: 999px; border: 2px solid var(--coral); cursor: pointer; font: inherit;
  font-weight: 800; line-height: 1.3; transition: transform .12s, background .12s; }
.btn:hover { background: var(--coral-d); border-color: var(--coral-d); color: #fff; transform: translateY(-1px); }
.btn-big { font-size: 1.12rem; padding: .75rem 1.6rem; }
.btn-ghost { background: transparent; color: var(--sea); border-color: var(--sea); }
.btn-ghost:hover { background: var(--sea); border-color: var(--sea); color: #fff; }
.chip { display: inline-block; background: var(--sea-l); color: var(--sea-d); font-size: .85rem; font-weight: 700;
  padding: .15rem .65rem; border-radius: 999px; margin: 0 .25rem .3rem 0; }
.chip-free { background: #fff3bf; color: #7a5b00; }

/* ---------- Header ---------- */
.top { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.logo img { width: 168px; height: auto; }
.menu { display: flex; align-items: center; gap: .2rem; flex-wrap: wrap; justify-content: flex-end; }
.menu a { text-decoration: none; color: var(--sea-d); font-weight: 700; padding: .4rem .7rem; border-radius: 999px; }
.menu a:hover, .menu a[aria-current] { background: var(--sea-l); color: var(--sea-d); }
.menu .lang { border: 2px solid var(--sea); color: var(--sea); margin-left: .3rem; }
.menu .lang:hover { background: var(--sea); color: #fff; }
.lang-short { display: none; }
@media (max-width: 560px) {
  .logo img { width: 104px; }
  .top-in { gap: .4rem; }
  .menu { flex-wrap: nowrap; gap: 0; }
  .menu a { padding: .3rem .45rem; font-size: .92rem; }
  .menu .lang { margin-left: .15rem; }
  .grid { gap: .8rem; }
  .card-body { padding: .7rem .8rem 1rem; }
  .card h3 { font-size: 1.02rem; }
  .card .sub { font-size: .85rem; }
  .chip { font-size: .75rem; padding: .1rem .5rem; }
  .lang-long { display: none; }
  .lang-short { display: inline; }
}

/* ---------- Home ---------- */
.hero { position: relative; background: linear-gradient(180deg, #d7f1f4 0%, #a9dfe6 100%); padding: 2.5rem 0 4.5rem; overflow: hidden; }
.hero-in { display: grid; grid-template-columns: 1.4fr 1fr; align-items: center; gap: 2rem; }
.hero h1 { color: var(--sea-d); }
.hero p { font-size: 1.15rem; max-width: 36em; }
.hero-img { width: min(300px, 100%); justify-self: center; filter: drop-shadow(0 10px 18px rgba(11, 61, 74, .25)); }
.waves { position: absolute; left: 0; right: 0; bottom: -1px; height: 48px;
  background: radial-gradient(circle at 50% 100%, var(--sand) 34px, transparent 35px) 0 0 / 70px 48px repeat-x; }
@media (max-width: 720px) {
  .hero { padding-top: 1.5rem; }
  .hero-in { grid-template-columns: 1fr; text-align: center; }
  .hero p { margin-inline: auto; }
  .hero-img { width: 170px; grid-row: 1; }
}
section.wrap { padding: 2.2rem 0 1rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 42%), 1fr)); gap: 1.2rem; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden;
  display: flex; flex-direction: column; transition: transform .15s, box-shadow .15s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 10px 28px rgba(11, 61, 74, .18); }
.card-img { position: relative; display: block; aspect-ratio: 6 / 5; background: var(--sea-l); }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: .9rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card h3 { margin-bottom: .2rem; }
.card h3 a { text-decoration: none; color: var(--sea-d); }
.card h3 a:hover { color: var(--coral-d); }
.card .sub { color: var(--muted); font-size: .95rem; margin-bottom: .5rem; }
.card .meta { margin-bottom: .8rem; }
.card .btn { margin-top: auto; align-self: flex-start; }
.card.soon { opacity: .92; }
.card.soon .card-body { padding-bottom: .9rem; }
.ribbon { position: absolute; top: .7rem; right: .7rem; background: var(--sun); color: #5c4400; font-weight: 800;
  font-size: .85rem; padding: .2rem .7rem; border-radius: 999px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.grid-soon { grid-template-columns: repeat(auto-fill, minmax(min(190px, 42%), 1fr)); }
.features { background: #fff; margin-top: 2.5rem; padding: 2rem 0; border-block: 1px solid var(--line); }
.feat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1.5rem; }
.feat { text-align: center; padding: .5rem 1rem; }
.feat-ico { font-size: 2.3rem; display: block; margin-bottom: .3rem; }
.feat p { color: var(--muted); margin: 0; }

/* ---------- Book page ---------- */
.crumbs { font-size: .9rem; color: var(--muted); padding-top: 1.2rem; }
.crumbs a { color: var(--muted); }
.book { padding-top: 1rem; }
.book-top { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 2.2rem; align-items: start; }
.book-cover img { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; }
.book-cover { display: block; transition: transform .15s; }
a.book-cover:hover { transform: scale(1.01); }
.series { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 800; color: var(--coral-d); margin-bottom: .3rem; }
.book-info .sub { font-size: 1.2rem; color: var(--muted); margin-top: -.2rem; }
.summary { font-size: 1.07rem; }
.actions { display: flex; flex-wrap: wrap; gap: .7rem; margin: 1.2rem 0 1.4rem; }
.credits { display: grid; grid-template-columns: auto 1fr; gap: .25rem 1rem; margin: 0; font-size: .95rem; }
.credits dt { color: var(--muted); }
.credits dd { margin: 0; font-weight: 700; }
@media (max-width: 820px) { .book-top { grid-template-columns: 1fr; gap: 1.4rem; } }

.share { margin: 2.2rem 0 0; padding: 1.2rem 1.4rem; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.share h2 { margin-bottom: .7rem; }
.share-row { display: flex; flex-wrap: wrap; gap: .5rem; }
.sh { display: inline-block; text-decoration: none; color: #fff; font: inherit; font-weight: 800; font-size: .95rem;
  padding: .45rem 1rem; border-radius: 999px; border: 0; cursor: pointer; }
.sh:hover { color: #fff; filter: brightness(.92); }
.sh-wa { background: #128c4a; } .sh-fb { background: #1877f2; } .sh-pin { background: #c8102e; }
.sh-mail, .sh-native { background: var(--sea); } .sh-copy { background: var(--sea-d); }

.story { margin-top: 2.6rem; }
.story-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.story-head p { margin: 0; }
.pages { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.pg { background: #fff; border-radius: 14px; padding: 1rem 1.3rem; border-left: 5px solid var(--sea);
  display: grid; grid-template-columns: 6.5rem 1fr; gap: .2rem 1.2rem; }
.pg-n { font-size: .82rem; font-weight: 800; color: var(--sea); text-decoration: none; white-space: nowrap; padding-top: .2rem; }
.pg-n:hover { text-decoration: underline; }
.pg-text p { margin: 0 0 .55em; font-size: 1.08rem; }
.pg-text p:last-child { margin-bottom: 0; }
.pg-other { display: none; color: #44535a; }
.pages.both .pg { grid-template-columns: 6.5rem 1fr 1fr; }
.pages.both .pg-other { display: block; border-left: 2px dashed var(--line); padding-left: 1.2rem; }
@media (max-width: 720px) {
  .pg, .pages.both .pg { grid-template-columns: 1fr; }
  .pages.both .pg-other { border-left: 0; padding-left: 0; border-top: 2px dashed var(--line); padding-top: .6rem; margin-top: .4rem; }
}
.more { padding-top: 3rem !important; }

/* ---------- Text pages and form ---------- */
.page-text { padding-top: 2.2rem !important; }
.page-text h2 { margin-top: 1.6em; }
.page-text .lead { font-size: 1.2rem; }
.page-text ul { padding-left: 1.2rem; }
.page-text li { margin-bottom: .4rem; }
.form { display: grid; gap: .35rem; background: #fff; padding: 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow); }
.form label { font-weight: 700; margin-top: .6rem; }
.form input, .form textarea { font: inherit; padding: .65rem .8rem; border: 2px solid var(--line); border-radius: 12px; width: 100%; background: #fffdf8; }
.form input:focus, .form textarea:focus { border-color: var(--sea); outline: none; }
.form [aria-invalid="true"] { border-color: #c92a2a; }
.form .btn { justify-self: start; margin-top: .4rem; }
.field-err { color: #c92a2a; font-size: .92rem; margin: 0; }
.note { padding: .9rem 1.1rem; border-radius: 12px; font-weight: 700; }
.note.ok { background: #d3f9d8; color: #1b5e20; }
.note.err { background: #ffe3e3; color: #8a1c1c; }
.hp { position: absolute; left: -5000px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- E-mail sign-up ---------- */
.signup { padding-top: 2.5rem !important; }
.signup-in { display: flex; align-items: center; gap: 1.2rem 1.6rem; background: linear-gradient(135deg, #fff3bf, #ffe8cc);
  border-radius: var(--radius); padding: 1.4rem 1.8rem; box-shadow: var(--shadow); }
.signup-in h2 { margin-bottom: .25rem; }
.signup-in p { margin: 0; color: #5c4a2a; }
.signup-in > div { flex: 1; }
.signup-in .btn { white-space: nowrap; }
.signup-ico { font-size: 2.4rem; }
@media (max-width: 720px) { .signup-in { flex-direction: column; text-align: center; } }
.r-signup { position: fixed; left: 50%; bottom: 5.2rem; transform: translateX(-50%); background: var(--sun); color: #3d2e00;
  font-weight: 800; text-decoration: none; padding: .55rem 1.2rem; border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.35); white-space: nowrap; z-index: 5; }
.r-signup:hover { color: #3d2e00; filter: brightness(1.05); }
.r-signup[hidden] { display: none; }

/* ---------- Footer ---------- */
.foot { margin-top: 3.5rem; background: var(--sea-d); color: #d8eef1; padding: 2rem 0; }
.foot-in { display: flex; gap: 1.2rem; align-items: center; }
.foot p { margin: .2rem 0; }
.foot a { color: #fff; }
.foot img { flex: none; }

/* ---------- Reader ---------- */
.reader-page { background: radial-gradient(ellipse at center, #135e6e 0%, #0b3d4a 70%); color: #fff; overflow: hidden; }
.reader { height: 100vh; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; background: inherit; }
.r-bar, .r-nav { display: flex; align-items: center; gap: .6rem; padding: .45rem .8rem; padding-left: max(.8rem, env(safe-area-inset-left)); padding-right: max(.8rem, env(safe-area-inset-right)); }
.r-bar { background: rgba(0, 0, 0, .25); }
.r-title { flex: 1; margin: 0; font-size: 1.05rem; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-tools { display: flex; gap: .4rem; }
.r-btn { display: inline-grid; place-items: center; min-width: 44px; height: 44px; padding: 0 .6rem; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: #fff; border: 0; cursor: pointer; text-decoration: none; font: inherit; font-weight: 800; }
.r-btn:hover { background: rgba(255, 255, 255, .28); color: #fff; }
.r-btn:disabled { opacity: .35; cursor: default; }
.r-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.r-stage { position: relative; min-height: 0; overflow: hidden; touch-action: none; }
.r-book { position: absolute; inset: .8rem; }
.r-book .page { background: #fff; overflow: hidden; }
.r-book .page img { width: 100%; height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.r-loading { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; font-weight: 700; }
.reader.ready .r-loading { display: none; }
.reader:not(.ready) .r-book { visibility: hidden; }
.r-nav { justify-content: center; gap: 1.2rem; padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
.r-count { margin: 0; min-width: 6.5rem; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.r-arrow { min-width: 56px; height: 52px; background: var(--coral); }
.r-arrow:hover { background: var(--coral-d); }
.r-hint { position: fixed; left: 50%; bottom: 5.2rem; transform: translateX(-50%); margin: 0; background: rgba(0, 0, 0, .55);
  padding: .4rem .9rem; border-radius: 999px; font-size: .9rem; pointer-events: none; transition: opacity .6s; white-space: nowrap; }
.r-hint.gone { opacity: 0; }
/* simple viewer (when StPageFlip is not available) */
.r-book.simple { display: grid; place-items: center; cursor: pointer; }
.r-book.simple .page { display: none; position: absolute; inset: 0; background: transparent; }
.r-book.simple .page.on { display: block; }
.r-book.simple .page img { filter: drop-shadow(0 8px 24px rgba(0, 0, 0, .45)); }
.reader:fullscreen { width: 100%; height: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .btn, .book-cover { transition: none; }
}
