@font-face{
  font-family:"VelaSans";
  src:url("../assets/fonts/VelaSans-Regular.ttf") format("truetype");
  font-weight:400;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"VelaSans";
  src:url("../assets/fonts/VelaSans-Bold.ttf") format("truetype");
  font-weight:700;
  font-style:normal;
  font-display:swap;
}
@font-face{
  font-family:"VelaSans";
  src:url("../assets/fonts/VelaSans-ExtraBold.ttf") format("truetype");
  font-weight:800 900;
  font-style:normal;
  font-display:swap;
}

:root{
  --text:#0e0e0e;
  --muted:#6b7280;
  --border:#d6d8de;
  --border2:#e6e7eb;
  --radius:16px;
  --container:1180px;
  --bg:#fff;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family:"VelaSans",system-ui,-apple-system,Segoe UI,Roboto,Arial;
  font-size:14px;
  color:var(--text);
  background:var(--bg);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}
a{ color:inherit; }

/* ─── Topbar ─────────────────────────────────────────── */
.topbar{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  padding:18px 0;
  display:grid;
  grid-template-columns: auto minmax(300px, 480px) auto;
  align-items:center;
  gap:24px;
}

.topbar__left{
  display:flex;
  align-items:center;
  gap:20px;
}

.logo{ height:24px; display:block; image-rendering:pixelated; }

.nav{
  display:flex;
  gap:20px;
  align-items:center;
}
.nav__link{
  text-decoration:none;
  font-size:14px;
  font-weight:700;
  color:var(--text);
  opacity:.85;
  white-space:nowrap;
  border:1.5px solid transparent;
  border-radius:999px;
  padding:6px 16px;
  transition:border-color .15s, opacity .15s;
}
.nav__link:hover{
  opacity:1;
  border-color:#0e0e0e;
}

.nav__pill{
  opacity:1;
}

.nav__link--soon{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:1px;
}
.nav__sub{
  font-size:9px;
  font-weight:700;
  color:var(--muted);
  line-height:1;
  letter-spacing:0.02em;
}

.topbar__center{
  display:flex;
  justify-content:center;
}

.search{
  position:relative;
  width:100%;
}
.search__icon{
  position:absolute;
  left:13px;
  top:50%;
  transform:translateY(-50%);
  font-size:16px;
  opacity:.45;
  pointer-events:none;
}
.search__input{
  width:100%;
  height:38px;
  border:1.5px solid var(--border2);
  border-radius:999px;
  padding:0 14px 0 38px;
  font-size:13px;
  font-family:inherit;
  outline:none;
  background:#fff;
  color:var(--text);
}
.search__input::placeholder{ color:var(--muted); }
.search__input:focus{
  border-color:#b0b8c8;
  box-shadow:0 0 0 3px rgba(0,0,0,.05);
}

.search__dropdown{
  position:absolute;
  left:0;
  right:0;
  top:46px;
  border:1.5px solid var(--border2);
  border-radius:14px;
  background:#fff;
  box-shadow:0 8px 24px rgba(0,0,0,.08);
  overflow:hidden;
  display:none;
  z-index:100;
}
.search__dropdown.is-open{ display:block; }

.ddItem{
  display:flex;
  gap:10px;
  align-items:center;
  padding:10px 14px;
  cursor:pointer;
}
.ddItem:hover{ background:#f8f8f8; }
.ddItem__cover{
  width:32px;
  height:42px;
  border-radius:8px;
  border:1px solid var(--border2);
  overflow:hidden;
  flex:0 0 auto;
  background:#eee;
}
.ddItem__cover img{ width:100%; height:100%; object-fit:cover; display:block; }
.ddItem__title{ font-weight:700; font-size:13px; }
.ddItem__sub{ font-size:11.5px; color:var(--muted); margin-top:2px; }

.topbar__right{
  display:flex;
  align-items:center;
  gap:18px;
}

.iconBtn{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:3px;
  text-decoration:none;
  color:var(--text);
}
.iconBtn__icon{
  width:20px;
  height:20px;
  display:block;
  color:var(--text);
}
.iconBtn__icon svg{
  width:100%;
  height:100%;
  stroke:currentColor;
  fill:none;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.iconBtn__label{
  font-size:11px;
  font-weight:700;
  color:var(--text);
  white-space:nowrap;
}

.avatarBtn{
  width:36px;
  height:36px;
  border-radius:999px;
  overflow:hidden;
  border:1.5px solid var(--border2);
  display:block;
  flex-shrink:0;
}
.avatarBtn img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* ─── Page ───────────────────────────────────────────── */
.page{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  padding:20px 0 48px;
}

/* ─── Carousel ───────────────────────────────────────── */
.carousel{
  position:relative;
  border-radius:20px;
  height:240px;
  overflow:hidden;
}

.carousel__track{
  display:flex;
  height:100%;
  transition:transform .55s cubic-bezier(.4,0,.2,1);
  will-change:transform;
}

.carousel__slide{
  min-width:100%;
  height:100%;
  flex-shrink:0;
}

.carousel__dots{
  position:absolute;
  bottom:14px;
  left:50%;
  transform:translateX(-50%);
  display:flex;
  gap:6px;
  z-index:10;
}
.carousel__dot{
  width:6px;
  height:6px;
  border-radius:999px;
  border:none;
  background:rgba(255,255,255,.35);
  cursor:pointer;
  padding:0;
  transition:background .25s, width .25s;
}
.carousel__dot.is-active{
  background:rgba(255,255,255,.9);
  width:22px;
}

/* ─── Slide 1: тёмный/золотой ────────────────────────── */
.hero{
  position:relative;
  height:100%;
}
.hero--dark{
  background: url('../assets/images/banners/carousel_1.png') center/cover no-repeat;
}

.hero__content{
  position:relative;
  z-index:1;
  height:100%;
  padding:36px 40px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:16px;
  max-width:460px;
}
.hero__title{
  color:#fff;
  font-size:26px;
  font-weight:900;
  line-height:1.15;
  letter-spacing:-.3px;
}
.hero__btn{
  display:inline-flex;
  align-items:center;
  gap:7px;
  height:36px;
  padding:0 20px;
  border-radius:999px;
  border:1.5px solid rgba(160,130,0,.6);
  background:#f4e55a;
  color:#111;
  font-family:inherit;
  font-weight:800;
  font-size:12.5px;
  cursor:pointer;
  width:fit-content;
  transition:opacity .15s;
}
.hero__btn:hover{ opacity:.9; }
.hero__btn__icon{
  width:16px;
  height:16px;
  border-radius:999px;
  border:1.5px solid rgba(0,0,0,.35);
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:10px;
  font-weight:900;
  line-height:1;
  flex-shrink:0;
}

/* ─── Slide 2 ─────────────────────────────────────────── */
.hero--purple{
  background: url('../assets/images/banners/carousel_2.png') center/cover no-repeat;
}

/* ─── Slide 3 ─────────────────────────────────────────── */
.hero--img3{
  background: url('../assets/images/banners/carousel_3.png') center/cover no-repeat;
}

.hero2{
  height:100%;
  padding:18px 36px 36px;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.hero2__logo{
  display:flex;
  justify-content:center;
}
.hero2__logo img{
  height:16px;
  display:block;
  filter:brightness(0) invert(1);
  opacity:.85;
}

.hero2__body{
  display:flex;
  align-items:baseline;
  gap:10px;
  flex:1;
}
.hero2__brand{
  color:#fff;
  font-size:20px;
  font-weight:900;
  white-space:nowrap;
  letter-spacing:-.2px;
}
.hero2__title{
  margin:0;
  color:#fff;
  font-size:22px;
  font-weight:900;
  line-height:1.2;
  letter-spacing:-.3px;
}

.hero2__cards{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
}
.hero2__card{
  background:rgba(255,255,255,.09);
  border:1px solid rgba(255,255,255,.13);
  border-radius:14px;
  padding:13px 16px;
  color:#fff;
  font-size:13px;
  font-weight:700;
  line-height:1.4;
}

/* ─── Sections ───────────────────────────────────────── */
.block{ margin-top:36px; }
.block__head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:14px;
}
.block__title{
  margin:0;
  font-size:22px;
  font-weight:900;
  letter-spacing:-.2px;
}
.block__arrows{
  display:flex;
  gap:6px;
}
.arrowBtn{
  width:34px;
  height:34px;
  border-radius:12px;
  border:1.5px solid var(--border2);
  background:#fff;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  font-weight:700;
  display:flex;
  align-items:center;
  justify-content:center;
  color:var(--text);
  transition:background .12s;
}
.arrowBtn:hover{ background:#f4f4f5; }

/* ─── Book row ───────────────────────────────────────── */
.row{
  display:flex;
  gap:14px;
  overflow:auto hidden;
  padding-bottom:4px;
  scroll-behavior:smooth;
  /* скрываем скроллбар */
  scrollbar-width:none;
}
.row::-webkit-scrollbar{ display:none; }

/* ─── Book card ──────────────────────────────────────── */
.book{
  width:130px;
  flex:0 0 auto;
}
.book__cover{
  position:relative;
  width:130px;
  aspect-ratio: 2 / 3;
  flex-shrink:0;
  border-radius:14px;
  border:1px solid var(--border2);
  overflow:hidden;
  background:#fff;
  cursor:pointer;
  transition:opacity .15s;
}
.book__cover:hover{ opacity:.88; }
.book__cover img{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center center;
  display:block;
}

.book__title{
  margin-top:9px;
  font-size:12.5px;
  font-weight:800;
  cursor:pointer;
  text-decoration:none;
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  color:var(--text);
  line-height:1.3;
}
.book__title:hover{ opacity:.7; }

.book__author{
  margin-top:3px;
  font-size:11.5px;
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
  display:block;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.book__author:hover{ color:#444; }

.book__meta{
  margin-top:7px;
  display:flex;
  gap:6px;
  align-items:center;
  flex-wrap:wrap;
  font-size:11px;
  color:#4b5563;
  font-weight:600;
}

/* ─── Badges ─────────────────────────────────────────── */
.badge{
  border-radius:999px;
  padding:3px 9px;
  font-weight:800;
  font-size:10.5px;
  border:1.5px solid var(--border2);
  background:#fff;
  white-space:nowrap;
}
.badge--yellow{ background:#e8f86a; border-color:#d5e050; color:#2a2a00; }
.badge--red{ background:#ff3b3b; border-color:#e02020; color:#fff; }
.badge--orange{ background:#ffaa00; border-color:#e09500; color:#1a0a00; }
.badge--green{ background:#d4f5c4; border-color:#8ed46e; color:#1a4000; }
.badge--outline{ background:#fff; border-color:var(--border); color:var(--text); }

/* ─── Genre tag ──────────────────────────────────────── */
.tag{
  display:inline-block;
  border-radius:999px;
  padding:2px 8px;
  font-size:10px;
  font-weight:700;
  background:#f0f0f0;
  color:#555;
  white-space:nowrap;
}

/* ─── Footer ─────────────────────────────────────────── */
.footer{
  border-top:1px solid var(--border2);
  margin-top:56px;
  padding:44px 0 28px;
}

.footer__inner{
  width:min(var(--container), calc(100% - 64px));
  margin:0 auto;
  display:flex;
  gap:64px;
  align-items:flex-start;
}

.footer__brand{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:0 0 auto;
}
.footer__logo{ height:32px; width:auto; display:block; }
.footer__tagline{
  font-size:12px;
  color:var(--muted);
  max-width:150px;
  line-height:1.5;
}

.footer__nav{
  display:flex;
  gap:56px;
  flex:1;
}
.footer__col{
  display:flex;
  flex-direction:column;
  gap:9px;
}
.footer__colTitle{
  font-size:12px;
  font-weight:800;
  margin-bottom:3px;
  color:var(--text);
}
.footer__col a{
  font-size:12px;
  color:var(--muted);
  text-decoration:none;
}
.footer__col a:hover{ color:var(--text); }

.footer__bottom{
  width:min(var(--container), calc(100% - 64px));
  margin:28px auto 0;
  padding-top:20px;
  border-top:1px solid var(--border2);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  font-size:11.5px;
  color:var(--muted);
}
.footer__legal{ display:flex; gap:20px; }
.footer__legal a{ color:var(--muted); text-decoration:none; }
.footer__legal a:hover{ color:var(--text); }

/* ─── Filter bar ─────────────────────────────────────── */

.filterBar{
  width:min(var(--container), calc(100% - 64px));
  margin:24px auto 0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  flex-wrap:wrap;
}

.chips{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.chip{
  height:36px;
  padding:0 16px;
  border-radius:999px;
  border:1.5px solid var(--border);
  background:#fff;
  font:inherit;
  font-size:12.5px;
  font-weight:700;
  color:var(--text);
  cursor:pointer;
  transition:background .12s, border-color .12s, color .12s;
  white-space:nowrap;
}

.chip:hover{
  background:#f5f5f5;
}

.chip--active{
  background:var(--text);
  border-color:var(--text);
  color:#fff;
}

.chip--active:hover{
  background:var(--text);
  color:#fff;
  opacity:.88;
}

.sortSelect{
  height:36px;
  padding:0 28px 0 12px;
  border-radius:10px;
  border:1.5px solid var(--border);
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%230e0e0e' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 10px center;
  font:inherit;
  font-size:12.5px;
  font-weight:700;
  color:var(--text);
  cursor:pointer;
  outline:none;
  appearance:none;
}

.sortSelect:focus{
  border-color:#aaa;
}

/* ─── Block count badge ───────────────────────────────── */

.block__count{
  font-size:11px;
  color:var(--muted);
  font-weight:700;
  white-space:nowrap;
}

/* ─── Filtered book grid (flex-wrap) ─────────────────── */

.bookGrid{
  display:flex;
  flex-wrap:wrap;
  gap:24px 20px;
  margin-top:16px;
}

/* ─── Responsive ─────────────────────────────────────── */
@media (max-width: 980px){
  .topbar,
  .page{ width:calc(100% - 32px); }

  .topbar{
    grid-template-columns:1fr;
    gap:12px;
    padding:12px 0;
  }
  .topbar__center{ order:-1; }

  .hero{ height:auto; min-height:180px; }
  .hero__content{ padding:28px 24px; }
  .hero__title{ font-size:20px; }

  .block{ margin-top:28px; }

  .footer__inner{ flex-direction:column; gap:32px; }
  .footer__nav{ flex-wrap:wrap; gap:32px; }
  .footer__bottom{
    flex-direction:column;
    align-items:flex-start;
    gap:10px;
  }
}
