/* ===========================================================
   CAMD BRASIL — Design System
   Centro de Atendimento Móvel ao Diabético
   Brand: #00AFEF (azul) · #F05853 (vermelho) · #FFFFFF
   Tipografia: Univia Pro (Black + Medium)
   =========================================================== */

@font-face {
  font-family: "Univia Pro";
  src: url("../assets/fonts/UniviaPro-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Univia Pro";
  src: url("../assets/fonts/UniviaPro-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* Brand */
  --blue:      #00AFEF;
  --blue-600:  #0096d4;
  --blue-700:  #007cb3;
  --blue-100:  #d8f0fc;
  --blue-50:   #eef8fe;
  --red:       #F05853;
  --red-600:   #e2403b;
  --red-50:    #fdecec;
  --navy:      #0c2c52;
  --navy-700:  #163d68;

  /* Neutrals */
  --ink:    #2c3845;
  --muted:  #69757f;
  --line:   #e6eef4;
  --white:  #ffffff;
  --bg:     #ffffff;
  --bg-soft:#f3f9fd;

  /* System */
  --font-display: "Univia Pro", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Univia Pro", "Trebuchet MS", system-ui, sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 26px;
  --shadow-sm: 0 2px 10px rgba(12, 44, 82, 0.06);
  --shadow: 0 14px 40px rgba(12, 44, 82, 0.10);
  --shadow-lg: 0 30px 70px rgba(12, 44, 82, 0.16);
  --maxw: 1200px;
  --header-h: 84px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-weight: 500;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 17px;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
h1, h2, h3, h4 { font-weight: 900; color: var(--navy); line-height: 1.08; letter-spacing: -0.02em; }
strong { font-weight: 900; }
::selection { background: var(--blue); color: #fff; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 28px; }
.section { padding-block: clamp(56px, 8vw, 104px); }
.section--soft { background: var(--bg-soft); }
.center { text-align: center; }
.eyebrow {
  font-weight: 900;
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 3px;
  background: var(--red);
  border-radius: 3px;
}
.eyebrow.center { justify-content: center; }
.section-title {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  margin-top: 14px;
  text-wrap: balance;
}
.section-title .accent { color: var(--red); }
.section-title .blue { color: var(--blue); }
.lead { color: var(--muted); font-size: 1.08rem; max-width: 60ch; }
.lead.center { margin-inline: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 900;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s, color .2s;
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; }
.btn--primary { background: var(--red); color: #fff; box-shadow: 0 12px 26px rgba(240, 88, 83, .32); }
.btn--primary:hover { background: var(--red-600); transform: translateY(-2px); box-shadow: 0 18px 34px rgba(240, 88, 83, .4); }
.btn--blue { background: var(--blue); color: #fff; box-shadow: 0 12px 26px rgba(0, 175, 239, .3); }
.btn--blue:hover { background: var(--blue-600); transform: translateY(-2px); box-shadow: 0 18px 34px rgba(0, 175, 239, .4); }
.btn--ghost { background: #fff; color: var(--navy); border: 2px solid var(--line); }
.btn--ghost:hover { border-color: var(--blue); color: var(--blue); transform: translateY(-2px); }
.btn--outline-white { border: 2px solid rgba(255,255,255,.6); color: #fff; }
.btn--outline-white:hover { background: #fff; color: var(--blue); transform: translateY(-2px); }
.btn--lg { padding: 18px 34px; font-size: 1.05rem; }
.link-arrow {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--blue); font-weight: 900; font-size: .96rem;
  transition: gap .2s var(--ease), color .2s;
}
.link-arrow svg { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.link-arrow:hover { color: var(--blue-700); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .3s;
}
.site-header.scrolled { box-shadow: var(--shadow-sm); }
.nav {
  height: var(--header-h);
  display: flex; align-items: center; gap: 18px;
  max-width: var(--maxw); margin-inline: auto; padding-inline: 28px;
}
.nav__logo { display: flex; align-items: center; gap: 11px; }
.nav__logo-img { height: 54px; width: auto; max-width: 210px; object-fit: contain; }
.nav__links { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav__links a {
  position: relative;
  padding: 10px 11px;
  font-weight: 900;
  font-size: 0.92rem;
  color: var(--navy);
  border-radius: 9px;
  transition: color .2s;
  white-space: nowrap;
}
.nav__links a::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 6px;
  height: 3px; border-radius: 3px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease);
}
.nav__links a:hover { color: var(--blue); }
.nav__links a:hover::after, .nav__links a.active::after { transform: scaleX(1); }
.nav__links a.active { color: var(--blue); }
.nav__cta { margin-left: 8px; }
.nav__toggle { display: none; width: 46px; height: 46px; border-radius: 12px; border: 2px solid var(--line); align-items: center; justify-content: center; color: var(--navy); }
.nav__toggle svg { width: 24px; height: 24px; }

/* mobile drawer */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: #fff; padding: 24px 28px 40px;
  transform: translateX(100%); transition: transform .35s var(--ease);
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu a { padding: 16px 6px; font-weight: 900; font-size: 1.2rem; color: var(--navy); border-bottom: 1px solid var(--line); }
.mobile-menu a.active { color: var(--blue); }
.mobile-menu .btn { margin-top: 18px; justify-content: center; }

/* ---------- Image placeholders ---------- */
.photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph.has-photo { background: none; border: none; }

/* ---------- Illustrated mockups (Educação) ---------- */
.edu-ill { position: relative; display: block; overflow: hidden; background: var(--blue-50); }
.edu-ill svg { width: 100%; height: 100%; display: block; }

.ph {
  position: relative;
  background-color: var(--blue-50);
  background-image: repeating-linear-gradient(
    -45deg, rgba(0,175,239,.10) 0 12px, rgba(0,175,239,.04) 12px 24px);
  border: 1px dashed rgba(0,175,239,.4);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; color: var(--blue-700);
}
.ph__label {
  font-family: "SFMono-Regular", ui-monospace, "Cascadia Code", Menlo, Consolas, monospace;
  font-size: .72rem; font-weight: 500; letter-spacing: .02em;
  text-transform: uppercase; text-align: center;
  padding: 8px 14px; line-height: 1.45;
  background: rgba(255,255,255,.72); border-radius: 8px;
  max-width: 80%;
}
.ph--red {
  background-color: var(--red-50);
  background-image: repeating-linear-gradient(
    -45deg, rgba(240,88,83,.10) 0 12px, rgba(240,88,83,.04) 12px 24px);
  border-color: rgba(240,88,83,.4); color: var(--red-600);
}

/* ---------- Cards ---------- */
.card {
  background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--blue-100); }

.icon-badge {
  width: 58px; height: 58px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue-50); color: var(--blue);
  margin-bottom: 18px;
}
.icon-badge svg { width: 28px; height: 28px; }
.icon-badge--red { background: var(--red-50); color: var(--red); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #cfe0f0; padding-block: 64px 28px; }
.site-footer a { color: #cfe0f0; transition: color .2s; }
.site-footer a:hover { color: #fff; }
.footer-grid {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.3fr; gap: 40px;
  padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.12);
}
.footer-logo { background:#fff; border-radius: 14px; padding: 10px 16px; display:inline-flex; align-items:center; max-width: 100%; margin-bottom: 18px; }
.footer-logo .nav__logo-img { height: 50px; max-width: 220px; }
.footer-brandnote { color: #9fbada; font-size: .98rem; max-width: 32ch; }
.footer-col h4 { color: #fff; font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: 18px; }
.footer-col ul { display: flex; flex-direction: column; gap: 11px; font-size: .98rem; }
.footer-contact li { display: flex; gap: 11px; align-items: flex-start; font-size: .98rem; line-height: 1.5; }
.footer-contact svg { width: 19px; height: 19px; color: var(--blue); flex: none; margin-top: 2px; }
.footer-partners { display: flex; flex-direction: column; gap: 14px; }
.footer-partners .p-row { display: flex; align-items: center; gap: 12px; }
.footer-partners .p-chip { background: #fff; border-radius: 10px; padding: 9px 12px; display: flex; align-items: center; }
.footer-partners .p-chip img { height: auto; max-height: 30px; width: auto; max-width: 100%; object-fit: contain; }
.footer-partners .p-label { font-size: .74rem; color: #9fbada; text-transform: uppercase; letter-spacing: .08em; }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding-top: 24px; color: #8fabcb; font-size: .88rem; flex-wrap: wrap;
}
.footer-social { display: flex; gap: 12px; }
.footer-social a { width: 40px; height: 40px; border-radius: 11px; border: 1px solid rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--blue); border-color: var(--blue); }
.footer-social svg { width: 19px; height: 19px; }

/* ---------- Ripple motif (logo echo) ---------- */
.ripple-bg { position: relative; overflow: hidden; }
.ripple-bg::before, .ripple-bg::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.12);
  pointer-events: none;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }
.reveal[data-delay="4"] { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background: linear-gradient(180deg, var(--blue-50), #fff);
  padding-block: clamp(48px, 7vw, 86px) clamp(40px, 6vw, 70px);
  border-bottom: 1px solid var(--line);
  position: relative; overflow: hidden;
}
.page-hero .crumbs { font-size: .9rem; color: var(--muted); font-weight: 900; margin-bottom: 16px; }
.page-hero .crumbs a { color: var(--blue); }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
.page-hero p { margin-top: 16px; max-width: 64ch; color: var(--muted); font-size: 1.1rem; }
.page-hero .ring { position: absolute; border-radius: 50%; border: 2px solid var(--blue-100); opacity: .6; }
.page-hero .ring.r1 { width: 280px; height: 280px; right: -60px; top: -80px; }
.page-hero .ring.r2 { width: 460px; height: 460px; right: -150px; top: -150px; }

/* ---------- Utility grids ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* ---------- Embedded map ---------- */
.map-embed { position: relative; overflow: hidden; }
.map-embed iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- Map modal (lightbox com mapa) ---------- */
.map-modal {
  position: fixed; inset: 0; z-index: 200;
  display: none; align-items: center; justify-content: center;
  padding: 24px; background: rgba(12, 44, 82, 0.55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.map-modal.open { display: flex; animation: mmFade .2s var(--ease); }
@keyframes mmFade { from { opacity: 0; } to { opacity: 1; } }
.map-modal__box {
  background: #fff; border-radius: 22px; overflow: hidden;
  width: min(820px, 100%); max-height: 88vh; display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg); animation: mmPop .26s var(--ease);
}
@keyframes mmPop { from { transform: translateY(16px) scale(.98); } to { transform: none; } }
.map-modal__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.map-modal__title { font-weight: 900; color: var(--navy); font-size: 1.1rem; }
.map-modal__close { width: 40px; height: 40px; border-radius: 11px; border: 2px solid var(--line); color: var(--navy); font-size: 1.4rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: all .2s; }
.map-modal__close:hover { border-color: var(--red); color: var(--red); }
.map-modal__frame { flex: 1; min-height: 340px; background: var(--blue-50); }
.map-modal__frame iframe { width: 100%; height: 46vh; min-height: 340px; border: 0; display: block; }
.map-modal__foot { padding: 16px 22px; display: flex; justify-content: flex-end; }


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

/* ---------- Responsive ---------- */
@media (max-width: 1040px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 1024px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: flex; margin-left: auto; }
}
@media (min-width: 1025px) and (max-width: 1120px) {
  .nav__logo-img { height: 42px; max-width: 160px; }
  .nav__links a { padding: 9px 8px; font-size: 0.85rem; }
  .nav { gap: 10px; padding-inline: 22px; }
  .nav__cta { padding: 12px 16px; font-size: 0.86rem; }
}
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  body { font-size: 16px; }
  .container { padding-inline: 20px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}
