/*
  SYMBIOTA — layout.css
  Estrutura, cabeçalho, rodapé, botões, cartões e componentes partilhados.
*/

.container {
  width: 100%;
  max-width: var(--container-w);
  margin-inline: auto;
  padding-inline: var(--space-5);
}

.section {
  padding-block: var(--space-8);
}

.section--tight {
  padding-block: var(--space-7);
}

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

.section--navy {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.9);
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-7);
}

.section-head + .section-head {
  margin-top: var(--space-6);
}

.section-head h2 {
  margin-top: var(--space-3);
}

.section-head .lead {
  margin-top: var(--space-3);
}

/* ---------------------------------------------------------------- */
/* Cabeçalho / navegação                                             */
/* ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  /* Nota: propositadamente sem backdrop-filter. Além de ser mais caro
     para o processador (o público-alvo inclui equipamentos modestos),
     um filtro num antecessor cria um novo "containing block" para
     descendentes com position:fixed — o que partia o menu mobile,
     prendendo-o dentro da caixa do cabeçalho em vez de cobrir o ecrã. */
  background: rgba(255, 255, 255, 0.98);
  border-bottom: 1px solid var(--line);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-5);
  padding-block: var(--space-3);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--navy-900);
  flex-shrink: 0;
}

.brand img {
  height: 40px;
  width: auto;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__text small {
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: var(--space-6);
}

.main-nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.main-nav__links a {
  font-size: 0.93rem;
  font-weight: 600;
  color: var(--ink-700);
  padding-block: var(--space-2);
  border-bottom: 2px solid transparent;
  transition: color 0.15s var(--ease), border-color 0.15s var(--ease);
}

.main-nav__links a:hover,
.main-nav__links a[aria-current="page"] {
  color: var(--blue-700);
  border-color: var(--gold-500);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.nav-toggle {
  display: none;
  padding: var(--space-2);
  border-radius: var(--radius-sm);
}

.nav-toggle svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 900px) {
  .main-nav {
    position: fixed;
    inset: 64px 0 0 0;
    background: var(--paper);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-5);
    gap: var(--space-5);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s var(--ease), transform 0.18s var(--ease),
      visibility 0.18s;
    overflow-y: auto;
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .main-nav__links {
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-1);
  }

  .main-nav__links a {
    padding: var(--space-3) var(--space-2);
    border-bottom: 1px solid var(--line);
    border-left: 2px solid transparent;
  }

  .main-nav__links a:hover,
  .main-nav__links a[aria-current="page"] {
    border-left-color: var(--gold-500);
    border-bottom-color: var(--line);
    background: var(--paper-alt);
  }

  .header-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .header-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .nav-toggle {
    display: inline-flex;
  }
}

/* ---------------------------------------------------------------- */
/* Botões                                                            */
/* ---------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.72rem 1.3rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s var(--ease), border-color 0.15s var(--ease),
    color 0.15s var(--ease), transform 0.1s var(--ease), box-shadow 0.15s var(--ease);
  white-space: nowrap;
}

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

.btn--gold {
  background: var(--gold-500);
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}

.btn--gold:hover {
  background: var(--gold-400);
  box-shadow: var(--shadow-md);
}

.btn--outline {
  background: transparent;
  color: var(--navy-900);
  border-color: var(--line-strong);
}

.btn--outline:hover {
  border-color: var(--blue-600);
  color: var(--blue-700);
}

.btn--outline-on-dark {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.35);
}

.btn--outline-on-dark:hover {
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}

.btn--ghost {
  background: transparent;
  color: var(--blue-700);
  padding-inline: 0.4rem;
}

.btn--ghost:hover {
  color: var(--blue-600);
}

.btn--sm {
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn--block {
  width: 100%;
}

.btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* ---------------------------------------------------------------- */
/* Grelhas                                                           */
/* ---------------------------------------------------------------- */

.grid {
  display: grid;
  gap: var(--space-6);
}

.grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid--4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 980px) {
  .grid--4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .grid--2,
  .grid--3,
  .grid--4 {
    grid-template-columns: 1fr;
  }
}

/* ---------------------------------------------------------------- */
/* Cartões                                                           */
/* ---------------------------------------------------------------- */

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease),
    transform 0.15s var(--ease);
}

.card:hover {
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-100);
  color: var(--blue-700);
  margin-bottom: var(--space-4);
}

.card__icon svg {
  width: 22px;
  height: 22px;
}

.card h3 {
  margin-bottom: var(--space-2);
}

.card p {
  color: var(--ink-600);
  font-size: 0.95rem;
}

.card--soon {
  background: var(--paper-alt);
  border-style: dashed;
}

.card--soon:hover {
  transform: none;
  box-shadow: none;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.tag--soon {
  background: var(--blue-100);
  color: var(--blue-700);
}

.tag--gold {
  background: var(--gold-100);
  color: var(--gold-700);
}

/* ---------------------------------------------------------------- */
/* Rodapé                                                            */
/* ---------------------------------------------------------------- */

.site-footer {
  background: var(--navy-950);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--space-8) var(--space-6);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: var(--space-6);
  padding-bottom: var(--space-7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-brand .brand {
  color: #fff;
}

.footer-brand p {
  margin-top: var(--space-4);
  font-size: 0.9rem;
  max-width: 320px;
  color: rgba(255, 255, 255, 0.6);
}

.footer-col h4 {
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.68);
  transition: color 0.15s var(--ease);
}

.footer-col a:hover {
  color: var(--gold-400);
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-top: var(--space-5);
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
  flex-wrap: wrap;
}

.footer-bottom a {
  color: rgba(255, 255, 255, 0.6);
}

.footer-bottom a:hover {
  color: #fff;
}

/* ---------------------------------------------------------------- */
/* Formulários                                                       */
/* ---------------------------------------------------------------- */

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.field label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-700);
}

.field .hint {
  font-size: 0.78rem;
  color: var(--ink-400);
}

.field input,
.field select,
.field textarea {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font-size: 0.95rem;
  color: var(--ink-900);
  transition: border-color 0.15s var(--ease), box-shadow 0.15s var(--ease);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px var(--blue-100);
}

.field textarea {
  resize: vertical;
  min-height: 120px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

@media (max-width: 560px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.form-note {
  display: block;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: var(--space-4);
}

.form-note--error {
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f3c6c2;
}

.form-note--success {
  background: #e9f6ee;
  color: var(--success);
  border: 1px solid #bfe4cd;
}

.form-note[hidden] {
  display: none;
}

/* ---------------------------------------------------------------- */
/* Utilitários                                                       */
/* ---------------------------------------------------------------- */

.stack {
  display: flex;
  flex-direction: column;
}

.cluster {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
}

.mt-2 {
  margin-top: var(--space-2);
}
.mt-4 {
  margin-top: var(--space-4);
}
.mt-6 {
  margin-top: var(--space-6);
}
.mt-7 {
  margin-top: var(--space-7);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--space-4);
  top: -60px;
  background: var(--navy-900);
  color: #fff;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top 0.15s var(--ease);
}

.skip-link:focus {
  top: var(--space-3);
}

/* Motivo decorativo — quadrados dourados/azuis retirados do logótipo,
   usados como assinatura visual recorrente da marca. */
.motif {
  position: absolute;
  display: block;
  pointer-events: none;
}

.motif span {
  position: absolute;
  border-radius: 3px;
}

.motif .sq-gold {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600));
}

.motif .sq-blue {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
}
