/* FM Terminals — landing page. Estilo Fluent / novo Outlook, tema claro e escuro automático. */

:root {
  color-scheme: light dark;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f3f3f3;
  --text: #242424;
  --sub: #616161;
  --border: #e0e0e0;
  --accent: #0f6cbd;
  --accent-soft: #ebf3fc;
  --link: #0f6cbd;
  --btn-bg: #0f6cbd;
  --btn-bg-hover: #115ea3;
  --btn-bg-active: #0f548c;
  --btn-text: #ffffff;
  --header-bg: rgba(250, 250, 250, 0.86);
  --prod: #c50f1f;
  --qa: #ca5010;
  --dev: #107c10;
  --shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.13), 0 0.3px 0.9px rgba(0, 0, 0, 0.11);
  --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.14), 0 0 2px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", Inter, system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1b;
    --surface: #292929;
    --surface-2: #242424;
    --text: #ffffff;
    --sub: #adadad;
    --border: #3d3d3d;
    --accent: #479ef5;
    --accent-soft: #1f3a55;
    --link: #479ef5;
    --btn-bg: #115ea3;
    --btn-bg-hover: #0f548c;
    --btn-bg-active: #0c3b66;
    --header-bg: rgba(27, 27, 27, 0.86);
    --prod: #dc626d;
    --qa: #e97548;
    --dev: #54b054;
    --shadow: 0 1.6px 3.6px rgba(0, 0, 0, 0.5), 0 0.3px 0.9px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.55), 0 0 2px rgba(0, 0, 0, 0.5);
  }
}

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

html {
  scroll-padding-top: 76px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 0.05em 0.35em; overflow-wrap: anywhere; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

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

.sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: 12px; top: -60px;
  z-index: 100;
  background: var(--btn-bg);
  color: var(--btn-text);
  padding: 8px 14px;
  border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}
.wrap--narrow { max-width: 860px; }

/* ------------------------------------------------------------ topo */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar__in {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  margin-right: auto;
}
.brand img { border-radius: 7px; }
.menu { display: flex; gap: 4px; list-style: none; }
.menu a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}
.menu a:hover { background: var(--surface-2); }

/* seletor de idioma (sem JavaScript) */
.langsw { position: relative; }
.langsw summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.langsw summary::-webkit-details-marker { display: none; }
.langsw summary:hover { background: var(--surface-2); }
.langsw svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.langsw ul {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 170px;
  list-style: none;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.langsw li a {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}
.langsw li a:hover { background: var(--surface-2); }
.langsw li a[aria-current="true"] { background: var(--accent-soft); font-weight: 600; }

/* ------------------------------------------------------------ botões */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid transparent;
  border-radius: 6px;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.btn--primary { background: var(--btn-bg); color: var(--btn-text); }
.btn--primary:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn--primary:active { background: var(--btn-bg-active); }
.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.btn--secondary:hover { background: var(--surface-2); text-decoration: none; }
.btn--ghost { background: transparent; color: var(--link); border-color: transparent; }
.btn--ghost:hover { background: var(--accent-soft); text-decoration: none; }

/* ------------------------------------------------------------ hero */
.hero { padding-block: clamp(36px, 7vw, 96px); overflow: hidden; }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
}
.badge {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 18px;
  background: var(--accent-soft);
  color: var(--link);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
}
.hero h1 {
  font-size: clamp(1.9rem, 1.1rem + 2.7vw, 3.4rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.lead {
  margin-top: 18px;
  font-size: clamp(1.02rem, 0.95rem + 0.3vw, 1.2rem);
  color: var(--sub);
  max-width: 60ch;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.fine { margin-top: 18px; font-size: 0.875rem; color: var(--sub); }
.hero__shot img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}

/* ------------------------------------------------------------ seções */
.section { padding-block: clamp(44px, 7vw, 88px); }
.section--alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); letter-spacing: -0.02em; }
.section__lead { margin-top: 12px; max-width: 70ch; color: var(--sub); font-size: 1.05rem; }
.section h2 + .cards,
.section h2 + .timeline { margin-top: 28px; }

/* cartões de recursos */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: 16px;
}
.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  margin-bottom: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 10px;
}
.card__icon svg {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.card h3 { font-size: 1.1rem; }
.card p { color: var(--sub); font-size: 0.97rem; }
.envs { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin-top: 6px; }
.env {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.env::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.env--prod::before { background: var(--prod); }
.env--qa::before { background: var(--qa); }
.env--dev::before { background: var(--dev); }

/* galeria */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 40px;
}
.gallery figure { margin: 0; }
.gallery img {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  background: var(--surface);
}
.gallery figcaption { margin-top: 10px; text-align: center; font-size: 0.9rem; color: var(--sub); }

/* download */
.dl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 28px;
}
.dl {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.dl h3 { font-size: 1.15rem; }
.dl p { color: var(--sub); }
.dl .dl__meta { font-size: 0.85rem; overflow-wrap: anywhere; }
.dl .btn { margin-top: auto; align-self: flex-start; }
.dl__meta + .btn { margin-top: 14px; }
.all-versions { margin-top: 18px; }

.howto {
  margin-top: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.howto summary {
  position: relative;
  padding: 16px 52px 16px 22px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  border-radius: var(--radius-lg);
}
.howto summary::-webkit-details-marker { display: none; }
.howto summary::after {
  content: "";
  position: absolute;
  right: 24px; top: 50%;
  width: 9px; height: 9px;
  border-right: 2px solid var(--sub);
  border-bottom: 2px solid var(--sub);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.15s ease;
}
.howto[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.howto__body { padding: 0 22px 22px; color: var(--text); }
.howto__body ol { padding-left: 1.3em; display: grid; gap: 8px; margin-bottom: 14px; }
.howto__body p { color: var(--sub); }

/* novidades */
.timeline { position: relative; display: grid; gap: 28px; padding-left: 26px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--border);
}
.release { position: relative; }
.release::before {
  content: "";
  position: absolute;
  left: -26px; top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--bg);
}
.release--next::before { background: var(--bg); border: 2px solid var(--sub); box-shadow: 0 0 0 4px var(--bg); }
.release h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 1.2rem; margin-bottom: 8px; }
.release time { font-size: 0.9rem; font-weight: 400; color: var(--sub); }
.release p { color: var(--sub); }
.release ul { margin-top: 8px; padding-left: 1.2em; color: var(--sub); display: grid; gap: 4px; }
.tag {
  padding: 2px 10px;
  background: var(--accent-soft);
  color: var(--link);
  border-radius: 999px;
  font-size: 0.95rem;
}

/* apoie */
.donate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 16px;
  margin-top: 28px;
}
.donate {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.donate h3 { font-size: 1.15rem; }
.donate > p { color: var(--sub); }
.pix { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; margin-top: 10px; }
.pix__qr {
  width: 168px; height: 168px;
  padding: 8px;
  background: #fff;           /* QR sempre escuro sobre claro, para a câmera ler */
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.pix__info { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; flex: 1 1 220px; min-width: 0; }
.pix__label { font-size: 0.85rem; color: var(--sub); }
.pix__key { display: block; max-width: 100%; padding: 8px 10px; font-size: 0.88rem; user-select: all; }
.pix .btn { min-width: 130px; }
.donate__links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 10px; }
.credits { margin-top: 28px; color: var(--sub); }
.issues { margin-top: 6px; color: var(--sub); }

/* FAQ */
.section--faq { padding-top: 0; }
.faq { display: grid; gap: 14px; margin-top: 28px; }
.faq article {
  padding: 18px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.faq h3 { font-size: 1.05rem; margin-bottom: 6px; }
.faq p { color: var(--sub); }

/* aviso de idioma */
.langbar {
  position: fixed;
  right: 16px; bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 420px;
  padding: 12px 12px 12px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  font-size: 0.92rem;
}
.langbar .btn { min-height: 36px; padding: 6px 14px; flex: none; }
.langbar__x {
  flex: none;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--sub);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.langbar__x:hover { background: var(--surface-2); }

/* rodapé */
.footer { padding-block: 28px; border-top: 1px solid var(--border); color: var(--sub); font-size: 0.9rem; }
.footer__in { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; }

/* ------------------------------------------------------------ responsivo */
@media (min-width: 1600px) {
  .wrap { max-width: 1360px; }
  html { font-size: 106.25%; }
}

@media (max-width: 960px) {
  .hero__grid { grid-template-columns: minmax(0, 1fr); }
  .hero__shot { order: 2; }
  .gallery { grid-template-columns: minmax(0, 1fr); max-width: 640px; margin-inline: auto; }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .donate-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  html { scroll-padding-top: 112px; }
  .topbar__in { flex-wrap: wrap; row-gap: 0; padding-block: 6px; }
  .brand { order: 1; }
  .langsw { order: 2; }
  .topbar__nav { order: 3; flex: 1 0 100%; margin-inline: -8px; }
  .menu { justify-content: space-between; }
  .menu { gap: 0; }
  .menu a { padding: 8px 5px; font-size: 0.85rem; }
  .actions .btn { flex: 1 1 100%; }
  .langbar { left: 12px; right: 12px; bottom: 12px; max-width: none; }
  .pix { justify-content: center; }
  .pix__info { align-items: stretch; flex-basis: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}

@media (forced-colors: active) {
  .btn, .card, .dl, .donate, .howto, .env { border: 1px solid CanvasText; }
}

/* 404 */
.notfound { min-height: 100vh; display: grid; align-content: center; justify-items: start; gap: 12px; padding-block: 48px; }
.notfound img { border-radius: 14px; }
.notfound h1 { font-size: 3rem; }
.notfound p { color: var(--sub); }

/* ---- v2.0.5: sobre o criador, notas, galeria ---- */
.gallery-note, .news-note { margin-top: 14px; font-size: 0.875rem; color: var(--sub); text-align: center; }
.news-note { text-align: left; }
.news-note:empty { display: none; }
.release h4 { margin-top: 10px; font-size: 1rem; }
.about { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 40px; align-items: center; max-width: 960px; margin-inline: auto; }
.about__photo { width: 240px; height: 240px; border-radius: 50%; object-fit: cover; box-shadow: var(--shadow-lg); border: 4px solid var(--surface); }
.about__text h2 { margin-bottom: 14px; }
.about__text p { margin-bottom: 12px; }
.about__actions { margin-top: 18px; }
.about .credits { margin-top: 18px; }
@media (max-width: 720px) {
  .about { grid-template-columns: minmax(0, 1fr); text-align: center; gap: 24px; justify-items: center; }
  .about__photo { width: 160px; height: 160px; }
}

.dl__sha { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 10px; font-size: 0.75rem; color: var(--sub); }
.dl__sha code { font-size: 0.7rem; overflow-wrap: anywhere; word-break: break-all; }
.linkbtn { background: none; border: 0; padding: 2px 4px; color: var(--link); font: inherit; font-size: 0.75rem; text-decoration: underline; cursor: pointer; border-radius: 4px; }
