/* Mega menu do cabeçalho (partials/site-header.html; também na landing). Só tokens do :root (base.css e landing). */
.mm svg, .mm-burger svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.site-header { position: sticky; }
.mm { display: flex; align-items: center; gap: 6px; }
.mm-item { position: static; }
.mm-trigger, .mm .mm-link { font: 500 13.5px/1 'Geist', sans-serif; color: var(--ink-2); background: none; border: 0; cursor: pointer; padding: 10px 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; transition: color .15s, background .15s; white-space: nowrap; }
.mm-trigger::after { content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s; opacity: .7; }
.mm-trigger:hover, .mm .mm-link:hover, .mm-item.open .mm-trigger { color: var(--ink); background: var(--paper); }
.mm-item.open .mm-trigger::after { transform: translateY(1px) rotate(-135deg); }
.mm .cta { margin-left: 6px; }

.mm-panel { position: absolute; left: 50%; top: 100%; width: min(1100px, calc(100vw - 32px)); transform: translate(-50%, 6px); background: var(--white); border: 1px solid var(--line-2); border-radius: 22px; box-shadow: 0 40px 80px -32px rgba(28,28,20,.35); padding: 26px 26px 20px; z-index: 300; opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility 0s .18s; }
.mm-panel::before { content: ""; position: absolute; left: 0; right: 0; top: -14px; height: 14px; }
.mm-item.open .mm-panel { opacity: 1; visibility: visible; transform: translate(-50%, 0); transition: opacity .18s ease, transform .18s ease; }
.mm-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 28px; }
.mm-panel-inq { width: min(900px, calc(100vw - 32px)); }
.mm-panel-inq .mm-cols { grid-template-columns: 1fr 1fr 1.05fr; }
.mm-h { font: 500 10.5px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; padding: 0 0 10px 10px; border-bottom: 1px solid var(--line); }
.mm-col { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mm .mm-col > a:not(.mm-all) { display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 12px; color: var(--ink); transition: background .15s; }
.mm .mm-col > a:not(.mm-all):hover { background: var(--green-soft); }
.mm-ico { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--green); background: var(--bg); transition: border-color .15s, background .15s; }
.mm-col > a:hover .mm-ico { border-color: var(--green); background: var(--white); }
.mm-ico svg { width: 19px; height: 19px; }
.mm-col b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.mm-col small { display: block; font-size: 12.5px; color: var(--ink-3); line-height: 1.3; margin-top: 2px; }
.mm .mm-all { display: inline-flex; align-items: center; gap: 6px; margin: 6px 0 0 10px; font-size: 13.5px; font-weight: 600; color: var(--green); }
.mm-all svg, .mm-band-cta svg, .mm-card-cta svg { width: 16px; height: 16px; transition: transform .2s; }
.mm-all:hover svg, .mm-band-cta:hover svg, .mm-card-cta:hover svg { transform: translateX(3px); }

.mm-band { --lima: #6EE7A0; margin-top: 18px; display: flex; align-items: center; gap: 22px; padding: 16px 18px 16px 22px; border-radius: 16px; color: #fff;
  background: radial-gradient(600px 160px at 20% 0%, rgba(45,122,79,.6), transparent 70%), var(--green-deep); }
.mm-band > div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mm-band b { font: 700 16px 'Bricolage Grotesque', sans-serif; letter-spacing: -.01em; }
.mm-band span { font-size: 13px; color: rgba(255,255,255,.72); }
.mm .mm-band span a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.mm .mm-band-l { color: #fff; font-weight: 600; font-size: 14px; border-bottom: 1px solid rgba(255,255,255,.35); padding-bottom: 2px; }
.mm .mm-band-l:hover { color: #fff; border-color: #fff; }
.mm .mm-band-cta { display: inline-flex; align-items: center; gap: 8px; background: var(--lima); color: var(--green-deep); font-weight: 700; font-size: 14px; padding: 11px 16px; border-radius: 11px; }
.mm .mm-band-cta:hover { color: var(--green-deep); }

.mm-card { --lima: #6EE7A0; border-radius: 16px; padding: 20px; color: #fff; display: flex; flex-direction: column; gap: 8px;
  background: radial-gradient(400px 200px at 0% 0%, rgba(45,122,79,.6), transparent 70%), var(--green-deep); }
.mm-card p { margin: 0; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,.8); }
.mm-card .mm-card-k { font: 500 10.5px 'Geist Mono', monospace; letter-spacing: .08em; text-transform: uppercase; color: var(--lima); }
.mm-card .mm-card-t { font: 700 19px/1.2 'Bricolage Grotesque', sans-serif; letter-spacing: -.02em; color: #fff; }
.mm .mm-card-cta { margin-top: auto; display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; background: var(--lima); color: var(--green-deep); font-weight: 700; font-size: 13.5px; padding: 10px 14px; border-radius: 11px; }
.mm .mm-card-cta:hover { color: var(--green-deep); }

.mm-burger { display: none; }
.mm :focus-visible, .mm-burger:focus-visible { outline: 2px solid var(--amber-m, #E07B12); outline-offset: 2px; }

/* Telemóvel e tablet: botão de menu; o menu abre por baixo do cabeçalho, com os painéis em acordeão. */
@media (max-width: 900px) {
  .site-header .mm-burger { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--white); cursor: pointer; margin-left: auto; }
  .mm-burger span, .mm-burger span::before, .mm-burger span::after { display: block; width: 18px; height: 1.8px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
  .mm-burger span::before, .mm-burger span::after { content: ""; position: absolute; left: 0; }
  .mm-burger span::before { top: -6px; } .mm-burger span::after { top: 6px; }
  .mm-burger[aria-expanded="true"] span { background: transparent; }
  .mm-burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
  .mm-burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }
  .site-header .wrap { flex-wrap: nowrap; }
  .site-header .mm { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0; background: var(--bg); border-bottom: 1px solid var(--line-2); padding: 8px 16px 20px; max-height: calc(100vh - 72px); overflow-y: auto; box-shadow: 0 30px 50px -30px rgba(28,28,20,.35); }
  .site-header.mm-aberto .mm { display: flex; }
  .site-header .mm > a:not(.cta) { display: flex !important; }
  .mm-trigger, .mm .mm-link { width: 100%; justify-content: space-between; padding: 16px 4px; font-size: 16px; border-radius: 0; border-bottom: 1px solid var(--line); }
  .mm-trigger:hover, .mm .mm-link:hover, .mm-item.open .mm-trigger { background: none; }
  .mm .cta { margin: 16px 0 0; text-align: center; justify-content: center; display: flex; padding: 14px; font-size: 15px; }
  .mm-panel, .mm-panel-inq { position: static; width: auto; transform: none; opacity: 1; visibility: visible; display: none; border: 0; box-shadow: none; padding: 8px 0 14px; background: transparent; border-radius: 0; transition: none; }
  .mm-item.open .mm-panel { display: block; transform: none; }
  .mm-cols, .mm-panel-inq .mm-cols { grid-template-columns: 1fr; gap: 14px; }
  .mm-band { flex-wrap: wrap; gap: 12px; }
  .mm-band > div { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .mm-panel, .mm-trigger::after { transition: none; } }
/* Landing: o mega menu vive no <nav> próprio da landing; no telemóvel a landing não tem botão de menu (só Entrar e Criar conta). */
.nx .nav-links.mm { gap: 4px; }
.nx nav { position: sticky; }
@media (max-width: 900px) { .nx .nav-links.mm { display: none; } }
