/* ============================================================
   Casa da Árvore — Design System
   Style: Botanical Editorial / Accessible & Ethical
   Fonts: Fraunces (headings) + DM Sans (body)
   ============================================================ */

/* --- Tokens --- */
:root {
  --surface:       #F0EDE4;
  --surface-alt:   #F7F5EE;
  --ink:           #1E392A;
  --ink-muted:     #555555;
  --accent:        #966755;
  --warm:          #DBCBB4;
  --brand-bg:      #1E392A;
  --brand-fg:      #F9F8F2;
  --brand-dark:    #15291E;

  /* Typography scale (rem, base 16px) */
  --text-xs:   0.75rem;   /* 12 */
  --text-sm:   0.875rem;  /* 14 */
  --text-base: 1rem;      /* 16 */
  --text-lg:   1.125rem;  /* 18 */
  --text-xl:   1.25rem;   /* 20 */
  --text-2xl:  1.5rem;    /* 24 */
  --text-3xl:  1.875rem;  /* 30 */
  --text-4xl:  2.25rem;   /* 36 */
  --text-5xl:  3rem;      /* 48 */
  --text-6xl:  4.25rem;   /* 68 */
  --text-7xl:  5.5rem;    /* 88 */

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

::selection {
  background: var(--warm);
  color: var(--ink);
}

img { max-width: 100%; height: auto; display: block; }
a {
  color: var(--accent);
  text-decoration: none;
  position: relative;
  transition: color 0.2s ease;
}
a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background-color: currentColor;
  transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
a:hover::after {
  width: 100%;
}
a:hover { color: var(--ink); }
/* Exclude sliding underline from nav, buttons, footer, logo */
.site-nav a::after,
.site-nav__logo::after,
.btn::after,
.site-footer a::after,
.footer-legal-btn::after,
.site-nav__cta::after {
  display: none;
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* --- Typography --- */
h1, h2, h3, h4 {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
}

h1 { font-size: var(--text-5xl); letter-spacing: -0.03em; }
h2 { font-size: var(--text-4xl); letter-spacing: -0.01em; }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-6xl); }
  h2 { font-size: var(--text-5xl); }
}
@media (min-width: 1024px) {
  h1 { font-size: var(--text-7xl); }
}

p { max-width: 65ch; }

.section-label {
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-4);
  display: block;
}

.lead {
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--ink-muted);
  max-width: 55ch;
}

/* --- Pull Quote --- */
.pull-quote {
  font-family: 'Fraunces', serif;
  font-size: var(--text-3xl);
  font-style: italic;
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
  border-left: 3px solid var(--accent);
  padding-left: var(--space-8);
  margin: var(--space-16) 0;
  max-width: 50ch;
}
@media (min-width: 768px) {
  .pull-quote { font-size: var(--text-4xl); }
}

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
}
@media (min-width: 768px) {
  .container { padding: 0 var(--space-8); }
}

.section {
  padding: var(--space-16) 0;
}
@media (min-width: 768px) {
  .section { padding: var(--space-16) 0; }
}
.section--dark {
  background-color: var(--brand-bg);
  color: var(--brand-fg);
}
.section--dark h1,
.section--dark h2,
.section--dark h3,
.section--dark h4 {
  color: var(--brand-fg);
}
.section--dark .section-label {
  color: var(--warm);
}
.section--dark .lead {
  color: var(--warm);
}
.section--warm {
  background-color: rgba(219, 203, 180, 0.35);
}
.section--white {
  background-color: var(--surface-alt);
}

/* --- Page Hero Banner --- */
.page-hero {
  padding: var(--space-16) 0 var(--space-12);
  background-color: var(--brand-bg);
  color: var(--brand-fg);
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(219,203,180,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.page-hero .section-label { color: var(--warm); }
.page-hero .accent-rule { background-color: var(--accent); }
.page-hero h1 { color: var(--brand-fg); }
.page-hero .lead { color: var(--warm); }

/* --- Feature Card --- */
.feature-card {
  background-color: var(--surface-alt);
  border: 1px solid rgba(219, 203, 180, 0.5);
  border-radius: 8px;
  padding: var(--space-8);
  position: relative;
  transition: border-color 0.2s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.35s ease;
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(30, 57, 42, 0.08);
}
.feature-card__icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-6);
  overflow: hidden;
}
.feature-card__icon--green {
  background-color: var(--brand-bg);
  color: var(--brand-fg);
}
.feature-card__icon--brown {
  background-color: var(--accent);
  color: var(--brand-fg);
}
.feature-card__icon--warm {
  background-color: var(--warm);
  color: var(--brand-bg);
}
.feature-card__icon svg {
  width: 24px;
  height: 24px;
  min-width: 24px;
  min-height: 24px;
  max-width: 24px;
  max-height: 24px;
  flex-shrink: 0;
}

/* --- Stat / Number Highlight --- */
.stat-bar {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  padding: var(--space-8) 0;
  border-top: 1px solid rgba(219, 203, 180, 0.5);
  border-bottom: 1px solid rgba(219, 203, 180, 0.5);
  margin: var(--space-8) 0;
}
@media (min-width: 768px) {
  .stat-bar {
    grid-template-columns: repeat(4, 1fr);
  }
}
.stat-bar__item {
  /* no flex needed — grid handles sizing */
}
.stat-bar__number {
  font-family: 'Fraunces', serif;
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.stat-bar__label {
  font-size: var(--text-sm);
  color: var(--ink-muted);
  margin-top: var(--space-2);
}
/* Dark section overrides */
.section--dark .stat-bar__number {
  color: var(--brand-fg);
}
.section--dark .stat-bar__label {
  color: var(--warm);
}

/* --- Navigation --- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background-color: rgba(21, 41, 30, 0.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid rgba(219, 203, 180, 0.2);
}
.site-nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-nav__logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  text-decoration: none;
  color: var(--brand-fg);
}
.site-nav__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.site-nav__logo-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.7);
}
.site-nav__logo-text {
  font-family: 'Fraunces', serif;
  font-size: var(--text-xl);
  font-weight: 700;
  letter-spacing: 0.01em;
}
.site-nav__links {
  display: none;
  list-style: none;
  gap: var(--space-8);
  align-items: center;
}
@media (min-width: 768px) {
  .site-nav__links { display: flex; }
}
.site-nav__links a {
  color: rgba(249, 248, 242, 0.9);
  font-size: var(--text-base);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;
  padding: var(--space-2) 0;
}
.site-nav__links a:hover,
.site-nav__links a[aria-current="page"] {
  color: var(--brand-fg);
}
.site-nav__links .site-nav__cta,
.site-nav__cta {
  display: inline-flex;
  align-items: center;
  padding: 10px 24px;
  background-color: var(--brand-fg);
  color: var(--brand-bg);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  transition: background-color 0.2s ease;
  white-space: nowrap;
}
.site-nav__links .site-nav__cta:hover,
.site-nav__cta:hover {
  background-color: var(--warm);
  color: var(--brand-bg);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Mobile nav */
.site-nav__mobile-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: var(--brand-fg);
  cursor: pointer;
}
@media (min-width: 768px) {
  .site-nav__mobile-btn { display: none; }
}
.site-nav__mobile-menu {
  display: none;
  background-color: var(--brand-bg);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: var(--space-6);
}
.site-nav__mobile-menu.is-open {
  display: block;
}
.site-nav__mobile-menu a {
  display: block;
  color: var(--brand-fg);
  padding: var(--space-3) 0;
  font-size: var(--text-base);
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.site-nav__mobile-menu a:last-child {
  border-bottom: none;
  color: var(--warm);
  font-weight: 600;
  margin-top: var(--space-3);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: var(--text-base);
  padding: 14px 32px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  text-decoration: none;
  min-height: 48px;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 57, 42, 0.15);
}
.btn:active {
  transform: translateY(0);
  box-shadow: none;
}
.btn--primary {
  background-color: var(--ink);
  color: var(--brand-fg);
  border-color: var(--ink);
}
.btn--primary:hover {
  background-color: var(--brand-dark);
  color: var(--brand-fg);
}
.btn--outline {
  background-color: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover {
  background-color: var(--ink);
  color: var(--brand-fg);
}
.btn--warm {
  background-color: var(--warm);
  color: var(--ink);
  border-color: var(--warm);
}
.btn--warm:hover {
  background-color: var(--brand-fg);
  border-color: var(--ink);
}
.btn--large {
  font-size: var(--text-lg);
  padding: 18px 40px;
}

/* --- Cards (editorial, no glass) --- */
.card {
  background-color: var(--surface-alt);
  border: 1px solid rgba(219, 203, 180, 0.4);
  border-radius: 4px;
  padding: var(--space-8);
}

/* --- Accent Rule (decorative horizontal line) --- */
.accent-rule {
  width: 48px;
  height: 2px;
  background-color: var(--accent);
  border: none;
  margin: var(--space-6) 0;
}

/* --- Accordion (FAQ) --- */
.accordion-item {
  border-bottom: 1px solid var(--warm);
}
.accordion-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 0;
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  min-height: 48px;
}
.accordion-item summary::-webkit-details-marker { display: none; }
.accordion-item summary::marker { display: none; }
.accordion-item .accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--accent);
  transition: transform 0.25s ease;
}
.accordion-item[open] .accordion-icon {
  transform: rotate(180deg);
}
.accordion-item .accordion-body {
  padding-bottom: var(--space-6);
  color: var(--ink-muted);
  line-height: 1.7;
  max-width: 65ch;
}
.accordion-item[open] .accordion-body {
  animation: fadeIn 0.25s ease;
}

/* --- Footer --- */
.site-footer {
  background-color: var(--brand-dark);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23F9F8F2' fill-opacity='0.15' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
  color: var(--warm);
  padding: var(--space-16) 0 var(--space-8);
  border-top: 1px solid rgba(255,255,255,0.05);
}
.site-footer a {
  color: var(--warm);
  transition: color 0.2s ease;
}
.site-footer a:hover {
  color: var(--brand-fg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.05);
  padding-top: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; }
}
.footer-bottom p {
  font-size: var(--text-xs);
  color: rgba(249, 248, 242, 0.5);
}
.footer-legal-btn {
  background: none;
  border: none;
  color: var(--warm);
  font-family: 'DM Sans', sans-serif;
  font-size: var(--text-xs);
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease;
  display: inline-flex;
  align-items: center;
}
.footer-legal-btn:hover {
  color: var(--brand-fg);
}

/* --- Modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: rgba(30, 57, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}
.modal-overlay.is-open { display: flex; }
.modal {
  background-color: var(--surface);
  border-radius: 8px;
  max-width: 640px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(30,57,42,0.2);
}
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6);
  border-bottom: 1px solid var(--warm);
}
.modal__header h3 {
  font-size: var(--text-xl);
}
.modal__close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--ink-muted);
  cursor: pointer;
  border-radius: 4px;
}
.modal__close:hover { color: var(--ink); background-color: rgba(219,203,180,0.2); }
.modal__body {
  padding: var(--space-6);
  overflow-y: auto;
  font-size: var(--text-sm);
  color: var(--ink-muted);
  line-height: 1.7;
}
.modal__footer {
  padding: var(--space-4) var(--space-6);
  border-top: 1px solid var(--warm);
  display: flex;
  justify-content: flex-end;
}

/* --- Animations --- */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- WhatsApp Float --- */
.whatsapp-float {
  position: fixed;
  bottom: var(--space-6);
  right: var(--space-6);
  z-index: 90;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: #25D366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.25);
  color: #fff;
}
.whatsapp-float::after {
  display: none;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.pt-nav { padding-top: 72px; }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.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;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* --- Parallax --- */
.parallax-hero {
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
}
@media (max-width: 768px) {
  /* Disable parallax on mobile for performance */
  .parallax-hero {
    background-attachment: scroll;
  }
}

/* --- Marquee --- */
.marquee {
  overflow: hidden;
  white-space: nowrap;
  padding: var(--space-4) 0;
  border-top: 1px solid rgba(219, 203, 180, 0.3);
  border-bottom: 1px solid rgba(219, 203, 180, 0.3);
  background-color: var(--surface);
}
.marquee__track {
  display: inline-flex;
  animation: marquee-scroll 30s linear infinite;
}
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-8);
  font-family: 'Cormorant Garamond', serif;
  font-size: var(--text-2xl);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.marquee__item .marquee__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
}
@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }
}
