@import url('tokens.css');
@import url('typography.css');

/* ─── RESET ────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-body-lg-size);
  line-height: var(--text-body-lg-line-height);
  letter-spacing: var(--text-body-lg-tracking);
  font-weight: var(--font-weight-regular);
  color: var(--color-brown);
  background-color: var(--color-off-white);
  -webkit-font-smoothing: antialiased;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { display: block; max-width: 100%; }

/* ─── NAVBAR ───────────────────────────────────────────────── */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;

  width: 100%;
  height: 34px;
  background-color: var(--color-orange);

  padding-inline: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* botão escondido no desktop */
.navbar__toggle {
  display: none;
}

/* menu normal */
.navbar__menu {
  display: flex;
  width: 100%;
  justify-content: space-between;
}

.navbar__link {
  font-size: 16px;
  font-weight: var(--font-weight-bold);
  color: var(--color-off-white);
  text-decoration: none;
}

.navbar__link:hover {
  text-decoration: underline;
}

/* ─── LEGAL PAGE ───────────────────────────────────────────── */

.legal-page {
  flex: 1; /* empurra footer pra baixo */

  max-width: 800px;
  margin: 80px auto 0; /* espaço pro navbar fixo */
  padding: 64px 24px;
}

.legal-page h1 {
  font-family: var(--font-display);
  font-size: 40px;
  margin-bottom: 32px;
  text-transform: uppercase;
}

.legal-page p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 16px;
}

/* CTA */
.legal-page__cta {
  margin-top: 40px;
}

/* ─── BOTÃO ───────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background-color: var(--color-orange);
  color: var(--color-off-white);
  text-decoration: none;
  transition: 0.15s;
}

.btn-primary .btn-arrow svg {
  transform: rotate(45deg);
  transition: 0.15s;
}

.btn-primary:hover .btn-arrow svg {
  transform: rotate(-45deg);
}

/* ─── FOOTER ───────────────────────────────────────────────── */

.footer {
  margin-top: auto; /* 👈 ESSENCIAL */

  background-color: var(--color-orange);
  display: flex;
  align-items: center;
  padding: 24px 76px;
  width: 100%;
}
.footer-logo-img {
  width: 141px;
  height: 83px;
}
.footer__logo-wrap,
.footer__address,
.footer__contact,
.footer__right {
  flex: 1;
}

.footer__address,
.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer__right {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}

.footer__social {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: space-between;
}

.footer-link {
  text-decoration: none;
  color: var(--color-brown);
}

.footer-link:hover {
  text-decoration: underline;
}

/* ─── RESPONSIVO ───────────────────────────────────────────── */

@media (max-width: 768px) {

  /* remove barra */
  .navbar {
    background: transparent;
    height: auto;
    padding: 0;
    display: block;
  }

  /* botão flutuante */
  .navbar__toggle {
    display: flex;
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 200;

    width: 54px;
    height: 54px;

    border: none;
    background: none;
    padding: 0;

    cursor: pointer;
  }

  /* imagem = botão real */
  .navbar__toggle img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  /* menu lateral mobile */
  .navbar__menu {
    position: fixed;
    top: 0;
    right: -100%; /* Inicia fora da tela */
    width: 280px;
    height: 100vh; /* Altura total da tela */
    background-color: var(--color-orange);
    flex-direction: column;
    gap: 32px;
    padding: 80px 32px;
    display: flex; /* Sempre flex, controlado pelo right */
    transition: right 0.3s ease-in-out;
    box-shadow: -8px 0 24px rgba(0,0,0,0.2);
    z-index: 150;
  }

  .navbar__menu--open {
    right: 0; /* Desliza para dentro */
  }

  .navbar__link {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
    width: 100%;
  }

  /* Overlay para fechar ao clicar fora */
  .navbar__overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    z-index: 140;
  }

  .navbar__overlay--active {
    display: block;
  }

  /* LEGAL PAGE */
  .legal-page {
    margin-top: 60px;
    padding: 32px 16px;
  }

  .legal-page h1 {
    font-size: 28px;
    margin-bottom: 24px;
  }

  .legal-page p {
    font-size: 15px;
    line-height: 1.5;
  }

  /* CTA */
  .legal-page__cta {
    margin-top: 32px;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

@media (max-width: 768px) {

  .footer {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "logo address"
      "contact contact"
      "right right";

    gap: 24px;
    padding: 24px 16px;
    align-items: start;
  }

  /* ÁREAS */
  .footer__logo-wrap { grid-area: logo; }
  .footer__address   { grid-area: address; }
  .footer__contact   { grid-area: contact; }
  .footer__right     { grid-area: right; }

  /* LOGO */
  .footer-logo-img {
    width: 120px;
    height: 80px;
  }

  /* ADDRESS */
  .footer__address {
    font-size: 14px;
    line-height: 1.4;
  }

  .footer__contact {
    display: flex;
    flex-direction: row;
    gap: 16px;
    font-size: 14px;
    flex-wrap: wrap;
  }

  .footer__right {
    align-items: flex-start;
    gap: 16px;
  }

  .footer__social {
    flex-wrap: wrap;
    gap: 12px;
  }

  .footer-link {
    font-size: 14px;
  }
}
}