/* IotMax — site institucional. Reaproveita paleta do portal. */
:root {
  --color-primary: #007AFF;
  --color-primary-dark: #0051D5;
  --color-success: #34C759;
  --color-warning: #FF9500;
  --color-danger: #FF3B30;
  --color-info: #5856D6;
  --color-text: #1C1C1E;
  --color-text-secondary: #6E6E73;
  --color-text-tertiary: #AEAEB2;
  --color-bg: #F5F5F7;
  --color-surface: #FFFFFF;
  --color-border: #E5E5EA;
  --color-border-subtle: #ECECF0;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 28px rgba(0,0,0,0.10);
  --radius-card: 14px;
  --max-width: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px; line-height: 1.5;
  color: var(--color-text); background: var(--color-bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }
@media (max-width: 640px) { .container { padding: 0 16px; } }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--color-border);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 60px; }
.site-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; color: var(--color-text); text-decoration: none; }
.site-brand .logo {
  width: 32px; height: 32px; border-radius: 8px;
  background: linear-gradient(135deg, var(--color-primary), #5AC8FA);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.site-nav { display: flex; gap: 4px; flex: 1; }
.site-nav a { padding: 8px 14px; color: var(--color-text-secondary); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 8px; transition: background 0.15s; }
.site-nav a:hover { background: var(--color-bg); color: var(--color-text); }
.site-nav a.active { color: var(--color-primary); }
.site-cta { display: flex; align-items: center; gap: 8px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: all 0.15s; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-dark); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary { background: var(--color-surface); border-color: var(--color-border); color: var(--color-text); }
.btn-secondary:hover { background: var(--color-bg); }
.btn-ghost { background: transparent; color: var(--color-primary); }
.btn-ghost:hover { background: rgba(0,122,255,0.08); }
.btn-lg { padding: 14px 28px; font-size: 16px; }

/* Mobile menu toggle */
.mobile-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.mobile-toggle svg { width: 24px; height: 24px; }
@media (max-width: 900px) {
  .site-nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--color-surface); flex-direction: column; padding: 12px; box-shadow: var(--shadow-md); border-bottom: 1px solid var(--color-border); }
  .site-nav.is-open { display: flex; }
  .site-nav a { padding: 12px; }
  .mobile-toggle { display: inline-flex; }
  .site-cta .btn-secondary { display: none; }
}

/* Hero */
.hero { padding: 80px 0 60px; text-align: center; }
.hero .badge-pill { display: inline-block; padding: 6px 14px; background: rgba(0,122,255,0.1); color: var(--color-primary); border-radius: 9999px; font-size: 13px; font-weight: 600; margin-bottom: 20px; }
.hero h1 { font-size: 56px; font-weight: 700; line-height: 1.1; letter-spacing: -0.02em; margin: 0 0 20px; }
.hero h1 .gradient { background: linear-gradient(135deg, var(--color-primary), var(--color-info)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero .subtitle { font-size: 20px; color: var(--color-text-secondary); max-width: 720px; margin: 0 auto 32px; }
.hero .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 640px) { .hero { padding: 48px 0 40px; } .hero h1 { font-size: 38px; } .hero .subtitle { font-size: 17px; } }

/* Hero split (home) — logo grande à esquerda, conteúdo à direita */
.hero-split { text-align: left; padding: 96px 0 72px; overflow: hidden; }
.hero-split-grid { display: grid; grid-template-columns: minmax(280px, 1fr) 1.2fr; gap: 56px; align-items: center; }
.hero-split-art { position: relative; display: flex; justify-content: center; }
.hero-split-art::before {
  content: ''; position: absolute; inset: -10% -10% -10% -10%; z-index: 0;
  background: radial-gradient(closest-side, rgba(0,122,255,0.10), transparent 70%);
  pointer-events: none;
}
.hero-logo { position: relative; z-index: 1; width: 100%; max-width: 480px; height: auto; display: block; filter: drop-shadow(0 16px 32px rgba(0,30,80,0.18)); }
.hero-split-text .badge-pill { margin-bottom: 18px; }
.hero-split-text h1 { font-size: 56px; line-height: 1.05; margin: 0 0 18px; }
.hero-split-text .subtitle { margin: 0 0 28px; max-width: 560px; }
.hero-split-text .actions { justify-content: flex-start; }
@media (max-width: 900px) {
  .hero-split { text-align: center; padding: 64px 0 48px; }
  .hero-split-grid { grid-template-columns: 1fr; gap: 32px; }
  .hero-split-art { order: -1; }
  .hero-logo { max-width: 320px; }
  .hero-split-text .actions { justify-content: center; }
  .hero-split-text .subtitle { margin-left: auto; margin-right: auto; }
  .hero-split-text h1 { font-size: 40px; }
}

/* Section Marca — logo horizontal grande + tagline + circuit divider */
.section-brand { text-align: center; padding: 88px 0 64px; }
.section-brand .brand-mark { width: 100%; max-width: 720px; height: auto; display: block; margin: 0 auto 24px; }
.section-brand .brand-tagline {
  font-size: 22px; font-weight: 500; color: var(--color-text);
  max-width: 640px; margin: 0 auto 36px; line-height: 1.4; letter-spacing: -0.01em;
}
.section-brand .brand-tagline strong { background: linear-gradient(135deg, #FF3B30 0%, #007AFF 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; font-weight: 700; }
.section-brand .brand-circuit {
  width: 100%; max-width: 720px; height: 12px; margin: 0 auto;
  background:
    linear-gradient(to right, transparent 4px, var(--color-primary) 4px, var(--color-primary) calc(50% - 60px), transparent calc(50% - 60px)),
    linear-gradient(to right, transparent calc(50% + 60px), #FF3B30 calc(50% + 60px), #FF3B30 calc(100% - 4px), transparent calc(100% - 4px));
  background-position: top, bottom; background-size: 100% 2px; background-repeat: no-repeat;
  position: relative;
}
.section-brand .brand-circuit::before, .section-brand .brand-circuit::after {
  content: ''; position: absolute; top: 50%; transform: translateY(-50%);
  width: 8px; height: 8px; border: 2px solid currentColor; border-radius: 50%; background: var(--color-bg);
}
.section-brand .brand-circuit::before { left: 0; color: var(--color-primary); }
.section-brand .brand-circuit::after { right: 0; color: #FF3B30; }
@media (max-width: 640px) {
  .section-brand .brand-mark { max-width: 88%; }
  .section-brand .brand-tagline { font-size: 18px; }
}

/* Footer brand block — logo colorido grande no topo do footer */
.footer-brand-block { display: flex; flex-direction: column; align-items: center; gap: 24px; margin-bottom: 40px; }
.footer-brand-link { display: block; }
.footer-brand-img { width: 280px; max-width: 70vw; height: auto; display: block; }
.footer-brand-divider {
  width: 100%; max-width: 480px; height: 1px;
  background: linear-gradient(to right, transparent, rgba(255,255,255,0.18), transparent);
}

/* Sections */
.section { padding: 80px 0; }
.section-bg-light { background: var(--color-surface); }
.section-bg-gradient { background: linear-gradient(180deg, var(--color-bg) 0%, var(--color-surface) 100%); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-head .eyebrow { color: var(--color-primary); font-size: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.section-head h2 { font-size: 40px; font-weight: 700; margin: 0 0 16px; letter-spacing: -0.01em; line-height: 1.15; }
.section-head p { font-size: 18px; color: var(--color-text-secondary); margin: 0; }
@media (max-width: 640px) { .section { padding: 56px 0; } .section-head h2 { font-size: 30px; } .section-head { margin-bottom: 32px; } }

/* Grid de cards */
.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.feature-card { background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card); padding: 28px; transition: transform 0.15s, box-shadow 0.15s; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.feature-card .icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, rgba(0,122,255,0.12), rgba(0,122,255,0.04)); display: inline-flex; align-items: center; justify-content: center; font-size: 24px; margin-bottom: 16px; }
.feature-card h3 { margin: 0 0 8px; font-size: 18px; font-weight: 600; }
.feature-card p { margin: 0; color: var(--color-text-secondary); font-size: 14px; line-height: 1.55; }

/* Ambientes grid */
.env-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.env-card { background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: var(--radius-card); padding: 20px; text-align: center; transition: transform 0.15s; }
.env-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.env-card .emoji { font-size: 36px; margin-bottom: 10px; }
.env-card h4 { margin: 0 0 6px; font-size: 15px; font-weight: 600; }
.env-card p { margin: 0; font-size: 12px; color: var(--color-text-secondary); }

/* Diagrama */
.diagram { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; align-items: stretch; max-width: 1000px; margin: 0 auto; }
.diagram-step { background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: 16px; padding: 24px; text-align: center; position: relative; }
.diagram-step .num { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 28px; height: 28px; border-radius: 50%; background: var(--color-primary); color: #fff; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.diagram-step .icon-big { font-size: 40px; margin: 8px 0 12px; }
.diagram-step h4 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.diagram-step p { margin: 0; color: var(--color-text-secondary); font-size: 13px; }
@media (max-width: 900px) { .diagram { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .diagram { grid-template-columns: 1fr; } }

/* Pricing */
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 980px; margin: 0 auto; }
.pricing-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 32px; display: flex; flex-direction: column; }
.pricing-card.featured { border-color: var(--color-primary); border-width: 2px; box-shadow: 0 12px 36px rgba(0,122,255,0.16); position: relative; }
.pricing-card.featured::before { content: 'RECOMENDADO'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--color-primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 9999px; letter-spacing: 0.05em; }
.pricing-card h3 { margin: 0 0 4px; font-size: 22px; font-weight: 700; }
.pricing-card .tagline { color: var(--color-text-secondary); font-size: 14px; margin-bottom: 24px; }
.pricing-card .price { font-size: 44px; font-weight: 700; line-height: 1; margin-bottom: 4px; }
.pricing-card .price small { font-size: 16px; font-weight: 500; color: var(--color-text-secondary); }
.pricing-card .price-meta { color: var(--color-text-secondary); font-size: 13px; margin-bottom: 24px; }
.pricing-card ul { list-style: none; padding: 0; margin: 0 0 28px; flex: 1; }
.pricing-card li { padding: 8px 0; font-size: 14px; display: flex; gap: 8px; align-items: flex-start; }
.pricing-card li::before { content: '✓'; color: var(--color-success); font-weight: 700; flex-shrink: 0; }
.pricing-card li.muted { color: var(--color-text-tertiary); }
.pricing-card li.muted::before { content: '–'; color: var(--color-text-tertiary); }

/* Stats / numeros */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; max-width: 880px; margin: 0 auto; }
.stat-block { text-align: center; }
.stat-block .num { font-size: 42px; font-weight: 700; color: var(--color-primary); line-height: 1; }
.stat-block .label { font-size: 14px; color: var(--color-text-secondary); margin-top: 6px; }

/* CTA banner */
.cta-banner { background: linear-gradient(135deg, var(--color-primary), var(--color-info)); border-radius: 24px; padding: 56px 40px; text-align: center; color: #fff; }
.cta-banner h2 { color: #fff; font-size: 36px; margin: 0 0 12px; line-height: 1.2; }
.cta-banner p { color: rgba(255,255,255,0.92); font-size: 17px; margin: 0 0 28px; max-width: 600px; margin-inline: auto; }
.cta-banner .btn-primary { background: #fff; color: var(--color-primary); }
.cta-banner .btn-primary:hover { background: rgba(255,255,255,0.92); }
.cta-banner .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.cta-banner .btn-ghost:hover { background: rgba(255,255,255,0.1); }

/* Footer */
.site-footer { background: #1C1C1E; color: #AEAEB2; padding: 56px 0 32px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
@media (max-width: 720px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; } }
.footer-grid h5 { color: #fff; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin: 0 0 14px; }
.footer-grid a { display: block; color: #AEAEB2; text-decoration: none; padding: 4px 0; font-size: 14px; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #38383A; padding-top: 24px; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 13px; }

/* Form contato */
.contact-card { max-width: 580px; margin: 0 auto; background: var(--color-surface); padding: 36px; border-radius: 18px; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border-subtle); }
.contact-card .form-row { margin-bottom: 16px; }
.contact-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: var(--color-text); }
.contact-card input, .contact-card select, .contact-card textarea {
  width: 100%; padding: 10px 14px; border: 1px solid var(--color-border); border-radius: 10px; font-family: inherit; font-size: 14px; background: var(--color-bg); transition: border-color 0.15s;
}
.contact-card input:focus, .contact-card select:focus, .contact-card textarea:focus { outline: none; border-color: var(--color-primary); background: #fff; }
.contact-card textarea { min-height: 120px; resize: vertical; }
.flash-msg { padding: 12px 16px; border-radius: 10px; margin-bottom: 20px; font-size: 14px; }
.flash-msg.success { background: rgba(52,199,89,0.10); color: #1F8B3D; border: 1px solid rgba(52,199,89,0.3); }
.flash-msg.error { background: rgba(255,59,48,0.10); color: var(--color-danger); border: 1px solid rgba(255,59,48,0.3); }

/* FAQ */
.faq { max-width: 720px; margin: 0 auto; }
.faq details { background: var(--color-surface); border: 1px solid var(--color-border-subtle); border-radius: 12px; margin-bottom: 10px; padding: 0; overflow: hidden; }
.faq summary { padding: 18px 24px; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 22px; font-weight: 400; color: var(--color-text-secondary); transition: transform 0.2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details > div { padding: 0 24px 20px; color: var(--color-text-secondary); font-size: 15px; line-height: 1.6; }

/* Página de detalhe / texto longo */
.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 28px; margin: 48px 0 16px; }
.prose h3 { font-size: 20px; margin: 32px 0 12px; }
.prose p { font-size: 16px; line-height: 1.7; margin: 0 0 16px; color: var(--color-text); }
.prose ul, .prose ol { padding-left: 24px; line-height: 1.7; }
.prose strong { color: var(--color-text); font-weight: 600; }

/* Stats no header de páginas */
.page-hero { padding: 60px 0 40px; text-align: center; }
.page-hero h1 { font-size: 44px; font-weight: 700; margin: 0 0 12px; letter-spacing: -0.01em; }
.page-hero .subtitle { font-size: 18px; color: var(--color-text-secondary); max-width: 640px; margin: 0 auto; }
@media (max-width: 640px) { .page-hero h1 { font-size: 32px; } }
