@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;1,400&family=Cormorant+Garamond:ital,wght@0,400;0,500;1,400&display=swap');

:root {
  --bg: #f0eee9;
  --bg-alt: #ece7e0;
  --card-bg: #f7f6f2;
  --text: #26231f;
  --text-soft: #514c44;
  --text-mute: #6b665e;
  --border: rgba(0, 0, 0, 0.09);
  --border-soft: rgba(0, 0, 0, 0.08);
  --gold: #a8802c;
  --gold-dark: #7d5e17;
  --gold-line: #c8a45c;
  --serif-display: "Cormorant Garamond", Georgia, serif;
  --serif-body: "EB Garamond", Georgia, serif;
  --max: 1400px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dark); }

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

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 56px;
  background: rgba(240, 238, 233, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}

.brand {
  font-family: var(--serif-display);
  font-size: 19px;
  letter-spacing: 0.24em;
  font-weight: 500;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 17px;
  flex-wrap: wrap;
}

.nav a { color: var(--text); }
.nav a.scp0 { padding-bottom: 2px; border-bottom: 1px solid transparent; }
.nav a.scp0:hover { border-bottom-color: var(--gold-line); color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  cursor: pointer;
  font-size: 17px;
  padding: 15px 26px;
  text-align: center;
  border: 1px solid transparent;
  font-family: var(--serif-body);
  background: none;
}
.btn-sm { padding: 11px 22px; font-size: 16px; }
.btn-outline-gold {
  border-color: var(--gold-line);
  color: var(--gold);
}
.btn-outline-gold:hover { background: var(--gold-line); color: #fff; }
.btn-outline-dark {
  border-color: rgba(0, 0, 0, 0.16);
  color: #3c3830;
}
.btn-outline-dark:hover { border-color: var(--text); color: var(--text); }
.btn-solid {
  background: var(--gold-line);
  color: #fff;
  border: none;
}
.btn-solid:hover { background: var(--gold); color: #fff; }
.btn-block { display: block; width: 100%; }

/* ---------- layout helpers ---------- */
.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 88px 56px;
}
.section-tight { padding-top: 44px; }
.section-border { border-top: 1px solid var(--border-soft); }
.eyebrow {
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 20px;
}
h1, h2, h3 { font-family: var(--serif-display); font-weight: 400; margin: 0; }
.lede { font-size: 20px; line-height: 1.6; color: var(--text-soft); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }

.card {
  border: 1px solid var(--border);
  background: var(--card-bg);
  padding: 28px 26px;
}

/* ---------- image placeholders (swap for real photos later) ---------- */
.ph {
  border: 1px solid rgba(200, 164, 92, 0.45);
  padding: 9px;
  background: var(--card-bg);
}
.ph-inner {
  height: 100%;
  min-height: 200px;
  background: repeating-linear-gradient(45deg, #e9e6df 0, #e9e6df 8px, #f2f0ea 8px, #f2f0ea 16px);
  display: flex;
  align-items: flex-end;
  padding: 12px;
  font: 11px ui-monospace, monospace;
  color: #8a8378;
}

/* ---------- trajectory / timeline ---------- */
.timeline-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 32px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
}
.timeline-row:last-child { border-bottom: 1px solid var(--border); }
.timeline-year { font-size: 15px; letter-spacing: 0.1em; color: var(--gold); }
.timeline-text { font-size: 19px; line-height: 1.55; color: #3c3830; max-width: 46em; }

/* ---------- forms ---------- */
.form-field {
  font-family: var(--serif-body);
  font-size: 18px;
  padding: 14px;
  border: 1px solid rgba(0, 0, 0, 0.16);
  background: var(--card-bg);
  color: var(--text);
  width: 100%;
}
textarea.form-field { min-height: 150px; resize: vertical; }
.form-row { display: flex; gap: 14px; }

.form-field:focus { outline: 2px solid var(--gold-line); outline-offset: 1px; }
.form-field:user-invalid { border-color: #b4533c; }

/* ---------- loja: catálogo ---------- */
.book-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 28px; }
.book-card { display: flex; flex-direction: column; }
.book-cover { height: 320px; width: 100%; object-fit: contain; background: var(--card-bg); }
.book-cover-vazia { display: flex; align-items: center; justify-content: center; padding: 24px; text-align: center; font-family: var(--serif-display); font-size: 22px; line-height: 1.3; color: var(--text-soft); background: repeating-linear-gradient(45deg, #e9e6df 0, #e9e6df 8px, #f2f0ea 8px, #f2f0ea 16px); }
.book-body { padding: 20px 4px 0; display: flex; flex-direction: column; flex: 1; }
.book-eyebrow { font-size: 12px; margin-bottom: 8px; }
.book-title { font-size: 24px; line-height: 1.2; margin-bottom: 10px; flex: 1; }
.book-price { font-family: var(--serif-display); font-size: 26px; margin-bottom: 16px; }
.btn.is-disabled, .btn:disabled { opacity: 0.55; cursor: not-allowed; pointer-events: none; }

/* ---------- loja: checkout ---------- */
.checkout-label { font-size: 13px; color: var(--gold); }
.checkout-fields { display: flex; flex-direction: column; gap: 14px; }
.checkout-status { margin-top: 16px; padding: 14px 16px; font-size: 16px; line-height: 1.5; border: 1px solid var(--border); }
.checkout-status.is-info { background: var(--card-bg); color: var(--text-soft); }
.checkout-status.is-ok { background: #eef3e8; border-color: #9bb07f; color: #3d5228; }
.checkout-status.is-aviso { background: #f6efdf; border-color: var(--gold-line); color: var(--gold-dark); }
.checkout-status.is-erro { background: #f7e9e5; border-color: #c98a78; color: #7a2e1c; }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  background: var(--bg-alt);
  padding: 72px 56px 56px;
}
.footer-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.footer-title {
  font-family: var(--serif-display);
  font-size: 18px;
  letter-spacing: 0.24em;
  margin-bottom: 18px;
  color: var(--text);
}
.footer-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; font-size: 17px; }
.footer-links a.gold { color: var(--gold); }

/* ---------- responsive ---------- */
/* !important below because several pages set an explicit
   grid-template-columns inline (e.g. style="grid-template-columns:0.72fr 1fr")
   for the desktop layout — the media query has to win over that on small screens. */
@media (max-width: 900px) {
  .site-header { padding: 18px 24px; flex-wrap: wrap; gap: 10px; }
  .nav { gap: 14px 16px; font-size: 15px; }
  .section { padding: 56px 24px !important; }
  .grid-2, .grid-4 { grid-template-columns: 1fr !important; }
  .grid-3 { grid-template-columns: 1fr 1fr !important; }
  .footer-grid { grid-template-columns: 1fr 1fr !important; }
  .sticky-cover { position: static !important; top: auto !important; }
  h1 { font-size: 38px !important; line-height: 1.15 !important; }
  h2 { font-size: 28px !important; }
}
@media (max-width: 560px) {
  .grid-3 { grid-template-columns: 1fr !important; }
  .footer-grid { grid-template-columns: 1fr !important; }
  .form-row { flex-direction: column; }
}
