/* DanEnglish: estilos do site todo (cores dos temas, base, header, rodapé).
   Os estilos da home ficam em home-app/src/styles/. */

/* ===== base ===== */
/* =========================================================
   DanEnglish — layout imersivo (seções de tela cheia, cada uma com sua cor)
   Claro: papel/branco + azul-marinho + vinho.  Escuro: marinho profundo.
   Blocos "x-navy", "x-wine", "x-ink" têm cor própria nos dois temas.
   ========================================================= */
:root,
:root[data-theme="light"] {
  --bg: #f7f5f0;           /* papel */
  --paper: #f7f5f0;
  --sand: #ebe6dc;
  --ink: #0f1b3d;          /* azul-escuro */
  --ink-2: #4a5269;
  --muted: #7a8094;
  --line: rgba(15, 27, 61, .14);
  --navy: #0f1f4f;
  --wine: #7a1626;
  --black: #0b0f1a;
  --accent: #8e1b2b;
  --pill: rgba(255, 255, 255, .86);
}
:root[data-theme="dark"] {
  --bg: #080d1a;
  --paper: #0b1122;
  --sand: #111a31;
  --ink: #eef1f8;
  --ink-2: #b4bccf;
  --muted: #8a93aa;
  --line: rgba(226, 232, 245, .14);
  --navy: #0d1a45;
  --wine: #5e1120;
  --black: #04070f;
  --accent: #d14a5c;
  --pill: rgba(14, 22, 44, .82);
}
body.dx {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.6 "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased; transition: background-color .3s, color .3s;
}
.dx *, .dx *::before, .dx *::after { box-sizing: border-box; }
.dx img { max-width: 100%; display: block; }
.dx a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.dx-wrap { width: 100%; max-width: 1400px; margin: 0 auto; padding: 0 clamp(16px, 3vw, 40px); }
.dx-muted { color: var(--muted); }



/* ===== header ===== */
/* ---------- header flutuante (pílula) ---------- */
.dx-header { position: fixed; top: 12px; left: 0; right: 0; z-index: 60; padding: 0 clamp(10px, 1.6vw, 24px); pointer-events: none; }
.dx-header-row {
  pointer-events: auto; max-width: none; margin: 0; display: flex; align-items: center; gap: 28px; height: 60px;
  padding: 0 10px 0 22px; border-radius: 18px; background: var(--pill); color: var(--ink);
  backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
  box-shadow: 0 6px 30px -12px rgba(0,0,0,.25); border: 1px solid var(--line);
}
.dx-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.dx-brand span { font: 400 1.35rem "Fraunces", Georgia, serif; letter-spacing: -.02em; }
.dx-brand b { font-weight: 500; color: var(--accent); }
/* logo short: azul-escuro no claro, branco no escuro (máscara do PNG branco) */
.dx-mark { display: inline-block; width: 30px; height: 30px; background: var(--logo-color, #0f1f4f); -webkit-mask: var(--logo) center / contain no-repeat; mask: var(--logo) center / contain no-repeat; }
:root[data-theme="dark"] .dx-mark { --logo-color: #fff; }
.dx-nav { display: flex; gap: 24px; margin-right: auto; }
.dx-nav a { font-size: .93rem; font-weight: 500; color: var(--ink-2); text-decoration: none; }
.dx-nav a:hover, .dx-nav a[aria-current] { color: var(--ink); }
.dx-nav-mobile-only { display: none; }
@media (min-width: 1021px) { .dx-nav a:not(.dx-nav-mobile-only) { display: inline-flex; align-items: center; gap: 6px; } }
.dx-nav-ico { font-size: 1.05em; }
.dx-header-actions { display: flex; align-items: center; gap: 8px; }
.dx-link-quiet {
  font-size: .9rem; font-weight: 500; text-decoration: none; padding: 9px 16px; border-radius: 999px; border: 1.5px solid var(--line);
}
.dx-link-quiet:hover { border-color: var(--ink); }
.dx-btn { display: inline-flex; align-items: center; padding: 10px 18px; border-radius: 999px; background: var(--ink); color: var(--bg) !important; font-weight: 600; font-size: .9rem; text-decoration: none; }
.dx-btn:hover { background: var(--accent); color: #fff !important; }
.dx-theme-toggle {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: transparent; color: var(--ink);
  cursor: pointer; display: grid; place-items: center; font-size: 17px;
}
.dx-theme-toggle:hover { border-color: var(--ink); }
:root[data-theme="dark"] .dx-ico-light, :root:not([data-theme="dark"]) .dx-ico-dark { display: none; }
.dx-burger { display: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--line); background: none; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.dx-burger span { display: block; width: 16px; height: 1.5px; background: var(--ink); transition: transform .25s; }
.dx-burger[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.dx-burger[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }
@media (max-width: 1020px) {
  .dx-link-quiet { display: none; }
  .dx-burger { display: flex; }
  .dx-header-row { justify-content: space-between; position: relative; }
  .dx-nav {
    position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 22px 16px;
    background: var(--pill); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    border-radius: 18px; border: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: opacity .2s, transform .2s, visibility .2s;
  }
  .dx-nav.is-open { opacity: 1; visibility: visible; transform: none; }
  .dx-nav a { padding: 14px 0; font: 400 1.6rem "Fraunces", serif; border-bottom: 1px solid var(--line); }
  .dx-nav a:last-child { border: 0; }
  .dx-nav-mobile-only { display: block; }
}
@media (max-width: 480px) { .dx-header-actions .dx-btn { display: none; } }
.dx-header a, .dx-btn, .dx-link-quiet { white-space: nowrap; }
@media (max-width: 1200px) { .dx-link-quiet { display: none; } }



/* ===== footer ===== */
.dx-footer .dx-mark { --logo-color: #fff; }
/* ---------- footer ---------- */
.dx-footer { background: var(--black); color: #fff; padding: 72px 0 28px; font-size: .95rem; }
.dx-footer .dx-wrap { max-width: none; padding: 0 clamp(16px, 3.2vw, 48px); }
.dx-footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.dx-footer .dx-brand span { font-size: 2.4rem; }
.dx-footer .dx-brand img { filter: none !important; }
.dx-footer .dx-muted { color: rgba(255,255,255,.6); }
.dx-footer h4 { font: 600 .75rem "Inter", sans-serif; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 0 0 14px; }
.dx-footer-grid a:not(.dx-brand) { display: block; color: rgba(255,255,255,.85); text-decoration: none; padding: 4px 0; }
.dx-footer-grid a:hover { color: #fff; }
.dx-footer-legal { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 56px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); color: rgba(255,255,255,.5); font-size: .82rem; }
.dx-footer-legal a { color: inherit; text-decoration: none; } .dx-footer-legal a:hover { color: #fff; }
.dx-footer-top { margin-bottom: 56px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,.14); }
.dx-footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dx-footer-cta p { margin: 0; font-family: "Fraunces", Georgia, serif; font-size: clamp(1.6rem, 3.2vw, 2.6rem); line-height: 1.1; }
.dx-footer-wa { display: inline-flex; align-items: center; gap: 10px; padding: 14px 24px; border-radius: 999px; background: #25d366; color: #0b1a10 !important; font-weight: 700; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.dx-footer-wa:hover { transform: translateY(-2px); box-shadow: 0 12px 30px -10px rgba(37,211,102,.6); }
.dx-footer-wa svg { width: 22px; height: 22px; }
.dx-social { display: flex; gap: 10px; margin-top: 20px; }
.dx-footer-grid .dx-social a { display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); color: #fff; transition: background .2s, transform .2s; }
.dx-footer-grid .dx-social a:hover { background: #fff; color: #0b0f1a; transform: translateY(-2px); }
.dx-social svg { width: 20px; height: 20px; }
.dx-footer-grid a.dx-ico-link { display: flex; align-items: center; gap: 10px; }
.dx-ico-link svg { width: 17px; height: 17px; opacity: .7; flex: none; }
@media (max-width: 760px) { .dx-footer-grid { grid-template-columns: 1fr 1fr; } }
.dx-footer .dx-wrap { padding: 0 clamp(20px, 6vw, 112px); }

/* ===== legacy ===== */
/* ---------- páginas ainda não migradas: espaço para o header flutuante ---------- */
.dx-footer-grid a.dx-ico-link { white-space: nowrap; }

/* footer claro (também no tema escuro) */
html .dx-footer { background: #f5f6fa; color: #0f1b3d; border-top: 1px solid rgba(15,27,61,.08); }
html .dx-footer .dx-brand img { filter: invert(1) !important; }
html .dx-footer .dx-brand span { color: #0f1b3d; }
html .dx-footer .dx-muted { color: #5b6170; }
html .dx-footer h4 { color: #8b90a0; }
html .dx-footer-grid a:not(.dx-brand) { color: #26304d; }
html .dx-footer-grid a:not(.dx-brand):hover { color: #7a1a2c; }
html .dx-footer-grid .dx-social a { border-color: rgba(15,27,61,.18); color: #0f1b3d; }
html .dx-footer-grid .dx-social a:hover { background: #0f1b3d; color: #fff; }
html .dx-footer-legal { border-color: rgba(15,27,61,.1); color: #8b90a0; }
html .dx-footer-legal a:hover { color: #7a1a2c; }
html body .dx-footer { position: relative; isolation: isolate;
  background-color: #f5f6fa;
  background-image:
    radial-gradient(ellipse 60% 80% at 100% 100%, rgba(122,26,44,.07), transparent 70%),
    radial-gradient(ellipse 50% 70% at 0% 0%, rgba(15,31,79,.06), transparent 70%),
    repeating-linear-gradient(135deg, rgba(15,31,79,.035) 0 1px, transparent 1px 14px); }
html body .dx-footer::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.06 0 0 0 0 0.1 0 0 0 0 0.24 0 0 0 .18 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
/* footer no tema escuro */
html[data-theme="dark"] body .dx-footer { background-color: #070b16; color: #fff; border-top-color: rgba(255,255,255,.08);
  background-image: radial-gradient(ellipse 60% 80% at 100% 100%, rgba(224,86,107,.10), transparent 70%), radial-gradient(ellipse 50% 70% at 0% 0%, rgba(59,130,246,.10), transparent 70%), repeating-linear-gradient(135deg, rgba(255,255,255,.03) 0 1px, transparent 1px 14px); }
html[data-theme="dark"] body .dx-footer::before { opacity: .2; filter: invert(1); }
html[data-theme="dark"] body .dx-footer .dx-brand img { filter: none !important; }
html[data-theme="dark"] body .dx-footer .dx-brand span { color: #fff; }
html[data-theme="dark"] body .dx-footer .dx-muted { color: rgba(255,255,255,.6); }
html[data-theme="dark"] body .dx-footer h4 { color: rgba(255,255,255,.5); }
html[data-theme="dark"] body .dx-footer-grid a:not(.dx-brand) { color: rgba(255,255,255,.85); }
html[data-theme="dark"] body .dx-footer-grid a:not(.dx-brand):hover { color: #86efac; }
html[data-theme="dark"] body .dx-footer-grid .dx-social a { border-color: rgba(255,255,255,.2); color: #fff; }
html[data-theme="dark"] body .dx-footer-grid .dx-social a:hover { background: #fff; color: #0b0f1a; }
html[data-theme="dark"] body .dx-footer-legal { border-color: rgba(255,255,255,.12); color: rgba(255,255,255,.5); }
html[data-theme="dark"] body .dx-footer-legal a:hover { color: #86efac; }
/* menu centralizado no header (desktop) */
@media (min-width: 1021px) {
  .dx-header-row { position: relative; }
  .dx-nav { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; }
  .dx-header-actions { margin-left: auto; }
}

/* ===== responsivo (celular e tablet) ===== */
@media (max-width: 1020px) {
  .dx-header-row { gap: 12px; padding: 0 8px 0 16px; min-width: 0; }
  .dx-nav { max-height: calc(100dvh - 100px); overflow-y: auto; }
  .dx-nav a { white-space: normal; }
  /* menu aberto: fundo sólido para o texto da página não atrapalhar a leitura */
  .dx-nav { background: var(--paper); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 18px 40px -16px rgba(8,13,26,.45); }
  .dx-nav a { display: flex; align-items: center; gap: 14px; padding: 11px 0; font-size: 1.4rem; }
  .dx-nav-ico { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; font-size: 21px; color: var(--ink);
    background: color-mix(in srgb, var(--ink) 8%, transparent); }
  .dx-nav a[aria-current] .dx-nav-ico { color: var(--paper); background: var(--ink); }
}
@media (max-width: 760px) {
  .dx-footer { padding: 52px 0 24px; }
  .dx-footer .dx-wrap { padding: 0 20px; }
  .dx-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px 20px; }
  /* marca centralizada no topo */
  .dx-footer-grid > :first-child { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; text-align: center;
    padding-bottom: 28px; border-bottom: 1px solid rgba(127,127,127,.18); }
  .dx-footer-grid > :first-child .dx-muted { margin: 10px 0 0; }
  .dx-footer .dx-brand span { font-size: 2rem; }
  .dx-social { justify-content: center; }
  .dx-footer-grid a:not(.dx-brand) { padding: 7px 0; }
  /* contato: linha inteira, cada contato vira um cartão fácil de tocar */
  .dx-footer-grid > :last-child { grid-column: 1 / -1; display: grid; gap: 8px; }
  .dx-footer-grid > :last-child h4 { margin-bottom: 4px; }
  .dx-footer-grid a.dx-ico-link { white-space: normal; overflow-wrap: anywhere; padding: 12px 14px; border-radius: 14px;
    border: 1px solid rgba(127,127,127,.2); background: rgba(127,127,127,.05); }
  .dx-footer-legal { margin-top: 32px; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
}

/* Menu com "Aplicativos": compacta em telas médias para não encostar na marca e nos botões. */
@media (min-width: 1021px) and (max-width: 1500px) {
  .dx-nav { gap: 14px; }
  .dx-nav .dx-nav-ico { display: none; }
}
@media (max-width: 1300px) { .dx-link-quiet { display: none; } }


/* ===== ícones embutidos (SVG) ===== */
.dx-ico { width: 1em; height: 1em; flex: none; display: block; }
.dx-nav-ico { display: inline-grid; place-items: center; }

/* ===== acessibilidade: pular para o conteúdo (aparece só com o teclado) ===== */
.dx-skip { position: fixed; left: 16px; top: -80px; z-index: 1000; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: top .15s; }
.dx-skip:focus { top: 16px; }
.dx-noscript { padding: 24px; text-align: center; }

/* ===== páginas de erro (404 e 500) ===== */
.dx-error { position: relative; isolation: isolate; overflow: hidden; min-height: 78vh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding: 140px 24px 80px; }
.dx-error-bg { position: absolute; inset: 0; z-index: -1; pointer-events: none; color: var(--ink); opacity: .07; }
.dx-error-bg svg { position: absolute; height: auto; animation: dx-error-float 9s ease-in-out infinite alternate; }
.dx-error-bg svg:nth-child(2n) { animation-duration: 12s; animation-delay: -4s; }
.dx-error-bg svg:nth-child(3n) { animation-duration: 15s; animation-delay: -7s; }
@keyframes dx-error-float { to { translate: 0 -14px; } }
@media (max-width: 640px) { .dx-error-bg svg:nth-child(n+9) { display: none; } }
@media (prefers-reduced-motion: reduce) { .dx-error-bg svg { animation: none; } }
.dx-error-code { margin: 0; font: 300 clamp(5rem, 22vw, 11rem)/.9 "Fraunces", Georgia, serif; color: var(--accent); letter-spacing: -.04em; }
.dx-error h1 { margin: 0; font: 700 clamp(1.6rem, 4vw, 2.4rem)/1.15 "Plus Jakarta Sans", sans-serif; }
.dx-error p { margin: 0; max-width: 64ch; color: var(--ink-2); text-wrap: balance; }
.dx-error-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 12px; }
.dx-error-actions .dx-link-quiet { display: inline-flex; color: var(--ink); }

/* ===== rodapé: links legais ===== */
.dx-footer-links { display: inline-flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
.dx-footer-links a { padding: 6px 0; }

/* ===== aviso de privacidade (uma vez por visitante) ===== */
.dx-notice { position: fixed; left: 16px; bottom: 16px; z-index: 900; display: flex; align-items: center; gap: 14px; max-width: min(430px, calc(100vw - 32px));
  padding: 12px 12px 12px 18px; border-radius: 18px; background: var(--pill); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--line); box-shadow: 0 14px 40px -18px rgba(0,0,0,.4); font-size: .85rem; color: var(--ink-2); }
.dx-notice[hidden] { display: none; }
.dx-notice p { margin: 0; line-height: 1.4; }
.dx-notice a { color: var(--ink); font-weight: 600; }
.dx-notice-ok { flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--ink); color: var(--bg); font: 600 .85rem inherit; font-family: inherit; cursor: pointer; }
.dx-notice-ok:hover { background: var(--accent); color: #fff; }
