/* ==========================================================================
   Contabilidade Matos — Static site
   Clean, sober, institutional. Refined professional green on soft off-white.
   ========================================================================== */

:root {
  --radius: 0.5rem;

  --background: oklch(0.99 0.006 150);
  --foreground: oklch(0.28 0.035 160);

  --card: oklch(1 0 0);
  --primary: oklch(0.6 0.12 151);
  --primary-foreground: oklch(0.99 0.01 150);
  --primary-deep: oklch(0.36 0.06 158);

  --secondary: oklch(0.95 0.025 150);
  --muted-foreground: oklch(0.5 0.025 158);

  --border: oklch(0.9 0.02 150);

  --gradient-hero: linear-gradient(
    160deg,
    oklch(0.97 0.025 150) 0%,
    oklch(0.99 0.008 150) 55%,
    oklch(1 0 0) 100%
  );
  --shadow-soft: 0 1px 3px oklch(0.36 0.06 158 / 0.06),
    0 10px 30px -12px oklch(0.36 0.06 158 / 0.18);
  --shadow-card: 0 1px 2px oklch(0.36 0.06 158 / 0.05),
    0 8px 24px -16px oklch(0.36 0.06 158 / 0.2);
}

@supports not (color: oklch(0 0 0)) {
  :root {
    --background: #fbfcfa;
    --foreground: #36423b;
    --card: #ffffff;
    --primary: #3f9466;
    --primary-foreground: #fbfdfa;
    --primary-deep: #2c4a3a;
    --secondary: #e7f0ea;
    --muted-foreground: #6b7a72;
    --border: #dde8e1;
    --gradient-hero: linear-gradient(160deg, #eaf3ed 0%, #f9fcfa 55%, #ffffff 100%);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  border-color: var(--border);
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: "Source Sans 3", ui-sans-serif, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: "Libre Baskerville", ui-serif, Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--primary-deep);
  line-height: 1.2;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.container {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.eyebrow {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--primary);
}

.text-muted {
  color: var(--muted-foreground);
}

.icon {
  width: 1.5rem;
  height: 1.5rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.wa-icon {
  fill: currentColor;
  stroke: none;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.7rem 1.4rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.btn .icon { width: 1.05rem; height: 1.05rem; }
.btn-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}
.btn-primary:hover { opacity: 0.9; }
.btn-outline {
  background-color: transparent;
  border-color: var(--border);
  color: var(--primary-deep);
}
.btn-outline:hover { background-color: var(--secondary); }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.875rem; }
.btn-lg { padding: 0.85rem 1.7rem; font-size: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: blur(12px);
}
.header-inner {
  display: flex;
  height: 5rem;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo img { width: 2.75rem; height: 2.75rem; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-name {
  font-family: "Libre Baskerville", serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary-deep);
}
.logo-since {
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--muted-foreground);
}
.nav {
  display: none;
  align-items: center;
  gap: 0.25rem;
}
.nav a {
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 500;
  color: color-mix(in srgb, var(--foreground) 80%, transparent);
  transition: color 0.15s;
}
.nav a:hover { color: var(--primary-deep); }
.nav a.active { color: var(--primary-deep); font-weight: 700; }
.nav .btn { margin-left: 0.5rem; }
/* Keep the header WhatsApp button text + icon white (override .nav a color) */
.nav a.btn-primary,
.nav a.btn-primary .wa-icon { color: var(--primary-foreground); }

.menu-toggle {
  display: inline-flex;
  width: 2.5rem;
  height: 2.5rem;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--foreground);
  cursor: pointer;
}
.mobile-nav {
  display: none;
  border-top: 1px solid var(--border);
  background-color: var(--background);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 0.25rem;
}
.mobile-nav.open { display: flex; }
.mobile-nav a {
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
}
.mobile-nav a.active { background-color: var(--secondary); font-weight: 700; color: var(--primary-deep); }
.mobile-nav .btn { margin-top: 0.5rem; }

@media (min-width: 768px) {
  .nav { display: flex; }
  .menu-toggle { display: none; }
}

/* ---------- Sections ---------- */
main { flex: 1; }

.section { padding: 4rem 0; }
@media (min-width: 768px) { .section { padding: 6rem 0; } }

.hero { background: var(--gradient-hero); }
.hero-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .hero-grid { grid-template-columns: 1fr 1fr; padding-top: 6rem; padding-bottom: 6rem; }
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid var(--border);
  background-color: var(--card);
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-deep);
}
.badge img { width: 1rem; height: 1rem; object-fit: contain; }
.hero h1 { margin-top: 1.25rem; font-size: 2.5rem; }
@media (min-width: 640px) { .hero h1 { font-size: 3rem; } }
.hero p { margin-top: 1.25rem; max-width: 32rem; font-size: 1.125rem; color: var(--muted-foreground); }
.btn-row { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-img {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}
.hero-img img { width: 100%; height: 100%; object-fit: cover; }

.page-hero { background: var(--gradient-hero); }
.page-hero-inner {
  max-width: 56rem;
  margin: 0 auto;
  text-align: center;
  padding: 4rem 1.25rem;
}
@media (min-width: 768px) { .page-hero-inner { padding: 5rem 1.25rem; } }
.page-hero img { margin: 0 auto 1.5rem; width: 5rem; height: 5rem; object-fit: contain; }
.page-hero h1 { margin-top: 0.75rem; font-size: 2.5rem; }
@media (min-width: 640px) { .page-hero h1 { font-size: 3rem; } }
.page-hero p { margin: 1.25rem auto 0; max-width: 40rem; font-size: 1.125rem; color: var(--muted-foreground); }

/* ---------- Cards / grids ---------- */
.grid-3 { display: grid; gap: 1.5rem; }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.cards-3 { display: grid; gap: 1.5rem; }
@media (min-width: 640px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }

.card {
  border: 1px solid var(--border);
  background-color: var(--card);
  border-radius: 1rem;
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s;
}
.card-link:hover { box-shadow: var(--shadow-soft); }
.icon-badge {
  display: inline-flex;
  width: 3rem;
  height: 3rem;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background-color: var(--secondary);
  color: var(--primary-deep);
}
.card h2, .card h3 { margin-top: 1.25rem; font-size: 1.25rem; }
.card p { margin-top: 0.5rem; font-size: 0.95rem; color: var(--muted-foreground); }

.section-head { max-width: 42rem; }
.section-head h2 { margin-top: 0.75rem; font-size: 1.875rem; }
@media (min-width: 640px) { .section-head h2 { font-size: 2.25rem; } }
.section-head p { margin-top: 1rem; color: var(--muted-foreground); }

/* History teaser */
.alt-bg { background-color: color-mix(in srgb, var(--secondary) 40%, transparent); }
.teaser-grid {
  display: grid;
  gap: 2.5rem;
  align-items: center;
  padding-top: 4rem;
  padding-bottom: 4rem;
}
@media (min-width: 768px) {
  .teaser-grid { grid-template-columns: 1.2fr 1fr; padding-top: 6rem; padding-bottom: 6rem; }
}
.teaser-grid h2 { margin-top: 0.75rem; font-size: 1.875rem; }
@media (min-width: 640px) { .teaser-grid h2 { font-size: 2.25rem; } }
.teaser-grid p { margin-top: 1.25rem; color: var(--muted-foreground); }
.teaser-emblem { display: flex; align-items: center; justify-content: center; }
.teaser-emblem img { width: 14rem; max-width: 100%; object-fit: contain; }
@media (min-width: 768px) { .teaser-emblem img { width: 18rem; } }

/* Service list (home) */
.service-list {
  margin-top: 2.5rem;
  display: grid;
  column-gap: 2rem;
  row-gap: 0.25rem;
}
@media (min-width: 640px) { .service-list { grid-template-columns: repeat(2, 1fr); } }
.service-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  border-bottom: 1px solid var(--border);
  padding: 1rem 0;
}
.service-item .icon { color: var(--primary); margin-top: 0.15rem; flex-shrink: 0; width: 1.25rem; height: 1.25rem; }
.service-item h3 { margin: 0; font-size: 1rem; font-weight: 600; color: var(--foreground); font-family: inherit; }
.service-item p { margin-top: 0.25rem; font-size: 0.95rem; color: var(--muted-foreground); }

/* CTA box */
.cta {
  border: 1px solid var(--border);
  border-radius: 1.5rem;
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-soft);
  background: var(--gradient-hero);
}
@media (min-width: 768px) { .cta { padding: 3rem 4rem; } }
.cta h2 { font-size: 1.875rem; }
@media (min-width: 640px) { .cta h2 { font-size: 2.25rem; } }
.cta p { margin: 1rem auto 0; max-width: 36rem; color: var(--muted-foreground); }
.cta .btn-row { justify-content: center; }

/* Timeline */
.timeline {
  max-width: 48rem;
  margin: 0 auto;
  list-style: none;
  border-left: 1px solid var(--border);
}
.timeline li { position: relative; margin-bottom: 3rem; margin-left: 2rem; }
.timeline li:last-child { margin-bottom: 0; }
.timeline .dot {
  position: absolute;
  left: -2.75rem;
  display: flex;
  width: 1.5rem;
  height: 1.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--primary);
  box-shadow: 0 0 0 4px var(--background);
}
.timeline .dot span { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background-color: var(--primary-foreground); }
.timeline .year { font-size: 0.875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--primary); }
.timeline h2 { margin-top: 0.25rem; font-size: 1.5rem; }
.timeline p { margin-top: 0.75rem; color: var(--muted-foreground); }

.note-box {
  margin-top: 3.5rem;
  max-width: 48rem;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--secondary) 40%, transparent);
  border-radius: 1rem;
  padding: 2rem;
  text-align: center;
}
.note-box h2 { font-size: 1.5rem; }
.note-box p { margin: 0.75rem auto 0; max-width: 36rem; color: var(--muted-foreground); }
.note-box .btn-row { justify-content: center; margin-top: 1.5rem; }

/* Contact */
.contact-grid { display: grid; gap: 2.5rem; }
@media (min-width: 1024px) { .contact-grid { grid-template-columns: 1fr 1fr; } }
.contact-cards { display: grid; gap: 1.25rem; }
@media (min-width: 640px) { .contact-cards { grid-template-columns: repeat(2, 1fr); } }
.contact-cards .card { padding: 1.5rem; }
.contact-cards .icon { color: var(--primary); }
.contact-cards h2 { margin-top: 1rem; font-size: 1rem; font-weight: 600; font-family: inherit; }
.contact-cards .card p { margin-top: 0.25rem; font-size: 0.95rem; }
.span-2 { grid-column: 1 / -1; }
.map-wrap {
  overflow: hidden;
  border-radius: 1rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}
.map-wrap iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }
.break-all { word-break: break-all; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: 6rem;
  border-top: 1px solid var(--border);
  background-color: color-mix(in srgb, var(--secondary) 40%, transparent);
}
.footer-grid {
  display: grid;
  gap: 2.5rem;
  padding-top: 3.5rem;
  padding-bottom: 3.5rem;
}
@media (min-width: 768px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-grid .tagline { margin-top: 1rem; max-width: 20rem; font-size: 0.95rem; color: var(--muted-foreground); }
.footer-col h2 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--primary-deep);
  font-family: inherit;
}
.footer-col ul { list-style: none; margin-top: 1rem; }
.footer-col li { margin-bottom: 0.5rem; font-size: 0.95rem; color: var(--muted-foreground); }
.footer-col a:hover { color: var(--primary-deep); }
.footer-contact li { display: flex; align-items: flex-start; gap: 0.65rem; margin-bottom: 0.75rem; }
.footer-contact .icon { width: 1rem; height: 1rem; color: var(--primary); margin-top: 0.15rem; flex-shrink: 0; }
.footer-bottom { border-top: 1px solid var(--border); }
.footer-bottom .footer-bottom-inner {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
  padding: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted-foreground);
}
.footer-bottom .footer-legal {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 1rem;
}
.footer-bottom .footer-legal a:hover { color: var(--primary-deep); }
@media (min-width: 640px) {
  .footer-bottom .footer-bottom-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 50;
  display: inline-flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background-color: var(--primary);
  color: var(--primary-foreground);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.25);
  transition: transform 0.15s;
}
.wa-float:hover { transform: scale(1.05); }
.wa-float .wa-icon { width: 1.75rem; height: 1.75rem; }

/* ---------- Cookie consent ---------- */
.cookie-consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 50;
  padding: 0 1rem 1rem;
}
.cookie-consent.hidden { display: none; }
.cookie-consent-inner {
  margin: 0 auto;
  max-width: 48rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--border);
  background-color: var(--background);
  border-radius: 0.75rem;
  padding: 1.25rem;
  box-shadow: var(--shadow-soft);
}
.cookie-consent-text {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
}
.cookie-consent-text .icon { color: var(--primary); width: 1.25rem; height: 1.25rem; margin-top: 0.15rem; flex-shrink: 0; }
.cookie-consent-text p { font-size: 0.875rem; color: var(--muted-foreground); }
.cookie-consent-text a { color: var(--primary-deep); text-decoration: underline; }
.cookie-consent-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-end;
}
.cookie-close {
  display: inline-flex;
  width: 2.25rem;
  height: 2.25rem;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: none;
  border: none;
  color: var(--muted-foreground);
  cursor: pointer;
  transition: background-color 0.15s;
}
.cookie-close:hover { background-color: var(--secondary); }
@media (min-width: 640px) {
  .cookie-consent-inner { flex-direction: row; align-items: center; }
  .cookie-consent-actions { align-self: auto; }
}

/* ---------- Legal / privacy page ---------- */
.legal { max-width: 48rem; margin: 0 auto; padding: 4rem 1.25rem; }
.legal h1 { font-size: 2rem; }
@media (min-width: 768px) { .legal h1 { font-size: 2.5rem; } }
.legal .legal-updated { margin-top: 0.75rem; font-size: 0.875rem; color: var(--muted-foreground); }
.legal-body { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 2rem; }
.legal-body h2 { font-size: 1.25rem; }
.legal-body p { margin-top: 0.5rem; line-height: 1.7; color: var(--foreground); }
.legal-body a { color: var(--primary-deep); text-decoration: underline; }
.legal-body ul { margin-top: 0.5rem; padding-left: 1.25rem; list-style: disc; color: var(--foreground); }
.legal-body li { margin-bottom: 0.25rem; }
