/* Freshmotion: estilos compartilhados
   Cores: tinta #144351 · profundo #002e3b · azul #2b7f99 · papel #f7f6f2 · areia #e9e4da · névoa #eceeea
   Cada página ainda traz um <style> próprio com o layout específico dela. */

:root {
  --fm-ink: #144351;
  --fm-deep: #002e3b;
  --fm-blue: #2b7f99;
  --fm-paper: #f7f6f2;
  --fm-sand: #e9e4da;
  --fm-mist: #eceeea;
  --fm-muted: #5b6c6e;
  --fm-line: rgba(20, 67, 81, .2);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--fm-paper); color: var(--fm-ink); }
img, video { max-width: 100%; }
[hidden] { display: none !important; }
button { font: inherit; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid var(--fm-blue);
  outline-offset: 4px;
}

.fm-skip {
  position: fixed; left: 16px; top: -100px; z-index: 100;
  background: #fff; color: var(--fm-ink); padding: 12px 16px; font: 600 14px Manrope, Arial, sans-serif;
}
.fm-skip:focus { top: 12px; }

/* ---------- cabeçalho e menu mobile ---------- */
.fm-header { position: relative; z-index: 30; }
.fm-menu-btn { display: none; }
.fm-nav-cta { display: none; }

.fm h1, .fm h2, .fm h3 { line-height: 1.18; }

@media (max-width: 900px) {
  .fm-nav, .fm-sub-cta, .fm-sub-name, .fm-bar-title { display: none !important; }
  .fm-chips { width: 100%; min-width: 0; }
  .fm-menu-btn {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 6px;
    width: 44px; height: 44px; padding: 0 10px; margin-left: 4px;
    background: transparent; border: 0; cursor: pointer;
  }
  .fm-menu-btn span { display: block; height: 1.5px; background: var(--fm-ink); transition: transform .2s ease; }
  .fm-menu-btn[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
  .fm-menu-btn[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }
  .fm-nav.is-open {
    display: flex !important; flex-direction: column; gap: 4px !important;
    position: absolute; top: 100%; left: 0; right: 0; margin: 0 !important;
    padding: 12px clamp(22px, 5.6vw, 96px) 24px; background: var(--fm-paper);
    border-bottom: 1px solid var(--fm-line); box-shadow: 0 16px 24px rgba(0, 46, 59, .08);
    font-size: 17px !important;
  }
  .fm-nav.is-open a { display: flex; align-items: center; min-height: 48px; border-bottom: 0 !important; }
  .fm-nav.is-open .fm-nav-cta {
    display: inline-flex; justify-content: center; margin-top: 12px; text-decoration: none;
    background: var(--fm-ink); color: #fff; font-size: 14px; font-weight: 600;
  }
}
@media (max-width: 600px) {
  .fm-header-cta { display: none !important; }
  .fm-menu-btn { margin-left: auto; }
  .fm-header a[aria-label^="Freshmotion"] { width: 180px !important; }
}

/* ---------- navegação interna (sticky) ---------- */
.fm-subnav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border-radius: 999px; font-size: 13px; font-weight: 500; text-decoration: none;
  white-space: nowrap; color: var(--fm-ink); transition: background .2s ease, color .2s ease;
}
.fm-subnav a:hover { background: rgba(20, 67, 81, .08); }
.fm-subnav a[aria-current="true"] { background: var(--fm-ink); color: #fff; }

/* ---------- pílulas (abas, filtros, escolhas) ---------- */
.fm-pill {
  min-height: 44px; padding: 0 18px; border-radius: 999px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
  background: transparent; color: var(--fm-ink); border: 1px solid rgba(20, 67, 81, .3);
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.fm-pill:hover { border-color: var(--fm-ink); }
.fm-pill[aria-selected="true"], .fm-pill[aria-pressed="true"] { background: var(--fm-ink); color: #fff; border-color: var(--fm-ink); }
.fm-pill--chip { flex-shrink: 0; padding: 0 16px; }
.fm-pill--on-dark { color: var(--fm-paper); border-color: #5f7d84; }
.fm-pill--on-dark:hover { border-color: var(--fm-paper); }
.fm-pill--on-dark[aria-selected="true"], .fm-pill--on-dark[aria-pressed="true"] { background: var(--fm-paper); color: var(--fm-ink); border-color: var(--fm-paper); }
.fm-pill--soft { font-weight: 400; color: #e4eded; border-color: #6a878e; padding: 0 16px; }

/* ---------- abas de "momentos" (home) ---------- */
.fm-moment-tab {
  text-align: left; padding: 18px 0 0; min-height: 44px; background: none; border: 0;
  border-top: 1px solid #70878b; color: #c1d0d2; font: inherit; font-size: 12px; line-height: 1.6; cursor: pointer;
}
.fm-moment-tab:hover { color: #fff; }
.fm-moment-tab[aria-selected="true"] { color: #fff; border-top: 3px solid #fff; padding-top: 16px; }

/* ---------- perguntas frequentes ---------- */
.fm-acc-icon { flex-shrink: 0; display: inline-block; font-size: 26px; font-weight: 300; line-height: 1; transition: transform .25s ease; }
[data-acc][aria-expanded="true"] .fm-acc-icon { transform: rotate(45deg); }
.fm details summary .fm-plus { transition: transform .25s ease; }

/* ---------- demonstrações ---------- */
.fm-demo-result {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity .8s ease;
}
[data-demo="drop"][data-phase="2"] .fm-demo-result,
[data-demo="drop"][data-phase="3"] .fm-demo-result { opacity: 1; transition-duration: .9s; }
[data-demo="day"][data-phase="1"] .fm-demo-result { opacity: .35; }
[data-demo="day"][data-phase="2"] .fm-demo-result { opacity: .7; }
[data-demo="day"][data-phase="3"] .fm-demo-result { opacity: 1; }

.fm-drop {
  position: absolute; left: 50%; top: calc(47% - 20px); width: 30px; height: 40px;
  border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; transform: translateX(-50%);
  background: radial-gradient(circle at 34% 30%, #fff 0 10%, #cfeaf2 26%, #7fbfd1 70%, #4c94aa 100%);
  box-shadow: 0 8px 14px rgba(0, 20, 28, .35);
  opacity: 0; transition: top .7s cubic-bezier(.55, 0, .8, .2), opacity .35s ease;
}
[data-demo="drop"][data-phase="0"] .fm-drop { top: -60px; opacity: 1; transition: none; }
[data-demo="drop"][data-phase="1"] .fm-drop { opacity: 1; }

.fm-demo-bar { height: 100%; width: 100%; background: var(--fm-blue); transition: width .8s ease; }
[data-demo="day"][data-phase="0"] .fm-demo-bar { width: 4%; }
[data-demo="day"][data-phase="1"] .fm-demo-bar { width: 40%; }
[data-demo="day"][data-phase="2"] .fm-demo-bar { width: 70%; }

.fm-step { padding: 12px 14px; font-size: 14px; background: var(--fm-mist); color: var(--fm-muted); transition: background .4s ease, color .4s ease; }
.fm-step.is-on { background: var(--fm-ink); color: #fff; }

/* ---------- interruptores de cookies ---------- */
.fm-switch {
  position: relative; flex-shrink: 0; width: 52px; height: 30px; border-radius: 999px;
  border: 0; padding: 0; cursor: pointer; background: #b9c4c6; transition: background .2s ease;
}
.fm-switch[aria-checked="true"] { background: var(--fm-ink); }
.fm-switch:disabled { opacity: .6; cursor: default; }
.fm-switch-knob {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; transition: left .2s ease;
}
.fm-switch[aria-checked="true"] .fm-switch-knob { left: 25px; }

/* ---------- teste rápido (artigo) ---------- */
.fm-quiz-btn[aria-pressed="true"].is-wrong { background: #f3e3d6; color: #7a3a12; border-color: #d9a07a; }
.fm-quiz-fb { font-size: 14px; margin-top: 10px; min-height: 22px; color: var(--fm-muted); }
.fm-quiz-fb.is-right { color: #1f6b52; }
.fm-quiz-fb.is-wrong { color: #8a4513; }

/* ---------- barra de leitura (artigo) ---------- */
.fm-progress-bar { height: 3px; width: 0; background: var(--fm-blue); transition: width .15s linear; }

/* ---------- formulários ---------- */
.fm form input:not([type="checkbox"]):focus-visible,
.fm form textarea:focus-visible,
.fm form select:focus-visible { outline-offset: 2px; }
.fm form .fm-invalid { border-bottom-color: #e6b98a !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
