/* =============================================
   MONTE BOOKS — main stylesheet
   ============================================= */

/* ---------- Reset & base ---------- */

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul {
  list-style: none;
}

/* ---------- Design tokens ---------- */

:root {
  --bg:           #F8F5F0;
  --bg-tinted:    #F2EDE6;
  --text:         #1A1A1A;
  --text-muted:   #6B6460;
  --border:       #DDD8D0;
  --font-serif:   Georgia, 'Times New Roman', serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --max-width:    1200px;
  --gap:          clamp(24px, 4vw, 48px);
  --section-py:   clamp(56px, 8vw, 96px);
}

/* ---------- Layout ---------- */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 64px);
}

.section {
  padding-block: var(--section-py);
  border-top: 1px solid var(--border);
}

.section--tinted {
  background-color: var(--bg-tinted);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: normal;
  letter-spacing: -0.01em;
  margin-bottom: clamp(32px, 5vw, 56px);
}

/* ---------- Header ---------- */

.site-header {
  padding-block: clamp(20px, 3vw, 32px);
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: clamp(20px, 3vw, 28px);
}

/* Logo */

.logo {
  display: flex;
  align-items: center;
  gap: 0;
}

.logo-word {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: normal;
  letter-spacing: -0.02em;
  line-height: 1;
}

.logo-image {
  height: clamp(104px, 14vw, 160px);
  width: auto;
  mix-blend-mode: multiply;
  margin-inline: -40px;
}

/* Language switcher */

.lang-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 2px 0;
  transition: color 0.15s;
}

.lang-btn:hover,
.lang-btn.active {
  color: var(--text);
}

.lang-btn.active {
  font-weight: 600;
}

.lang-sep {
  color: var(--border);
  font-size: 0.75rem;
  user-select: none;
}

/* Nav */

.header-nav {
  display: flex;
  gap: clamp(20px, 4vw, 40px);
  flex-wrap: wrap;
}

.header-nav a {
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
  transition: color 0.15s, border-color 0.15s;
}

.header-nav a:hover {
  color: var(--text);
  border-bottom-color: var(--text);
}

/* ---------- Books grid ---------- */

.books-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--gap);
}

.book-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Placeholder covers — пока нет реальных обложек */
.book-cover {
  aspect-ratio: 2 / 3;
  background-color: var(--bg-tinted);
  border: 1px solid var(--border);
  overflow: hidden;
  position: relative;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Цветовые акценты для placeholder-обложек */
.book-cover--1 { background-color: #E8E2D8; }
.book-cover--2 { background-color: #DDD7CC; }
.book-cover--3 { background-color: #E4DDD4; }
.book-cover--4 { background-color: #D9D2C8; }

.book-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.book-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: normal;
  line-height: 1.3;
}

.book-author {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.book-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.55;
}

/* ---------- Promo banner ---------- */

.promo-banner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

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

.promo-text {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.promo-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.promo-title {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2.5vw, 1.875rem);
  font-weight: normal;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.promo-desc {
  font-size: clamp(0.875rem, 1.2vw, 1rem);
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 680px) {
  .promo-banner {
    grid-template-columns: 1fr;
  }
}

/* ---------- About ---------- */

.about-content {
  max-width: 640px;
  display: flex;
  flex-direction: column;
  gap: 1.25em;
}

.about-content p {
  font-size: clamp(0.9375rem, 1.5vw, 1.0625rem);
  line-height: 1.7;
}

/* ---------- Contacts ---------- */

.contacts-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.contact-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--text-muted);
  display: flex;
}

.contact-icon svg {
  width: 100%;
  height: 100%;
}

.contact-link {
  font-size: 1rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}

.contact-link:hover {
  border-bottom-color: var(--text);
}

/* ---------- Lightbox ---------- */

.zoomable {
  cursor: zoom-in;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 24px;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.15s;
}

.lightbox-close:hover {
  opacity: 1;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 28px;
}

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* ---------- Legal (скрыт) ---------- */

.section--legal {
  padding-block: 32px;
}

.legal-content {
  font-size: 0.8125rem;
  color: var(--text-muted);
  max-width: 720px;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
  .header-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .lang-switcher {
    align-self: flex-end;
  }

  .books-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }
}
