/* ═══════════════════════════════════════════════════════════════
   IPELS TI. Design System (v2 · Corporate Blue)
   Direção: distribuição/revenda de TI · confiança e solidez
   Reutilizável por index.html e (futuramente) loja.html
   ═══════════════════════════════════════════════════════════════ */

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, ul, ol, figure, blockquote { margin: 0; padding: 0; }
ul, ol { list-style: none; }
img { max-width: 100%; display: block; height: auto; }
button { font-family: inherit; cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font-family: inherit; }

/* === TOKENS === */
:root {
  --ink:        #0A2233;
  --navy:       #0C3357;
  --blue:       #0E5AA6;
  --blue-600:   #1568BE;
  --azure:      #2C8AE0;
  --azure-200:  #B9D7F0;
  --sky:        #E9F2FB;
  --sky-2:      #F4F8FD;
  --paper:      #FBFCFE;
  --line:       #DBE6F1;
  --slate:      #5B6B7B;
  --text:       #16232F;
  --white:      #FFFFFF;
  --accent:     #EC6A4D;
  --accent-deep:#D4583B;
  --ok:         #1E9E6A;

  --font-display: 'Archivo', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, 'Courier New', monospace;

  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 20px; --space-6: 24px; --space-8: 32px; --space-10: 40px;
  --space-12: 48px; --space-16: 64px; --space-20: 80px; --space-24: 96px; --space-32: 128px;

  --container-max: 1240px;
  --container-pad: clamp(20px, 4vw, 40px);

  --radius: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(12, 51, 87, 0.06);
  --shadow:    0 10px 28px rgba(12, 51, 87, 0.10);
  --shadow-lg: 0 26px 56px rgba(10, 34, 51, 0.16);
  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === BASE === */
body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6; color: var(--text); background: var(--white);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--ink); letter-spacing: -0.02em; line-height: 1.08; font-weight: 700; }
h1 { font-size: clamp(36px, 4.6vw, 58px); font-weight: 800; }
h2 { font-size: clamp(28px, 3.4vw, 42px); }
h3 { font-size: clamp(19px, 2vw, 24px); }
h4 { font-size: 17px; font-weight: 600; }
p  { color: var(--text); }
strong { font-weight: 600; color: var(--ink); }

/* === LAYOUT === */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding-left: var(--container-pad); padding-right: var(--container-pad); }
.section { padding: var(--space-24) 0; }
.section-sky { background: var(--sky-2); }
.section-ink { background: var(--ink); color: rgba(255,255,255,0.85); }
section { scroll-margin-top: 120px; }
.section-head { max-width: 720px; margin-bottom: var(--space-12); }
.section-head h2 { margin-bottom: var(--space-4); }
.section-head p { font-size: 18px; color: var(--slate); }
.section-ink .section-head h2 { color: var(--white); }
.section-ink .section-head p { color: rgba(255,255,255,0.7); }

/* === EYEBROW === */
.eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); font-size: 12px; font-weight: 500; letter-spacing: 0.14em; text-transform: uppercase; color: var(--blue); margin-bottom: var(--space-4); }
.eyebrow::before { content: ''; width: 2px; height: 2px; background: var(--accent); }
.section-ink .eyebrow { color: var(--azure); }

/* === BOTÕES === */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); padding: 14px 26px; font-family: var(--font-display); font-size: 15px; font-weight: 600; border-radius: var(--radius); border: 1.5px solid transparent; transition: var(--transition); white-space: nowrap; line-height: 1; }
.btn-primary { background: var(--blue); color: var(--white); border-color: var(--blue); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-accent { background: var(--accent); color: var(--white); border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); box-shadow: 0 10px 24px rgba(236,106,77,0.30); }
.btn-secondary { background: var(--white); color: var(--blue); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--blue); background: var(--sky); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.30); }
.btn-ghost:hover { background: rgba(255,255,255,0.10); border-color: var(--white); }
.btn-arrow::after { content: '→'; transition: transform var(--transition); }
.btn-arrow:hover::after { transform: translateX(4px); }
.btn-sm { padding: 10px 18px; font-size: 14px; }

/* === TOPBAR === */
.topbar { background: var(--ink); color: rgba(255,255,255,0.72); font-size: 13px; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 40px; }
.topbar a { color: rgba(255,255,255,0.72); transition: color var(--transition); }
.topbar a:hover { color: var(--white); }
.topbar-left { display: flex; align-items: center; gap: var(--space-2); font-family: var(--font-mono); letter-spacing: 0.02em; }
.topbar-left .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.topbar-right { display: flex; align-items: center; gap: var(--space-6); }
.topbar-right .sep { width: 1px; height: 14px; background: rgba(255,255,255,0.18); }

/* === NAVBAR === */
.nav { position: sticky; top: 0; z-index: 200; background: var(--white); border-bottom: 1px solid var(--line); transition: var(--transition); }
.nav-inner { display: flex; align-items: center; gap: var(--space-8); height: 76px; }
.brand-lockup { display: inline-flex; align-items: baseline; gap: 8px; }
.brand-lockup img { height: 30px; width: auto; transform: translateY(4px); }
.brand-ti { font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: -0.03em; color: var(--navy); line-height: 1; }
.brand-ti .dot { color: var(--accent); }
.nav-menu { display: flex; align-items: center; gap: var(--space-2); height: 100%; }
.nav-item { position: static; height: 100%; display: flex; align-items: center; }
.nav-link { display: inline-flex; align-items: center; gap: 6px; padding: 0 var(--space-4); height: 100%; font-size: 15px; font-weight: 500; color: var(--text); transition: color var(--transition); position: relative; }
.nav-link:hover, .nav-item:focus-within .nav-link { color: var(--blue); }
.nav-link .chev { width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: var(--transition); opacity: 0.6; }
.nav-item.has-mega:hover .chev, .nav-item.has-mega.open .chev { transform: rotate(225deg) translateY(-1px); }
.nav-spacer { flex: 1; }
.nav-actions { display: flex; align-items: center; gap: var(--space-3); }
.nav-search-btn { display: grid; place-items: center; width: 42px; height: 42px; border-radius: var(--radius); color: var(--navy); border: 1px solid var(--line); transition: var(--transition); }
.nav-search-btn:hover { background: var(--sky); border-color: var(--azure-200); }

/* === MEGA-MENU === */
.mega-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--white); border-top: 1px solid var(--line); box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transform: translateY(-10px); transition: opacity var(--transition), transform var(--transition), visibility var(--transition); z-index: 199; }
.nav-item.has-mega:hover .mega-panel, .nav-item.has-mega:focus-within .mega-panel, .nav-item.has-mega.open .mega-panel { opacity: 1; visibility: visible; transform: none; }
.mega-inner { display: grid; gap: var(--space-8); padding: var(--space-10) 0 var(--space-12); }
.mega-cols-4 { grid-template-columns: repeat(4, 1fr); }
.mega-cols-3 { grid-template-columns: 1.4fr 1fr 1fr; }
.mega-group h4 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--slate); margin-bottom: var(--space-4); font-weight: 500; }
.mega-link { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) 0; transition: var(--transition); }
.mega-link strong { font-size: 15px; color: var(--ink); font-weight: 600; }
.mega-link span { font-size: 13px; color: var(--slate); }
.mega-link:hover strong { color: var(--blue); }
.mega-feature { background: var(--sky-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--space-6); display: flex; flex-direction: column; }
.mega-feature .eyebrow { margin-bottom: var(--space-3); }
.mega-feature p { font-size: 14px; color: var(--slate); margin: var(--space-2) 0 var(--space-5); }

/* === HERO === */
.hero { background: linear-gradient(180deg, var(--sky-2), var(--white) 70%); padding: var(--space-20) 0 var(--space-24); border-bottom: 1px solid var(--line); }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--space-16); align-items: center; }
.hero h1 { margin-bottom: var(--space-5); }
.hero h1 .accent { color: var(--blue); }
.hero-sub { font-size: clamp(17px, 1.6vw, 20px); color: var(--slate); max-width: 46ch; margin-bottom: var(--space-8); }
.searchbar { display: flex; gap: var(--space-2); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); max-width: 560px; }
.searchbar:focus-within { border-color: var(--azure); box-shadow: 0 0 0 4px rgba(44,138,224,0.12); }
.searchbar .sb-cat { border: none; background: transparent; padding: 0 var(--space-3); color: var(--navy); font-size: 14px; font-weight: 500; border-right: 1px solid var(--line); outline: none; max-width: 150px; }
.searchbar input { flex: 1; border: none; outline: none; padding: 10px var(--space-3); font-size: 15px; color: var(--text); background: transparent; min-width: 0; }
.searchbar .sb-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--blue); color: #fff; border-radius: 7px; padding: 0 var(--space-5); font-family: var(--font-display); font-weight: 600; font-size: 14px; transition: var(--transition); }
.searchbar .sb-btn:hover { background: var(--navy); }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin: var(--space-5) 0 var(--space-8); }
.hero-trust { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--slate); flex-wrap: wrap; }
.hero-trust b { color: var(--navy); font-weight: 600; }

/* === IMG SLOT === */
.img-slot { position: relative; border-radius: var(--radius-lg); display: grid; place-items: center; color: var(--slate); overflow: hidden; min-height: 220px; }
.img-slot .slot-inner { text-align: center; padding: var(--space-6); max-width: 320px; }
.img-slot .slot-ic { width: 44px; height: 44px; margin: 0 auto var(--space-3); display: grid; place-items: center; border-radius: var(--radius); background: var(--white); color: var(--blue); box-shadow: var(--shadow-sm); }
.img-slot .slot-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); margin-bottom: 4px; }
.img-slot .slot-label { font-size: 14px; font-weight: 600; color: var(--navy); }
.img-slot .slot-hint { font-size: 12px; color: var(--slate); margin-top: 2px; }
.img-slot.tall { min-height: 460px; }
.img-slot.wide { min-height: 300px; }

/* === BANDA DE FABRICANTES === */
.makers { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--white); }
.makers-inner { padding: var(--space-12) 0; }
.makers-stat { text-align: center; font-size: 15px; color: var(--slate); margin-bottom: var(--space-8); }
.makers-stat b { color: var(--ink); font-weight: 700; }
.makers-row { display: flex; align-items: center; justify-content: center; gap: var(--space-10); flex-wrap: wrap; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 22px; color: var(--slate); letter-spacing: -0.01em; opacity: 0.85; transition: var(--transition); }
.wordmark:hover { color: var(--navy); opacity: 1; }
.maker-slot { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; width: 120px; height: 52px; border: 1.5px dashed var(--azure-200); border-radius: var(--radius); color: var(--slate); }
.maker-slot .ms-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; }
.maker-slot .ms-sub { font-size: 11px; }

/* === TILES === */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.tile { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: var(--transition); min-height: 150px; }
.tile:hover { border-color: var(--azure); box-shadow: var(--shadow); transform: translateY(-3px); }
.tile .t-ic { width: 44px; height: 44px; border-radius: var(--radius); background: var(--sky); color: var(--blue); display: grid; place-items: center; }
.tile h4 { color: var(--ink); }
.tile .t-meta { margin-top: auto; font-family: var(--font-mono); font-size: 12px; color: var(--slate); display: flex; align-items: center; gap: 6px; }
.tile .t-meta::after { content: '→'; color: var(--azure); transition: transform var(--transition); }
.tile:hover .t-meta::after { transform: translateX(3px); }

/* === VALOR / SOLUÇÃO === */
.value-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-4); }
.value-card { padding: var(--space-8) var(--space-6); border-radius: var(--radius-lg); background: var(--white); border: 1px solid var(--line); transition: var(--transition); }
.value-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.value-card .v-ic { width: 48px; height: 48px; border-radius: var(--radius); background: var(--navy); color: #fff; display: grid; place-items: center; margin-bottom: var(--space-4); }
.value-card h3 { font-size: 19px; margin-bottom: var(--space-2); }
.value-card p { font-size: 14px; color: var(--slate); }
.section-ink .value-card { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.10); }
.section-ink .value-card h3 { color: #fff; }
.section-ink .value-card p { color: rgba(255,255,255,0.65); }
.section-ink .value-card .v-ic { background: var(--azure); }

/* === STATS === */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--space-8); }
.stat { padding-top: var(--space-5); border-top: 2px solid var(--accent); }
.stat .s-num { font-family: var(--font-display); font-weight: 800; font-size: clamp(34px, 4vw, 50px); color: #fff; line-height: 1; letter-spacing: -0.03em; }
.stat .s-num .ph { color: var(--azure); }
.stat .s-label { margin-top: var(--space-3); font-size: 14px; color: rgba(255,255,255,0.65); }

/* === INSIGHTS === */
.insights { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--white); transition: var(--transition); }
.post-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.post-card .img-slot { border-radius: 0; border: none; border-bottom: 1.5px dashed var(--azure-200); min-height: 170px; }
.post-card .pc-body { padding: var(--space-6); display: flex; flex-direction: column; gap: var(--space-2); flex: 1; }
.post-card .pc-tag { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.post-card h3 { font-size: 19px; color: var(--ink); }
.post-card .pc-meta { margin-top: auto; padding-top: var(--space-4); font-size: 13px; color: var(--slate); display: flex; justify-content: space-between; align-items: center; }
.post-card .pc-meta .read { color: var(--blue); font-weight: 600; }

/* === COTAÇÃO / FORM === */
.quote-grid { display: grid; grid-template-columns: 0.95fr 1.05fr; gap: var(--space-16); align-items: start; }
.quote-points { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-8); }
.quote-point { display: flex; gap: var(--space-4); }
.quote-point .qp-ic { width: 38px; height: 38px; flex-shrink: 0; border-radius: var(--radius); background: rgba(255,255,255,0.08); color: var(--azure); display: grid; place-items: center; }
.quote-point h4 { color: #0C3357; margin-bottom: 2px; }
.quote-point p { font-size: 14px; color: #0C3357; }
.form-card { background: var(--white); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: clamp(24px, 3vw, 40px); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-group { margin-bottom: var(--space-4); }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text); margin-bottom: 6px; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 13px 15px; font-size: 15px; color: var(--text); background: var(--white); border: 1.5px solid var(--line); border-radius: var(--radius); transition: var(--transition); }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(14,90,166,0.10); }
.form-group textarea { resize: vertical; min-height: 96px; }
.form-note { font-size: 13px; color: var(--slate); margin-top: var(--space-3); text-align: center; }

/* === FOOTER === */
.footer { background: var(--ink); color: rgba(255,255,255,0.72); padding: var(--space-20) 0 var(--space-8); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: var(--space-10); margin-bottom: var(--space-16); }
.footer-brand .brand-lockup img { height: 36px; }
.footer-brand .brand-ti { color: #fff; font-size: 22px; }
.footer-tagline { font-family: var(--font-mono); font-size: 13px; letter-spacing: 0.04em; color: var(--azure); margin: var(--space-4) 0 var(--space-4); }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; max-width: 300px; }
.footer h4 { color: #fff; font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--space-4); font-family: var(--font-mono); font-weight: 500; }
.footer ul li { margin-bottom: var(--space-2); }
.footer ul a { color: rgba(255,255,255,0.6); font-size: 14px; transition: color var(--transition); }
.footer ul a:hover { color: var(--azure); }
.footer-bottom { padding-top: var(--space-6); border-top: 1px solid rgba(255,255,255,0.10); display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: rgba(255,255,255,0.45); flex-wrap: wrap; gap: var(--space-4); }

/* === MOBILE NAV TOGGLE === */
.nav-toggle { display: none; width: 44px; height: 44px; position: relative; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px auto; transition: var(--transition); }

/* === REVEAL === */
.reveal-ready .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.4,0,.2,1); }
.reveal-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal-ready .reveal { opacity: 1; transform: none; transition: none; } }

/* === RESPONSIVO === */
@media (max-width: 1024px) {
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); gap: var(--space-10); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
@media (max-width: 900px) {
  .nav-menu, .nav-search-btn, .topbar { display: none; }
  .nav-toggle { display: block; }
  .nav-spacer { display: none; }
  .nav-inner { justify-content: space-between; gap: var(--space-4); }
  .hero-grid, .quote-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .insights { grid-template-columns: 1fr; }
  .nav-menu.open { display: flex; flex-direction: column; align-items: stretch; position: absolute; top: 100%; left: 0; right: 0; height: auto; background: var(--white); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg); padding: var(--space-4); gap: 0; max-height: 80vh; overflow-y: auto; }
  .nav-menu.open .nav-item { height: auto; flex-direction: column; align-items: stretch; border-bottom: 1px solid var(--line); }
  .nav-menu.open .nav-link { height: auto; padding: var(--space-4) var(--space-2); justify-content: space-between; }
  .nav-menu.open .mega-panel { position: static; box-shadow: none; border-top: none; opacity: 1; visibility: visible; transform: none; display: none; background: var(--sky-2); border-radius: var(--radius); margin-bottom: var(--space-3); }
  .nav-menu.open .nav-item.open .mega-panel { display: block; }
  .nav-menu.open .mega-inner { grid-template-columns: 1fr !important; padding: var(--space-4); gap: var(--space-5); }
  .nav-menu.open .mega-feature { display: none; }
}
@media (max-width: 640px) {
  .nav-actions .btn-accent { display: none; }
  .tiles, .value-grid, .stats { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .searchbar { flex-wrap: wrap; }
  .searchbar .sb-cat { border-right: none; border-bottom: 1px solid var(--line); width: 100%; max-width: none; padding: 8px var(--space-3); }
  .searchbar .sb-btn { width: 100%; padding: 12px; justify-content: center; }
}
