/* ==========================================================================
   Erróneamente – theme
   Brand colours taken from the podcast banner and the book covers.
   ========================================================================== */
:root {
  --paper:      #F6F0E5;   /* cream background */
  --paper-2:    #EFE5D3;   /* slightly darker band */
  --card:       #FFFCF6;
  --ink:        #1F1A17;   /* titles */
  --ink-soft:   #5B524B;   /* body text */
  --ink-muted:  #857A70;
  --rust:       #B4401F;   /* accent (bird, circle, wavy line) */
  --rust-dark:  #8F3017;
  --mustard:    #E8B84A;
  --navy:       #223A50;
  --line:       #E2D6C2;

  --font-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --font-sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-hand:  "Caveat", "Segoe Print", cursive;

  /* Bootstrap overrides */
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--ink-soft);
  --bs-body-font-family: var(--font-sans);
  --bs-link-color: var(--rust);
  --bs-link-color-rgb: 180, 64, 31;
  --bs-link-hover-color: var(--rust-dark);
  --bs-link-hover-color-rgb: 143, 48, 23;
  --bs-border-color: var(--line);
  --bs-emphasis-color: var(--ink);
  color-scheme: light;
}

html { font-size: 16px; scroll-behavior: smooth; }
@media (max-width: 575.98px) { html { font-size: 15px; } }

body {
  background: var(--paper);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }

h1, h2, h3, h4, h5, h6, .font-serif {
  font-family: var(--font-serif);
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
}
.text-ink { color: var(--ink) !important; }
.text-rust { color: var(--rust) !important; }
.text-soft { color: var(--ink-soft) !important; }
.text-muted, .text-body-secondary { color: var(--ink-muted) !important; }

/* Anchor targets sit below the sticky navbar */
section[id] { scroll-margin-top: 80px; }

/* ---------- Buttons & forms ---------- */
.btn-primary, .btn-brand {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--rust);
  --bs-btn-border-color: var(--rust);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--rust-dark);
  --bs-btn-hover-border-color: var(--rust-dark);
  --bs-btn-active-bg: var(--rust-dark);
  --bs-btn-active-border-color: var(--rust-dark);
  --bs-btn-disabled-bg: var(--rust);
  --bs-btn-disabled-border-color: var(--rust);
}
.btn-outline-primary, .btn-outline-brand {
  --bs-btn-color: var(--rust);
  --bs-btn-border-color: var(--rust);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--rust);
  --bs-btn-hover-border-color: var(--rust);
  --bs-btn-active-bg: var(--rust-dark);
  --bs-btn-active-border-color: var(--rust-dark);
}
.btn-outline-secondary {
  --bs-btn-color: var(--ink-soft);
  --bs-btn-border-color: var(--line);
  --bs-btn-hover-bg: var(--paper-2);
  --bs-btn-hover-color: var(--ink);
  --bs-btn-hover-border-color: var(--line);
}
.btn { border-radius: 999px; font-weight: 600; }
.btn-sm { padding-inline: .85rem; }

.form-control, .form-select {
  background-color: var(--card);
  border-color: var(--line);
  border-radius: .6rem;
}
.form-control:focus, .form-select:focus, .form-check-input:focus,
.btn:focus-visible, .nav-link:focus-visible {
  border-color: var(--rust);
  box-shadow: 0 0 0 .2rem rgba(180, 64, 31, .2);
}
.form-check-input:checked { background-color: var(--rust); border-color: var(--rust); }
.form-floating > .form-control::placeholder { color: transparent; }

.pagination {
  --bs-pagination-color: var(--rust);
  --bs-pagination-bg: var(--card);
  --bs-pagination-border-color: var(--line);
  --bs-pagination-hover-color: var(--rust-dark);
  --bs-pagination-hover-bg: var(--paper-2);
  --bs-pagination-active-bg: var(--rust);
  --bs-pagination-active-border-color: var(--rust);
  --bs-pagination-focus-box-shadow: 0 0 0 .2rem rgba(180, 64, 31, .2);
}
.card { background: var(--card); border-color: var(--line); border-radius: 1rem; }
.table { --bs-table-bg: transparent; }
.alert { border-radius: .8rem; }
.nav-pills { --bs-nav-pills-link-active-bg: var(--rust); --bs-nav-link-color: var(--ink-soft); --bs-nav-link-hover-color: var(--rust); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background: rgba(246, 240, 229, .92);
  backdrop-filter: saturate(150%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .navbar { padding-block: .6rem; }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--ink) !important;
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand svg { width: 34px; height: auto; flex: none; }
.site-header .nav-link {
  color: var(--ink-soft);
  font-weight: 500;
  padding-inline: .8rem !important;
}
.site-header .nav-link:hover, .site-header .nav-link.active { color: var(--rust); }
.navbar-toggler { border-color: var(--line); }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(180, 64, 31, .2); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(3rem, 7vw, 5.5rem); }
.section-alt { background: var(--paper-2); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--rust);
  margin-bottom: .75rem;
}
.section-title {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
}
.wavy {
  display: block;
  width: 180px;
  max-width: 60%;
  height: 12px;
  margin: .25rem 0 1.5rem;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 12'%3E%3Cpath d='M0 6 Q 7.5 0 15 6 T 30 6 T 45 6 T 60 6 T 75 6 T 90 6 T 105 6 T 120 6' fill='none' stroke='%23B4401F' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") repeat-x left center / 60px 12px;
}
.text-center .wavy, .wavy.mx-auto { margin-inline: auto; }
.lead-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.15rem, 2.4vw, 1.45rem);
  color: var(--ink);
}
.hand {
  font-family: var(--font-hand);
  color: var(--rust);
  font-size: 1.6rem;
  line-height: 1.1;
}

/* ---------- Podcast ---------- */
.podcast-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 1.25rem;
  box-shadow: 0 1.25rem 3rem rgba(31, 26, 23, .12);
  border: 1px solid var(--line);
  background: var(--paper);
}
.topics { color: var(--ink-soft); font-weight: 600; letter-spacing: .02em; }
.topics span + span::before { content: "·"; margin-inline: .5rem; color: var(--rust); }

/* Social links */
.social-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1.05rem;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.social-btn:hover {
  color: var(--ink);
  transform: translateY(-2px);
  border-color: var(--rust);
  box-shadow: 0 .5rem 1.25rem rgba(31, 26, 23, .1);
}
.social-btn svg { width: 22px; height: 22px; flex: none; }
.social-btn.instagram svg { color: #D62976; }
.social-btn.spotify   svg { color: #1DB954; }
.social-btn.youtube   svg { color: #FF0000; }
.social-btn.ivoox     svg { color: #F45A1E; }
.social-btn.linkedin  svg { color: #0A66C2; }
.social-icons { display: flex; flex-wrap: wrap; gap: .5rem; }
.social-icon {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(246, 240, 229, .35);
  color: var(--paper);
  transition: background-color .15s ease, color .15s ease;
}
.social-icon:hover { background: var(--paper); color: var(--navy); }
.social-icon svg { width: 20px; height: 20px; }
@media (max-width: 575.98px) {
  /* two buttons per row on phones (5 buttons: the last one takes the full row) */
  .social-links .social-btn { flex: 1 1 calc(50% - .375rem); justify-content: center; }
}

/* ---------- Books ---------- */
.badge-soon {
  display: inline-block;
  vertical-align: middle;
  font-family: var(--font-sans);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--mustard);
  border-radius: 999px;
  padding: .35rem .85rem;
  margin-left: .5rem;
  transform: translateY(-.4em);
}
.book-note {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 5px solid var(--rust);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 500;
}
.book-note svg { flex: none; width: 28px; height: 28px; color: var(--rust); margin-top: .1rem; }
.book-cover {
  margin: 0;
  transition: transform .2s ease;
}
.book-cover img {
  display: block;
  width: 100%;
  height: auto;            /* the HTML height="" attribute must not win over aspect-ratio */
  aspect-ratio: 2 / 3;
  object-fit: cover;
  border-radius: .5rem;
  box-shadow: 0 .9rem 2rem rgba(31, 26, 23, .18), 0 .15rem .4rem rgba(31, 26, 23, .1);
}
.book-cover:hover { transform: translateY(-6px) rotate(-.6deg); }

/* ---------- Blog cards ---------- */
.post-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1rem;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: #D9C6AA; box-shadow: 0 .75rem 2rem rgba(31, 26, 23, .08); }
.post-card h3 { font-size: 1.35rem; line-height: 1.25; margin: .35rem 0 .6rem; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.post-card { position: relative; }
.post-card .meta { font-size: .85rem; color: var(--ink-muted); }
.post-card p { flex: 1; margin-bottom: 1rem; }
.read-more { font-weight: 600; color: var(--rust); }
.search-box { max-width: 360px; width: 100%; }

/* ---------- Article ---------- */
.article { max-width: 760px; margin-inline: auto; }
.article-title { font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; }
.post-content { font-size: 1.12rem; line-height: 1.8; color: var(--ink); }
.post-content h1, .post-content h2, .post-content h3 { margin-top: 2rem; }
.post-content img { max-width: 100%; height: auto; border-radius: .75rem; }
.post-content pre { background: var(--paper-2); padding: 1rem; border-radius: .6rem; overflow-x: auto; }
.post-content blockquote {
  border-left: 4px solid var(--rust);
  padding: .25rem 0 .25rem 1.25rem;
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
}
.post-content table { width: 100%; margin-bottom: 1rem; }
.post-content a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.comment { border-left: 3px solid var(--line); padding-left: 1rem; margin-bottom: 1.5rem; }

/* ---------- Auth / admin pages ---------- */
.page-narrow { max-width: 480px; margin-inline: auto; }
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  padding: clamp(1.25rem, 4vw, 2.25rem);
  box-shadow: 0 1rem 2.5rem rgba(31, 26, 23, .06);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: rgba(246, 240, 229, .82);
  padding-block: 3rem 2rem;
  margin-top: auto;
}
.site-footer a { color: var(--paper); }
.site-footer .brand { color: var(--paper) !important; }
.site-footer .brand-tagline { font-family: var(--font-serif); font-style: italic; }
.site-footer hr { border-color: rgba(246, 240, 229, .2); opacity: 1; }
.site-footer .small a { color: rgba(246, 240, 229, .82); }
