/* ==========================================================================
   Portal Grupo MS — Landing Page
   Paleta extraída oficialmente do logotipo (não alterar sem novo logo).
   ========================================================================== */

:root {
  --navy-900: #04122E;
  --navy-800: #0B2258;
  --navy-700: #123073;
  --blue-600: #0090E0;
  --blue-500: #29ABE2;
  --blue-100: #E6F4FC;
  --teal-500: #00A8C0;
  --logo-navy: #002058; /* azul escuro exato da escrita "GRUPO MS" no logotipo, amostrado do PNG oficial */

  --text-main: #16223D;
  --text-muted: #5B6472;
  --white: #FFFFFF;
  --bg-light: #F7F9FC;
  --border-soft: #E4E9F2;

  --font-main: 'Montserrat', 'Segoe UI', Arial, sans-serif;

  --container-w: 1160px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-soft: 0 12px 32px rgba(11, 34, 88, 0.10);
  --shadow-strong: 0 20px 48px rgba(11, 34, 88, 0.18);

  --transition: 220ms ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

body {
  font-family: var(--font-main);
  color: var(--text-main);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: var(--container-w);
  margin: 0 auto;
  padding: 0 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-800);
  color: var(--white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.2px;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition), border-color var(--transition);
  border: 2px solid transparent;
  white-space: nowrap;
}
.btn-primary {
  background: var(--blue-600);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--navy-800); transform: translateY(-2px); box-shadow: var(--shadow-strong); }

.btn-outline {
  background: transparent;
  color: var(--navy-800);
  border-color: var(--border-soft);
}
.btn-outline:hover { border-color: var(--blue-600); color: var(--blue-600); transform: translateY(-2px); }

.btn-ghost {
  background: var(--navy-800);
  color: var(--white);
  padding: 10px 22px;
}
.btn-ghost:hover { background: var(--blue-600); }

.btn-block { width: 100%; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.site-header.is-scrolled {
  box-shadow: 0 4px 24px rgba(11, 34, 88, 0.08);
  border-bottom-color: var(--border-soft);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo { height: 40px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 28px;
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-list a {
  position: relative;
  color: var(--text-main);
  padding: 6px 2px;
  transition: color var(--transition);
}
.nav-list a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px;
  width: 0; height: 2px;
  background: var(--blue-600);
  transition: width var(--transition);
}
.nav-list a:hover { color: var(--blue-600); }
.nav-list a:hover::after { width: 100%; }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: none;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--navy-800);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 72px;
    left: 0; right: 0;
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px 20px 24px;
    box-shadow: 0 16px 32px rgba(11, 34, 88, 0.12);
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .nav-list {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    width: 100%;
  }
  .nav-list a { display: block; padding: 12px 4px; width: 100%; }
  .nav-entrar { margin-top: 12px; align-self: flex-start; }
}
@media (min-width: 861px) {
  .nav-toggle { display: none; }
}

/* ---- Hero ----
   Fundo obrigatoriamente branco sólido (#FFFFFF) — sem degradê, imagem,
   textura, ilustração, padrão gráfico ou glassmorphism. */
.hero {
  position: relative;
  padding: 168px 0 96px;
  min-height: 92vh;
  display: flex;
  align-items: center;
  background: var(--white);
}
.hero-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.hero-logo {
  width: min(360px, 78vw);
  height: auto;
  margin-bottom: 32px;
  animation: fadeUp 700ms ease both;
}
.hero-slogan {
  max-width: 620px;
  font-size: clamp(1.15rem, 2.6vw, 1.55rem);
  font-weight: 500;
  color: var(--logo-navy);
  margin-bottom: 40px;
  animation: fadeUp 700ms ease 120ms both;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  animation: fadeUp 700ms ease 220ms both;
}
/* Botões da primeira tela usam o azul escuro exato do logotipo (escopo local,
   não altera .btn-primary usado nas demais seções da página). */
.hero-actions .btn-primary {
  background: var(--logo-navy);
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Section shared ---- */
section { padding: 96px 0; }
.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--blue-600);
  margin-bottom: 12px;
}
.eyebrow-light { color: var(--blue-500); }

h2 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  font-weight: 800;
  color: var(--navy-800);
  letter-spacing: -0.3px;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 560px;
  margin-top: 14px;
}

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- About ---- */
.about { background: var(--white); }
.about-inner {
  max-width: 720px;
  text-align: center;
  margin: 0 auto;
}
.about-inner p {
  margin-top: 18px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* ---- Apps ---- */
.apps { background: var(--bg-light); }
.apps-grid {
  margin-top: 48px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: start;
  gap: 28px;
}

.app-card {
  background: var(--white);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.app-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-strong);
  border-color: transparent;
}

/* Cabeçalho compacto: ícone e nome na mesma linha, alinhados verticalmente
   ao centro. Padrão a ser reaproveitado por todo card de aplicativo,
   presente e futuro, pois é gerado pelo mesmo template em main.js. */
.app-card__header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.app-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--blue-100), #ffffff);
  color: var(--blue-600);
  flex-shrink: 0;
}
.app-icon svg { width: 22px; height: 22px; }

.app-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--navy-800);
  letter-spacing: 0.5px;
}

.app-card p {
  color: var(--text-muted);
  font-size: 0.98rem;
  margin-bottom: 16px;
}

.app-card__subtitle {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy-800);
  margin-bottom: 4px;
  margin-top: -8px;
}

.app-card .btn { align-self: flex-start; }

/* Botão do card "Geriatria In" no azul escuro exato do logotipo (escopo local,
   não altera .btn-primary usado nas demais seções da página). */
.app-card[data-app="Geriatria In"] .btn-primary {
  background: var(--logo-navy);
}

/* Botão informativo "Em desenvolvimento" — mesma identidade visual dos
   demais botões, porém sem ação (disabled), com leve indicação visual
   discreta de que não é clicável. */
.btn-disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-disabled:hover {
  transform: none;
  box-shadow: var(--shadow-soft);
  background: var(--logo-navy);
}

.app-card--placeholder {
  border-style: dashed;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  min-height: 150px;
}

/* ---- Contact ---- */
.contact {
  background: linear-gradient(160deg, var(--navy-900), var(--navy-800));
  color: var(--white);
}
.contact-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}
.contact h2 { color: var(--white); }
.contact-info p { color: rgba(255,255,255,0.75); margin-top: 14px; max-width: 480px; }

.contact-list {
  margin-top: 32px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 1rem;
}
.contact-list .contact-icon {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue-500);
}
.contact-list .contact-icon svg { width: 20px; height: 20px; }
.contact-list a { transition: color var(--transition); }
.contact-list a:hover { color: var(--blue-500); }

.contact-cta-box {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-lg);
  padding: 32px;
  align-self: start;
}
.contact-cta-box p { margin-bottom: 18px; color: rgba(255,255,255,0.8); }

@media (min-width: 760px) {
  .contact-inner { grid-template-columns: 1.3fr 1fr; align-items: center; }
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.65);
  padding: 48px 0 32px;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 20px;
  align-items: center;
  text-align: center;
}
.footer-brand-name {
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--white);
  font-size: 1.05rem;
}
.footer-brand p { margin-top: 6px; font-size: 0.85rem; color: var(--blue-500); }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  font-size: 0.9rem;
}
.footer-links a { transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }

.footer-copy { font-size: 0.82rem; }

@media (min-width: 760px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
}

/* ---- Utility page (privacy/terms) ---- */
.legal-page {
  padding: 168px 0 96px;
  max-width: 780px;
  margin: 0 auto;
}
.legal-page h1 { font-size: 2rem; font-weight: 800; color: var(--navy-800); margin-bottom: 24px; }
.legal-page p { color: var(--text-muted); margin-bottom: 16px; }
.legal-page a.back-link { color: var(--blue-600); font-weight: 600; display: inline-block; margin-bottom: 32px; }
