/* Landing page do Erasó.
   Estrutura, medidas e comportamentos reproduzidos do site do LocalSend
   (github.com/localsend/website, Apache License 2.0); código, textos, imagens
   e identidade visual são do Erasó. Medidas: docs/landing/LANDING_REFERENCE.md */

:root {
  /* Papéis de cor da referência → identidade Erasó (areia, floresta, terracota/laranja) */
  --bg-page: #F7F2E8;            /* areia clara */
  --bg-card: #EFE7D7;            /* areia */
  --bg-bar: #ECE3D0;             /* bege da barra de navegação */
  --button-bg: #F76100;          /* laranja da logo — ação */
  --button-bg-hover: #E35700;
  --button-text: #1A1105;
  --subtle-bg: rgba(220, 205, 176, 0.35);
  --border-color: rgba(78, 87, 76, 0.16);
  --mockup-border: #004F29;      /* nó verde da logo */
  --mockup-border-strong: #F76100; /* nó laranja da logo */
  --shine-color: #F7F2E8;
  --accent-primary: #0B5E34;     /* verde-floresta para texto e ícones (7,06:1) */
  --accent-warm: #A8410F;        /* terracota para o destaque do título (5,49:1) */
  --accent-secondary: #DCCDB0;   /* areia escura */
  --surface-gradient-end: #E8DCC5;
  --text-main: #13201A;
  --text-muted: #4E574C;

  --font-body: 'Instrument Sans', system-ui, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-display: 'Lexend', 'Instrument Sans', system-ui, sans-serif;
  --container-width: 1100px;
  --section-padding: 150px 20px;
  --card-radius: 20px;
  --transition-fast: 0.2s ease;
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

.dark {
  --bg-page: #11140F;
  --bg-card: #1A1E17;
  --bg-bar: #1A1E17;
  --button-bg: #FF6B05;
  --button-bg-hover: #FF8A3D;
  --button-text: #1A1105;
  --subtle-bg: rgba(255, 255, 255, 0.04);
  --border-color: rgba(92, 208, 143, 0.12);
  --mockup-border: #2E3B2C;
  --mockup-border-strong: #5A3A22;
  --shine-color: #FFFFFF;
  --accent-primary: #5CD08F;
  --accent-warm: #FF8A3D;
  --accent-secondary: #3A4234;
  --surface-gradient-end: #22281F;
  --text-main: #F5F0E6;
  --text-muted: #B9B3A5;
  color-scheme: dark;
}

/* ---------- base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.28s ease, color 0.28s ease;
}
.navbar, .card, .btn, .theme-toggle, .mobile-toggle, .footer, .mobile-menu, .nav-action-btn {
  transition: background-color 0.28s ease, color 0.28s ease, border-color 0.28s ease,
    box-shadow 0.28s ease, filter 0.28s ease, transform var(--transition-fast);
}
ul { list-style: none; }
a { text-decoration: none; color: inherit; transition: var(--transition-fast); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; }
h1, h2 { font-family: var(--font-display); }
:focus-visible { outline: 2px solid var(--accent-warm); outline-offset: 3px; border-radius: 6px; }
section[id] { scroll-margin-top: 80px; }
.icon { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.text-center { text-align: center; }
.accent { color: var(--accent-warm); }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 2000; background: var(--button-bg); color: var(--button-text); padding: 10px 16px; border-radius: 50px; font-weight: 600; }
.skip-link:focus { top: 12px; }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 20px; }
.section { padding: var(--section-padding); }
.grid { display: grid; gap: 30px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- botões e cartões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border-radius: 50px; font-weight: 600; cursor: pointer;
  border: none; font-size: 1rem; font-family: inherit;
}
.btn-primary { background-color: var(--button-bg); color: var(--button-text); }
.btn-primary:hover { background-color: var(--button-bg-hover); transform: translateY(-2px); }
.btn-secondary { background-color: var(--bg-card); color: var(--accent-primary); }
.btn-secondary:hover { background-color: var(--button-bg); color: var(--button-text); }
.btn-sm { padding: 8px 20px; font-size: 0.9rem; }
.btn-lg { padding: 16px 36px; font-size: 1.1rem; }
.btn-block { display: block; width: 100%; text-align: center; }

.card { background-color: var(--bg-card); border-radius: var(--card-radius); padding: 30px; transition: var(--transition-slow); }
.card:hover { transform: translateY(-5px); }
.stats .card:hover, .feature-card:hover, .step-visual.card:hover, .faq-item.card:hover, .demo-card:hover { transform: none; }

/* ---------- navegação ---------- */
.navbar {
  position: fixed; top: 0; width: 100%; height: 80px; z-index: 1000;
  display: flex; align-items: center;
  background-color: color-mix(in srgb, var(--bg-bar) 86%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.navbar .container { display: flex; align-items: center; width: 100%; }
.logo { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.logo .symbol { height: 32px; width: auto; overflow: visible; }
.logo .wordmark { height: 24px; width: auto; }
.wordmark-dark { display: none !important; }
.dark .wordmark-light { display: none !important; }
.dark .wordmark-dark { display: block !important; }
/* Desvio documentado: a referência usa gap 48 / margem 60 com rótulos curtos; aqui os rótulos são mais longos
   ("Como funciona", "Documentação"), então o espaçamento é menor e os itens nunca quebram de linha. */
.nav-links { display: flex; gap: 32px; margin-left: 48px; }
.nav-links a, .nav-action-btn, .navbar .btn { white-space: nowrap; }
.nav-links a { color: var(--text-muted); font-weight: 500; }
.nav-links a:hover { color: var(--accent-primary); }
.nav-actions { display: flex; align-items: center; gap: 16px; margin-left: auto; }
.theme-toggle, .mobile-toggle {
  background: none; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 8px; color: var(--text-muted);
}
.theme-toggle:hover { color: var(--button-text); background: var(--button-bg); }
.theme-toggle .moon { display: block; } .theme-toggle .sun { display: none; }
.dark .theme-toggle .moon { display: none; } .dark .theme-toggle .sun { display: block; }
.mobile-toggle { display: none; color: var(--text-main); }
.mobile-toggle .close { display: none; }
.mobile-toggle[aria-expanded="true"] .open { display: none; }
.mobile-toggle[aria-expanded="true"] .close { display: block; }
.hide-mobile { display: inline-flex; }

/* seletor de idioma */
.lang-switcher { position: relative; }
.nav-action-btn {
  background: var(--subtle-bg); border: 1px solid var(--border-color); color: var(--text-main);
  padding: 8px 16px; border-radius: 50px; display: flex; align-items: center; gap: 8px; cursor: pointer;
  font-size: 0.9rem; font-weight: 600; font-family: inherit;
}
.nav-action-btn:hover, .nav-action-btn[aria-expanded="true"] { background: color-mix(in srgb, var(--accent-primary) 12%, transparent); border-color: var(--accent-primary); }
.nav-action-btn .icon { width: 18px; height: 18px; transition: transform 0.3s ease; }
.nav-action-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.lang-dropdown {
  position: absolute; top: calc(100% + 15px); right: 0; width: 280px; max-width: calc(100vw - 40px);
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 20px; padding: 10px; z-index: 1000;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); transition: opacity 0.3s ease, transform 0.3s ease;
}
.lang-dropdown[hidden] { display: block; visibility: hidden; opacity: 0; transform: translateY(10px); pointer-events: none; }
.lang-search { position: relative; margin-bottom: 10px; }
.lang-search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-muted); }
.lang-search input {
  width: 100%; background: var(--bg-page); border: 1px solid var(--border-color); padding: 10px 10px 10px 40px;
  border-radius: 12px; color: var(--text-main); font-size: 0.85rem; font-family: inherit;
}
.lang-list { max-height: 350px; overflow-y: auto; }
.lang-item { display: flex; justify-content: space-between; align-items: center; padding: 10px 15px; border-radius: 12px; cursor: pointer; width: 100%; background: none; border: 0; text-align: left; color: inherit; font-family: inherit; }
.lang-item:hover { background: var(--subtle-bg); }
.lang-item[aria-selected="true"] { background: color-mix(in srgb, var(--accent-primary) 10%, transparent); }
.lang-name { display: block; font-size: 0.9rem; font-weight: 600; }
.lang-en { display: block; font-size: 0.75rem; color: var(--text-muted); }
.lang-item .icon { color: var(--accent-primary); width: 20px; height: 20px; }
.lang-empty { padding: 30px; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* menu do celular */
.mobile-menu {
  position: fixed; top: 70px; left: 20px; right: 20px; z-index: 1000;
  background: var(--bg-card); border: 1px solid var(--border-color); border-radius: 1.5rem; padding: 2rem;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); transition: opacity 0.3s ease, transform 0.3s ease;
}
.mobile-menu[hidden] { display: block; visibility: hidden; opacity: 0; transform: translateY(-10px); pointer-events: none; }
.mobile-nav-links { margin: 0 0 2rem; }
.mobile-nav-links li { margin-bottom: 1rem; }
.mobile-nav-links a { color: var(--text-main); font-size: 1.25rem; font-weight: 500; }
@media (min-width: 769px) { .mobile-menu { display: none !important; } }

/* ---------- hero ---------- */
.hero { padding-top: 180px; padding-bottom: 60px; animation: fadeIn 0.8s ease-out; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.hero h1 { font-size: 4rem; max-width: 900px; margin: 0 auto 20px; letter-spacing: -1px; }
.hero .subtitle { font-size: 1.3rem; color: var(--text-muted); max-width: 600px; margin: 0 auto 40px; }
/* evita palavra sozinha na última linha (mesmo número de linhas da referência) */
.hero h1, .hero .subtitle, .section-subtitle { text-wrap: balance; }
.hero-ctas { display: flex; gap: 20px; justify-content: center; margin-bottom: 80px; }
.hero-visual { position: relative; max-width: 900px; margin: 0 auto; }
.desktop-mockup { border-radius: 12px; overflow: hidden; border: 4px solid var(--mockup-border); }
.mobile-mockup {
  position: absolute; bottom: -40px; right: -20px; width: 200px;
  border-radius: 24px; overflow: hidden; border: 6px solid var(--mockup-border-strong);
}
.shot-dark { display: none; }
.dark .shot-light { display: none; }
.dark .shot-dark { display: block; }

/* ---------- números ---------- */
.stats { padding: 40px 0; }
.card-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); padding: 40px;
  background: linear-gradient(135deg, var(--bg-card), var(--surface-gradient-end));
}
.stat-item { text-align: center; }
.stat-value { display: block; font-family: var(--font-display); font-size: 2.5rem; font-weight: 800; line-height: 1.6; color: var(--accent-primary); }
.stat-label { display: block; color: var(--text-muted); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }

/* ---------- cabeçalhos de seção ---------- */
.section-header { margin-bottom: 60px; }
.section-title { font-size: 2.5rem; margin-bottom: 15px; }
.section-subtitle { color: var(--text-muted); font-size: 1.1rem; max-width: 600px; margin: 0 auto; }

/* ---------- recursos ---------- */
.features-grid { gap: 24px; }
.feature-card { text-align: center; padding: 24px; }
.feature-icon { display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; margin: 0 auto 12px; color: var(--accent-primary); }
.feature-icon .icon { width: 36px; height: 36px; stroke-width: 1.6; }
.feature-card h3 { margin-bottom: 8px; font-size: 1.1rem; }
.feature-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.4; }

/* ---------- como funciona ---------- */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 50px; gap: 40px; }
.step-card { text-align: center; }
.step-visual { height: 180px; margin-bottom: 30px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 15px; overflow: hidden; }
.step-card h3 { margin-bottom: 10px; font-size: 1rem; }
.step-card p { color: var(--text-muted); font-size: 0.95rem; }

.install-animation { position: relative; width: 200px; height: 100px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; }
.install-app { position: relative; z-index: 2; opacity: 0; }
.install-app .symbol { height: 44px; width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.3)); }
.install-folder { color: var(--accent-secondary); opacity: 0; }
.install-folder .icon { width: 56px; height: 56px; fill: currentColor; stroke: none; }
.install-cursor { position: absolute; bottom: 0; right: 0; color: var(--text-main); z-index: 10; pointer-events: none; opacity: 0; transform: rotate(-15deg); filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5)); }
.install-cursor .icon { width: 32px; height: 32px; fill: currentColor; stroke: none; }
.install-success { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: var(--accent-primary); z-index: 11; opacity: 0; pointer-events: none; }
.install-success .icon { width: 80px; height: 80px; stroke-width: 1.5; }
.animate-drag .install-cursor { animation: cursorMove 3s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.animate-drag .install-app { animation: appDrag 3s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.animate-drag .install-folder { animation: folderPulse 3s ease infinite; }
.animate-drag .install-success { animation: showSuccess 3s ease infinite; }
@keyframes showSuccess {
  0%, 60% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  65%, 95% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8); }
}
@keyframes cursorMove {
  0% { transform: translate(-220px, -130px) rotate(-15deg); opacity: 0; }
  25% { transform: translate(-150px, -18px) rotate(-15deg); opacity: 1; }
  40% { transform: translate(-150px, -18px) rotate(-15deg) scale(0.9); }
  55% { transform: translate(-30px, -18px) rotate(-15deg) scale(0.9); }
  60% { transform: translate(-30px, -18px) rotate(-15deg) scale(1); opacity: 1; }
  70%, 100% { transform: translate(20px, 40px) rotate(-15deg); opacity: 0; }
}
@keyframes appDrag {
  0%, 10% { opacity: 0; transform: translate(0, 0); }
  15%, 40% { opacity: 1; transform: translate(0, 0); }
  55% { transform: translate(120px, 0); opacity: 1; }
  60% { transform: translate(120px, 0) scale(0.8); opacity: 1; }
  65%, 100% { transform: translate(120px, 0) scale(0.8); opacity: 0; }
}
@keyframes folderPulse {
  0% { opacity: 0; transform: scale(1); color: var(--accent-secondary); }
  10%, 59% { opacity: 1; transform: scale(1); color: var(--accent-secondary); }
  60% { transform: scale(1.2); color: var(--accent-primary); opacity: 1; }
  65% { transform: scale(1); color: var(--accent-primary); opacity: 0; }
  100% { opacity: 0; }
}

.file-stack { position: relative; width: 60px; height: 80px; }
.file-item {
  position: absolute; width: 100%; height: 100%; background: var(--accent-secondary);
  border-radius: 8px; border: 2px solid var(--bg-page); opacity: 0; transform: translateY(10px);
  animation: fileStack 3s infinite ease-in-out;
}
.file-item:nth-child(1) { animation-delay: 0s; top: 0; left: 0; z-index: 1; }
.file-item:nth-child(2) { animation-delay: 0.15s; top: -8px; left: 8px; z-index: 2; }
.file-item:nth-child(3) { animation-delay: 0.3s; top: -16px; left: 16px; z-index: 3; background: var(--accent-primary); }
@keyframes fileStack {
  0% { opacity: 0; transform: translateY(15px) rotate(-2deg); }
  15%, 85% { opacity: 1; transform: translateY(0) rotate(0deg); }
  40% { transform: translateY(-3px) rotate(1deg); }
  65% { transform: translateY(-1px) rotate(-1deg); }
  100% { opacity: 0; transform: translateY(-5px); }
}

.transfer-animation { display: flex; align-items: center; gap: 20px; position: relative; }
.device-mini { width: 40px; height: 60px; background: var(--bg-page); border: 2px solid var(--accent-secondary); border-radius: 8px; position: relative; overflow: hidden; z-index: 2; }
/* sincronização com a logo: o arquivo sai laranja (em trânsito) e chega verde (concluído) */
.device-mini.origin { border-color: color-mix(in srgb, var(--button-bg) 45%, var(--accent-secondary)); }
.transfer-indicator { width: 40px; height: 4px; background: linear-gradient(90deg, var(--button-bg), var(--accent-primary)); border-radius: 2px; position: relative; overflow: hidden; }
.transfer-indicator::after { content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%; background: var(--shine-color); animation: transfer 2.5s infinite; }
.transfer-file-source, .transfer-file-target {
  position: absolute; width: 14px; height: 18px; border-radius: 2px; top: 50%; left: 50%;
  margin-left: -7px; margin-top: -9px; opacity: 0;
}
.transfer-file-source { background: var(--button-bg); animation: sourceFileOut 2.5s infinite; }
.transfer-file-target { background: var(--accent-primary); animation: targetFileIn 2.5s infinite; }
@keyframes sourceFileOut {
  0% { opacity: 0; transform: translateX(0) scale(0.5); }
  15% { opacity: 1; transform: translateX(0) scale(1); }
  40% { transform: translateX(30px); opacity: 1; }
  41%, 100% { opacity: 0; }
}
@keyframes targetFileIn {
  0%, 70% { opacity: 0; transform: translateX(-30px); }
  70.1% { opacity: 1; transform: translateX(-30px); }
  85% { transform: translateX(0); opacity: 1; }
  90% { opacity: 1; transform: translateX(0) scale(1); }
  100% { opacity: 0; transform: translateX(0) scale(0.5); }
}
@keyframes transfer { 0% { left: -100%; } 40% { left: -100%; } 70% { left: 200%; } 100% { left: 200%; } }

/* ---------- demonstração + perguntas ---------- */
.video-container { position: relative; padding-bottom: 56.25%; height: 0; margin-bottom: 80px; border-radius: 24px; overflow: hidden; background: #0C0F0B; }
.video-container video { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; background: #0C0F0B; }
.demo-figure { margin: 0 0 80px; }
.demo-figure .video-container { margin-bottom: 0; }
.demo-caption { margin-top: 14px; text-align: center; font-size: 0.95rem; color: var(--text-muted, inherit); opacity: 0.85; }
.demo-note { display: block; margin-top: 6px; font-size: 0.82rem; opacity: 0.8; }
.demo-note a { margin-left: 4px; white-space: nowrap; }
.dark { --logo-green-orbit: #3DBE78; --logo-green-path: #5CD08F; --logo-green-node: #5CD08F; }
.faq-list { max-width: 800px; margin: 40px auto 0; display: flex; flex-direction: column; gap: 15px; }
.faq-item { margin-bottom: 20px; padding: 0; }
.faq-question { padding: 30px 30px 10px; margin: 0; font-size: 1.25rem; font-weight: 700; color: var(--text-main); display: block; }
.faq-item p { padding: 0 30px 30px; color: var(--text-muted); margin: 0; }
.faq-item p a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- contato ---------- */
.contact-card { display: flex; flex-direction: column; align-items: center; gap: 15px; }
.contact-card .feature-icon { margin-bottom: 0; }
.contact-card h3 { font-size: 1rem; }
.read-more { color: var(--accent-primary); font-weight: 600; font-size: 0.9rem; }
.placeholder { color: var(--text-muted); font-style: italic; font-weight: 500; }

/* ---------- rodapé ---------- */
.footer { padding: 80px 0 40px; }
.footer-grid { display: grid; grid-template-columns: 1fr 2.4fr; gap: 50px; margin-bottom: 60px; }
.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p { color: var(--text-muted); max-width: 300px; }
.footer-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; align-items: start; }
.footer-links h4 { margin-bottom: 20px; color: var(--text-main); }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a, .footer-links ul li span { color: var(--text-muted); font-size: 0.95rem; }
.footer-links ul li a:hover { color: var(--accent-primary); }
.footer-bottom { display: flex; justify-content: space-between; gap: 20px; padding-top: 40px; border-top: 1px solid var(--border-color); color: var(--text-muted); font-size: 0.85rem; }
.footer-bottom a { color: var(--accent-primary); }
.footer-bottom a:hover { opacity: 0.8; }
.footer-bottom a.license-link { color: inherit; text-decoration: underline; }

/* ---------- responsivo (mesmos pontos de quebra da referência) ---------- */
.lang-label-short { display: none; }
/* Desvio documentado: na referência, o cabeçalho transborda entre 769 e 1024 px
   (rolagem horizontal em 769 px). Aqui o menu se compacta para caber. */
@media (max-width: 1180px) { .nav-links { gap: 24px; margin-left: 32px; } }
@media (max-width: 1023px) {
  .nav-links { gap: 20px; margin-left: 24px; }
  .nav-actions .hide-mobile { display: none; }
  .lang-label-long { display: none; }
  .lang-label-short { display: inline; }
}
@media (max-width: 860px) { .nav-links { gap: 14px; margin-left: 14px; } .nav-actions { padding-left: 8px; gap: 10px; } }
@media (max-width: 800px) { .nav-links { gap: 10px; margin-left: 8px; } .nav-actions { gap: 8px; } }
@media (max-width: 360px) { .lang-label-short { display: none; } .nav-action-btn { padding: 8px 10px; } }
@media (max-width: 1024px) {
  .hero h1 { font-size: 3rem; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --section-padding: 80px 20px; }
  .grid-2, .grid-4 { grid-template-columns: 1fr; }
  .steps-grid { grid-template-columns: 1fr; gap: 30px; }
  .nav-links, .hide-mobile { display: none; }
  .mobile-toggle { display: flex; }
  .navbar { height: 76px; }
  .navbar .container { padding: 0 16px; }
  .logo { gap: 10px; }
  .logo .symbol { height: 28px; }
  .logo .wordmark { height: 19px; }
  .nav-actions { gap: 8px; }
  .theme-toggle, .mobile-toggle { width: 34px; height: 34px; }
  .hero { padding-top: 108px; padding-bottom: 76px; }
  .section-title { font-size: 2rem; }
  .hero h1 { font-size: clamp(2rem, 8vw, 2.6rem); margin-bottom: 16px; }
  .hero .subtitle { font-size: 1.1rem; margin-bottom: 32px; }
  .hero-ctas { flex-direction: column; gap: 14px; margin-bottom: 52px; }
  .hero-ctas .btn { width: 100%; max-width: 350px; min-height: 58px; margin: 0 auto; padding: 14px 24px; }
  .hero-visual { max-width: 560px; margin-bottom: 28px; }
  .desktop-mockup { border-width: 3px; }
  .mobile-mockup { right: 10px; bottom: -26px; width: clamp(96px, 28vw, 136px); border-width: 4px; border-radius: 18px; }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
  .video-container { border-radius: 18px; }
}
@media (max-width: 480px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .container { padding: 0 18px; }
  .navbar .container { padding: 0 14px; }
  .logo { gap: 8px; }
  .logo .symbol { height: 26px; }
  .logo .wordmark { height: 17px; }
  .hero { padding-top: 96px; }
  .hero h1 { font-size: clamp(1.8rem, 7.5vw, 2.05rem); }
  .hero .subtitle { font-size: 1rem; }
  .mobile-mockup { width: clamp(82px, 24vw, 108px); right: 6px; bottom: -18px; border-width: 3px; border-radius: 15px; }
  .footer-links { grid-template-columns: 1fr; }
}

/* ---------- movimento reduzido (requisito do design system do Erasó) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .install-app, .install-folder { opacity: 1 !important; animation: none !important; }
  .file-item { opacity: 1 !important; animation: none !important; transform: none !important; }
  .transfer-file-target { opacity: 1 !important; animation: none !important; }
}

/* =====================================================================
   Páginas institucionais (Etapa 1) — layout secundário.
   Mesma estrutura do PageHeader/LegalLayout da referência (título centrado,
   conteúdo de 800 px), com os tokens do Erasó.
   ===================================================================== */
.nav-links a[aria-current="page"] { color: var(--accent-primary); }
.badge { display: inline-block; padding: 6px 16px; margin-bottom: 20px; border-radius: 40px; font-size: 0.85rem; font-weight: 600; background: var(--bg-card); color: var(--accent-warm); border: 1px solid var(--border-color); }
a.badge:hover { border-color: var(--accent-warm); }
.page-header { padding: 150px 20px 40px; }
.page-header h1 { font-size: 3rem; letter-spacing: -0.5px; max-width: 800px; margin: 0 auto 16px; text-wrap: balance; }
.page-header .subtitle { font-size: 1.2rem; color: var(--text-muted); max-width: 640px; margin: 0 auto; text-wrap: balance; }
.breadcrumb { margin-bottom: 20px; font-size: 0.9rem; color: var(--text-muted); }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.breadcrumb li + li::before { content: "›"; margin-right: 8px; }
.breadcrumb a { color: var(--accent-primary); }
.breadcrumb a:hover { text-decoration: underline; }
.page-body { padding: 0 20px 110px; }

.legal-content { max-width: 800px; margin: 0 auto; }
.legal-content h2 { margin: 56px 0 18px; color: var(--accent-primary); font-size: 1.8rem; scroll-margin-top: 100px; }
.legal-content h2:first-child { margin-top: 0; }
.legal-content h3 { margin: 32px 0 12px; color: var(--text-main); font-size: 1.3rem; font-family: var(--font-body); scroll-margin-top: 100px; }
.legal-content p, .legal-content li, .legal-content dd { font-size: 1.05rem; line-height: 1.75; color: var(--text-muted); }
.legal-content p { margin-bottom: 18px; }
.legal-content strong { color: var(--text-main); }
.legal-content ul, .legal-content ol { margin: 0 0 20px; padding-left: 22px; }
.legal-content ul { list-style: disc; }
.legal-content ol { list-style: decimal; }
.legal-content li { margin-bottom: 8px; }
.legal-content a { color: var(--accent-primary); text-decoration: underline; text-underline-offset: 3px; }
.legal-content a:hover { color: var(--text-main); }
.legal-content a.btn { text-decoration: none; }
.legal-content a.btn-primary { color: var(--button-text); }
.legal-content a.btn-secondary { color: var(--accent-primary); }
.legal-content a.btn-secondary:hover { color: var(--button-text); }
.legal-content a.card { text-decoration: none; color: inherit; display: block; }
.legal-content a.card:hover { color: inherit; }
.legal-content .lead { font-size: 1.25rem; color: var(--text-main); line-height: 1.6; }
.legal-content kbd { font: 600 0.82em var(--font-body); padding: 2px 8px; border-radius: 6px; background: var(--bg-card); border: 1px solid var(--border-color); white-space: nowrap; color: var(--text-main); }
.legal-content code { font: 0.9em ui-monospace, "Cascadia Mono", Menlo, monospace; padding: 2px 6px; border-radius: 6px; background: var(--bg-card); color: var(--text-main); }
.legal-content p, .legal-content li, .legal-content dd, .legal-content td, .legal-content th { overflow-wrap: break-word; }
.legal-content code { overflow-wrap: anywhere; }
.legal-content pre { margin: 0 0 22px; padding: 18px 20px; border-radius: 16px; background: var(--bg-card); overflow-x: auto; }
.legal-content pre code { padding: 0; background: none; font-size: 0.92rem; line-height: 1.7; }

.notice-box { margin: 0 0 36px; padding: 20px 24px; border-radius: var(--card-radius); background: var(--bg-card); border: 1px dashed var(--accent-warm); }
.notice-box .label { display: block; margin-bottom: 6px; font-size: 0.78rem; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--accent-warm); }
.legal-content .notice-box p { margin: 0; font-size: 1rem; color: var(--text-main); line-height: 1.6; }
.legal-content .notice-box p + p { margin-top: 10px; }
.toc { margin: 0 0 44px; padding: 24px 30px; border-radius: var(--card-radius); background: var(--bg-card); }
.legal-content .toc h2 { margin: 0 0 12px; font-size: 1rem; color: var(--text-main); font-family: var(--font-body); }
.toc ol { columns: 2; column-gap: 32px; margin: 0; padding-left: 22px; }
.toc li { margin-bottom: 8px; break-inside: avoid; }

.table-wrap { overflow-x: auto; margin: 0 0 26px; border: 1px solid var(--border-color); border-radius: 16px; }
.data-table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.95rem; }
.data-table th, .data-table td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border-color); line-height: 1.5; }
.data-table thead th { background: var(--bg-card); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-muted); }
.data-table tbody th { font-weight: 600; color: var(--text-main); }
.data-table td { color: var(--text-muted); }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.chip { display: inline-block; padding: 2px 10px; border-radius: 40px; border: 1px solid currentColor; font-size: 0.78rem; font-weight: 600; white-space: nowrap; }
.chip-done { color: var(--accent-primary); }
.chip-proto { color: var(--accent-warm); }
.chip-open { color: var(--text-muted); }

.facts { display: grid; grid-template-columns: minmax(150px, 230px) 1fr; margin: 0 0 26px; border: 1px solid var(--border-color); border-radius: 16px; overflow: hidden; }
.facts dt, .facts dd { padding: 14px 18px; border-bottom: 1px solid var(--border-color); margin: 0; line-height: 1.5; }
.facts dt { font-weight: 600; background: var(--bg-card); color: var(--text-main); font-size: 1rem; }
.facts dt:nth-last-of-type(1), .facts dd:nth-last-of-type(1) { border-bottom: 0; }
.doc-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin: 0 0 32px; }
.doc-grid .card { padding: 24px; }
.doc-grid h3 { margin: 0 0 8px; font-size: 1.1rem; color: var(--text-main); }
.legal-content .doc-grid p { margin: 0 0 12px; font-size: 0.95rem; line-height: 1.5; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; margin: 32px 0 0; }
.legal-content ol.flow { display: grid; gap: 14px; margin: 0 0 28px; padding: 0; list-style: none; counter-reset: flow; }
.flow li { position: relative; margin: 0; padding: 18px 20px 18px 64px; border-radius: 16px; background: var(--bg-card); counter-increment: flow; }
.flow li::before { content: counter(flow); position: absolute; left: 18px; top: 16px; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 0.95rem var(--font-display); background: var(--button-bg); color: var(--button-text); }
.flow strong { display: block; margin-bottom: 2px; }

@media (max-width: 768px) {
  .page-header { padding: 118px 20px 28px; }
  .page-header h1 { font-size: 2.1rem; }
  .page-header .subtitle { font-size: 1.05rem; }
  .page-body { padding-bottom: 80px; }
  .legal-content h2 { font-size: 1.5rem; margin-top: 44px; }
  .legal-content .lead { font-size: 1.12rem; }
  .doc-grid { grid-template-columns: 1fr; }
  .toc ol { columns: 1; }
  .toc { padding: 20px 22px; }
  .facts { grid-template-columns: 1fr; }
  .facts dt { border-bottom: 0; padding-bottom: 6px; }
  .cta-row .btn { width: 100%; }
}

/* ---------- diagramas (figuras SVG) ---------- */
.diagram { margin: 0 0 40px; }
.diagram svg { width: 100%; height: auto; display: block; }
.diagram .dm { display: none; }
.diagram-caption { margin-top: 12px; text-align: center; font-size: 0.92rem; color: var(--text-muted); }
.diagram .d-t { fill: var(--text-main); font: 600 15px var(--font-body); }
.diagram .d-s { fill: var(--text-muted); font: 400 13px var(--font-body); }
.diagram .d-n { fill: #FFFFFF; font: 700 13px var(--font-body); }
.diagram .d-n2 { fill: var(--text-main); }
.diagram .d-box { fill: var(--bg-card); stroke: var(--border-color); stroke-width: 1.5; }
.diagram .d-opt { stroke-dasharray: 4 4; }
.diagram .d-node { fill: var(--bg-page); stroke: var(--accent-primary); stroke-width: 2.5; }
.diagram .d-dash { stroke: var(--text-muted); stroke-width: 2; stroke-dasharray: 6 6; opacity: 0.7; }
.diagram .d-dot { stroke: var(--text-muted); stroke-width: 2; stroke-dasharray: 2 5; stroke-linecap: round; opacity: 0.7; }
@media (max-width: 700px) {
  .diagram .dd { display: none; }
  .diagram .dm { display: block; max-width: 420px; margin: 0 auto; }
}
