/* =============================================================
   Road MZ — Website institucional
   CSS3 puro · sem frameworks · organizado por secções
   ============================================================= */

/* -------------------------------------------------------------
   1. Variáveis (tema)
   ------------------------------------------------------------- */
:root {
  --primary: #3B6EF5;
  --primary-dark: #2A54C9;
  --primary-soft: #E9F0FE;

  --text: #1A2233;
  --text-muted: #5B6577;
  --heading: #0F1B33;

  --bg: #FFFFFF;
  --bg-alt: #F5F7FB;
  --card: #FFFFFF;
  --border: #E6EAF2;

  --success: #16A34A;
  --shadow-sm: 0 1px 2px rgba(15, 27, 51, 0.05);
  --shadow: 0 8px 24px rgba(15, 27, 51, 0.08);
  --shadow-lg: 0 18px 48px rgba(15, 27, 51, 0.12);

  --radius: 16px;
  --radius-sm: 10px;
  --radius-lg: 24px;

  --container: 1120px;
  --gap: 24px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* -------------------------------------------------------------
   2. Reset e 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);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--primary-dark);
}

h1,
h2,
h3,
h4 {
  color: var(--heading);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: 1.25rem; }

p { color: var(--text-muted); }

ul { list-style: none; }

/* Acessibilidade: link de salto e foco visível */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
}
.skip-link:focus {
  left: 12px;
  top: 12px;
}

:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* -------------------------------------------------------------
   3. Layout
   ------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding: clamp(56px, 9vw, 104px) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section-head {
  max-width: 720px;
  margin: 0 auto clamp(36px, 5vw, 56px);
  text-align: center;
}

.section-head p {
  margin-top: 12px;
  font-size: 1.05rem;
}

.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* -------------------------------------------------------------
   4. Botões
   ------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  padding: 13px 24px;
  border-radius: var(--radius-sm);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.2s var(--ease),
    box-shadow 0.2s var(--ease), border-color 0.2s var(--ease);
  white-space: nowrap;
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(59, 110, 245, 0.28);
}
.btn--primary:hover {
  background: var(--primary-dark);
  color: #fff;
  box-shadow: 0 10px 22px rgba(59, 110, 245, 0.34);
}

.btn--ghost {
  background: #fff;
  color: var(--heading);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* -------------------------------------------------------------
   5. Cabeçalho / navegação
   ------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--heading);
  letter-spacing: -0.02em;
}
.brand svg { width: 34px; height: 34px; }
.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  object-fit: cover;
  display: block;
}
.site-footer .brand-logo { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25); }

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

.nav-links a {
  color: var(--text);
  font-weight: 500;
  font-size: 0.96rem;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-links a:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--heading);
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}
.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);
}

/* -------------------------------------------------------------
   6. Hero
   ------------------------------------------------------------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(64px, 10vw, 120px) 0;
  background: radial-gradient(
      1200px 600px at 80% -10%,
      var(--primary-soft),
      transparent 60%
    ),
    var(--bg);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(32px, 6vw, 72px);
}

.hero-copy h1 { margin-bottom: 20px; }
.hero-copy .lead {
  font-size: 1.2rem;
  max-width: 34ch;
  margin-bottom: 32px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-dark);
  background: var(--primary-soft);
  padding: 7px 14px;
  border-radius: 999px;
  margin-bottom: 20px;
}
.hero-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}

/* Mockup do telemóvel (CSS puro, sem imagem obrigatória) */
.hero-visual {
  display: flex;
  justify-content: center;
}
.phone {
  width: 260px;
  aspect-ratio: 9 / 19;
  background: linear-gradient(160deg, var(--primary), var(--primary-dark));
  border-radius: 34px;
  padding: 12px;
  box-shadow: var(--shadow-lg);
  position: relative;
}
.phone::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: 90px;
  height: 6px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 999px;
}
.phone-screen {
  height: 100%;
  background: #fff;
  border-radius: 24px;
  padding: 26px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.phone-screen .ps-title {
  font-weight: 800;
  color: var(--heading);
  font-size: 1rem;
}
.phone-screen .ps-sub { font-size: 0.72rem; color: var(--text-muted); }
.ps-card {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.74rem;
  color: var(--heading);
  font-weight: 600;
}
.ps-card small { display: block; color: var(--text-muted); font-weight: 400; }
.ps-pill {
  align-self: flex-start;
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

/* -------------------------------------------------------------
   7. Grelha de funcionalidades
   ------------------------------------------------------------- */
.grid {
  display: grid;
  gap: var(--gap);
}
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    border-color 0.25s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: #d7dEF5;
}

.card .icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.97rem; }

/* -------------------------------------------------------------
   8. "Porquê" — lista de vantagens
   ------------------------------------------------------------- */
.why-list {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(2, 1fr);
}
.why-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.why-item .check {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--success);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  margin-top: 2px;
}
.why-item h3 { font-size: 1.08rem; margin-bottom: 4px; }
.why-item p { font-size: 0.95rem; }

/* -------------------------------------------------------------
   9. FAQ (acordeão)
   ------------------------------------------------------------- */
.faq {
  max-width: 780px;
  margin-inline: auto;
  display: grid;
  gap: 14px;
}
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  padding: 20px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.faq-q .chev {
  flex: none;
  transition: transform 0.3s var(--ease);
  color: var(--primary);
}
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s var(--ease);
}
.faq-a-inner { padding: 0 24px 20px; }
.faq-a-inner p { font-size: 0.98rem; }

/* -------------------------------------------------------------
   10. Bloco de destaque (CTA / faixa)
   ------------------------------------------------------------- */
.callout {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(36px, 6vw, 60px);
  text-align: center;
  box-shadow: var(--shadow-lg);
}
.callout h2 { color: #fff; }
.callout p { color: rgba(255, 255, 255, 0.9); margin: 12px auto 0; max-width: 52ch; }

/* -------------------------------------------------------------
   11. Rodapé
   ------------------------------------------------------------- */
.site-footer {
  background: #0F1B33;
  color: #C7D0E0;
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer p { color: #9AA6BD; font-size: 0.95rem; max-width: 40ch; }
.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col a {
  display: block;
  color: #C7D0E0;
  padding: 5px 0;
  font-size: 0.95rem;
}
.footer-col a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.88rem;
  color: #8592AB;
}

/* -------------------------------------------------------------
   12. Páginas legais (Privacidade / Termos)
   ------------------------------------------------------------- */
.legal-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: clamp(48px, 8vw, 80px) 0;
}
.legal-hero .eyebrow { margin-bottom: 16px; }
.legal-hero p { margin-top: 12px; font-size: 1.05rem; }

.legal-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
  padding: clamp(40px, 6vw, 72px) 0;
}

.toc {
  position: sticky;
  top: 90px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}
.toc h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.toc a {
  display: block;
  color: var(--text);
  font-size: 0.92rem;
  padding: 7px 12px;
  border-radius: 8px;
  border-left: 2px solid transparent;
}
.toc a:hover,
.toc a.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-left-color: var(--primary);
}

.legal-content .legal-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-sm);
  margin-bottom: 22px;
  scroll-margin-top: 90px;
}
.legal-content h2 { font-size: 1.4rem; margin-bottom: 14px; }
.legal-content h3 { margin: 20px 0 8px; }
.legal-content p { margin-bottom: 12px; color: var(--text); }
.legal-content ul.bullets {
  list-style: disc;
  padding-left: 22px;
  margin-bottom: 12px;
}
.legal-content ul.bullets li { margin-bottom: 8px; color: var(--text); }
.legal-content .meta {
  font-size: 0.9rem;
  color: var(--text-muted);
}
.legal-note {
  background: var(--primary-soft);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 0.95rem;
  color: var(--primary-dark);
}

/* Botão "voltar ao topo" */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease),
    visibility 0.3s;
  z-index: 90;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--primary-dark); }

/* -------------------------------------------------------------
   13. Suporte
   ------------------------------------------------------------- */
.support-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
  margin-bottom: 40px;
}
.support-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  text-align: center;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.support-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.support-card .icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
}
.support-card .icon svg { width: 28px; height: 28px; }
.support-card h3 { margin-bottom: 6px; }
.support-card .big {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--heading);
  margin: 8px 0 18px;
  word-break: break-word;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.info-strip .card { text-align: left; }

/* -------------------------------------------------------------
   14. Sobre
   ------------------------------------------------------------- */
.about-values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
}
.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}
.tech-chip {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 9px 18px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--heading);
  box-shadow: var(--shadow-sm);
}

/* -------------------------------------------------------------
   15. Animações subtis (reveal)
   ------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* -------------------------------------------------------------
   16. Responsivo
   ------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-copy .lead { margin-inline: auto; }
  .hero-actions { justify-content: center; }
  .hero-visual { order: -1; margin-bottom: 12px; }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .about-values { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .nav-links {
    position: fixed;
    inset: 70px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 14px 20px 22px;
    box-shadow: var(--shadow);
    transform: translateY(-120%);
    transition: transform 0.3s var(--ease);
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 12px 14px; }
  .nav-toggle { display: flex; }
  .grid--3,
  .grid--2,
  .why-list,
  .support-cards,
  .info-strip,
  .about-values { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; }
}
