:root {
  --bg: #f3ebe0;
  --bg-deep: #e8dcc8;
  --fg: #2a231c;
  --muted: rgba(42, 35, 28, 0.78);
  --accent: #a67c2d;
  --badge: #8b4513;
  --nav: #3d3329;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: "Source Sans 3", system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% 0%, rgba(255, 252, 246, 0.95), transparent 55%),
    linear-gradient(165deg, var(--bg) 0%, var(--bg-deep) 100%);
  position: relative;
  overflow-x: hidden;
}

.decor {
  position: fixed;
  bottom: -8%;
  left: 50%;
  transform: translateX(-50%);
  width: min(120vw, 900px);
  height: auto;
  opacity: 0.07;
  pointer-events: none;
  z-index: 0;
}

.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  padding: 1rem 1.25rem 1.25rem;
  max-width: 56rem;
  margin: 0 auto;
  width: 100%;
  min-height: 3.25rem;
}

.logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.logo-link .logo {
  display: block;
  width: min(90px, 30vw);
  height: auto;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: center;
  gap: 0.35rem 1.25rem;
  font-size: 1.425rem;
  font-weight: 500;
  line-height: 1.15;
  padding-top: 0.12em;
}

.nav a {
  color: var(--nav);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--badge);
  border-bottom-color: rgba(139, 69, 19, 0.35);
}

.nav a[aria-current="page"] {
  color: var(--badge);
  border-bottom-color: var(--accent);
}

.lottie-hero {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 42rem;
  margin: -0.5cm auto 0;
  min-height: 13rem;
  max-height: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1rem 1rem;
  overflow: visible;
  isolation: isolate;
  border-radius: 14px;
  background: linear-gradient(
    165deg,
    rgba(180, 210, 255, 0.65) 0%,
    rgba(210, 230, 255, 0.5) 40%,
    rgba(230, 240, 255, 0.35) 100%
  );
  box-shadow:
    0 0 0 1px rgba(37, 99, 235, 0.2),
    0 8px 24px rgba(30, 64, 175, 0.08);
  transition:
    opacity 0.65s ease,
    max-height 0.65s ease,
    min-height 0.65s ease,
    margin 0.65s ease,
    padding 0.65s ease;
}

.lottie-hero.is-hidden {
  opacity: 0;
  max-height: 0;
  min-height: 0;
  margin: 0;
  padding: 0;
  pointer-events: none;
  overflow: hidden;
}

.lottie-hero .lottie-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  max-height: min(70vh, 32rem);
  filter: brightness(1.03);
}

.lottie-blue-wash {
  position: absolute;
  inset: 0;
  z-index: 2;
  border-radius: 14px;
  pointer-events: none;
  background: #2563eb;
  opacity: 0.4;
  mix-blend-mode: color;
}

.lottie-hero .lottie-inner svg {
  display: block;
  max-width: 100%;
}

main {
  flex: 1 0 auto;
  width: 100%;
}

main#knizky {
  padding-top: 0;
  transition: padding-top 0.65s ease;
}

#lottie-hero.is-hidden + main#knizky {
  padding-top: 1.75cm;
}

.content {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1cm 1.5rem 2.5rem;
  text-align: center;
}

.book-block {
  margin-bottom: 5.5rem;
}

.book-block:last-of-type {
  margin-bottom: 2rem;
}

.badge {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--badge);
  margin-bottom: 0.75rem;
}

.book-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.65rem, 5vw, 2.1rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--fg);
  margin-bottom: 1.25rem;
}

.book-cover {
  width: min(320px, 88vw);
  height: auto;
  border-radius: 4px;
  box-shadow:
    0 12px 28px rgba(42, 35, 28, 0.12),
    0 4px 8px rgba(42, 35, 28, 0.06);
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.book-cover + .lead {
  margin-top: 1.25rem;
}

.lead {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.2rem, 3.8vw, 1.45rem);
  font-weight: 500;
  line-height: 1.55;
  color: var(--muted);
  max-width: 28em;
  margin: 0 auto;
}

.poem-section {
  margin-top: 1.75rem;
  max-width: 28em;
  margin-left: auto;
  margin-right: auto;
}

.poem-hint {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1rem, 2.8vw, 1.15rem);
  font-style: italic;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 1rem;
}

.poem-text {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.05rem, 3.2vw, 1.25rem);
  font-weight: 500;
  line-height: 1.65;
  color: var(--muted);
  text-align: center;
  white-space: pre-line;
}

.ine-video {
  width: 10cm;
  max-width: 100%;
  margin: 0 auto 1.5rem;
}

.ine-video-inner {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #0a1628;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(42, 35, 28, 0.15);
}

.ine-video-inner iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.book-heading {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.5rem, 4.5vw, 1.85rem);
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--fg);
}

.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 1.5rem 1rem 2rem;
  font-size: 0.8rem;
  color: rgba(42, 35, 28, 0.38);
}

.ine-page .ine-body {
  max-width: 32rem;
  margin: 0 auto;
  padding: 1rem 1.5rem 3rem;
  text-align: left;
  color: var(--muted);
  line-height: 1.65;
}

.ine-page .ine-body--video {
  max-width: 40rem;
  text-align: center;
}

.ine-page .ine-body h1 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 600;
  color: var(--fg);
  margin-bottom: 1rem;
}

.ine-page .ine-body--video h1 {
  text-align: center;
  font-size: clamp(1.35rem, 4.2vw, 1.85rem);
  line-height: 1.28;
  margin-bottom: 1.25rem;
}

@media (max-width: 520px) {
  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav {
    width: 100%;
    justify-content: flex-start;
  }
}
