/* Lato (SIL Open Font License) — autoallotjada */
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-italic-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-italic-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-regular-400-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/lato-regular-400-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lato-bold-700-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Lato';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('fonts/lato-bold-700-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Editorial Ida Mett — minimal catalog theme (MIT) */

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

html { font-size: 100%; }

:root {
  --font-sans: 'Lato', 'Ubuntu', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  line-height: 1.15;
  font-weight: 700;
  margin: 0 0 0.6em;
}

p { margin: 0 0 1em; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}

.narrow { max-width: 780px; }

/* Header */
.site-header {
  border-bottom: 1px solid rgba(28, 28, 28, 0.15);
  background: var(--paper);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand-logo { width: 36px; height: auto; }
.brand-name {
  font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-sans);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.site-nav a { color: var(--ink); }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.lang-switch {
  display: flex;
  gap: 6px;
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}
.lang-switch a {
  border: 1px solid rgba(28, 28, 28, 0.25);
  padding: 3px 6px;
  color: var(--ink);
}
.lang-switch a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* Home intro */
.intro { padding: 64px 0 28px; }
.intro h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); max-width: 900px; }
.intro p { max-width: 760px; font-size: 1.1rem; }

/* Catalog */
.catalog-section { padding: 28px 0 80px; }
.section-title {
  font-size: 1.4rem;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 10px;
  margin-bottom: 36px;
}
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 42px 32px;
}
.book-card { display: flex; flex-direction: column; }
.book-cover {
  display: block;
  background: var(--ink);
  aspect-ratio: 2 / 3;
  overflow: hidden;
}
.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 180ms ease;
}
.book-card:hover .book-cover img { transform: scale(1.015); }
.cover-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 24px;
  color: var(--paper);
  font-size: 1.2rem;
  text-align: center;
}
.book-info { padding-top: 16px; }
.book-lang {
  margin: 0 0 4px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}
.book-info h3 { font-size: 1.2rem; margin-bottom: 4px; }
.book-info h3 a { color: var(--ink); }
.book-info h3 a:hover { color: var(--accent); text-decoration: none; }
.book-author {
  font-style: italic;
  font-size: 0.95rem;
  margin-bottom: 10px;
}
.book-desc { font-size: 0.95rem; color: rgba(28, 28, 28, 0.8); }
.book-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* Buttons */
.btn {
  display: inline-block;
  border: 1px solid var(--accent);
  padding: 8px 12px;
  font-family: var(--font-sans);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  background: transparent;
}
.btn:hover { background: var(--accent); color: var(--paper); text-decoration: none; }
.btn-ghost { border-color: rgba(28, 28, 28, 0.3); color: var(--ink); }
.btn-ghost:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* Book page */
.book-hero { border-bottom: 1px solid rgba(28, 28, 28, 0.15); }
.book-hero-grid {
  display: grid;
  grid-template-columns: minmax(200px, 290px) 1fr;
  gap: 56px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 56px;
}
.book-hero-cover {
  background: var(--ink);
  aspect-ratio: 2 / 3;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);
}
.book-hero-cover img { width: 100%; height: 100%; object-fit: cover; }
.book-hero-info h1 { font-size: clamp(2rem, 4vw, 3rem); }
.book-long { max-width: 680px; font-size: 1.05rem; }
.book-intro { padding: 48px 0; }
.book-intro h1, .book-intro h2 { margin-top: 0; }
.book-toc {
  padding: 40px 0 72px;
  border-top: 1px solid rgba(28, 28, 28, 0.15);
}
.toc-list {
  list-style: none;
  counter-reset: toc;
  padding: 0;
  margin: 0;
}
.toc-list li {
  counter-increment: toc;
  border-bottom: 1px solid rgba(28, 28, 28, 0.12);
  padding: 10px 0;
}
.toc-list li::before {
  content: counter(toc) ".";
  color: var(--accent);
  display: inline-block;
  width: 2em;
  font-family: var(--font-sans);
  font-size: 0.8rem;
}
.toc-list a { color: var(--ink); }
.toc-list a:hover { color: var(--accent); text-decoration: none; }

/* Reading */
.reading { padding: 56px 0 96px; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
.byline { font-style: italic; color: rgba(28, 28, 28, 0.7); }
.prose { font-size: 1.08rem; line-height: 1.8; }
.prose h1, .prose h2, .prose h3 { margin-top: 1.8em; }
.prose h1 { font-size: 1.9rem; }
.prose h2 { font-size: 1.45rem; }
.prose blockquote {
  margin: 1.6em 0;
  padding: 0.4em 0 0.4em 1.2em;
  border-left: 3px solid var(--accent);
  font-style: italic;
  color: rgba(28, 28, 28, 0.85);
}
.prose img { margin: 1.6em 0; }
.prose hr { border: 0; border-top: 1px solid rgba(28, 28, 28, 0.2); margin: 2.4em 0; }
.pager {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid rgba(28, 28, 28, 0.15);
}

/* Footer */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 48px 0 20px;
  font-size: 0.95rem;
}
.site-footer a { color: var(--paper); text-decoration: underline; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding-bottom: 32px;
}
.footer-grid h3, .footer-grid h2 { font-size: 1rem; color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  border-top: 1px solid rgba(246, 243, 236, 0.25);
  font-family: var(--font-sans);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: rgba(246, 243, 236, 0.8);
}

.empty { font-style: italic; color: rgba(28, 28, 28, 0.65); }

@media (max-width: 800px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .site-nav { order: 3; width: 100%; gap: 14px; }
  .book-hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .book-hero-cover { max-width: 260px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; }
  .pager { flex-direction: column; }
}
