/* =============================================================
   ZENO — Layout e componentes.
   Todas as cores vêm de theme.css. Regra do âmbar (Manual, pág. 04):
   acento apenas — cursor, botão, sublinhado, ícone. Nunca superfícies.
   ============================================================= */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  -webkit-text-size-adjust: 100%;
  /* Cabeçalho e rodapé são escuros: o overscroll acompanha, sem faixa clara. */
  background: var(--tinta);
}

body {
  margin: 0;
  font-family: var(--font-texto);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-titulo);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.15rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1rem; }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--ambar);
  outline-offset: 3px;
  border-radius: 4px;
}

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 22px;
}

/* Sobrancelha das secções — âmbar, em maiúsculas espaçadas (como o manual). */
.eyebrow {
  font-family: var(--font-texto);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.72rem;
  color: var(--ambar-text);
  margin-bottom: 0.85rem;
}

/* Traço âmbar curto — o mesmo elemento da capa do manual. */
.rule {
  display: block;
  width: 56px;
  height: 3px;
  border-radius: 3px;
  background: var(--ambar);
  margin: 0 0 1.5rem;
}

.lead {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 62ch;
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-texto);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.2;
  white-space: nowrap;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease,
              color 0.18s ease, transform 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }

/* Botão âmbar: dose pequena de acento, texto a Tinta (contraste ~9:1). */
.btn-ambar { background: var(--ambar); color: var(--tinta); }
.btn-ambar:hover { background: color-mix(in srgb, var(--ambar) 88%, var(--tinta)); }

.btn-outline { border-color: var(--border-dark); color: var(--text-on-dark); }
.btn-outline:hover { border-color: var(--ambar); color: var(--ambar); }

.btn-sm { padding: 0.58rem 1.15rem; font-size: 0.875rem; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--tinta) 92%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-dark);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 76px;
}
/* Tamanho mínimo do logótipo completo em ecrã: 90 px (Manual, pág. 06). */
.brand img { width: 116px; }

.nav {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  font-size: 0.94rem;
}
.nav > a:not(.btn) { color: var(--muted-on-dark); font-weight: 500; }
.nav > a:not(.btn):hover { color: var(--papel); }
.nav .btn { flex: 0 0 auto; }   /* não encolher: o texto transborda */
.nav .lang-switch { flex: 0 0 auto; }

.lang-switch { display: flex; gap: 0.2rem; align-items: center; }
.lang-switch a {
  color: var(--muted-on-dark);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
}
.lang-switch a:hover { color: var(--papel); }
.lang-switch a.is-active { color: var(--ambar); background: var(--ambar-soft); }

/* Menu mobile: apenas CSS, sem JavaScript. */
.nav-burger { display: none; cursor: pointer; padding: 0.5rem; }
.nav-burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 4.5px 0;
  background: var(--papel);
  border-radius: 2px;
}

/* ---------- Hero ---------- */
.hero {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  padding: clamp(3.5rem, 8vw, 6rem) 0 0;
}
.hero .lead { color: var(--muted-on-dark); }

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.9rem; }

/* Cartão terminal — eco do símbolo da marca. */
.terminal {
  background: var(--surface-dark);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.95rem;
}
.terminal-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid var(--border-dark);
  background: color-mix(in srgb, var(--tinta) 45%, transparent);
}
.terminal-dots { display: flex; gap: 0.35rem; }
.terminal-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--papel) 26%, transparent);
}
.terminal-dots i:first-child { background: var(--ambar); }
.terminal-title {
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  color: var(--muted-on-dark);
}
.terminal-body {
  list-style: none;
  margin: 0;
  padding: 1.25rem 1.35rem 1.5rem;
  display: grid;
  gap: 0.7rem;
  color: var(--text-on-dark);
}
.prompt {
  color: var(--ambar);
  font-weight: 600;
  margin-right: 0.35rem;
}
.terminal-cursor i {
  display: inline-block;
  width: 11px;
  height: 3px;
  border-radius: 2px;
  background: var(--ambar);
  animation: blink 1.15s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Promessas — números âmbar sobre fundo escuro (contraste ~7:1). */
.promises {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  padding: 2rem 0 0;
  border-top: 1px solid var(--border-dark);
}
.promises strong {
  display: block;
  font-family: var(--font-titulo);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--ambar);
}
.promises span { color: var(--muted-on-dark); font-size: 0.9rem; }
.hero .promises { margin-bottom: 0; padding-bottom: clamp(3rem, 6vw, 4.5rem); }

/* ---------- Secções ---------- */
.section { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.section-white { background: var(--surface); }
.section-dark {
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
/* Em fundo escuro o âmbar puro é legível (~7:1) — usa-se a cor da marca tal e qual. */
.section-dark .eyebrow,
.hero .eyebrow,
.notfound .eyebrow { color: var(--ambar); }
.section-dark .lead,
.notfound .lead { color: var(--muted-on-dark); }
.section-head { max-width: 640px; margin-bottom: 2.75rem; }

/* ---------- Cartões de serviço ---------- */
.cards {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  border-color: var(--ambar);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.card p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }
.section-white .card { background: var(--papel); }

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--ardosia);
  color: var(--papel);
  margin-bottom: 1.1rem;
}
.card:hover .card-icon { color: var(--ambar); }
.icon { width: 23px; height: 23px; }

/* ---------- Como funciona ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.75rem;
  counter-reset: step;
}
.steps li { border-top: 2px solid var(--border); padding-top: 1.1rem; }
.steps li:first-child { border-top-color: var(--ambar); }
.step-num {
  display: block;
  font-family: var(--font-titulo);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  color: var(--ambar-text);
  margin-bottom: 0.5rem;
}
.steps p { margin: 0; color: var(--text-muted); font-size: 0.94rem; }

/* ---------- Sobre ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.about-grid > div p { color: var(--text-muted); }

.highlights { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.highlights li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--ambar);
  border-radius: var(--radius-sm);
  padding: 1.15rem 1.35rem;
}
.highlights h3 { margin-bottom: 0.3rem; }
.highlights p { margin: 0; color: var(--text-muted); font-size: 0.93rem; }

/* ---------- Contactos ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.4rem;
}
.contact-list li { border-left: 2px solid var(--ambar); padding-left: 1.1rem; }
.contact-label {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 600;
  color: var(--muted-on-dark);
  margin-bottom: 0.15rem;
}
.contact-list a,
.contact-value {
  font-family: var(--font-titulo);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--text-on-dark);
}
.contact-list a:hover { color: var(--ambar); }

/* ---------- Rodapé ---------- */
.site-footer {
  background: var(--bg-dark);
  color: var(--text-on-dark);
  border-top: 1px solid var(--border-dark);
  padding-top: 3.25rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand { max-width: 320px; }
.footer-brand img { width: 128px; }
.footer-brand p {
  color: var(--muted-on-dark);
  font-size: 0.9rem;
  margin: 1rem 0 0;
}
.footer-nav,
.footer-contact { display: grid; gap: 0.55rem; font-size: 0.92rem; align-content: start; }
.footer-nav a,
.footer-contact a,
.footer-contact span { color: var(--muted-on-dark); }
.footer-nav a:hover,
.footer-contact a:hover { color: var(--ambar); }

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-top: 1px solid var(--border-dark);
  padding-block: 1.35rem;
  font-size: 0.82rem;
  color: var(--muted-on-dark);
}
.footer-prompt { color: var(--ambar); font-weight: 600; }
.footer-prompt i {
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--ambar);
  margin-left: 4px;
  vertical-align: 2px;
}

/* ---------- 404 ---------- */
.notfound {
  min-height: 70vh;
  display: grid;
  place-items: center;
  text-align: center;
  background: var(--bg-dark);
  color: var(--text-on-dark);
}
.notfound .rule { margin-inline: auto; }
.notfound img { width: 128px; margin: 0 auto 2rem; }

/* ---------- Responsivo ---------- */
@media (max-width: 940px) {
  .hero-grid,
  .about-grid,
  .contact-grid { grid-template-columns: 1fr; }
  .terminal { max-width: 460px; }
}

@media (max-width: 780px) {
  .nav-burger { display: block; order: 3; }
  .nav {
    display: none;
    order: 4;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.05rem;
    padding: 0.5rem 0 1.4rem;
    border-top: 1px solid var(--border-dark);
  }
  .nav-toggle:checked ~ .nav { display: flex; }
  .header-inner { flex-wrap: wrap; }
  .promises { grid-template-columns: 1fr; gap: 1.1rem; }
  .footer-inner { flex-direction: column; gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
