/* Architect of Myself — static bridge site
   Faithful light theme, mirroring the live oarquitetodemim.com.br (Colibri theme):
   white background, Georgia serif body copy, Cormorant Garamond display
   headings, Open Sans nav/UI, blue CTA pills, warm brown accent. */

:root {
  --bg: #ffffff;
  --bg-cream: #f7efe0;
  --text: #2a1f15;
  --text-dim: #999999;
  --heading: #333333;
  --heading-dark: #1a1208;
  --accent: #8a5a2c;
  --accent-soft: rgba(138, 90, 44, 0.3);
  --blue: #03a9f4;
  --blue-dark: #026e9f;
  --nav-active: #a6dcf4;
  --nav-dark: #2a1f0e;
  --rule: #e8e1d5;
  --serif-body: Georgia, "Iowan Old Style", "Times New Roman", serif;
  --serif-display: "Cormorant Garamond", Georgia, serif;
  --sans-heading: "Open Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans-ui: -apple-system, "system-ui", "Segoe UI", Helvetica, Arial, sans-serif;
  --maxw: 720px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif-body);
  line-height: 1.75;
  font-size: 17.6px;
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 0.5em 1em;
  z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------------- Header / nav ---------------- */

header.site-header {
  background: #fff;
  box-shadow: 0 0 4px rgba(0,0,0,0.18);
  position: relative;
  z-index: 20;
}
.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  padding: 11px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.1rem;
  flex-wrap: wrap;
  font-family: var(--sans-heading);
}
.brand { display: none; } /* hidden text-logo, matching the live theme */

nav.main-nav {
  display: flex;
  align-items: center;
  gap: 2.1rem;
  flex-wrap: wrap;
  justify-content: center;
}
nav.main-nav a,
nav.main-nav summary {
  color: var(--nav-dark);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: uppercase;
  cursor: pointer;
}
nav.main-nav a.active,
nav.main-nav summary.active {
  border-bottom: 3px solid var(--nav-active);
  padding-bottom: 6px;
}

details.chapters-menu { position: relative; }
details.chapters-menu > summary { list-style: none; }
details.chapters-menu > summary::-webkit-details-marker { display: none; }

details.chapters-menu .dropdown {
  position: absolute;
  top: 1.8rem;
  left: 50%;
  transform: translateX(-50%);
  background: #fff;
  border: 1px solid var(--rule);
  padding: 0.7rem 0.9rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(210px, 1fr));
  grid-auto-flow: column;
  grid-template-rows: repeat(9, auto);
  column-gap: 0.5rem;
  z-index: 50;
  box-shadow: 0 12px 28px rgba(0,0,0,0.15);
}
details.chapters-menu .dropdown a {
  display: block;
  padding: 0.4rem 0.6rem;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
}
details.chapters-menu .dropdown a:hover { color: var(--blue); background: rgba(3,169,244,0.06); }

/* ---------------- Hero banners ---------------- */
/* The live theme renders the hero as a fixed-height section with a CSS
   background-image (cover/center) — NOT a fluid <img> — so the photo
   crops to fill a roughly constant box instead of stretching with the
   viewport. We mirror that here. */

.page-hero {
  width: 100%;
  background-size: cover;
  background-position: 50% 50%;
  background-color: #14202b;
  position: relative;
}

/* Interior pages: plain banner. Same fix as the home hero — the box follows
   the artwork's proportions (2160x555) instead of a fixed 480px. The old
   fixed height was the worse case of the two: because this art is very wide,
   a 480px box forced `cover` to stretch it by height and crop the SIDES, so
   on a 1440px laptop only ~77% of the banner's width was ever visible. */
.hero-interior {
  aspect-ratio: 2160 / 555;
  min-height: 220px;
  max-height: 520px;
}

/* Home hero: nav overlay + buy CTA flow inside a centered, padded box
   (matches the live site's flex/align-items-center hero section).

   The height follows the artwork's own proportions (1980x1012) instead of a
   fixed 600px. With a fixed height, a wider viewport forced `cover` to scale
   the image up until its width fit, cropping the title off the top. Tying the
   box to the image ratio means `cover` fills it exactly, with no crop.
   min-height keeps a sensible floor on narrow screens; max-height stops the
   hero from swallowing an ultrawide monitor, and the top anchor makes any
   residual crop come off the bottom (pier and water), never the title. */
.hero-home {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1980 / 1012;
  min-height: 600px;
  max-height: 88vh;
  background-position: 50% 0;
  padding: 6.5rem 1.5rem;
}
/* The CTA is pinned to a share of the hero's height rather than centred.
   Once the hero stopped cropping, dead-centre landed the tagline on top of
   the "D. LaMaison" lockup in the artwork. 48% drops it into the clear strip
   of pier between the author name (ends ~44%) and the photo collage
   (starts ~66%), and because it is a percentage it holds that spot at every
   width instead of drifting. */
.hero-inner {
  position: absolute;
  top: 48%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 640px;
  padding: 0 1.5rem;
}
.hero-cta { text-align: center; }
.hero-cta .tagline {
  display: inline-block;
  background: rgba(15, 12, 8, 0.55);
  color: #fff;
  font-family: var(--sans-heading);
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  margin: 0 0 1.1rem;
}
.hero-cta .buttons {
  display: flex;
  gap: 0.8rem;
  justify-content: center;
  flex-wrap: wrap;
}
.hero-cta .buttons a {
  background: var(--blue);
  color: #fff;
  font-family: var(--sans-heading);
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 0.85rem 1.6rem;
  border-radius: 56px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.25);
}
.hero-cta .buttons a:hover { background: var(--blue-dark); text-decoration: none; }

/* Trailer section, directly below the home hero */
.trailer-section {
  text-align: center;
  padding: 3.4rem 1.5rem 0.5rem;
}
.trailer-section .eyebrow-plain {
  display: block;
  font-family: var(--sans-ui);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1.1rem;
}
.trailer-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--accent);
  color: #fff;
  font-family: var(--sans-heading);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.9rem 1.8rem;
  border: none;
  border-radius: 3px;
  cursor: pointer;
}
.trailer-btn:hover { background: #6e4823; text-decoration: none; }
.trailer-note {
  margin: 0.8rem 0 0;
  font-size: 0.75rem;
  color: var(--text-dim);
  font-family: var(--sans-ui);
}

.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 8, 6, 0.88);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.video-modal.open { display: flex; }
.video-modal-inner { position: relative; width: 100%; max-width: 900px; }
.video-modal video { width: 100%; max-height: 80vh; display: block; background: #000; }
.video-modal-close {
  position: absolute;
  top: -2.4rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  font-family: var(--sans-ui);
}

/* ---------------- Main content ---------------- */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 3.4rem 1.5rem 4.5rem;
}

.kicker {
  display: inline-block;
  font-family: var(--sans-ui);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent-soft);
  border-radius: 2px;
  padding: 0.4rem 0.85rem;
  margin: 0 0 1.5rem;
}

.diamond {
  text-align: center;
  color: var(--accent);
  font-size: 0.85rem;
  margin: 0 0 1.1rem;
}

/* Home pitch heading */
.home-h1 {
  font-family: var(--sans-heading);
  font-weight: 300;
  font-size: 2.35rem;
  line-height: 1.32;
  color: var(--heading);
  margin: 0 0 1.7rem;
}
.home-h1 em { font-style: italic; }

/* Elegant serif heading used on interior pages (About / Contact / Chapters) */
.display-h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 2.15rem;
  color: var(--heading-dark);
  text-align: center;
  margin: 0 0 1.5rem;
  letter-spacing: 0.01em;
}
.display-h1 em { font-style: italic; color: var(--accent); }

p { margin: 0 0 1.3rem; }
p:last-child { margin-bottom: 0; }
strong { color: var(--accent); font-weight: 700; }
em { font-style: italic; }

.lede { color: var(--text-dim); font-size: 1rem; margin-bottom: 2rem; text-align: center; }

.pull-quote {
  font-style: italic;
  border-left: 2px solid var(--accent);
  padding-left: 1.4rem;
  margin: 0 0 1.6rem;
  color: var(--text);
}

.closing-lines {
  text-align: center;
  font-style: italic;
  color: var(--accent);
  border-top: 1px solid var(--rule);
  padding-top: 1.7rem;
  margin-top: 1.7rem;
}
.closing-lines p { margin: 0 0 0.3rem; }

.cover {
  width: 100%;
  max-width: 380px;
  display: block;
  margin: 0 auto 2.5rem;
}

/* Chapter title, echoing the live "Capítulo 01 — ..." styling */
.chapter-title {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 1.5rem;
  font-weight: 600;
  border-left: 2px solid var(--accent);
  padding-left: 1.1rem;
  margin: 0 0 1.9rem;
  color: var(--text);
}

.verse { font-style: normal; }
.verse p { margin: 0 0 1.15rem; }

.quote-box {
  background: var(--bg-cream);
  border-left: 3px solid var(--accent);
  padding: 1.9rem 2.1rem;
  margin: 0 0 2.4rem;
}
.quote-box p {
  margin: 0;
  font-style: italic;
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--heading-dark);
}

.attribution {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0 0 1.5rem;
  border-top: 1px solid var(--rule);
  padding-top: 1.3rem;
}

.buy-note {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-top: 1rem;
}

.back-link {
  display: inline-block;
  margin-top: 2.6rem;
  font-family: var(--sans-ui);
  font-size: 0.9rem;
  color: var(--blue);
}
.back-link em { font-style: italic; }

.chapter-pager {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.6rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  font-family: var(--sans-ui);
  font-size: 0.88rem;
}
.chapter-pager a { color: var(--blue); }
.chapter-pager .next { text-align: right; margin-left: auto; }

/* Contact page */
.contact-h1 em { font-style: italic; color: var(--accent); }

.email-card {
  border: 1px solid var(--rule);
  padding: 2.4rem 1.5rem;
  text-align: center;
  margin: 2.2rem 0;
}
.email-card .kicker { margin-bottom: 0.9rem; }
.email-card .value {
  font-family: var(--serif-body);
  font-size: 1.55rem;
  color: var(--text);
}
.email-card .value a {
  color: var(--text);
  border-bottom: 1px solid var(--accent-soft);
  padding-bottom: 0.3rem;
}
.email-card .value a:hover { color: var(--accent); text-decoration: none; }

.social-band {
  background: var(--bg-cream);
  text-align: center;
  padding: 3.2rem 1.5rem;
  margin: 3rem calc(50% - 50vw) 0;
  width: 100vw;
}
.social-band h2 {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 500;
  font-size: 1.85rem;
  color: var(--heading-dark);
  margin: 0 0 0.6rem;
}
.social-band p {
  color: var(--text-dim);
  font-family: var(--sans-ui);
  font-size: 0.88rem;
  margin: 0 0 1.5rem;
}
.social-band .ig-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--accent-soft);
  padding: 0.85rem 1.7rem;
  color: var(--text);
  font-family: var(--serif-body);
  font-size: 0.95rem;
}
.social-band .ig-btn:hover { border-color: var(--accent); text-decoration: none; }

/* Chapters index (near-empty, matching the live page) */
.chapters-index-note { color: var(--text-dim); }

footer.site-footer {
  border-top: 1px solid var(--rule);
  font-family: var(--serif-body);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--text-dim);
  text-align: center;
  padding: 2.2rem 1.5rem;
}
footer.site-footer a { color: var(--text-dim); }

@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .header-inner { gap: 1.1rem; padding: 12px 16px; }
  nav.main-nav { gap: 1.1rem; }
  .home-h1 { font-size: 1.75rem; }
  .display-h1 { font-size: 1.7rem; }
  .hero-home { min-height: 420px; padding: 3.5rem 1.2rem; }
  .hero-interior { min-height: 280px; }
  .hero-cta .buttons a { padding: 0.7rem 1.2rem; font-size: 0.74rem; }
  .hero-cta .tagline { font-size: 0.8rem; padding: 0.55rem 1rem; }
  details.chapters-menu .dropdown {
    grid-template-columns: 1fr;
    grid-auto-flow: row;
    grid-template-rows: none;
    max-height: 70vh;
    overflow-y: auto;
    left: 0;
    transform: none;
    min-width: 220px;
  }
}
