/* ================================
   Base / Reset
================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  /* Paleta (profissional, neutra + azul) */
  --bg: #0b1220;
  --surface: #0f1b33;
  --surface-2: #122144;
  --text: #eaf0ff;
  --muted: #b9c6e6;
  --muted-2: #91a3cc;

  --primary: #4f7cff;
  --primary-2: #2f5bff;
  --border: rgba(255, 255, 255, 0.10);

  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;

  --radius: 16px;
  --radius-lg: 22px;

  --shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
  --shadow-soft: 0 10px 22px rgba(0, 0, 0, 0.25);

  --container: 1100px;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% -10%, rgba(79, 124, 255, 0.35), transparent 55%),
              radial-gradient(800px 500px at 90% 10%, rgba(34, 197, 94, 0.18), transparent 60%),
              var(--bg);
  color: var(--text);
  line-height: 1.55;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(var(--container), calc(100% - 40px));
  margin-inline: auto;
}

/* ================================
   Acessibilidade
================================ */
.skip-link {
  position: absolute;
  left: 12px;
  top: 12px;
  transform: translateY(-150%);
  background: #ffffff;
  color: #111827;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 600;
  z-index: 1000;
  box-shadow: 0 10px 20px rgba(0,0,0,.25);
}
.skip-link:focus {
  transform: translateY(0);
  outline: 3px solid rgba(79,124,255,.55);
  outline-offset: 2px;
}

/* Foco para teclado */
:focus-visible {
  outline: 3px solid rgba(79,124,255,.55);
  outline-offset: 2px;
  border-radius: 10px;
}

/* ================================
   Header
================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(11, 18, 32, 0.7);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  position: relative;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  transition: transform .2s ease;
}

.logo:hover {
  transform: scale(1.02);
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(79,124,255,.9), rgba(47,91,255,.55));
  box-shadow: 0 14px 30px rgba(79,124,255,.20);
  font-weight: 800;
}

.logo-text strong {
  display: block;
  font-size: 14px;
  letter-spacing: 0.2px;
}
.logo-text small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav-link {
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}

.nav-link:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
  color: var(--text);
  transform: translateY(-1px);
}

.nav-link.is-active {
  color: var(--text);
  background: rgba(79,124,255,0.16);
  border-color: rgba(79,124,255,0.35);
}

/* Menu Mobile */
.menu-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  width: 42px;
  height: 42px;
  border-radius: 12px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
  transition: all .2s ease;
  padding: 0;
}

.menu-toggle:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(79,124,255,0.35);
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: all .2s ease;
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -6px);
}

/* ================================
   Layout Sections
================================ */
.section {
  padding: 26px 0;
}

.section-header {
  margin-bottom: 14px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(18px, 3vw, 26px);
  letter-spacing: 0.2px;
}

.section-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

/* ================================
   Hero
================================ */
.hero {
  padding: 34px 0 18px;
}

.hero-content {
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15,27,51,.78), rgba(15,27,51,.55));
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.hero-content::before {
  content: "";
  position: absolute;
  inset: -120px -80px auto auto;
  width: 340px;
  height: 340px;
  background: radial-gradient(circle at 30% 30%, rgba(79,124,255,.45), transparent 65%);
  filter: blur(10px);
  transform: rotate(18deg);
}

.hero h1 {
  margin: 0;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.15;
  letter-spacing: 0.2px;
}

.hero-subtitle {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.trust-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
  border-radius: 999px;
  color: var(--muted);
}

/* ================================
   Cards / Grid
================================ */
.grid {
  display: grid;
  gap: 14px;
}

.tools-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  border: 1px solid var(--border);
  background: rgba(15,27,51,0.62);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-soft);
}

.tool-card {
  border: 1px solid rgba(255,255,255,0.10);
  background: linear-gradient(180deg, rgba(18,33,68,0.75), rgba(15,27,51,0.55));
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 200px;
  transition: transform .14s ease, border-color .14s ease, background .14s ease;
}

.tool-card:hover {
  transform: translateY(-2px);
  border-color: rgba(79,124,255,0.35);
}

.tool-title {
  margin: 10px 0 6px;
  font-size: 18px;
}

.tool-desc {
  margin: 0;
  color: var(--muted);
}

.tool-card-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-start;
}

.tool-card-soon {
  opacity: 0.85;
}
.tool-card-soon:hover {
  transform: none;
  border-color: rgba(255,255,255,0.10);
}

/* Tag */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(79,124,255,.30);
  background: rgba(79,124,255,.14);
  width: fit-content;
}
.tag-muted {
  border-color: rgba(255,255,255,.16);
  background: rgba(255,255,255,.06);
  color: var(--muted);
}

/* ================================
   Buttons
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, opacity .12s ease;
  user-select: none;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  color: #0b1220;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  box-shadow: 0 14px 34px rgba(79,124,255,0.25);
  position: relative;
  overflow: hidden;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  transform: translate(-50%, -50%);
  transition: width .4s ease, height .4s ease;
}

.btn-primary:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary.loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn-primary.loading::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid rgba(11, 18, 32, 0.3);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.btn-secondary {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.10);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  color: var(--text);
}

.btn-disabled,
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}

/* ================================
   Steps / Note
================================ */
.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--text);
}

.steps li {
  margin: 8px 0;
}

.note {
  margin: 12px 0 0;
  color: var(--muted);
}

/* ================================
   FAQ
================================ */
.faq-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.faq {
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(15,27,51,0.62);
  border-radius: var(--radius-lg);
  padding: 14px 14px;
  box-shadow: var(--shadow-soft);
}

.faq summary {
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "＋";
  float: right;
  color: var(--muted-2);
}

.faq[open] summary::after {
  content: "－";
}

.faq p {
  margin: 10px 0 0;
  color: var(--muted);
}

/* ================================
   Footer
================================ */
.site-footer {
  margin-top: 26px;
  padding: 22px 0;
  border-top: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.6);
}

.footer-inner {
  display: grid;
  gap: 10px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--muted);
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid transparent;
}

.footer-links a:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}

.footer-copy {
  margin: 0;
  color: var(--muted);
}

.footer-disclaimer {
  margin: 0;
  color: var(--muted-2);
  font-size: 13px;
}

/* ================================
   Responsivo
================================ */
@media (max-width: 980px) {
  .tools-grid,
  .faq-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .menu-toggle {
    display: flex;
  }

  .nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    animation: slideDown .2s ease;
  }

  .nav[aria-expanded="true"] {
    display: flex;
  }

  .nav-link {
    width: 100%;
    text-align: left;
    padding: 12px;
  }

  .hero-content {
    padding: 18px;
  }

  .tools-grid,
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================================
   Forms / Inputs / Results (Calculadoras)
================================ */
.form-grid{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.form-grid .field {
  display: flex;
  flex-direction: column;
}

.form-grid .field > *:first-child {
  margin-top: 0;
}

/* Garante que os inputs fiquem alinhados na mesma linha */
.form-grid .field .input,
.form-grid .field .select-btn {
  flex-shrink: 0;
  height: 42px;
  margin-top: 0;
}

/* Alinha os labels na mesma altura */
.form-grid .field label {
  height: auto;
  min-height: 1.5em;
  display: flex;
  align-items: flex-end;
}

.form-grid .field-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 0;
}


.field label {
  display: block;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--muted);
}

.input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease;
  font-family: inherit;
  font-size: 14px;
}

.input::placeholder {
  color: rgba(185, 198, 230, 0.65);
}

.input:focus {
  border-color: rgba(79,124,255,0.45);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.18);
}

textarea.input {
  min-height: 120px;
  padding: 12px;
  resize: vertical;
  line-height: 1.5;
}

.field-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 0;
}

.result {
  margin-top: 14px;
  padding: 14px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.05);
  color: var(--text);
}

.actions-row {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chart-box {
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.chart {
  width: 100%;
  height: 260px;
  display: block;
}

/* Tabela */
.table-wrap {
  overflow: auto;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
}

.table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
}

.table th,
.table td {
  text-align: left;
  padding: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.table thead th {
  color: var(--muted);
  font-weight: 800;
  background: rgba(255,255,255,0.03);
}

.formula {
  font-size: 18px;
}

@media (max-width: 980px) {
  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field-actions {
    grid-column: span 2;
  }
}

@media (max-width: 680px) {
  .form-grid {
    grid-template-columns: 1fr;
  }
  .field-actions {
    grid-column: auto;
  }
}

/* ================================
   Select custom (tema escuro)
================================ */
.select {
  position: relative;
}

.select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  font-size: 14px;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.select-btn:hover {
  border-color: rgba(79,124,255,0.35);
}

.select-btn:focus {
  border-color: rgba(79,124,255,0.45);
  box-shadow: 0 0 0 3px rgba(79,124,255,0.18);
  outline: none;
}

.select-btn::after{
  content: "▾";
  opacity: .9;
  margin-left: 10px;
  flex-shrink: 0;
}

.select-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;

  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,27,51,0.98);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.select-item {
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.select-item:hover {
  background: rgba(79,124,255,0.16);
}

.select-item.is-active {
  background: rgba(79,124,255,0.22);
}

.select-item:focus-visible {
  outline: 3px solid rgba(79,124,255,.55);
  outline-offset: -3px;
}

.select-help {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* ================================
   Select custom (robusto / tema escuro)
================================ */

/* garante que o dropdown posicione certo dentro do field */
.field.select{
  position: relative;
}

/* botão reaproveitando .input */
.input.select-btn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
  width: 100%;
  height: 42px;
}

/* setinha */
.select-caret{
  opacity: .85;
  margin-left: 10px;
}

/* a lista (dropdown) */
.select-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 9999;

  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,27,51,0.98);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* itens */
.select-item{
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.select-item:hover{
  background: rgba(79,124,255,0.16);
}

.select-item.is-active{
  background: rgba(79,124,255,0.22);
}

/* evita “tremedeira” do layout quando abrir */
.select-list[hidden]{
  display: none;
}

/* ================================
   Select custom (único / otimizado)
   - Reaproveita visual do .input
   - Dropdown com tema escuro consistente
   - Usa [hidden] para abrir/fechar sem conflito
================================ */

.field.select{
  position: relative;
}

/* botão: usa o mesmo estilo do .input */
.input.select-btn{
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  font-weight: 700;
}

/* caret opcional (se você usar <span class="select-caret">▾</span>) */
.select-caret{
  opacity: .85;
  margin-left: 10px;
}

/* dropdown */
.select-list{
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 2000;

  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(15,27,51,0.98);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

/* itens */
.select-item{
  width: 100%;
  text-align: left;
  padding: 12px 12px;
  background: transparent;
  border: 0;
  color: var(--text);
  cursor: pointer;
  font-weight: 700;
}

.select-item:hover{
  background: rgba(79,124,255,0.16);
}

.select-item.is-active{
  background: rgba(79,124,255,0.22);
}

/* acessibilidade */
.select-item:focus-visible{
  outline: 3px solid rgba(79,124,255,.55);
  outline-offset: -3px;
}

/* estado fechado */
.select-list[hidden]{
  display: none;
}

/* ajuda (se usar) */
.select-help{
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

/* Toast Notifications */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: rgba(15,27,51,0.95);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 14px 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  color: var(--text);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 280px;
  max-width: 400px;
  animation: toastSlideIn .3s ease;
  backdrop-filter: blur(10px);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(15,27,51,0.98);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(15,27,51,0.98);
}

.toast.hiding {
  animation: toastSlideOut .3s ease forwards;
}

@keyframes toastSlideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastSlideOut {
  to {
    transform: translateX(400px);
    opacity: 0;
  }
}

/* Smooth scroll */
html {
  scroll-behavior: smooth;
}

/* Fade in animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  animation: fadeIn .4s ease;
}

.card {
  animation: fadeIn .5s ease;
}

