:root {
  --ink: #202124;
  --ink-dark: #131316;
  --blue: #1fa9de;
  --blue-light: #4fc3e8;
  --blue-dark: #0e86b5;
  --radius: 14px;

  --bg: #ffffff;
  --surface: #f5f6f8;
  --card-bg: #ffffff;
  --header-bg: rgba(255,255,255,0.95);
  --border: #eceef1;
  --border-strong: #e8e9ec;
  --heading: var(--ink);
  --text: #1c2530;
  --muted: #5b6572;
}
:root[data-theme="dark"] {
  --bg: #0b0c0e;
  --surface: #17181b;
  --card-bg: #1a1b1e;
  --header-bg: rgba(11,12,14,0.9);
  --border: #2a2c30;
  --border-strong: #2a2c30;
  --heading: #f2f4f6;
  --text: #d7dbe0;
  --muted: #9aa3ab;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  transition: background-color 0.2s ease, color 0.2s ease;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* Header */
header {
  position: sticky; top: 0; z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-strong);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px; gap: 16px;
}
.logo-img { height: 40px; width: auto; }
.header-logo { transition: opacity 0.3s ease; }
header.logo-hidden .header-logo { opacity: 0; pointer-events: none; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: block; }
nav ul { list-style: none; display: flex; align-items: center; gap: 20px; }
nav a { font-weight: 600; font-size: 0.95rem; color: var(--heading); transition: color 0.2s; }
nav a:hover { color: var(--blue); }
nav { margin-left: auto; }
.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-pill {
  background: var(--blue); color: #fff !important; padding: 10px 20px;
  border-radius: 999px; font-weight: 700; transition: background 0.2s;
}
.nav-pill:hover { background: var(--blue-dark); color: #fff !important; }
.theme-toggle {
  width: 38px; height: 38px; border-radius: 999px; display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 1px solid var(--border-strong); cursor: pointer; color: var(--heading);
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.burger span { width: 24px; height: 2px; background: var(--heading); display: block; }

/* Hero */
.hero {
  min-height: calc(100vh - 69px);
  min-height: calc(100svh - 69px);
  display: flex; align-items: center; justify-content: center;
  padding: 40px 24px;
  text-align: center;
}
.hero-inner { width: 100%; max-width: 780px; margin: 0 auto; }
.hero h1 { line-height: 0; }
.hero-logo { width: min(640px, 85%); height: auto; margin: 0 auto; }
.hero-logo.logo-dark { display: none; }
:root[data-theme="dark"] .hero-logo.logo-light { display: none; }
:root[data-theme="dark"] .hero-logo.logo-dark { display: block; }

/* Section generic */
section { padding: 100px 0 70px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head .eyebrow { color: var(--blue-dark); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.1em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 800; color: var(--heading); margin: 10px 0 14px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* Services */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.service-card {
  background: var(--surface); border-radius: var(--radius); padding: 36px 28px;
  border: 1px solid var(--border); transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s, border-color 0.2s;
  position: relative;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 16px 32px rgba(15,41,66,0.1); }
.service-card h3 { font-size: 1.2rem; font-weight: 700; color: var(--heading); margin-bottom: 12px; }
.service-card p { color: var(--muted); font-size: 0.95rem; }
.iso-badge { height: 64px; width: auto; margin-top: 18px; border-radius: 8px; }

.services-grid--single {
  grid-template-columns: 1fr; margin: 0 auto;
}
#servicos .container { max-width: 1440px; }
.services-grid--single .service-card {
  display: flex; align-items: center; gap: 40px; padding: 44px;
}
.services-grid--single .iso-badge { height: 88px; margin-top: 0; flex-shrink: 0; align-self: flex-end; }
.services-grid--single .service-text { flex: 1; }
.service-image {
  width: 50%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: center 35%;
  border-radius: 10px; flex-shrink: 0;
}
.services-grid--single .service-card h3 { font-size: clamp(1.4rem, 2.2vw, 1.9rem); margin-bottom: 16px; }
.services-grid--single .service-card p { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.7; }
.services-grid--single .service-card p + p { margin-top: 14px; }
@media (max-width: 720px) {
  .services-grid--single .service-card { flex-direction: column; gap: 24px; padding: 20px 20px 28px; }
  .services-grid--single .service-card h3 { text-align: center; }
  .service-image { width: 100%; }
  .services-grid--single .iso-badge { align-self: center; }
}

/* Contact */
.section-narrow { max-width: 700px; margin: 0 auto; }
.contact-info {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 32px;
}
.contact-card-title {
  font-size: 1.2rem; font-weight: 800; color: var(--heading); margin-bottom: 24px;
  padding-bottom: 16px; border-bottom: 1px solid var(--border-strong);
}
.contact-info h3 { font-size: 1.1rem; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.contact-blocks-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 32px; }
.contact-block { margin-bottom: 0; }
.contact-block p { color: var(--muted); font-size: 0.95rem; }
.contact-block a { color: var(--blue-dark); font-weight: 600; }
.contact-block a:hover { text-decoration: underline; }
.maps-link { display: inline-block; margin-top: 6px; font-size: 0.85rem; }

/* Policy pages */
.policy-content { max-width: 780px; margin: 0 auto; padding: 40px 24px 20px; }
.policy-content h1 { font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 800; color: var(--heading); margin-bottom: 8px; }
.policy-content .updated { color: var(--muted); font-size: 0.85rem; margin-bottom: 32px; display: block; }
.policy-content h2 { font-size: 1.15rem; font-weight: 700; color: var(--heading); margin: 32px 0 10px; }
.policy-content p, .policy-content li { color: var(--muted); font-size: 0.98rem; margin-bottom: 12px; }
.policy-content ul { padding-left: 20px; margin-bottom: 12px; }
.policy-content a.back-link { color: var(--blue-dark); font-weight: 600; }
.policy-content a.back-link:hover { text-decoration: underline; }

/* Cookie banner */
.cookie-banner {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 200;
  background: var(--card-bg); border: 1px solid var(--border-strong); border-radius: var(--radius);
  padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}
.cookie-banner p { font-size: 0.9rem; color: var(--text); margin-bottom: 16px; }
.cookie-actions { display: flex; justify-content: flex-end; align-items: center; gap: 20px; }
.cookie-actions a { font-size: 0.8rem; color: var(--muted); text-decoration: underline; }
.cookie-actions a:hover { color: var(--heading); }
.cookie-accept-btn {
  background: var(--blue); color: #fff; border: none; padding: 10px 24px; border-radius: 999px;
  font-weight: 700; font-size: 0.9rem; cursor: pointer; transition: background 0.2s;
}
.cookie-accept-btn:hover { background: var(--blue-dark); }
@media (min-width: 640px) {
  .cookie-banner { left: auto; right: 24px; bottom: 24px; max-width: 400px; }
}

/* Footer */
footer { background: var(--ink); color: #9aa7b5; padding: 32px 24px; text-align: center; font-size: 0.85rem; margin-top: 80px; }
footer strong { color: #fff; }
.footer-links { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-top: 12px; }
.footer-links a { color: #9aa7b5; }
.footer-links a:hover { color: #fff; }

@media (max-width: 860px) {
  nav ul { position: fixed; top: 70px; left: 0; right: 0; background: var(--bg); flex-direction: column;
    padding: 20px 24px; gap: 18px; border-bottom: 1px solid var(--border-strong);
    transform: translateY(calc(-100% - 80px)); visibility: hidden;
    transition: transform 0.25s, visibility 0.25s; box-shadow: 0 10px 20px rgba(0,0,0,0.06); }
  nav ul.open { transform: translateY(0); visibility: visible; align-items: flex-start; }
  .burger { display: flex; }
  section { padding: 56px 0 32px; }
  .services-grid { grid-template-columns: 1fr; }
  .contact-blocks-grid { grid-template-columns: 1fr; }
}
