/* =========================================================
   MedControl - Site institucional
   Tema: cores da marca + tipografia system
   ========================================================= */

:root {
  /* Paleta da marca */
  --brand-blue: #3E7896;
  --brand-green: #7AB89A;
  --brand-blue-deep: #1B6FA0;
  --brand-blue-darker: #0F4F75;

  /* Texto e neutros */
  --text-gray: #6B7B85;
  --text-dark: #1F2D35;
  --text-muted: #8A98A1;
  --bg-light: #F4F8FA;
  --bg-white: #FFFFFF;
  --border: #E1E8EC;

  /* Estados */
  --shadow-sm: 0 2px 8px rgba(31, 45, 53, 0.06);
  --shadow-md: 0 8px 24px rgba(31, 45, 53, 0.08);
  --shadow-lg: 0 20px 48px rgba(31, 45, 53, 0.12);

  /* Tipografia fluida */
  --fs-h1: clamp(2rem, 5vw + 0.5rem, 3.75rem);
  --fs-h2: clamp(1.5rem, 3vw + 0.5rem, 2.5rem);
  --fs-h3: clamp(1.125rem, 1.5vw + 0.5rem, 1.5rem);
  --fs-body: clamp(1rem, 0.5vw + 0.875rem, 1.0625rem);

  /* Espaçamento e raios */
  --container: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --header-h: 72px;

  /* Animação */
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* =========================================================
   Reset enxuto
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--brand-blue); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--brand-blue-deep); }
button { font-family: inherit; cursor: pointer; }

h1, h2, h3, h4 {
  margin: 0 0 0.5em;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-dark);
}
p { margin: 0 0 1em; }

/* Foco acessível */
:focus-visible {
  outline: 3px solid var(--brand-green);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--brand-blue);
  color: #fff;
  padding: 12px 20px;
  z-index: 9999;
  border-radius: 0 0 var(--radius-sm) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* =========================================================
   Containers e utilitários
   ========================================================= */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: clamp(64px, 8vw, 112px) 0; }
.section--alt { background: var(--bg-light); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: var(--fs-h2); font-weight: 800; }
.section-head p { color: var(--text-gray); font-size: 1.0625rem; }

.eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-blue);
  background: rgba(62, 120, 150, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 16px;
}

/* =========================================================
   Botões
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease),
              background 0.2s var(--ease), color 0.2s var(--ease);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn--primary {
  background: var(--brand-blue);
  color: #fff;
  box-shadow: 0 6px 16px rgba(62, 120, 150, 0.25);
}
.btn--primary:hover {
  background: var(--brand-blue-deep);
  color: #fff;
  box-shadow: 0 10px 24px rgba(62, 120, 150, 0.35);
}

.btn--ghost {
  background: transparent;
  color: var(--brand-blue);
  border-color: var(--brand-blue);
}
.btn--ghost:hover { background: var(--brand-blue); color: #fff; }

.btn--white {
  background: #fff;
  color: var(--brand-blue);
}
.btn--white:hover { background: var(--bg-light); color: var(--brand-blue-deep); }

.btn[aria-disabled="true"], .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* Play Store badge (placeholder) */
.play-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #1F2D35;
  color: #fff;
  padding: 10px 22px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease);
}
.play-badge:hover { background: #000; color: #fff; transform: translateY(-2px); }
.play-badge .play-badge__small { display: block; font-size: 0.7rem; opacity: 0.85; font-weight: 400; }
.play-badge .play-badge__big   { display: block; font-size: 1.05rem; line-height: 1; }
.play-badge svg { width: 28px; height: 28px; flex: none; }
.play-badge[aria-disabled="true"] { opacity: 0.7; cursor: not-allowed; }
.play-badge[aria-disabled="true"]:hover { transform: none; background: #1F2D35; }

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand__mark { width: 36px; height: 36px; }
.brand__wordmark {
  font-weight: 800;
  font-size: 1.35rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand__wordmark .w-med    { color: var(--brand-blue); }
.brand__wordmark .w-control{ color: var(--brand-green); }

.nav { display: flex; align-items: center; gap: 8px; }
.nav__list {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav__list a {
  color: var(--text-dark);
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav__list a:hover { background: var(--bg-light); color: var(--brand-blue); }
.nav__list a[aria-current="page"],
.nav__list a[aria-current="location"] {
  color: var(--brand-blue);
  background: rgba(62, 120, 150, 0.08);
  position: relative;
}
.nav__list a[aria-current="location"]::after {
  content: "";
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 2px;
  height: 2px;
  background: var(--brand-blue);
  border-radius: 2px;
}
.nav__cta { margin-left: 12px; padding: 10px 20px; font-size: 0.95rem; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: var(--radius-sm);
  align-items: center;
  justify-content: center;
}
.nav-toggle:hover { background: var(--bg-light); }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-dark);
  border-radius: 2px;
  transition: transform 0.25s var(--ease), opacity 0.2s var(--ease);
  position: relative;
}
.nav-toggle__bars::before, .nav-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.nav-toggle__bars::before { top: -7px; }
.nav-toggle__bars::after  { top:  7px; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 16px 24px 24px;
    gap: 8px;
    transform: translateY(-110%);
    transition: transform 0.3s var(--ease);
    box-shadow: var(--shadow-md);
  }
  .nav[data-open="true"] { transform: translateY(0); }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__list a { padding: 14px 12px; font-size: 1.05rem; }
  .nav__cta { margin: 12px 0 0; align-self: stretch; }
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(56px, 8vw, 96px) 0 clamp(72px, 10vw, 120px);
  background:
    radial-gradient(1200px 600px at 90% -10%, rgba(122, 184, 154, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 110%, rgba(62, 120, 150, 0.18), transparent 60%),
    var(--bg-white);
}
.hero__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 56px;
  align-items: center;
}
@media (min-width: 960px) {
  .hero__grid { grid-template-columns: 1.1fr 1fr; gap: 64px; }
}
.hero__title {
  font-size: var(--fs-h1);
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}
.hero__title .accent { color: var(--brand-blue); }
.hero__subtitle {
  font-size: 1.125rem;
  color: var(--text-gray);
  max-width: 540px;
  margin-bottom: 32px;
}
.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}
.hero__trust {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--text-gray);
  font-size: 0.92rem;
}
.hero__trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero__trust svg { width: 18px; height: 18px; color: var(--brand-green); }

/* Phone mockup placeholder */
.phone {
  position: relative;
  width: 280px;
  max-width: 100%;
  aspect-ratio: 9 / 19;
  margin: 0 auto;
  border-radius: 44px;
  background: linear-gradient(150deg, var(--brand-blue), var(--brand-green));
  padding: 14px;
  box-shadow: var(--shadow-lg);
}
.phone::before {
  content: "";
  position: absolute;
  top: 18px; left: 50%;
  width: 110px; height: 22px;
  background: #1F2D35;
  border-radius: 0 0 14px 14px;
  transform: translateX(-50%);
  z-index: 2;
}
.phone__screen {
  width: 100%;
  height: 100%;
  background: var(--bg-light);
  border-radius: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  color: var(--text-gray);
  font-size: 0.85rem;
  line-height: 1.5;
  position: relative;
  overflow: hidden;
}
.phone__screen::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(62,120,150,0.08), transparent 40%),
    repeating-linear-gradient(180deg,
      transparent 0 36px,
      rgba(62,120,150,0.06) 36px 37px);
}
.phone__screen span {
  position: relative;
  background: rgba(255,255,255,0.85);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--border);
}

/* =========================================================
   Recursos (cards)
   ========================================================= */
.features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 640px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 980px) { .features { grid-template-columns: repeat(3, 1fr); } }

.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              border-color 0.25s var(--ease);
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(62, 120, 150, 0.25);
}
.feature__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(62,120,150,0.12), rgba(122,184,154,0.18));
  color: var(--brand-blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.15rem; font-weight: 700; margin-bottom: 8px; }
.feature p { color: var(--text-gray); margin: 0; font-size: 0.98rem; }

/* =========================================================
   Como funciona (steps)
   ========================================================= */
.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }

.step {
  position: relative;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
}
.step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 18px;
}
.step h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.step p  { color: var(--text-gray); margin: 0; }

/* =========================================================
   Screenshots
   ========================================================= */
.shots {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
@media (min-width: 700px) { .shots { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .shots { grid-template-columns: repeat(4, 1fr); } }

.shot {
  aspect-ratio: 9 / 18;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(62,120,150,0.06), rgba(122,184,154,0.06)),
    var(--bg-light);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 16px;
  color: var(--text-gray);
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
}
.shot::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(180deg,
    transparent 0 32px,
    rgba(62,120,150,0.05) 32px 33px);
  pointer-events: none;
}

/* =========================================================
   FAQ (accordion)
   ========================================================= */
.faq {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.faq__item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.faq__item[data-open="true"] {
  border-color: rgba(62, 120, 150, 0.35);
  box-shadow: var(--shadow-sm);
}
.faq__q {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 20px 22px;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--text-dark);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.faq__q:hover { color: var(--brand-blue); }
.faq__q::after {
  content: "";
  width: 12px; height: 12px;
  border-right: 2px solid var(--brand-blue);
  border-bottom: 2px solid var(--brand-blue);
  transform: rotate(45deg);
  transition: transform 0.25s var(--ease);
  flex: none;
  margin-top: -6px;
}
.faq__item[data-open="true"] .faq__q::after { transform: rotate(-135deg); margin-top: 4px; }
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.faq__a__inner {
  padding: 0 22px 20px;
  color: var(--text-gray);
}
.faq__item[data-open="true"] .faq__a { max-height: 400px; }

/* =========================================================
   CTA final
   ========================================================= */
.cta-banner {
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.cta-banner::before, .cta-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.cta-banner::before { width: 280px; height: 280px; top: -120px; right: -80px; }
.cta-banner::after  { width: 220px; height: 220px; bottom: -120px; left: -60px; }
.cta-banner h2 {
  color: #fff;
  font-size: var(--fs-h2);
  font-weight: 800;
  margin-bottom: 16px;
  position: relative;
}
.cta-banner p {
  color: rgba(255,255,255,0.92);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 28px;
  position: relative;
}
.cta-banner .cta-banner__actions {
  position: relative;
  display: inline-flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: #0F4F75;
  color: rgba(255,255,255,0.85);
  padding: 56px 0 32px;
}
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--brand-green); }
.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
@media (min-width: 760px) {
  .footer__grid { grid-template-columns: 2fr 1fr 1fr; }
}
.footer__brand .brand__wordmark { color: #fff; }
.footer__brand .brand__wordmark .w-med { color: #fff; }
.footer__brand .brand__wordmark .w-control { color: var(--brand-green); }
.footer__tagline {
  margin-top: 16px;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.75);
  max-width: 360px;
}
.footer__col h4 {
  color: #fff;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer__col ul {
  list-style: none;
  padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 10px;
  font-size: 0.96rem;
}
.footer__legal {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.65);
}

/* =========================================================
   Páginas legais (privacidade/termos)
   ========================================================= */
.legal {
  padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 8vw, 96px);
  background:
    radial-gradient(900px 380px at 80% -60px, rgba(62, 120, 150, 0.06), transparent 60%),
    var(--bg-white);
}
.legal__container {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Wrapper externo do conteúdo legal (sem padding próprio para evitar dupla margem) */
.legal__layout {
  width: 100%;
}

/* Frontispício */
.legal__back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 28px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--brand-blue);
}
.legal__back::before {
  content: "";
  width: 18px;
  height: 18px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M19 12H5M12 19l-7-7 7-7'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><path d='M19 12H5M12 19l-7-7 7-7'/></svg>") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}
.legal__back:hover::before { transform: translateX(-3px); }

.legal__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--brand-blue);
  background: rgba(62, 120, 150, 0.08);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.legal h1 {
  font-size: clamp(1.9rem, 3vw + 1rem, 2.75rem);
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

.legal__meta-card {
  margin: 24px 0 16px;
  padding: 20px 22px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  color: var(--text-gray);
  line-height: 1.7;
}
.legal__meta-card strong { color: var(--text-dark); font-weight: 600; }
.legal__meta-card a { color: var(--brand-blue); }

.legal__divider {
  height: 1px;
  background: linear-gradient(to right, var(--border), transparent);
  margin: 36px 0 8px;
  border: 0;
}

/* Mantém compat com a classe original (se ainda usada) */
.legal__meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 32px;
  line-height: 1.7;
}

/* Sumário (TOC) */
.legal__toc {
  margin: 28px 0 40px;
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.legal__toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 20px;
  background: transparent;
  border: 0;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brand-blue);
  cursor: pointer;
  text-align: left;
}
.legal__toc-header::after {
  content: "";
  width: 14px;
  height: 14px;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>") center / contain no-repeat;
  transition: transform 0.25s var(--ease);
}
.legal__toc[data-open="true"] .legal__toc-header::after { transform: rotate(180deg); }

.legal__toc-list {
  list-style: none;
  margin: 0;
  padding: 6px 12px 14px;
  display: none;
}
.legal__toc[data-open="true"] .legal__toc-list { display: block; }

.legal__toc-list li { margin: 0; }
.legal__toc-list a {
  display: block;
  padding: 8px 12px;
  font-size: 0.92rem;
  color: var(--text-gray);
  border-radius: var(--radius-sm);
  border-left: 2px solid transparent;
  line-height: 1.4;
  transition: background 0.15s var(--ease), color 0.15s var(--ease), border-color 0.15s var(--ease);
}
.legal__toc-list a:hover {
  background: rgba(62, 120, 150, 0.08);
  color: var(--brand-blue);
}
.legal__toc-list a[aria-current="location"] {
  background: rgba(62, 120, 150, 0.10);
  color: var(--brand-blue-deep);
  border-left-color: var(--brand-blue);
  font-weight: 600;
}

/* Headings */
.legal h2 {
  font-size: clamp(1.3rem, 1vw + 1rem, 1.6rem);
  font-weight: 700;
  margin-top: 56px;
  margin-bottom: 14px;
  color: var(--brand-blue-darker);
  letter-spacing: -0.015em;
  line-height: 1.25;
  scroll-margin-top: calc(var(--header-h) + 16px);
}
.legal h2::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-blue), var(--brand-green));
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}
.legal h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text-dark);
}

/* Corpo */
.legal p, .legal ul, .legal ol {
  color: var(--text-dark);
  font-size: 1rem;
  line-height: 1.75;
}
.legal p { margin: 0 0 14px; }

/* Subitens numerados (parágrafos que começam com "1.1.", "10.2.1." etc.) */
.legal p.legal__clause {
  position: relative;
  padding-left: 14px;
  border-left: 2px solid transparent;
  transition: border-color 0.2s var(--ease);
}
.legal p.legal__clause:hover { border-left-color: rgba(62, 120, 150, 0.25); }
.legal p.legal__clause > strong:first-child,
.legal p.legal__clause-num {
  color: var(--brand-blue);
  font-weight: 700;
}

/* Listas */
.legal ul, .legal ol { padding-left: 26px; margin: 0 0 18px; }
.legal li { margin-bottom: 8px; padding-left: 4px; }
.legal ul li::marker { color: var(--brand-blue); font-size: 1.1em; }
.legal ol li::marker {
  color: var(--brand-blue);
  font-weight: 700;
}

/* Tabelas */
.legal__table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 18px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
}
.legal table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
  font-size: 0.94rem;
}
.legal th, .legal td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  line-height: 1.6;
  border-bottom: 1px solid var(--border);
}
.legal th {
  background: rgba(62, 120, 150, 0.06);
  font-weight: 700;
  color: var(--brand-blue-darker);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border);
}
.legal tbody tr:nth-child(odd) { background: rgba(244, 248, 250, 0.5); }
.legal tbody tr:hover { background: rgba(62, 120, 150, 0.04); }
.legal tbody tr:last-child td { border-bottom: 0; }

/* Aviso médico (callout) */
.legal__warning {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255, 247, 230, 0.55), rgba(253, 236, 236, 0.4));
  border: 1px solid #E8B999;
  border-left: 4px solid #C76A3F;
  color: #4F2516;
  padding: 22px 24px 22px 64px;
  border-radius: var(--radius-md);
  margin: 28px 0;
  font-size: 0.97rem;
  line-height: 1.7;
  box-shadow: var(--shadow-sm);
}
.legal__warning::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 22px;
  width: 28px;
  height: 28px;
  background-color: #C76A3F;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>") center / contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z'/><line x1='12' y1='9' x2='12' y2='13'/><line x1='12' y1='17' x2='12.01' y2='17'/></svg>") center / contain no-repeat;
}
.legal__warning > p:first-child {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #8C3A12;
  margin: 0 0 12px;
}
.legal__warning > p:first-child strong { color: inherit; }
.legal__warning p { margin: 0 0 12px; }
.legal__warning p:last-child { margin-bottom: 0; }
.legal__warning ul { padding-left: 20px; margin: 8px 0 12px; }
.legal__warning li { margin-bottom: 6px; }
.legal__warning ul li::marker { color: #C76A3F; }
.legal__warning strong { color: #4F2516; }

/* Bloco "notice" (preservado para compatibilidade) */
.legal__notice {
  background: #FFF7E6;
  border: 1px solid #F2C97A;
  color: #6B4F12;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 40px;
  font-size: 0.95rem;
}
.legal__notice strong { color: #4A3608; }

/* Rodapé do documento */
.legal hr,
.legal__doc-footer-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 56px 0 24px;
}
.legal__doc-footer {
  margin-top: 0;
  padding: 20px 22px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  color: var(--text-gray);
  font-size: 0.88rem;
  line-height: 1.7;
}
.legal__doc-footer strong { color: var(--text-dark); font-weight: 600; }

/* TOC: ajustes para desktop (mantém inline, sem sticky) */
@media (min-width: 1024px) {
  .legal__toc { max-width: 720px; }
  .legal__toc-list { columns: 2; column-gap: 24px; }
  .legal__toc-list li { break-inside: avoid; }
}

/* =========================================================
   Mobile (< 640px)
   ========================================================= */
@media (max-width: 639px) {
  .legal h1 { font-size: 1.65rem; }
  .legal h2 { margin-top: 44px; font-size: 1.2rem; }
  .legal h3 { font-size: 1rem; }
  .legal__meta-card { padding: 16px 18px; font-size: 0.88rem; }
  .legal__warning { padding: 18px 18px 18px 56px; }
  .legal__warning::before { top: 18px; left: 16px; width: 24px; height: 24px; }
  .legal th, .legal td { padding: 10px 12px; font-size: 0.88rem; }
}

/* =========================================================
   404
   ========================================================= */
.error {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  place-items: center;
  text-align: center;
  padding: 64px 24px;
}
.error__code {
  font-size: clamp(5rem, 14vw, 9rem);
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-green));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: 16px;
}
.error h1 { font-size: var(--fs-h2); margin-bottom: 12px; }
.error p { color: var(--text-gray); max-width: 480px; margin: 0 auto 28px; }

/* =========================================================
   Formulário de exclusão de conta
   ========================================================= */
.delete-steps {
  padding-left: 24px;
  margin: 0 0 28px;
}
.delete-steps li {
  padding-left: 6px;
  margin-bottom: 12px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text-dark);
}
.delete-steps li::marker {
  color: var(--brand-blue);
  font-weight: 700;
}

.delete-form {
  background: var(--bg-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: clamp(22px, 4vw, 40px);
  margin: 28px 0 40px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.form-label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-dark);
}

.form-required {
  color: #C00;
  margin-left: 2px;
}

.form-optional {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.85em;
  margin-left: 4px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-dark);
  background: var(--bg-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
  outline: none;
  appearance: none;
  -webkit-appearance: none;
}
.form-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(62, 120, 150, 0.15);
}
.form-input[aria-invalid="true"] {
  border-color: #C00;
  box-shadow: 0 0 0 3px rgba(204, 0, 0, 0.10);
}
.form-input::placeholder { color: var(--text-muted); }

.form-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.form-error {
  color: #C00;
  font-size: 0.84rem;
  font-weight: 500;
  min-height: 1.2em;
}

.form-notice {
  font-size: 0.875rem;
  color: var(--text-gray);
  margin: 4px 0 22px;
  line-height: 1.6;
}

.form-submit { width: 100%; }
@media (min-width: 480px) { .form-submit { width: auto; } }

.form-success {
  background: linear-gradient(135deg, rgba(122, 184, 154, 0.12), rgba(62, 120, 150, 0.06));
  border: 1.5px solid var(--brand-green);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin: 0 0 40px;
  outline: none;
}
.form-success p:first-child {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--brand-blue-darker);
  margin-bottom: 8px;
}
.form-success p:last-child {
  color: var(--text-gray);
  margin: 0;
  font-size: 0.95rem;
}

/* =========================================================
   Modal de confirmação de envio (<dialog> nativo)
   ========================================================= */
dialog.modal {
  border: none;
  border-radius: var(--radius-lg);
  padding: clamp(28px, 6vw, 52px);
  max-width: 460px;
  width: calc(100% - 48px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
dialog.modal[open] {
  animation: modal-in 0.3s var(--ease) both;
}
dialog.modal::backdrop {
  background: rgba(15, 36, 53, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.modal__icon {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(122,184,154,0.22), rgba(62,120,150,0.14));
  color: var(--brand-green);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
}
.modal__icon svg { width: 34px; height: 34px; }

.modal__title {
  font-size: clamp(1.2rem, 2vw + 0.7rem, 1.5rem);
  font-weight: 800;
  color: var(--text-dark);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.modal__body {
  color: var(--text-gray);
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 28px;
}

.modal__ok { min-width: 140px; }

/* =========================================================
   Reduced motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    transition-duration: 0.001s !important;
    scroll-behavior: auto !important;
  }
}
