*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --bg: #ffffff;
  --bg-elevated: #f0f6ff;
  --text: #0c2744;
  --muted: #4a667a;
  --accent: #1565c0;
  --accent-deep: #0d47a1;
  --accent-soft: rgba(21, 101, 192, 0.12);
  --on-accent: #ffffff;
  --border: rgba(13, 71, 161, 0.14);
  --radius: 12px;
  --radius-lg: 20px;
  --font-sans: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.75rem 1rem;
  background: var(--accent);
  color: var(--on-accent);
  z-index: 100;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(1100px, 100% - 2.5rem);
  margin-inline: auto;
}

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding-left: env(safe-area-inset-left, 0);
  padding-right: env(safe-area-inset-right, 0);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.875rem 0;
  flex-wrap: nowrap;
}

.header__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
  flex: 1 1 auto;
}

.menu-toggle {
  display: none;
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.menu-toggle:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background: var(--bg-elevated);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.menu-toggle__bar {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 1px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}

.header--nav-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.header--nav-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}

.header--nav-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.brand {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}

.brand:hover {
  color: var(--accent);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
}

.nav__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 999px;
  border: 1px solid transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.nav__btn--ghost {
  color: var(--muted);
  border-color: var(--border);
}

.nav__btn--ghost:hover {
  color: var(--text);
  border-color: color-mix(in srgb, var(--text) 35%, transparent);
}

.nav__btn--primary {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.nav__btn--primary:hover {
  background: color-mix(in srgb, var(--accent) 22%, var(--bg));
}

.nav__btn--accent {
  background: var(--accent);
  color: var(--on-accent);
}

.nav__btn--accent:hover {
  background: var(--accent-deep);
}

/* Hero */
.hero {
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 10vw, 7rem);
  background:
    radial-gradient(ellipse 85% 55% at 50% -15%, rgba(21, 101, 192, 0.14), transparent),
    linear-gradient(180deg, #f5f9ff 0%, var(--bg) 55%);
}

.hero__inner {
  max-width: 42rem;
  min-width: 0;
}

.hero__eyebrow {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.hero__title {
  margin: 0 0 1.25rem;
  font-family: var(--font-serif);
  font-size: clamp(2.25rem, 5vw, 3.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero__title em {
  font-style: italic;
  color: var(--accent);
}

.hero__lead {
  margin: 0 0 2rem;
  font-size: 1.0625rem;
  color: var(--muted);
  max-width: 36ch;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn--primary {
  background: var(--accent);
  color: var(--on-accent);
}

.btn--primary:hover {
  background: var(--accent-deep);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}

.btn--outline:hover {
  border-color: var(--muted);
  background: var(--bg-elevated);
}

.btn--lg {
  padding: 1rem 1.5rem;
  font-size: 1rem;
}

/* Sections */
.section {
  padding: clamp(3.5rem, 8vw, 5rem) 0;
}

.section--muted {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section__title {
  margin: 0 0 0.75rem;
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 400;
}

.section__intro {
  margin: 0 0 2rem;
  color: var(--muted);
  max-width: 50ch;
}

.section__cta {
  margin: 2.5rem 0 0;
}

.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

.card {
  padding: 1.5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.section:not(.section--muted) .card {
  background: color-mix(in srgb, var(--bg-elevated) 60%, var(--bg));
}

.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 600;
}

.card__text {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Contact */
.contact {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.5rem;
}

.contact__links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.link-pill {
  display: inline-flex;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-radius: 999px;
  transition: background 0.2s;
}

.link-pill:hover {
  background: var(--accent-soft);
}

/* Footer */
.footer {
  padding: 2rem 0;
  padding-bottom: max(2rem, env(safe-area-inset-bottom, 0));
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer__copy {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

.footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
}

.footer__nav a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

.footer__nav a:hover {
  color: var(--accent);
}

/* Tablet e celular */
@media (max-width: 767px) {
  body.menu-aberto {
    overflow: hidden;
  }

  .header__inner {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .header__row {
    flex: 1 1 100%;
    width: 100%;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    margin: 0;
    padding: 0.75rem 0 0.25rem;
    border-top: 1px solid var(--border);
    gap: 0.5rem;
  }

  .header--nav-open .nav {
    display: flex;
  }

  .nav__btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .hero {
    padding-top: clamp(2rem, 6vw, 3rem);
    padding-bottom: clamp(2.5rem, 8vw, 4rem);
  }

  .hero__title {
    font-size: clamp(1.85rem, 8vw, 2.5rem);
    hyphens: auto;
    -webkit-hyphens: auto;
  }

  .hero__lead {
    max-width: none;
  }

  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
  }

  .section__intro {
    max-width: none;
  }

  .cards {
    grid-template-columns: 1fr;
  }

  .contact {
    align-items: stretch;
    width: 100%;
  }

  .contact .btn--lg {
    width: 100%;
    max-width: 100%;
    justify-content: center;
    text-align: center;
    word-break: break-word;
    hyphens: auto;
  }

  .section__cta .btn {
    width: 100%;
    min-height: 48px;
    justify-content: center;
  }

  .link-pill {
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }

  .footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__nav {
    justify-content: center;
  }

  .footer__nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
}

@media (min-width: 768px) {
  .header__row {
    flex: 0 1 auto;
    justify-content: flex-start;
  }

  .menu-toggle {
    display: none !important;
  }

  .nav {
    display: flex !important;
  }
}

@media (max-width: 380px) {
  .container {
    width: min(1100px, 100% - 1.25rem);
  }

  .brand {
    font-size: 1.35rem;
  }
}
