:root {
  --bg: #0b1220;
  --surface: #111b2e;
  --surface-2: #17243a;
  --text: #eef3fb;
  --muted: #aab8cc;
  --line: #2b3b54;
  --accent: #8aa4ff;
  --accent-strong: #b7c5ff;
  --success: #71d3a2;
  --warning: #f0c56a;
  --max: 1180px;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; }
a { color: var(--accent-strong); }
a:hover { color: #fff; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #dce4ff; outline-offset: 3px; }
.container { width: min(calc(100% - 2rem), var(--max)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -4rem; z-index: 1000; padding: .75rem 1rem; background: white; color: #111; border-radius: 10px; }
.skip-link:focus { top: 1rem; }

.site-header { position: sticky; top: 0; z-index: 100; background: rgba(11,18,32,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { min-height: 56px; display: flex; align-items: center; gap: .75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: white; text-decoration: none; font-weight: 800; letter-spacing: .02em; font-size: .92rem; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--accent); color: #0b1220; font-size: .68rem; }
.main-nav { margin-left: auto; display: flex; align-items: center; gap: .25rem; }
.main-nav a { color: var(--muted); text-decoration: none; padding: .5rem .7rem; border-radius: 10px; font-size: .9rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: white; background: var(--surface-2); }
.menu-toggle { display: none; margin-left: auto; padding: .55rem .7rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: white; font-size: 1.2rem; }

.hero { padding: clamp(1.4rem, 3vw, 2.3rem) 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr); gap: clamp(1.4rem, 3vw, 3rem); align-items: center; }
.eyebrow { color: var(--accent-strong); text-transform: uppercase; letter-spacing: .13em; font-weight: 800; font-size: .78rem; }
h1 { margin: .1rem 0 .4rem; font-size: clamp(1.9rem, 4.8vw, 3.2rem); line-height: 1.02; letter-spacing: -.04em; }
.lead { max-width: 760px; margin: .2rem 0; font-size: clamp(.92rem, 1.25vw, 1rem); color: var(--muted); }
.hero-card { display: grid; gap: .32rem; padding: .8rem; border: 1px solid var(--line); border-radius: 15px; background: linear-gradient(145deg, var(--surface-2), var(--surface)); box-shadow: 0 12px 28px rgba(0,0,0,.18); }
.hero-card span { color: var(--muted); }
.price { color: #fff; font-size: 1rem; }
.button-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.button { display: inline-flex; justify-content: center; align-items: center; min-height: 38px; padding: .5rem .8rem; border-radius: 10px; background: var(--accent); color: #0b1220; font-weight: 800; text-decoration: none; border: 1px solid transparent; font-size: .95rem; }
.button:hover { color: #0b1220; background: #a7b8ff; }
.button-secondary { background: transparent; color: white; border-color: var(--line); }
.button-secondary:hover { color: white; background: var(--surface-2); }

.site-footer { border-top: 1px solid var(--line); padding: 1.15rem 0; background: #09101c; }
.footer-grid { display: flex; justify-content: space-between; gap: 1.4rem; align-items: flex-start; }
.site-footer p { margin: .25rem 0; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.site-footer nav a { text-decoration: none; }

@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .main-nav { display: none; position: absolute; left: 1rem; right: 1rem; top: calc(100% + .5rem); padding: .6rem; flex-direction: column; align-items: stretch; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
  .main-nav.is-open { display: flex; }
  .main-nav a { padding: .8rem; }
  .hero-grid { grid-template-columns: 1fr; }
  .footer-grid { flex-direction: column; }
}

@media (max-width: 520px) {
  .container { width: min(calc(100% - 1.2rem), var(--max)); }
  .hero { padding-block: 2.25rem; }
  .button-row { flex-direction: column; }
  .button { width: 100%; }
}

.section { padding: clamp(1.2rem, 2.4vw, 2rem) 0; }
.section-alt { background: #0e1727; border-block: 1px solid var(--line); }
.page-hero { padding: clamp(1.2rem, 2.6vw, 2rem) 0 .7rem; }
.page-hero h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
.narrow { max-width: 860px; }
.section-heading { margin-bottom: .65rem; }
.section-heading h2 { margin: .1rem 0 .25rem; font-size: clamp(1.35rem, 2.5vw, 2rem); line-height: 1.08; }
.section-intro { max-width: 760px; margin: .2rem 0; color: var(--muted); font-size: .92rem; }
.card-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6rem; }
.product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { min-width: 0; padding: .75rem; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.card h2, .card h3 { margin: .4rem 0 .2rem; overflow-wrap: anywhere; font-size: 1.1rem; }
.card p { margin: .25rem 0 .45rem; color: var(--muted); font-size: .92rem; }
.card-featured { border-color: #647ccb; background: linear-gradient(150deg, #162541, #111b2e); }
.badge { display: inline-flex; width: fit-content; padding: .3rem .6rem; border-radius: 999px; font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.badge-success { color: #bff6d7; background: rgba(27, 121, 75, .35); border: 1px solid rgba(113,211,162,.4); }
.badge-warning { color: #ffe4a8; background: rgba(146, 100, 15, .28); border: 1px solid rgba(240,197,106,.35); }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .55rem; }
.feature { padding: .55rem 0; border-top: 1px solid var(--line); }
.feature p, .prose p { color: var(--muted); }
.prose h2 { margin: .95rem 0 .35rem; font-size: 1.22rem; }

@media (max-width: 900px) {
  .card-grid, .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .card-grid, .product-grid, .feature-grid { grid-template-columns: 1fr; }
}

.product-hero { padding: clamp(1.25rem, 2.8vw, 2rem) 0; }
.product-hero-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(270px, .5fr); gap: clamp(1.5rem, 3vw, 3rem); align-items: center; }
.product-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
.small-note { max-width: 720px; color: var(--muted); font-size: .84rem; }
.button-disabled, .button:disabled { cursor: not-allowed; opacity: .6; background: #64748b; color: #eef3fb; }
.module-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.module { padding: .65rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.module h3 { margin-top: 0; }
.module p { margin-bottom: 0; color: var(--muted); }
.reference-grid { display: grid; grid-template-columns: minmax(220px, .6fr) minmax(0, 1.4fr); gap: clamp(1.3rem, 3vw, 2.6rem); align-items: center; }
.reference-image { margin: 0; }
.reference-image img { display: block; width: min(100%, 250px); margin-inline: auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 12px 28px rgba(0,0,0,.25); }
.reference-image figcaption { margin-top: .8rem; color: var(--muted); font-size: .86rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: .8rem 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .55rem; }
.steps li { counter-increment: step; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); font-size: .92rem; }
.steps li::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; margin-bottom: .5rem; border-radius: 50%; background: var(--accent); color: #0b1220; font-weight: 900; font-size: .82rem; }
.steps li span { display: block; margin-top: .5rem; color: var(--muted); }
.notice { padding: .7rem .85rem; border-left: 4px solid var(--accent); background: var(--surface); border-radius: 0 12px 12px 0; }
.notice p { margin-bottom: 0; color: var(--muted); }

@media (max-width: 960px) {
  .product-hero-grid, .reference-grid { grid-template-columns: 1fr; }
  .module-grid, .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .module-grid, .steps { grid-template-columns: 1fr; }
}

.gallery-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .45rem; }
.gallery-card { min-width: 0; margin: 0; padding: .3rem; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.gallery-button { display: block; width: 100%; padding: 0; border: 0; border-radius: 11px; overflow: hidden; background: #060b13; cursor: zoom-in; }
.gallery-button img { display: block; width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .2s ease; }
.gallery-button:hover img { transform: scale(1.018); }
.gallery-card figcaption { padding: .28rem .08rem .02rem; color: var(--muted); font-size: .72rem; line-height: 1.35; }
.gallery-modal[hidden] { display: none; }
.gallery-modal { position: fixed; inset: 0; z-index: 999; display: grid; place-items: center; padding: 1rem; }
.gallery-backdrop { position: absolute; inset: 0; background: rgba(1,5,12,.86); backdrop-filter: blur(5px); }
.gallery-dialog { position: relative; z-index: 1; width: min(960px, 100%); max-height: calc(100vh - 2rem); overflow: hidden; padding: .65rem; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 24px 70px rgba(0,0,0,.5); }
.gallery-dialog img { display: block; width: 100%; max-height: calc(100vh - 8.5rem); object-fit: contain; border-radius: 10px; background: #070b12; }
.gallery-dialog p { margin: .4rem 4rem .05rem .1rem; color: var(--muted); font-size: .88rem; }
.gallery-close { position: absolute; right: .8rem; top: .8rem; z-index: 4; width: 38px; height: 38px; margin: 0; border: 1px solid var(--line); border-radius: 50%; background: #0b1220; color: white; font-size: 1.35rem; cursor: pointer; }

.gallery-nav { position: absolute; top: 50%; z-index: 3; width: 40px; height: 40px; transform: translateY(-50%); border: 1px solid var(--line); border-radius: 50%; background: rgba(11,18,32,.9); color: white; font-size: 1.35rem; line-height: 1; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.25); }
.gallery-nav:hover { background: #17243a; }
.gallery-prev { left: 1.1rem; }
.gallery-next { right: 1.1rem; }
.gallery-counter { position: absolute; right: .85rem; bottom: .65rem; margin: 0; padding: .2rem .45rem; border-radius: 999px; background: rgba(11,18,32,.85); color: var(--text); font-size: .74rem; font-weight: 800; }
body.modal-open { overflow: hidden; }

@media (max-width: 980px) { .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 760px) { .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-modal { padding: .4rem; }
  .gallery-dialog { max-height: calc(100vh - .8rem); padding: .5rem; }
  .gallery-dialog img { max-height: calc(100vh - 6.4rem); }
  .gallery-nav { width: 36px; height: 36px; }
  .gallery-prev { left: .5rem; }
  .gallery-next { right: .5rem; }
}

.contact-panel { display: flex; justify-content: space-between; align-items: center; gap: .9rem; padding: .8rem; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); }
.contact-panel h2 { margin-top: 0; }
.contact-panel p { color: var(--muted); }
.faq-list { display: grid; gap: .45rem; }
.faq-list details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: .65rem .8rem; }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list p { color: var(--muted); }
@media (max-width: 620px) { .contact-panel { flex-direction: column; align-items: stretch; } }

/* Robustez de conteúdo em telas estreitas */
p, li, h1, h2, h3, a, span { overflow-wrap: anywhere; }
.prose table { display: block; max-width: 100%; overflow-x: auto; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
