* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: #0d0b0a;
  color: #f8f2ea;
  font-family: Arial, Helvetica, sans-serif;
}

a {
  color: inherit;
}

.image-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  background: #181310;
}

.hero {
  position: relative;
  min-height: clamp(260px, 44vw, 620px);
  height: clamp(260px, 44vw, 620px);
  background: #000000;
}

.panel-image {
  display: block;
  width: 100%;
  height: auto;
}

.hero .panel-image {
  height: 100%;
  min-height: inherit;
  object-fit: contain;
  object-position: center;
}

.hero-actions {
  position: absolute;
  left: 50%;
  bottom: clamp(18px, 5vw, 72px);
  display: flex;
  width: min(92%, 760px);
  flex-wrap: wrap;
  justify-content: center;
  gap: clamp(10px, 2vw, 22px);
  transform: translateX(-50%);
}

.social-actions {
  position: absolute;
  top: clamp(12px, 2.5vw, 28px);
  right: clamp(12px, 3vw, 42px);
  display: flex;
  align-items: center;
  gap: clamp(8px, 1.4vw, 14px);
  z-index: 2;
}

.social-button {
  display: inline-flex;
  width: clamp(42px, 5vw, 58px);
  height: clamp(42px, 5vw, 58px);
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 6px;
  background: rgba(15, 11, 9, 0.78);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.social-button:hover,
.social-button:focus-visible {
  border-color: #ffffff;
  background: rgba(126, 25, 19, 0.92);
  transform: translateY(-2px);
}

.social-button img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 4px;
  background: rgba(15, 11, 9, 0.72);
  color: #fffaf3;
  font-size: clamp(13px, 1.5vw, 18px);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  overflow-wrap: anywhere;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.button:hover,
.button:focus-visible {
  border-color: #ffffff;
  background: rgba(126, 25, 19, 0.9);
  transform: translateY(-2px);
}

.book-panel + .book-panel {
  border-top: none;
}

.book-panel {
  position: relative;
  margin: 0;
  width: 100%;
}

.book-panel .panel-image {
  object-position: center;
  object-fit: contain;
}

.buy-button {
  position: absolute;
  left: 50%;
  bottom: clamp(30px, 10vw, 140px);
  width: min(78%, 420px);
  min-width: clamp(220px, 32vw, 360px);
  min-height: clamp(56px, 7vw, 78px);
  padding-inline: clamp(18px, 4vw, 34px);
  font-size: clamp(18px, 2.6vw, 30px);
  transform: translateX(-50%);
}

.buy-button:hover,
.buy-button:focus-visible {
  transform: translateX(-50%) translateY(-2px);
}

.subpage {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: clamp(18px, 4vw, 48px);
  background:
    linear-gradient(rgba(13, 11, 10, 0.78), rgba(13, 11, 10, 0.88)),
    url("baner.jpg") center / cover no-repeat;
}

.page-content {
  width: min(980px, 100%);
  padding: clamp(28px, 6vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(13, 11, 10, 0.82);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

.page-content h1 {
  margin: 22px 0 14px;
  font-size: clamp(15px, 6vw, 30px);
  letter-spacing: 0;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.page-content p {
  margin: 0 0 18px;
  color: #eaded0;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.7;
}

.page-content p:last-child {
  margin-bottom: 0;
}

.author-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.8fr);
  gap: clamp(24px, 5vw, 48px);
  align-items: center;
}

.author-copy {
  min-width: 0;
}

.author-copy p {
  font-size: clamp(14px, 1.45vw, 16px);
  text-align: justify;
}

.author-portrait {
  display: block;
  width: 100%;
  max-height: 620px;
  justify-self: end;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 18px 56px rgba(0, 0, 0, 0.35);
}

.faq-list {
  display: grid;
  gap: 14px;
}

.faq-item {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
}

.faq-item summary {
  padding: clamp(14px, 2.8vw, 18px) clamp(14px, 3vw, 20px);
  color: #fffaf3;
  cursor: pointer;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.faq-item p {
  padding: 0 clamp(14px, 3vw, 20px) clamp(14px, 3vw, 20px);
  text-align: justify;
}

.contact-page {
  width: min(720px, 100%);
}

.contact-form {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.contact-form label {
  color: #fffaf3;
  font-size: clamp(14px, 1.8vw, 16px);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: #181310;
  font: inherit;
  font-size: clamp(15px, 1.8vw, 16px);
  line-height: 1.45;
}

.contact-form input {
  min-height: 48px;
  padding: 10px 12px;
}

.contact-form textarea {
  min-height: 190px;
  padding: 12px;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: #ffffff;
  outline: 3px solid rgba(242, 199, 168, 0.36);
}

.form-submit {
  justify-self: start;
  margin-top: 8px;
}

.form-status {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 6px;
}

.form-success {
  border: 1px solid rgba(123, 218, 139, 0.55);
  background: rgba(31, 114, 56, 0.32);
}

.form-error {
  border: 1px solid rgba(255, 132, 132, 0.6);
  background: rgba(126, 25, 19, 0.38);
}

.hidden-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.book-sale-page {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #f8f2ea;
}

.lustro-sale {
  background-image:
    linear-gradient(90deg, rgba(13, 11, 10, 0.84), rgba(13, 11, 10, 0.5)),
    url("tlo_lustro.png");
}

.szept-sale {
  background-image:
    linear-gradient(90deg, rgba(13, 11, 10, 0.84), rgba(13, 11, 10, 0.46)),
    url("tlo_szept.png");
}

.sale-content {
  display: grid;
  width: min(1180px, 100%);
  min-height: calc(100vh - 82px);
  margin: 0 auto;
  padding: clamp(22px, 5vw, 56px);
}

.sale-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.85fr) minmax(280px, 1fr);
  gap: clamp(28px, 6vw, 72px);
  align-items: center;
}

.sale-actions {
  display: grid;
  width: min(100%, 430px);
  gap: clamp(12px, 2vw, 18px);
}

.sale-actions h1 {
  margin: 0 0 clamp(8px, 2vw, 18px);
  font-size: clamp(42px, 8vw, 92px);
  line-height: 0.95;
  letter-spacing: 0;
}

.sale-link {
  width: 100%;
  min-height: clamp(50px, 6vw, 68px);
  justify-content: center;
  padding-inline: clamp(16px, 3vw, 28px);
  font-size: clamp(14px, 2vw, 20px);
}

.audiobook-player {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  background: rgba(13, 11, 10, 0.62);
}

.site-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(13, 11, 10, 0.8);
  z-index: 999;
  padding: clamp(16px, 3vw, 24px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.site-modal.is-open {
  display: flex;
}

.site-modal__panel {
  position: relative;
  width: min(520px, 100%);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  margin: auto;
  padding: clamp(40px, 4.5vw, 48px);
  border-radius: 16px;
  background: rgba(13, 11, 10, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 28px 96px rgba(0, 0, 0, 0.38);
  overscroll-behavior: contain;
}

.site-modal__content-wrap {
  padding-top: 14px;
}

.site-modal__actions {
  display: flex;
  justify-content: stretch;
  gap: 14px;
  margin-top: 22px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.site-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: rgba(13, 11, 10, 0.84);
  color: #fffaf3;
  cursor: pointer;
  transition: background 180ms ease, transform 180ms ease;
}

.site-modal__close:hover,
.site-modal__close:focus-visible {
  background: rgba(160, 34, 26, 0.96);
  transform: translateY(-1px);
}

.site-modal__close svg {
  width: 18px;
  height: 18px;
}

.site-modal__panel h2 {
  margin: 0 0 12px;
  color: #ffffff;
  font-size: clamp(20px, 2.8vw, 28px);
  line-height: 1.05;
}

.site-modal__panel p {
  margin: 0 0 20px;
  color: #eaded0;
  font-size: clamp(15px, 1.7vw, 17px);
  line-height: 1.65;
}

.site-modal__text p {
  margin: 0 0 14px;
  text-align: justify;
}

.site-modal__text a {
  color: #f2c7a8;
  text-decoration: underline;
  text-align: justify;
}

.site-modal__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.modal-button {
  width: auto;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(126, 25, 19, 0.86);
  color: #fffaf3;
}

.modal-button:hover,
.modal-button:focus-visible {
  border-color: #ffffff;
  background: rgba(160, 34, 26, 0.96);
  transform: translateY(-1px);
}

.audiobook-player__label {
  margin: 0;
  color: #fffaf3;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 700;
}

.audiobook-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.audiobook-control {
  display: inline-flex;
  width: 46px;
  height: 46px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(126, 25, 19, 0.86);
  color: #fffaf3;
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.audiobook-control svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.audiobook-control:hover,
.audiobook-control:focus-visible {
  transform: translateY(-1px);
  background: rgba(160, 34, 26, 0.96);
}

.audiobook-control:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
}

.audiobook-wave {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 18px;
  margin-left: 2px;
}

.audiobook-wave span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #f2c7a8;
  animation: audiobook-wave 1s ease-in-out infinite;
  animation-play-state: paused;
  transform-origin: bottom;
}

.audiobook-wave span:nth-child(2) {
  animation-delay: 0.18s;
}

.audiobook-wave span:nth-child(3) {
  animation-delay: 0.34s;
}

.audiobook-player.is-playing .audiobook-wave span {
  animation-play-state: running;
}

.audiobook-player:not(.is-playing) .audiobook-wave span {
  height: 4px;
}

.audiobook-timeline {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  cursor: pointer;
}

.audiobook-progress {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f2c7a8, #b34f37);
  transition: width 120ms linear;
}

.audiobook-time {
  display: flex;
  justify-content: space-between;
  color: #eaded0;
  font-size: clamp(12px, 1.3vw, 13px);
}

.audiobook-status {
  margin: 0;
  color: #eaded0;
  font-size: clamp(13px, 1.4vw, 14px);
}

.sale-cover-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(16px, 3vw, 24px);
}

.sale-cover {
  display: flex;
  width: 80%;
  height: 80%;
  max-width: min(100%, 720px);
  max-height: min(72vh, 720px);
  border-radius: 2px;
  object-fit: scale-down;
  object-position: center;
  box-shadow: 0 28px 86px rgba(0, 0, 0, 0.48);
}

.sale-description {
  width: min(100%, 520px);
  margin: 0;
  padding: clamp(14px, 2.8vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  background: rgba(13, 11, 10, 0.72);
  color: #eaded0;
  font-size: clamp(15px, 1.8vw, 18px);
  line-height: 1.65;
  text-align: justify;
}

@keyframes audiobook-wave {
  0%,
  100% {
    height: 4px;
    transform: scaleY(0.8);
  }
  50% {
    height: 16px;
    transform: scaleY(1);
  }
}

.back-link {
  color: #f2c7a8;
  font-size: clamp(14px, 1.8vw, 15px);
  text-decoration: none;
}

.back-link:hover,
.back-link:focus-visible {
  text-decoration: underline;
}

.site-footer {
  width: 100%;
  padding: clamp(18px, 4vw, 30px) 18px;
  background: rgba(13, 11, 10, 0.96);
  color: #eaded0;
  text-align: center;
}

.site-footer p {
  margin: 0;
  font-size: clamp(12px, 1.6vw, 15px);
  line-height: 1.55;
}

.site-footer p + p {
  margin-top: 4px;
}

@media (max-width: 900px) {
  .hero {
    min-height: clamp(300px, 62vw, 520px);
  }

  .hero-actions {
    width: min(94%, 620px);
  }

  .button {
    padding-inline: 16px;
  }

  .author-layout {
    grid-template-columns: 1fr;
  }

  .author-portrait {
    width: min(100%, 420px);
    max-height: none;
    justify-self: center;
  }

  .book-sale-page {
    background-position: center top;
  }

  .sale-content {
    min-height: auto;
  }

  .sale-layout {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .sale-actions {
    width: min(100%, 520px);
    justify-self: center;
    order: 2;
  }

  .sale-cover-wrap {
    order: 1;
  }

  .sale-cover {
    width: min(78vw, 320px);
    max-height: 72vh;
  }
}

@media (max-width: 768px) {
  .hero {
    min-height: clamp(260px, 44vw, 620px);
    height: clamp(260px, 44vw, 620px);
  }

  .hero .panel-image,
  .book-panel .panel-image {
    width: 100%;
    height: auto;
    min-height: auto;
    object-fit: contain;
    object-position: center;
  }

  .social-actions {
    top: 8px;
    right: 8px;
    gap: 5px;
  }

  .social-button {
    width: clamp(28px, 8vw, 34px);
    height: clamp(28px, 8vw, 34px);
    padding: 4px;
  }

  .hero-actions {
    bottom: 10px;
    gap: 6px;
  }

  .button {
    min-height: 38px;
    padding: 8px 10px;
    font-size: clamp(11px, 3vw, 12px);
  }

  .buy-button {
    bottom: clamp(12px, 4vw, 24px);
    width: min(92%, 320px);
    min-width: 0;
    min-height: 44px;
    padding-inline: clamp(12px, 2.5vw, 20px);
    font-size: clamp(13px, 3.5vw, 16px);
  }

  main {
    margin: 0;
    padding: 0;
  }

  .page-content {
    padding: 20px 14px;
  }

  .page-content h1 {
    margin: 12px 0 10px;
  }

  .page-content p {
    margin: 0 0 12px;
  }

  .author-copy p {
    text-align: justify;
  }
}

.cookie-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px clamp(16px, 4vw, 24px);
  background: rgba(15, 11, 9, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.35);
  color: #f8f2ea;
  z-index: 9999;
}

.cookie-banner__text {
  margin: 0;
  font-size: clamp(13px, 1.3vw, 15px);
  line-height: 1.5;
}

.cookie-banner__button {
  min-width: 120px;
  justify-self: end;
}

@media (max-width: 640px) {
  .cookie-banner {
    grid-template-columns: 1fr;
    gap: 10px;
    text-align: left;
  }

  .cookie-banner__button {
    justify-self: start;
  }
}

  .form-submit {
    width: 100%;
    justify-self: stretch;
  }

  .sale-content {
    padding: 18px 14px 32px;
  }

  .sale-actions {
    gap: 10px;
  }

  .sale-actions h1 {
    text-align: left;
    font-family: 'AC Steelfish';
  }

  .sale-link {
    min-height: 48px;
  }


@media (max-width: 420px) {
  .hero {
    min-height: clamp(260px, 44vw, 620px);
    height: clamp(260px, 44vw, 620px);
  }

  .hero-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: min(76%, 260px);
    bottom: 12px;
  }

  .hero-actions .button {
    width: 100%;
  }

  .social-actions {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
  }

  .subpage {
    place-items: start center;
    padding: 14px 12px 28px;
  }

  .page-content {
    border-radius: 4px;
  }

  .contact-form textarea {
    min-height: 160px;
  }

  .sale-cover {
    width: min(84vw, 300px);
    max-height: 42vh;
  }
}

@media (min-width: 1400px) {
  .page-content {
    width: min(1120px, 100%);
  }

  .contact-page {
    width: min(760px, 100%);
  }
}
