/* ==========================================================================
   Applv — site institucional
   Mesma identidade do aplicativo (apps/mobile/src/theme/tokens.ts):
   Baloo 2 nos títulos, Hanken Grotesk no texto, verde-água + coral + manteiga.
   Sem JavaScript, sem fontes de terceiros, sem estilo embutido no HTML.
   ========================================================================== */

/* ---------- Fontes (as mesmas do app, só com os caracteres do português) --- */
@font-face {
  font-family: "Baloo 2";
  src: url("/fonts/baloo2-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Baloo 2";
  src: url("/fonts/baloo2-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Hanken Grotesk";
  src: url("/fonts/hanken-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------------------------------------------------------- */
:root {
  color-scheme: light;

  --ink: #17282a;
  --teal-950: #072f33;
  --teal-900: #0b4a50;
  --teal-700: #0b7c85;
  --teal-600: #0ea5b0;
  --teal-500: #14b8c4;
  --teal-400: #17c2c9;
  --coral-700: #c2491f;
  --coral-600: #ff7a56;
  --coral-500: #ff8a65;
  --coral-100: #ffeee6;
  --butter: #ffc94d;
  --butter-ink: #4a3208;
  --butter-soft: #ffe3b3;
  --butter-tip: #fff4dc;

  --surface: #f1f8f8;
  --surface-2: #e8f4f4;
  --card: #ffffff;
  --line: #dcedee;
  --muted: #4a6668;
  --chip-text: #3a5254;

  --safe-a: #1fb56c;
  --safe-b: #0e8a4d;
  --safe-ink: #0e7a45;
  --safe-bg: #ddf3e7;
  --danger-a: #eb5d74;
  --danger-b: #c22743;
  --danger-ink: #c22743;
  --danger-bg: #fce0e4;
  --warn-a: #f0b24a;
  --warn-b: #d8891e;
  --warn-ink: #8a5a0b;

  --font-display: "Baloo 2", "Trebuchet MS", system-ui, sans-serif;
  --font-body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius-chip: 12px;
  --radius-card: 24px;
  --radius-hero: 32px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(11, 74, 80, 0.06);
  --shadow-card: 0 1px 2px rgba(11, 74, 80, 0.04), 0 18px 40px -22px rgba(11, 74, 80, 0.28);
  --shadow-lift: 0 2px 4px rgba(11, 74, 80, 0.05), 0 28px 56px -24px rgba(11, 74, 80, 0.38);

  --container: 1120px;
  --header-height: 68px;
}

/* ---------- Base ------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-display);
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.9rem, 4vw, 2.85rem);
  font-weight: 800;
}

h3 {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.2;
}

p {
  margin: 0;
  text-wrap: pretty;
}

a {
  color: inherit;
}

svg {
  display: block;
}

:focus-visible {
  outline: 3px solid var(--teal-700);
  outline-offset: 3px;
  border-radius: 8px;
}

.container {
  width: min(100% - 2.5rem, var(--container));
  margin-inline: auto;
}

.sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 50;
  padding: 0.75rem 1.1rem;
  border-radius: var(--radius-pill);
  background: var(--teal-900);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* ---------- Cabeçalho ------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(241, 248, 248, 0.94);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid rgba(220, 237, 238, 0.9);
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: var(--header-height);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 44px;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  width: 40px;
  height: 40px;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.55rem;
  line-height: 1;
  letter-spacing: -0.01em;
  padding-top: 0.12em;
}

.site-nav {
  display: flex;
  gap: 0.15rem;
  margin-left: auto;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.97rem;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.site-nav a:hover {
  background: var(--surface-2);
  color: var(--teal-900);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.42rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--butter-soft);
  background: var(--butter-tip);
  color: var(--butter-ink);
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
}

.status-pill__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--coral-600);
  box-shadow: 0 0 0 4px rgba(255, 122, 86, 0.2);
}

/* ---------- Botões ---------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 54px;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius-pill);
  border: 1.5px solid transparent;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.03rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.btn svg {
  width: 1.2rem;
  height: 1.2rem;
  flex: none;
}

.btn--primary {
  background: var(--butter);
  color: var(--butter-ink);
  box-shadow: 0 14px 28px -14px rgba(224, 160, 18, 0.95), inset 0 -2px 0 rgba(74, 50, 8, 0.14);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 34px -14px rgba(224, 160, 18, 0.95), inset 0 -2px 0 rgba(74, 50, 8, 0.14);
}

.btn--ghost {
  background: var(--card);
  border-color: var(--line);
  color: var(--teal-900);
}

.btn--ghost:hover {
  border-color: var(--teal-500);
  transform: translateY(-2px);
}

.btn--light {
  background: #fff;
  color: var(--teal-900);
}

.btn--light:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 30px -16px rgba(0, 0, 0, 0.5);
}

.btn:active {
  transform: translateY(0);
}

/* ---------- Rodapé ---------------------------------------------------------- */
.site-footer {
  padding: 2.75rem 0 2rem;
  border-top: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  font-size: 0.97rem;
}

.site-footer__top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem 3rem;
}

.site-footer__brand {
  max-width: 24rem;
}

.site-footer__brand p {
  margin-top: 0.5rem;
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.5rem;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--teal-900);
  font-weight: 600;
  text-decoration: none;
}

.site-footer__nav a:hover {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.4rem 1.5rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
}

/* ---------- Página de erro -------------------------------------------------- */
.notfound {
  display: grid;
  place-items: center;
  min-height: calc(100vh - var(--header-height));
  min-height: calc(100dvh - var(--header-height));
  padding: 3rem 0;
  text-align: center;
}

.notfound__code {
  color: var(--teal-500);
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(5rem, 22vw, 9rem);
  line-height: 0.9;
  opacity: 0.35;
}

.notfound h1 {
  margin-top: 0.5rem;
  font-size: clamp(1.9rem, 5vw, 2.7rem);
  font-weight: 800;
}

.notfound p {
  max-width: 28rem;
  margin: 0.9rem auto 0;
  color: var(--muted);
}

.notfound .btn {
  margin-top: 1.75rem;
}

/* ---------- Movimento ------------------------------------------------------- */
@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .enter {
    animation: enter 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
  }

  .enter--1 {
    animation-delay: 0.05s;
  }

  .enter--2 {
    animation-delay: 0.12s;
  }

  .enter--3 {
    animation-delay: 0.2s;
  }

  .enter--4 {
    animation-delay: 0.28s;
  }

  .enter--5 {
    animation-delay: 0.36s;
  }

  /* Cartões sobem conforme entram na tela — só onde o navegador sabe fazer
     isso sem JavaScript; nos demais, ficam simplesmente visíveis. */
  @supports (animation-timeline: view()) {
    .reveal {
      animation: rise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 42%;
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
