/*
Theme Name: Modelo 3 — Minimalista Premium
Description: Editora da UNIFAP — Demo Site — Tema Minimalista
Version: 1.0
*/

@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=Montserrat:wght@300;400;600&display=swap');

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

:root {
  --white: #ffffff;
  --black: #1a1a1a;
  --gold: #b8976a;
  --gray: #f4f4f2;
  --muted: #888;
  --rule: #e0e0e0;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'Montserrat', system-ui, sans-serif;
}

html { font-size: 16px; }

body {
  font-family: var(--sans);
  font-weight: 300;
  color: var(--black);
  background: var(--white);
  line-height: 1.6;
}

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

/* ── Demo banner ── */
.m3-demo-banner {
  background: var(--gray);
  text-align: center;
  padding: 8px 16px;
  font-size: 12px;
  font-style: italic;
  color: var(--muted);
  letter-spacing: 0.04em;
}

/* ── Header ── */
.m3-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px max(24px, env(safe-area-inset-left, 0px)) 24px max(24px, env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--rule);
}

.m3-logo {
  font-family: var(--serif);
  font-style: italic;
  font-size: 20px;
  color: var(--black);
}

.m3-nav a {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: 32px;
  transition: color 0.2s;
}
.m3-nav a:hover { color: var(--black); }

/* ── Hero ── */
.m3-hero {
  padding: 100px max(48px, env(safe-area-inset-left, 0px));
  max-width: 900px;
}

.m3-hero-heading {
  font-family: var(--serif);
  font-size: clamp(40px, 6vw, 80px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--black);
  text-wrap: balance;
}

.m3-hero-rule {
  width: 60px;
  height: 2px;
  background: var(--gold);
  margin: 32px 0;
}

.m3-hero-sub {
  font-family: var(--serif);
  font-style: italic;
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 500px;
}

/* ── Stats ── */
.m3-stats {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 48px max(48px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.m3-stat {
  flex: 1;
  text-align: center;
  padding: 0 32px;
  border-right: 1px solid var(--rule);
}
.m3-stat:last-child { border-right: none; }

.m3-stat-n {
  display: block;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  color: var(--black);
  line-height: 1;
}
.m3-stat-l {
  display: block;
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 8px;
}

/* ── Catalog ── */
.m3-catalog {
  padding: 64px max(48px, env(safe-area-inset-left, 0px));
}

.m3-catalog-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 40px;
}

.m3-catalog-title {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 400;
}

/* ── Year filters ── */
.m3-filters {
  display: flex;
  gap: 24px;
}

.m3-filter-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0 0 4px;
  border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.m3-filter-btn:hover { color: var(--black); }
.m3-filter-btn.active {
  color: var(--black);
  border-bottom-color: var(--gold);
}

/* ── Book list (table of contents style) ── */
.m3-book-list { width: 100%; }

.m3-book-row {
  display: grid;
  grid-template-columns: 36px 1fr 160px 60px;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
  cursor: default;
}
.m3-book-row:hover { background: var(--gray); padding-left: 8px; padding-right: 8px; margin-left: -8px; margin-right: -8px; }

.m3-book-num {
  font-family: var(--serif);
  font-size: 11px;
  color: var(--gold);
  text-align: right;
  padding-right: 8px;
}

.m3-book-title {
  font-family: var(--serif);
  font-size: 15px;
  color: var(--black);
  line-height: 1.4;
}

.m3-book-area {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--muted);
  text-align: right;
}

.m3-book-year {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.m3-book-row[hidden] { display: none; }

/* ── Footer ── */
.m3-footer {
  padding: 32px max(48px, env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--rule);
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 12px;
}
.m3-footer-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.m3-footer a { color: var(--gold); }
.m3-footer a:hover { text-decoration: underline; }

/* ── Responsive ── */
@media (max-width: 680px) {
  .m3-hero { padding: 60px 16px; }
  .m3-stats { flex-direction: column; gap: 24px; padding: 32px 16px; }
  .m3-stat { border-right: none; border-bottom: 1px solid var(--rule); padding: 0 0 24px; width: 100%; }
  .m3-stat:last-child { border-bottom: none; }
  .m3-catalog { padding: 40px 16px; }
  .m3-catalog-header { flex-direction: column; gap: 16px; }
  .m3-book-row { grid-template-columns: 28px 1fr; }
  .m3-book-area, .m3-book-year { display: none; }
  .m3-header { padding: 16px; }
  .m3-nav { display: none; }
}
