:root {
  --paper: #f4efe8;
  --ink: #2c241c;
  --muted: #6d6258;
  --line: rgba(44, 36, 28, 0.14);
  --card: #fffcf8;
  --terra: #9c5344;
  --terra-dark: #7d4035;
  --gold: #b08968;
  --shadow: 0 16px 40px rgba(60, 40, 20, 0.08);
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Outfit", "Segoe UI", sans-serif;
  --wrap: 1080px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse 70% 42% at 85% -5%, rgba(198, 165, 123, 0.22), transparent 60%),
    var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: inherit;
}

::selection {
  background: #e7cfc4;
  color: var(--ink);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* =========================================================
   Layout & Container (Mobile First)
   ========================================================= */
.wrap {
  width: min(var(--wrap), calc(100% - 2rem));
  margin-inline: auto;
}

.eyebrow {
  margin: 0;
  color: var(--terra);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* =========================================================
   Top Bar & Navigation (Mobile First)
   Single-row header on mobile, zero overflow.
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 239, 232, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* Theme links hidden on small screens to eliminate clutter and overflow */
.nav-theme {
  display: none;
}

.nav-cta {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--terra);
  text-decoration: none;
  padding: 0.35rem 0.85rem;
  border: 1px solid rgba(156, 83, 68, 0.35);
  border-radius: 999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--terra);
  color: #fff;
  border-color: var(--terra);
}

/* =========================================================
   Hero Section (Mobile First)
   ========================================================= */
.hero {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 1.75rem;
  padding: 1.5rem 0 2.5rem;
  scroll-margin-top: 4.5rem;
}

.portrait {
  order: -1;
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
}

.portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center 18%;
  border-radius: 1.25rem;
  box-shadow:
    8px 8px 0 rgba(176, 137, 104, 0.35),
    0 16px 36px rgba(60, 40, 20, 0.12);
}

.hero-copy {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.35rem, 8.5vw, 5.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 36rem;
  font-size: 1.05rem;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
}

/* =========================================================
   Notes Section ("Sobre" - Mobile First)
   ========================================================= */
.notes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}

.note {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.note h2,
.themes-title,
.theme summary,
.card h3,
.book h3 {
  font-family: var(--serif);
  font-weight: 500;
}

.note h2 {
  font-size: 1.6rem;
  line-height: 1.15;
}

.note p,
.theme-intro,
.card p,
.book-copy > p:not(.eyebrow):not(.book-quote) {
  color: var(--muted);
}

.note p {
  font-size: 0.98rem;
}

/* =========================================================
   Themes & Accordions (Mobile First)
   ========================================================= */
.themes {
  padding-bottom: 1.5rem;
}

.themes-title {
  margin-bottom: 0.5rem;
  font-size: clamp(2rem, 6vw, 3.2rem);
  line-height: 1.05;
  scroll-margin-top: 4.5rem;
}

.theme {
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}

.theme:last-of-type {
  border-bottom: 1px solid var(--line);
}

.theme summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.1rem 0;
  font-size: clamp(1.5rem, 4.8vw, 2.4rem);
  line-height: 1.1;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}

.theme summary::-webkit-details-marker {
  display: none;
}

.theme summary:hover {
  color: var(--terra-dark);
}

.mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.chevron {
  width: 0.45rem;
  height: 0.45rem;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
  transition: transform 0.2s ease;
}

.theme[open] .chevron {
  transform: translateY(2px) rotate(225deg);
}

.theme[open] .mark {
  border-color: var(--gold);
  color: var(--terra);
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  padding-bottom: 1.75rem;
}

.panel-photo {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 1rem;
}

.theme-intro {
  max-width: 42rem;
  font-size: 0.98rem;
}

/* =========================================================
   Cards (Mobile First)
   ========================================================= */
.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.card,
.book {
  background: var(--card);
  box-shadow: var(--shadow);
}

.card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-height: 100%;
  padding: 1.15rem 1.15rem 1.25rem;
  border-radius: 0.9rem;
}

.card h3 {
  font-size: 1.45rem;
  line-height: 1.15;
}

.card p {
  font-size: 0.95rem;
}

.more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: auto;
  padding-top: 0.65rem;
  min-height: 2.75rem;
  color: var(--terra);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
}

.more::after {
  content: "→";
}

.more:hover {
  color: var(--terra-dark);
}

/* =========================================================
   Book Section (Mobile First)
   ========================================================= */
.book {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border-radius: 1.15rem;
}

.book img {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  object-position: center top;
}

.book-copy {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1.25rem 1.15rem 1.4rem;
}

.book h3 {
  font-size: clamp(1.65rem, 5vw, 2.75rem);
  line-height: 1.1;
}

.book-quote {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.35;
  color: var(--ink);
}

.book-copy > p:not(.eyebrow):not(.book-quote) {
  font-size: 0.98rem;
}

.book .more {
  align-self: flex-start;
}

/* =========================================================
   Footer (Mobile First)
   ========================================================= */
.site-footer {
  border-top: 1px solid var(--line);
  scroll-margin-top: 4.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 1.6rem 0 2.25rem;
}

.footer-name {
  font-family: var(--serif);
  font-size: 1.5rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--ink);
}

/* =========================================================
   Accessibility & Focus
   ========================================================= */
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--terra);
  outline-offset: 3px;
  border-radius: 2px;
}

/* =========================================================
   Progressive Enhancement Breakpoints (min-width)
   ========================================================= */
@media (min-width: 600px) {
  .cards.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-inner {
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
    padding: 1.6rem 0 2.4rem;
  }

  .footer-name {
    font-size: 1.6rem;
  }
}

@media (min-width: 800px) {
  body {
    font-size: 1.05rem;
  }

  .wrap {
    width: min(var(--wrap), calc(100% - 3rem));
  }

  .top {
    padding: 1.1rem 0;
  }

  .brand {
    font-size: 1.5rem;
  }

  .nav {
    gap: 1.5rem;
  }

  .nav-theme {
    display: inline-flex;
    color: var(--muted);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .nav-theme:hover {
    color: var(--ink);
  }

  .nav-cta {
    font-size: 0.9rem;
    padding: 0.4rem 0.95rem;
  }

  .hero {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    padding: 3.5rem 0 3.5rem;
  }

  .portrait {
    order: 0;
    width: min(100%, 420px);
    margin: 0 0 0 auto;
  }

  .portrait img {
    border-radius: 1.5rem;
    box-shadow:
      12px 12px 0 rgba(176, 137, 104, 0.38),
      0 22px 46px rgba(60, 40, 20, 0.12);
  }

  .hero-copy {
    gap: 0.85rem;
  }

  .eyebrow {
    font-size: 0.78rem;
    letter-spacing: 0.16em;
  }

  .lead {
    font-size: 1.16rem;
  }

  .notes {
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    padding: 2.5rem 0 3.5rem;
  }

  .note h2 {
    font-size: 1.85rem;
  }

  .note p {
    font-size: 1.05rem;
  }

  .panel-photo {
    aspect-ratio: 16 / 8;
    border-radius: 1.15rem;
  }

  .theme-intro {
    font-size: 1.05rem;
  }

  .card {
    padding: 1.2rem 1.25rem 1.3rem;
    border-radius: 1rem;
  }

  .card h3 {
    font-size: 1.7rem;
    line-height: 1.12;
  }

  .card p {
    font-size: 1rem;
  }

  .cards.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .cards.cols-1 {
    max-width: 36rem;
  }

  .book {
    grid-template-columns: minmax(210px, 280px) 1fr;
    align-items: stretch;
    border-radius: 1.25rem;
  }

  .book img {
    height: 100%;
    max-height: none;
    object-position: center top;
  }

  .book-copy {
    gap: 0.7rem;
    padding: 1.8rem 1.8rem 1.9rem;
  }

  .book-quote {
    font-size: 1.35rem;
  }

  .book-copy > p:not(.eyebrow):not(.book-quote) {
    font-size: 1.05rem;
  }
}

/* =========================================================
   Reduced Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .chevron {
    transition: none;
  }
}
