/* ARMEXO — folha de estilo principal
   Cores e tipografia definidas em variáveis no :root.
   Para mudar a identidade, altere apenas este bloco. */

:root {
  --paper: #f2f4f1;
  --paper-2: #e8ece8;
  --ink: #0e1d27;
  --ink-2: #4b5b63;
  --line: #d2dad7;
  --sea: #17485a;
  --sea-ink: #eef3f1;
  --gold: #c9961a;
  --focus: #2f7fa0;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 40px);
  --radius: 14px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0b161d;
    --paper-2: #10202a;
    --ink: #e6ecea;
    --ink-2: #95a5ab;
    --line: #233540;
    --sea: #123a49;
    --sea-ink: #e6ecea;
    --gold: #e2b23f;
    --focus: #6fb8d6;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0b161d;
  --paper-2: #10202a;
  --ink: #e6ecea;
  --ink-2: #95a5ab;
  --line: #233540;
  --sea: #123a49;
  --sea-ink: #e6ecea;
  --gold: #e2b23f;
  --focus: #6fb8d6;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--gold); color: #0e1d27; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5.6rem); font-weight: 560; letter-spacing: -0.035em; line-height: 1.0; }
h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.5rem); letter-spacing: -0.012em; }
p { margin: 0 0 1em; max-width: 68ch; text-wrap: pretty; }
.lead { font-size: clamp(1.15rem, 1.6vw, 1.35rem); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { width: 34px; height: auto; }
.brand .brand-mark .sona-line { stroke: var(--ink); }
.brand .brand-mark .sona-dots { fill: var(--gold); }
.brand-name { font-family: var(--font-display); font-weight: 650; font-size: 1.3rem; letter-spacing: 0.06em; }

.nav-list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-list a {
  display: block; padding: 8px 12px; border-radius: 999px;
  text-decoration: none; color: var(--ink-2); font-weight: 500;
  transition: color .15s, background-color .15s;
}
.nav-list a:hover { color: var(--ink); background: var(--paper-2); }
.nav-list a[aria-current="page"] { color: var(--ink); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--ink);
  cursor: pointer;
}
.icon-btn:hover { background: var(--paper-2); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: none; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: block; }
}
.menu-toggle { display: none; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-grid; }
  .site-nav {
    position: fixed; inset: 72px 0 0 0; background: var(--paper);
    padding: 24px var(--gutter); display: none; overflow-y: auto;
  }
  .site-nav.is-open { display: block; }
  .nav-list { flex-direction: column; gap: 0; }
  .nav-list a {
    font-family: var(--font-display); font-size: 1.75rem; color: var(--ink);
    padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line);
  }
  .nav-list a:hover { background: none; }
  body.menu-open { overflow: hidden; }
}

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 600 1rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  border: 1px solid var(--ink); transition: background-color .15s, color .15s;
}
.btn-solid { background: var(--ink); color: var(--paper); }
.btn-solid:hover { background: transparent; color: var(--ink); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

/* ---------- Sona (desenho de assinatura) ---------- */
.sona .sona-line { fill: none; stroke: var(--gold); stroke-linecap: round; stroke-linejoin: round; }
.sona .sona-dots { fill: var(--ink); }

.sona-draw .sona-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: sona-draw 4.2s cubic-bezier(.55,.1,.3,1) .5s forwards; }
.sona-draw .sona-dots circle { opacity: 0; animation: sona-dot .5s ease-out forwards; }
@keyframes sona-draw { to { stroke-dashoffset: 0; } }
@keyframes sona-dot { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.sona-draw .sona-dots circle { transform-box: fill-box; transform-origin: center; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sona-draw .sona-line { animation: none; stroke-dashoffset: 0; }
  .sona-draw .sona-dots circle { animation: none; opacity: 1; }
}

/* ---------- Secções ---------- */
.section { padding: clamp(72px, 10vw, 136px) 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr; gap: 16px; margin-bottom: clamp(40px, 6vw, 64px); }
.section-head p { color: var(--ink-2); margin: 0; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 5fr 6fr; align-items: end; gap: 48px; }
}

/* ---------- Herói da página inicial ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 48px; align-items: center; }
.hero h1 { max-width: 11ch; }
.hero .lead { margin-top: 28px; }
.hero-figure { margin: 0; }
.hero-figure .sona { width: 100%; max-width: 520px; margin-left: auto; }
.hero-figure figcaption { margin-top: 20px; font-size: .95rem; color: var(--ink-2); max-width: 44ch; margin-left: auto; }
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 7fr 5fr; gap: 64px; }
}

/* ---------- Lista de projetos ---------- */
.project-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.project-row { border-bottom: 1px solid var(--line); }
.project-link {
  display: grid; grid-template-columns: 72px 1fr; gap: 8px 24px; align-items: center;
  padding: 28px 8px; text-decoration: none; border-radius: 6px;
  transition: background-color .2s;
}
.project-link:hover { background: var(--paper-2); }
.project-link .sona { width: 72px; grid-row: span 2; }
.project-link .sona .sona-line { stroke: var(--ink); }
.project-link .sona .sona-dots { fill: var(--gold); }
.project-link h3 { font-size: clamp(1.4rem, 2.4vw, 2rem); }
.project-link p { color: var(--ink-2); margin: 0; grid-column: 2; }
.project-meta { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.status {
  display: inline-flex; align-items: center; gap: 8px; white-space: nowrap;
  font-size: .9rem; color: var(--ink-2);
}
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); }
.status[data-state="breve"]::before { background: transparent; border: 1.5px solid var(--ink-2); }
@media (min-width: 760px) {
  .project-link { grid-template-columns: 96px 1fr auto; padding: 36px 12px; }
  .project-link .sona { width: 96px; }
  .project-link .status { grid-row: span 2; }
}

/* ---------- Princípios ---------- */
.principles { display: grid; gap: 40px; }
.principle h3 { margin-bottom: 10px; }
.principle p { color: var(--ink-2); margin: 0; }
@media (min-width: 760px) { .principles { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

/* ---------- Notícias ---------- */
.news-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.news-item { border-bottom: 1px solid var(--line); }
.news-item a { display: grid; gap: 6px; padding: 28px 0; text-decoration: none; }
.news-item time { color: var(--ink-2); font-size: .95rem; }
.news-item h3 { transition: color .15s; }
.news-item a:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .15em; }
.news-item p { color: var(--ink-2); margin: 0; }
@media (min-width: 760px) {
  .news-item a { grid-template-columns: 200px 1fr; column-gap: 32px; }
  .news-item time { grid-row: span 2; padding-top: 6px; }
}

/* ---------- Faixa de chamada ---------- */
.band { background: var(--sea); color: var(--sea-ink); padding: clamp(72px, 10vw, 128px) 0; position: relative; overflow: hidden; }
.band h2 { max-width: 16ch; }
.band p { color: color-mix(in srgb, var(--sea-ink) 78%, transparent); margin-top: 20px; }
.band .btn { border-color: var(--sea-ink); }
.band .btn-solid { background: var(--sea-ink); color: var(--sea); }
.band .btn-solid:hover { background: transparent; color: var(--sea-ink); }
.band .btn-ghost { color: var(--sea-ink); }
.band .btn-ghost:hover { background: var(--sea-ink); color: var(--sea); }
.band .sona { position: absolute; right: -40px; bottom: -60px; width: min(46vw, 460px); opacity: .5; pointer-events: none; }
.band .sona .sona-line { stroke: var(--gold); }
.band .sona .sona-dots { fill: var(--sea-ink); opacity: .5; }
.band .wrap { position: relative; }

/* ---------- Cabeçalho de páginas interiores ---------- */
.page-head { padding: clamp(56px, 8vw, 104px) 0 clamp(48px, 6vw, 80px); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: clamp(2.4rem, 5.2vw, 4.4rem); max-width: 16ch; }
.page-head .lead { margin-top: 24px; }
.crumb { display: inline-block; margin-bottom: 24px; color: var(--ink-2); text-decoration: none; font-size: .95rem; }
.crumb:hover { color: var(--ink); text-decoration: underline; }
.page-head-grid { display: grid; gap: 40px; align-items: end; }
.page-head-grid .sona { width: 100%; max-width: 300px; }
@media (min-width: 900px) { .page-head-grid { grid-template-columns: 1fr auto; } .page-head-grid .sona { width: 300px; } }

/* ---------- Texto corrido (artigos, sobre, legais) ---------- */
.prose { max-width: 68ch; }
.prose h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); margin: 2.2em 0 .6em; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 1.8em 0 .5em; }
.prose ul, .prose ol { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose p, .prose li { color: var(--ink); }
.note {
  border-left: 3px solid var(--gold); padding: 14px 18px; background: var(--paper-2);
  border-radius: 0 8px 8px 0; color: var(--ink-2); font-size: .97rem; max-width: 68ch;
}

/* Layout de duas colunas: título à esquerda, conteúdo à direita */
.split { display: grid; gap: 24px; }
.split + .split { margin-top: clamp(56px, 8vw, 96px); }
.split > h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
@media (min-width: 900px) {
  .split { grid-template-columns: 4fr 7fr; gap: 64px; }
  .split > h2 { position: sticky; top: 104px; align-self: start; }
}

/* Lista de funcionalidades */
.features { display: grid; gap: 32px 48px; margin-top: 8px; }
.feature h3 { font-size: 1.2rem; margin-bottom: 6px; }
.feature p { color: var(--ink-2); margin: 0; }
@media (min-width: 640px) { .features { grid-template-columns: 1fr 1fr; } }

.next-project { display: flex; flex-direction: column; gap: 6px; padding: 40px 0; text-decoration: none; border-top: 1px solid var(--line); }
.next-project span { color: var(--ink-2); }
.next-project strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); letter-spacing: -0.02em; }
.next-project:hover strong { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: .12em; }

/* ---------- Contacto ---------- */
.contact-grid { display: grid; gap: 56px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 4fr 7fr; gap: 80px; } }
.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.contact-list dt, .contact-list .label { color: var(--ink-2); font-size: .95rem; margin-bottom: 2px; }
.contact-list a { font-family: var(--font-display); font-size: 1.3rem; text-decoration: none; }
.contact-list a:hover { text-decoration: underline; }
.form { display: grid; gap: 20px; }
.form-row { display: grid; gap: 20px; }
@media (min-width: 640px) { .form-row { grid-template-columns: 1fr 1fr; } }
.field { display: grid; gap: 8px; }
.field label { font-weight: 600; font-size: .97rem; }
.field input, .field select, .field textarea {
  font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%;
  transition: border-color .15s;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--ink-2); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.field textarea { min-height: 160px; resize: vertical; }
.form-help { color: var(--ink-2); font-size: .93rem; margin: 0; }
.form-error { color: #b3261e; font-size: .93rem; margin: 0; }
:root[data-theme="dark"] .form-error { color: #f2a59d; }

/* ---------- Rodapé ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 72px 0 40px; margin-top: 0; }
.footer-grid { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand p { color: var(--ink-2); margin-top: 16px; max-width: 34ch; }
.footer-col h2 { font-family: var(--font-body); font-size: .95rem; font-weight: 600; letter-spacing: 0; margin-bottom: 14px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: var(--ink-2); text-decoration: none; }
.footer-col a:hover { color: var(--ink); text-decoration: underline; }
.footer-bottom { display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; margin-top: 64px; padding-top: 24px; border-top: 1px solid var(--line); color: var(--ink-2); font-size: .93rem; }
@media (min-width: 900px) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr 1fr; }
  .footer-brand { grid-column: auto; }
}

/* ---------- 404 ---------- */
.not-found { min-height: 60vh; display: grid; align-content: center; gap: 24px; }
.not-found .sona { width: 180px; }

/* ---------- Estados e avisos (gerados a partir do painel) ---------- */
.status[data-state="live"]::before { background: #2f9e6a; box-shadow: 0 0 0 3px color-mix(in srgb, #2f9e6a 25%, transparent); }
.note-risk { border-left-color: #c2410c; margin: 0; color: var(--ink); }
:root[data-theme="dark"] .note-risk { border-left-color: #f2894b; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .note-risk { border-left-color: #f2894b; } }
.prose .note { margin: 0 0 1.4em; }
