/* DuesNexa website — midnight navy, teal accents. */
:root {
  --navy-950: #050d1f;
  --navy-900: #0a1630;
  --navy-800: #102244;
  --navy-700: #1a3160;
  --ink: #0b1f45;
  --text: #1c2b48;
  --muted: #55657f;
  --line: #e1e7f0;
  --surface: #ffffff;
  --surface-2: #f4f7fb;
  --teal: #14b8a6;
  --teal-600: #0d9488;
  --teal-300: #5eead4;
  --blue: #3da9ff;
  --warn-bg: #fff7e6;
  --warn-line: #f2c46b;
  --warn-ink: #7a4b00;
  --ok: #0f9d6b;
  --err: #c43c3c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(10, 22, 48, .08);
  --display: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  --body: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
  --wrap: 1160px;
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--text); background: var(--surface); line-height: 1.6; font-size: 16px; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-600); }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--teal); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--teal-300); outline-offset: 2px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(10, 22, 48, .92); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid rgba(255, 255, 255, .06); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; font-family: var(--display); font-weight: 700; font-size: 1.15rem; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.brand .accent { color: var(--blue); }
.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { color: #c9d4e8; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; transition: color .2s, background .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: #fff; background: rgba(255, 255, 255, .07); }
.nav .btn { margin-left: 8px; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 1px solid rgba(255, 255, 255, .2); color: #fff; border-radius: 8px; padding: 8px 10px; font: inherit; cursor: pointer; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-weight: 600; font-family: var(--body); font-size: .98rem; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), box-shadow .2s, background .2s, color .2s; line-height: 1.2; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--teal); color: #04221f; }
.btn-primary:hover { background: var(--teal-300); color: #04221f; box-shadow: 0 8px 22px rgba(20, 184, 166, .35); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .28); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.btn-outline { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-outline:hover { border-color: var(--teal); color: var(--ink); }
.btn-wa { background: #1fa855; color: #fff; }
.btn-wa:hover { background: #24c063; color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* Hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(1200px 500px at 85% -10%, rgba(61, 169, 255, .22), transparent 60%), radial-gradient(900px 500px at 0% 110%, rgba(20, 184, 166, .18), transparent 60%), var(--navy-900); color: #dbe5f5; padding: 88px 0 96px; }
.hero h1 { color: #fff; }
.hero h1 .hl { color: var(--teal-300); }
.hero p.lead { font-size: 1.15rem; max-width: 640px; color: #b8c6de; }
.hero .cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.eyebrow { display: inline-block; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--teal-300); font-weight: 600; margin-bottom: 14px; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .9fr; gap: 48px; align-items: center; }
.hero-card { background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 18px; padding: 22px; box-shadow: 0 30px 60px rgba(0, 0, 0, .25); }
.hero-card .bubble { margin: 10px 0; }
.hero-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 26px; padding: 0; list-style: none; font-size: .92rem; color: #a9b9d3; }
.hero-points li::before { content: "✓"; color: var(--teal-300); margin-right: 8px; font-weight: 700; }
.page-hero { padding: 64px 0 56px; }
.page-hero h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); }

/* Sections */
section { padding: 80px 0; }
.section-alt { background: var(--surface-2); }
.section-dark { background: var(--navy-900); color: #c9d4e8; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head p { color: var(--muted); font-size: 1.05rem; }
.section-dark .section-head p { color: #a9b9d3; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #cfe9e5; }
.card p { color: var(--muted); margin-bottom: .6em; }
.card ul { margin: .4em 0 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.section-dark .card { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); }
.section-dark .card p, .section-dark .card ul { color: #a9b9d3; }
.icon { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: rgba(20, 184, 166, .12); color: var(--teal-600); font-weight: 700; margin-bottom: 14px; font-family: var(--display); }
.steps { counter-reset: s; }
.step { position: relative; padding-left: 64px; }
.step::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--navy-900); color: var(--teal-300); font-family: var(--display); font-weight: 700; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: rgba(20, 184, 166, .12); color: var(--teal-600); }
.pill-warn { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); }
.cta-band { background: linear-gradient(120deg, var(--navy-900), var(--navy-700)); color: #dbe5f5; border-radius: 20px; padding: 40px; display: flex; gap: 24px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.cta-band h2 { color: #fff; margin: 0; }

/* Notices */
.notice { border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); padding: 14px 16px; border-radius: 12px; font-size: .95rem; }
.notice-info { border-color: #bfe6e1; background: #effaf8; color: #0b4b45; }
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; }
.flash-ok { background: #e8f8f1; color: #0b5e40; border: 1px solid #b6e8d2; }
.flash-error { background: #fdecec; color: #8a2020; border: 1px solid #f3c2c2; }

/* Forms */
form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
label { display: block; font-weight: 600; font-size: .92rem; color: var(--ink); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], select, textarea { width: 100%; padding: 12px 14px; border: 1px solid #cdd6e3; border-radius: 10px; font: inherit; color: var(--text); background: #fff; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(20, 184, 166, .18); }
textarea { min-height: 120px; resize: vertical; }
.field { margin-bottom: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .92rem; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; flex: none; accent-color: var(--teal); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.contact-list { list-style: none; padding: 0; margin: 0; }
.contact-list li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.contact-list strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

/* Prose (policy pages) */
.prose { max-width: 780px; }
.prose h2 { font-size: 1.35rem; margin-top: 1.8em; }
.prose li { margin-bottom: .4em; }
.placeholder { background: #fff3cd; padding: 0 4px; border-radius: 4px; }

/* Footer */
.site-footer { background: var(--navy-950); color: #93a3bf; padding: 56px 0 28px; font-size: .94rem; }
.site-footer a { color: #c9d4e8; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.site-footer h4 { color: #fff; font-size: .95rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 36px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; }

/* Chat */
.chat-launcher { position: fixed; right: 18px; bottom: 18px; z-index: 60; border-radius: 999px; padding: 14px 20px; box-shadow: 0 12px 30px rgba(10, 22, 48, .3); }
.chat-panel { position: fixed; right: 18px; bottom: 84px; z-index: 61; width: 380px; max-width: calc(100vw - 24px); height: min(620px, calc(100vh - 110px)); background: #fff; border-radius: 18px; box-shadow: 0 24px 60px rgba(10, 22, 48, .3); display: none; flex-direction: column; overflow: hidden; border: 1px solid var(--line); }
.chat-panel.open { display: flex; animation: pop .25s var(--ease); }
.chat-inline { position: static; width: 100%; max-width: 100%; height: 640px; display: flex; box-shadow: var(--shadow); }
.chat-head { background: var(--navy-900); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-head img { width: 32px; height: 32px; border-radius: 8px; }
.chat-head .t { font-family: var(--display); font-weight: 600; font-size: .98rem; }
.chat-head .s { font-size: .76rem; color: #a9b9d3; }
.chat-head .tools { margin-left: auto; display: flex; gap: 6px; }
.chat-head button { white-space: nowrap; background: rgba(255, 255, 255, .1); border: 0; color: #fff; border-radius: 8px; padding: 6px 9px; font: inherit; font-size: .8rem; cursor: pointer; }
.chat-head button:hover { background: rgba(255, 255, 255, .2); }
.chat-status { font-size: .75rem; padding: 6px 14px; background: var(--surface-2); color: var(--muted); border-bottom: 1px solid var(--line); display: flex; gap: 8px; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; background: #9aa7bd; vertical-align: middle; }
.dot.on { background: var(--ok); }
.dot.err { background: var(--err); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; background: #f7f9fc; }
.bubble { max-width: 85%; padding: 10px 13px; border-radius: 14px; margin: 8px 0; font-size: .94rem; white-space: pre-wrap; word-wrap: break-word; animation: fadeUp .25s var(--ease); }
.bubble.bot { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--text); }
.bubble.agent { background: #e9f6ff; border: 1px solid #cbe6fb; border-bottom-left-radius: 4px; }
.bubble.you { background: var(--teal); color: #04221f; margin-left: auto; border-bottom-right-radius: 4px; }
.bubble .meta { display: block; font-size: .7rem; color: var(--muted); margin-top: 4px; }
.bubble.you .meta { color: #0b4b45; }
.sim-tag { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: #fff3cd; color: #7a4b00; border-radius: 4px; padding: 1px 5px; margin-right: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 12px 0; background: #fff; }
.chip { border: 1px solid #cfe9e5; background: #f0fbf9; color: var(--teal-600); border-radius: 999px; padding: 5px 11px; font-size: .8rem; cursor: pointer; font-family: inherit; }
.chip:hover { background: #dff6f2; }
.chat-form { display: flex; gap: 8px; padding: 10px 12px 12px; background: #fff; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; }
.chat-foot { font-size: .7rem; color: var(--muted); padding: 0 12px 10px; background: #fff; }
.lead-form { padding: 12px; background: #fff; border-top: 1px solid var(--line); display: none; }
.lead-form.open { display: block; }
.lead-form input { padding: 9px 11px; margin-bottom: 8px; }
.typing { font-size: .8rem; color: var(--muted); padding: 0 14px 6px; min-height: 1.2em; }

.try-btn span:last-child { font-size: .88rem; }

/* Dialog */
dialog { border: 0; border-radius: 16px; padding: 24px; max-width: 440px; width: calc(100% - 32px); box-shadow: 0 30px 60px rgba(0, 0, 0, .3); }
dialog::backdrop { background: rgba(5, 13, 31, .55); }

/* Motion */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Responsive */
@media (max-width: 960px) {
  .hero-grid, .g3, .g4, .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .menu-toggle { display: inline-block; }
  .nav { display: none; position: absolute; top: 68px; left: 0; right: 0; background: var(--navy-900); flex-direction: column; align-items: stretch; padding: 12px 16px 20px; gap: 2px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
  .nav.open { display: flex; }
  .nav .btn { margin: 8px 0 0; }
}
@media (max-width: 640px) {
  section { padding: 56px 0; }
  .hero { padding: 56px 0 64px; }
  .g2, .g3, .g4, .footer-grid, form .row { grid-template-columns: 1fr; }
  .cta-band { padding: 28px 20px; }
  .chat-panel { right: 12px; left: 12px; width: auto; max-width: none; bottom: 80px; height: calc(100vh - 100px); }
  .chat-inline { height: 560px; }
  .chat-head .s { display: none; }
  .chat-head .t { font-size: .9rem; }
  .try-btn { flex-wrap: wrap; text-align: left; justify-content: flex-start !important; }
  .chat-launcher { right: 12px; bottom: 12px; }
  .hero .cta .btn { flex: 1 1 100%; }
}
