/* Helse Solutions – Design System Base & Layout */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-text, 'Manrope', system-ui, -apple-system, sans-serif);
  background-color: var(--p-bg, #f4f9ff);
  color: var(--p-ink, #0a1628);
  line-height: 1.5;
  min-height: 100vh;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Espaçamento e escala padrão */
:root {
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;

  --t-small: 13px;
  --muted: var(--p-muted, #586473);

  --u-bg: #ffffff;
  --u-surface: #f8fafc;
  --u-border: rgba(10, 22, 40, 0.08);
  --u-line: rgba(10, 22, 40, 0.06);
  --u-r: 16px;
  --u-shadow: 0 20px 48px -16px rgba(10, 22, 40, 0.12), 0 1px 3px rgba(10, 22, 40, 0.05);

  --ground-bg: #eaf2fb;
  --ground-surface: #ffffff;
  --ground-accent: #2a6aa8;
}

html[data-theme="dark"] {
  --u-bg: #121d2c;
  --u-surface: #172437;
  --u-border: rgba(255, 255, 255, 0.08);
  --u-line: rgba(255, 255, 255, 0.06);
  --u-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.6);
  --ground-bg: #0d1a2d;
  --ground-surface: #17263c;
  --ground-accent: #3d7fbe;
}

/* Tipografia e Títulos */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display, var(--font-text));
  font-weight: 700;
  margin-top: 0;
  color: inherit;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  letter-spacing: -0.035em;
  margin-bottom: var(--s-4);
}

h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  letter-spacing: -0.025em;
  margin-bottom: var(--s-3);
}

h3 {
  font-size: 1.35rem;
  margin-bottom: var(--s-2);
}

p {
  margin-top: 0;
  margin-bottom: var(--s-4);
}

a {
  color: var(--p-action, #2a6aa8);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  text-decoration: underline;
}

.t-lead, .hero__lead {
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  color: var(--p-muted, #586473);
  line-height: 1.6;
  margin-bottom: var(--s-5);
}

.t-small {
  font-size: 0.85rem;
  color: var(--p-muted, #586473);
}

.t-label {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--p-muted, #586473);
  margin-bottom: var(--s-2);
}

.muted {
  color: var(--p-muted, #586473);
  font-weight: 400;
}

/* Grid & Layout System */
.wrap {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--s-5);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--s-5);
}

.grid--top {
  align-items: start;
}

.span-1  { grid-column: span 1 / span 1; }
.span-2  { grid-column: span 2 / span 2; }
.span-3  { grid-column: span 3 / span 3; }
.span-4  { grid-column: span 4 / span 4; }
.span-5  { grid-column: span 5 / span 5; }
.span-6  { grid-column: span 6 / span 6; }
.span-7  { grid-column: span 7 / span 7; }
.span-8  { grid-column: span 8 / span 8; }
.span-9  { grid-column: span 9 / span 9; }
.span-10 { grid-column: span 10 / span 10; }
.span-11 { grid-column: span 11 / span 11; }
.span-12 { grid-column: span 12 / span 12; }

.start-7 {
  grid-column-start: 7;
}

.stack-3 { display: flex; flex-direction: column; gap: var(--s-3); }
.stack-4 { display: flex; flex-direction: column; gap: var(--s-4); }
.stack-5 { display: flex; flex-direction: column; gap: var(--s-5); }

.section {
  padding: var(--s-8) 0;
}

.section-head {
  margin-bottom: var(--s-6);
}

/* Botões */
.btn-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 var(--s-4);
  border-radius: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none !important;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

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

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

.btn--xl {
  height: 52px;
  padding: 0 var(--s-6);
  font-size: 1.05rem;
}

.btn--wide {
  width: 100%;
  max-width: 320px;
}

.m-arrow {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s ease;
}

.btn:hover .m-arrow {
  transform: translateX(3px);
}

/* Navegação / Header */
.nav {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(244, 249, 255, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(10, 22, 40, 0.06);
  transition: background 0.3s ease, border-color 0.3s ease;
}

html[data-theme="dark"] .nav {
  background: rgba(10, 22, 40, 0.85);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.nav__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 10px;
  padding: 8px 16px;
  background: var(--p-accent);
  color: #fff;
  z-index: 1000;
  border-radius: 6px;
}

.skip-link:focus {
  top: 10px;
}

.nav__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--s-5);
  margin-left: var(--s-5);
}

.nav__item {
  position: relative;
}

.nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--p-ink, #0a1628);
  padding: 8px 0;
}

.nav__link:hover {
  text-decoration: none;
  color: var(--p-action);
}

.chev {
  width: 12px;
  height: 12px;
  transition: transform 0.2s;
}

.nav__item:hover .chev {
  transform: rotate(180deg);
}

/* Mega Menu Dropdown */
.nav__menu {
  position: absolute;
  top: calc(100% + 10px);
  left: -20px;
  width: 480px;
  background: var(--u-bg);
  border: 1px solid var(--u-border);
  border-radius: var(--u-r);
  box-shadow: var(--u-shadow);
  padding: var(--s-4);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav__item:hover .nav__menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav__menu .grid {
  gap: var(--s-4);
}

.menu-col {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.menu-col a {
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--p-ink);
  transition: background 0.15s;
}

.menu-col a:hover {
  background: rgba(42, 106, 168, 0.08);
  text-decoration: none;
}

.menu-col a span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--p-muted);
}

.nav__actions {
  display: flex;
  align-items: center;
  gap: var(--s-3);
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 8px;
}

/* Hero Section */
.hero {
  padding: var(--s-8) 0;
  overflow: hidden;
}

.hero__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__art {
  position: relative;
  min-height: 460px;
  border-radius: 20px;
  padding: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__art > .ly-piece--main {
  width: 100%;
  max-width: 520px;
}

.hero__art > .ly-piece--note {
  position: absolute;
  right: var(--s-4);
  bottom: var(--s-3);
  width: 280px;
  z-index: 5;
}

/* Seção HELSIM e Mockup App */
.ui.app {
  margin-top: var(--s-6);
  background: var(--u-bg);
  border: 1px solid var(--u-border);
  border-radius: var(--u-r);
  box-shadow: var(--u-shadow);
  overflow: hidden;
}

.ui-win__bar {
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 var(--s-4);
  background: var(--u-surface);
  border-bottom: 1px solid var(--u-border);
  gap: var(--s-3);
  font-size: 0.88rem;
}

.ui-dots {
  display: flex;
  gap: 6px;
}

.ui-dots i {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #e2e8f0;
}

.ui-win__crumb {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
}

.ui-brand {
  width: 18px;
  height: 18px;
  stroke: var(--p-accent);
}

.ui-spacer {
  flex: 1;
}

.ui-win__search {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--u-bg);
  border: 1px solid var(--u-border);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.8rem;
  color: var(--p-muted);
}

.ui-icon {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}

.ui-kbd {
  background: var(--u-surface);
  border: 1px solid var(--u-border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 0.75rem;
}

.ui-win__body {
  display: grid;
  grid-template-columns: 180px 1fr;
  min-height: 400px;
}

.ui-win__side {
  background: var(--u-surface);
  border-right: 1px solid var(--u-border);
  padding: var(--s-3) var(--s-2);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ui-win__nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--p-muted);
  cursor: pointer;
}

.ui-win__nav.is-on {
  background: var(--u-bg);
  color: var(--p-ink);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.ui-win__label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 700;
  color: var(--p-muted);
  padding: 12px 12px 4px;
}

.ui-win__hash {
  font-weight: 700;
  opacity: 0.6;
}

.ui-win__cols {
  display: grid;
  grid-template-columns: 120px 1fr 100px 70px;
  padding: 10px 16px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--p-muted);
  border-bottom: 1px solid var(--u-border);
}

.ui-win__rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.ui-win__row {
  display: grid;
  grid-template-columns: 36px 84px 1fr 100px 70px;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--u-line);
  font-size: 0.88rem;
}

.ui-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #cfe3f7;
  color: #1d4a73;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.ui-win__who {
  font-weight: 600;
}

.ui-win__sub {
  color: var(--p-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ui-win__st {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
  background: #e2e8f0;
  color: #475569;
}

.ui-win__st.is-you {
  background: #fef3c7;
  color: #92400e;
}

.ui-win__st.is-done {
  background: #dcfce7;
  color: #166534;
}

.ui-win__age {
  color: var(--p-muted);
  font-size: 0.82rem;
  text-align: right;
}

/* Debriefing Doc Viewer */
.app__pane--open {
  padding: var(--s-5);
  background: var(--u-bg);
}

.ui-doc {
  max-width: 680px;
  margin: 0 auto;
}

.ui-doc__page {
  background: var(--u-surface);
  border: 1px solid var(--u-border);
  border-radius: 12px;
  padding: var(--s-5);
  margin-bottom: var(--s-4);
}

.ui-doc__label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--p-accent);
  margin-bottom: var(--s-2);
}

.ui-doc__title {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: var(--s-4);
}

.ui-doc__text {
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--s-3);
  color: var(--p-ink);
}

.ui-doc__mark {
  background: #fef08a;
  color: #854d0e;
  padding: 1px 4px;
  border-radius: 3px;
}

.ui-doc__mark.is-on {
  background: #bbf7d0;
  color: #166534;
}

.ui-doc__note {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--u-surface);
  border: 1px solid var(--u-border);
  border-radius: 10px;
  padding: var(--s-3) var(--s-4);
  font-size: 0.88rem;
}

.ui-doc__kind {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: #b45309;
}

.ui-doc__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f59e0b;
}

.ui-doc__where {
  color: var(--p-muted);
  margin-left: auto;
  font-size: 0.8rem;
}

/* Seção Soluções - Cards */
#solucoes .card {
  background: var(--u-bg);
  border: 1px solid var(--u-border);
  border-radius: 16px;
  padding: var(--s-5);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 4px 16px -4px rgba(10, 22, 40, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#solucoes .card:hover {
  transform: translateY(-4px);
  box-shadow: var(--u-shadow);
}

#solucoes .card h3 {
  font-size: 1.25rem;
  margin-bottom: var(--s-2);
}

#solucoes .card p {
  font-size: 0.95rem;
  color: var(--p-muted);
  flex: 1;
}

#solucoes .panel {
  margin-top: var(--s-4);
  height: 140px;
  border-radius: 12px;
  background: radial-gradient(80% 70% at 20% 10%, #dbeafe 0%, transparent 70%), linear-gradient(155deg, #eff6ff 0%, #f0fdf4 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p-accent);
}

/* Seção Módulos */
#modulos .frame {
  background: var(--u-bg);
  border: 1px solid var(--u-border);
  border-radius: 20px;
  padding: var(--s-6);
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--u-shadow);
}

#modulos ul {
  padding-left: 20px;
  color: var(--p-ink);
  line-height: 1.8;
}

/* Diagrama Interativo dos Módulos */
.dg-hub {
  position: relative;
  width: 340px;
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dg-center {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--p-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  box-shadow: 0 10px 25px -5px rgba(42, 106, 168, 0.5);
  z-index: 2;
}

.dg-spoke {
  position: absolute;
  width: 90px;
  height: 38px;
  border-radius: 99px;
  background: var(--u-surface);
  border: 1px solid var(--u-border);
  color: var(--p-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Posicionamento dos 6 spokes ao redor do centro */
.dg-spoke:nth-child(2) { top: 10px; left: 125px; } /* Agenda */
.dg-spoke:nth-child(3) { top: 75px; right: 10px; } /* Sessões */
.dg-spoke:nth-child(4) { bottom: 75px; right: 10px; } /* Cenários */
.dg-spoke:nth-child(5) { bottom: 10px; left: 125px; } /* Cursos */
.dg-spoke:nth-child(6) { bottom: 75px; left: 10px; } /* Avaliações */
.dg-spoke:nth-child(7) { top: 75px; left: 10px; } /* Almoxarifado */

/* Seção Sustentável */
.statement {
  background: linear-gradient(135deg, var(--p-accent) 0%, #173b61 100%);
  color: #ffffff;
  text-align: center;
  padding: var(--s-9) 0;
  border-radius: 24px;
  margin: var(--s-8) var(--s-5);
}

.statement h2 {
  color: #ffffff;
  font-size: clamp(2rem, 4vw, 3rem);
}

.statement p {
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
  margin: 0 auto;
}

/* Formulário de Contato */
.form {
  background: var(--u-bg);
  border: 1px solid var(--u-border);
  border-radius: 20px;
  padding: var(--s-6);
  box-shadow: var(--u-shadow);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field--wide {
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--p-ink);
}

.field input, .field select, .field textarea {
  width: 100%;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--u-border);
  background: var(--u-surface);
  color: var(--p-ink);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--p-accent);
  box-shadow: 0 0 0 3px rgba(42, 106, 168, 0.2);
}

.form .btn-row {
  grid-column: 1 / -1;
  margin-top: var(--s-2);
}

.form .t-small {
  grid-column: 1 / -1;
}

/* Rodapé */
.footer {
  background: var(--p-inv-bg, #0a1628);
  color: var(--p-inv-ink, #f4f9ff);
  padding: var(--s-9) 0 var(--s-6);
  margin-top: var(--s-9);
}

.closing__cta {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--s-8);
}

.closing__cta h2 {
  color: #fff;
}

.closing__cta p {
  color: var(--p-inv-muted, #919aa7);
  margin-bottom: var(--s-5);
}

.closing__links {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: var(--s-7);
}

.footer__col h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: var(--s-3);
}

.footer__col ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__col a {
  color: var(--p-inv-muted, #919aa7);
  font-size: 0.9rem;
}

.footer__col a:hover {
  color: #fff;
}

.footer__legal {
  margin-top: var(--s-7);
  padding-top: var(--s-4);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.85rem;
  color: var(--p-inv-muted, #919aa7);
  display: flex;
  justify-content: space-between;
}

/* Responsividade */
@media (max-width: 1023px) {
  .nav__links {
    display: none;
  }
  .nav__toggle {
    display: block;
  }
  .start-7 {
    grid-column-start: auto;
  }
  .span-6, .span-5, .span-4, .span-3 {
    grid-column: span 12;
  }
  .hero__art {
    margin-top: var(--s-6);
  }
  .form {
    grid-template-columns: 1fr;
  }
}
