/* =============================================================
   GELCAM — Estilos de página: hero, drawer, seletor, catálogo,
   calculadora, comparativo, laudo.
   ============================================================= */

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: clamp(620px, 92vh, 920px);
  display: flex; align-items: center;
  background: radial-gradient(120% 120% at 80% -20%, #15171d 0%, var(--hero-from) 40%, var(--hero-to) 100%);
  color: #fff; overflow: hidden;
  isolation: isolate;
}
.hero__canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; opacity: 0.9; }
.hero__grid {
  position: absolute; inset: 0; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 25%, transparent 80%);
          mask-image: radial-gradient(ellipse 90% 80% at 30% 40%, #000 25%, transparent 80%);
}
.hero__glow { width: 620px; height: 620px; top: -180px; right: -120px; opacity: 0.22; }
.hero__scrim { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, var(--hero-to) 0%, rgba(6,7,8,0.6) 40%, transparent 75%); }
.hero__in { position: relative; z-index: 3; width: 100%; }
.hero__col { max-width: 760px; display: flex; flex-direction: column; align-items: flex-start; }
.hero h1 {
  color: #fff; font-size: var(--t-5xl); line-height: 0.96;
  text-transform: uppercase; letter-spacing: -0.02em; margin: 0 0 var(--s-6);
  text-wrap: balance; padding-bottom: 0.04em;
}
.hero h1 em { font-style: normal; color: var(--g-red); position: relative; }
.hero h1 .flash { color: var(--g-red); text-shadow: 0 0 30px rgba(229,27,35,0.55); }
.hero__lead { font-size: var(--t-md); color: rgba(255,255,255,0.74); max-width: 56ch; margin-bottom: var(--s-7); }
.hero__cta { display: flex; gap: var(--s-4); flex-wrap: wrap; }
.hero__stats {
  display: flex; gap: var(--s-8); margin-top: var(--s-9); flex-wrap: wrap;
  padding-top: var(--s-6); border-top: 1px solid rgba(255,255,255,0.1);
}
.hero__stats .stat-num { color: #fff; font-size: clamp(1.8rem,3vw,2.6rem); }
.hero__stats .stat-num span { color: var(--g-red); }
.hero__stats .stat-label { color: rgba(255,255,255,0.55); }
.hero__badge {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 16px; border-radius: var(--r-pill);
  background: rgba(229,27,35,0.12); border: 1px solid rgba(229,27,35,0.4);
  color: #fff; font-family: var(--font-mono); font-size: var(--t-xs);
  letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: var(--s-6);
}
.hero__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--g-red); box-shadow: 0 0 12px var(--g-red); animation: pulse 1.8s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

@media (max-width: 720px) {
  .hero { min-height: 80vh; }
  .hero__stats { gap: var(--s-6); }
}

/* ============ MARQUEE ============ */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: var(--bg-2); }
.marquee__track { display: flex; gap: var(--s-7); padding: var(--s-5) 0; white-space: nowrap; animation: scroll 32s linear infinite; }
.marquee__track span { font-family: var(--font-display); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); display: inline-flex; align-items: center; gap: var(--s-5); font-size: 1.05rem; }
.marquee__track .ic { width: 16px; height: 16px; color: var(--g-red); }
@keyframes scroll { to { transform: translateX(-50%); } }
.marquee:hover .marquee__track { animation-play-state: paused; }

/* ============ FEATURE GRID ============ */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
.feature {
  padding: var(--s-6); border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); transition: border-color 240ms var(--ease), transform 240ms var(--ease);
  position: relative; overflow: hidden;
}
.feature:hover { border-color: var(--g-red); transform: translateY(-3px); }
.feature__ic {
  width: 52px; height: 52px; border-radius: var(--r); display: grid; place-items: center;
  background: var(--red-tint); color: var(--g-red); margin-bottom: var(--s-5);
}
.feature__ic .ic { width: 26px; height: 26px; }
.feature h4 { margin-bottom: var(--s-3); }
.feature p { color: var(--text-muted); margin: 0; font-size: var(--t-sm); }
@media (max-width: 880px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

/* ============ STATS BAND ============ */
.stats-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-6); }
.stats-band .item { text-align: center; padding: var(--s-5); }
.stats-band .item + .item { border-left: 1px solid var(--border); }
@media (max-width: 720px) { .stats-band { grid-template-columns: 1fr 1fr; } .stats-band .item:nth-child(odd) { border-left: 0; } }

/* ============ SPLIT (empresa) ============ */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-9); align-items: center; }
.split__media {
  aspect-ratio: 4/5; border-radius: var(--r-xl); overflow: hidden; position: relative;
  border: 1px solid var(--border);
}
@media (max-width: 880px) { .split { grid-template-columns: 1fr; gap: var(--s-7); } .split__media { aspect-ratio: 16/10; } }

/* ============ DRAWER (orçamento) ============ */
.icon-btn { width: 38px; height: 38px; border-radius: var(--r); border: 1px solid var(--border); background: var(--surface-2); color: var(--text); display: grid; place-items: center; }
.icon-btn:hover { border-color: var(--g-red); color: var(--g-red); }
.gc-drawer { position: fixed; inset: 0; z-index: 300; visibility: hidden; }
.gc-drawer.open { visibility: visible; }
.gc-drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.55); opacity: 0; transition: opacity 320ms var(--ease); }
.gc-drawer.open .gc-drawer__scrim { opacity: 1; }
.gc-drawer__panel {
  position: absolute; top: 0; right: 0; height: 100%; width: min(420px, 92vw);
  background: var(--bg); border-left: 1px solid var(--border);
  display: flex; flex-direction: column; transform: translateX(100%);
  transition: transform 360ms var(--ease); box-shadow: var(--shadow);
}
.gc-drawer.open .gc-drawer__panel { transform: none; }
.gc-drawer__head { display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--border); }
.gc-drawer__title { font-family: var(--font-display); font-weight: 800; font-size: var(--t-lg); }
.gc-drawer__sub { font-size: var(--t-xs); color: var(--text-muted); margin-top: 2px; }
.gc-drawer__list { flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5); }
.gc-drawer__foot { padding: var(--s-5); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s-3); }
.gc-line { display: grid; grid-template-columns: 1fr auto auto; gap: var(--s-3); align-items: center; padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.gc-line__name { font-weight: 600; font-size: var(--t-sm); line-height: 1.3; }
.gc-line__code { font-size: var(--t-xs); color: var(--text-muted); margin-top: 3px; }
.gc-qty { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-pill); padding: 3px; }
.gc-qty button { width: 26px; height: 26px; border: 0; background: none; border-radius: 50%; color: var(--text); display: grid; place-items: center; }
.gc-qty button:hover { background: var(--red-tint); color: var(--g-red); }
.gc-qty button .ic { width: 15px; height: 15px; }
.gc-qty span { min-width: 26px; text-align: center; font-family: var(--font-mono); font-size: var(--t-sm); }
.gc-del { width: 32px; height: 32px; border: 0; background: none; color: var(--text-dim); border-radius: var(--r); display: grid; place-items: center; }
.gc-del:hover { color: var(--g-red); background: var(--red-tint); }
.gc-del .ic { width: 17px; height: 17px; }
.gc-empty { text-align: center; padding: var(--s-9) var(--s-5); color: var(--text-muted); }
.gc-empty .ic { width: 48px; height: 48px; color: var(--text-dim); margin: 0 auto var(--s-4); }
.gc-empty p { font-family: var(--font-display); font-weight: 700; font-size: var(--t-md); color: var(--text); margin-bottom: 6px; }
.gc-empty span { font-size: var(--t-sm); }

/* ============ PAGE HEADER ============ */
.page-head { position: relative; padding-block: var(--s-9) var(--s-8); background: var(--hero-to); color: #fff; overflow: hidden; isolation: isolate; }
.page-head .hero__grid { mask-image: radial-gradient(ellipse 90% 100% at 20% 0%, #000 30%, transparent 85%); }
.page-head h1 { color: #fff; font-size: var(--t-4xl); text-transform: uppercase; }
.page-head .lead { color: rgba(255,255,255,0.7); max-width: 60ch; }
.crumbs { display: flex; gap: 8px; align-items: center; font-family: var(--font-mono); font-size: var(--t-xs); color: rgba(255,255,255,0.5); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: var(--s-5); }
.crumbs a { color: rgba(255,255,255,0.5); } .crumbs a:hover { color: var(--g-red-bright); }

/* ============ SELETOR DE TELHADO ============ */
.roof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-4); }
@media (max-width: 880px) { .roof-grid { grid-template-columns: 1fr 1fr; } }
.roof {
  text-align: left; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-lg); padding: var(--s-5); cursor: pointer;
  transition: border-color 200ms var(--ease), transform 200ms var(--ease), background 200ms var(--ease);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.roof:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.roof.sel { border-color: var(--g-red); background: var(--red-tint); }
.roof__ic { width: 46px; height: 46px; border-radius: var(--r); background: var(--surface-2); display: grid; place-items: center; color: var(--g-red); }
.roof.sel .roof__ic { background: var(--g-red); color: #fff; }
.roof__ic .ic { width: 24px; height: 24px; }
.roof h4 { font-size: var(--t-base); margin: 0; }
.roof small { color: var(--text-muted); font-size: var(--t-xs); }
.roof .code { margin-top: auto; font-family: var(--font-mono); font-size: var(--t-xs); color: var(--g-red); letter-spacing: 0.05em; }

.roof-result {
  margin-top: var(--s-6); border: 1px solid var(--g-red); border-radius: var(--r-xl);
  background: var(--surface); overflow: hidden; display: grid; grid-template-columns: 1fr 1.2fr;
}
.roof-result.empty { display: block; border-style: dashed; border-color: var(--border); text-align: center; padding: var(--s-8); color: var(--text-muted); }
.roof-result__media { position: relative; min-height: 280px; aspect-ratio: auto; align-self: stretch; }
.roof-result__body { padding: var(--s-7); }
@media (max-width: 760px) { .roof-result { grid-template-columns: 1fr; } }

/* ============ CATÁLOGO ============ */
.cat-bar { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; margin-bottom: var(--s-7); }
.cat-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.cat-chip { font-family: var(--font-display); font-weight: 600; font-size: 0.9rem; padding: 9px 16px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--text-muted); cursor: pointer; transition: all 160ms var(--ease); }
.cat-chip:hover { color: var(--text); border-color: var(--border-strong); }
.cat-chip.active { background: var(--g-red); color: #fff; border-color: transparent; }
.cat-search { position: relative; margin-left: auto; min-width: 240px; }
.cat-search .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--text-dim); }
.cat-search .input { padding-left: 42px; }

.prod-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }
@media (max-width: 880px) { .prod-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .prod-grid { grid-template-columns: 1fr; } }
.prod { display: flex; flex-direction: column; }
.prod .media { aspect-ratio: 4/3; }
.prod__ic { position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; color: rgba(255,255,255,0.55); }
.prod__cat { position: absolute; top: 12px; left: 12px; font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.6); background: rgba(0,0,0,0.4); padding: 4px 9px; border-radius: var(--r-pill); }
.prod__body { padding: var(--s-5); display: flex; flex-direction: column; gap: var(--s-3); flex: 1; }
.prod__name { font-family: var(--font-display); font-weight: 700; font-size: var(--t-base); line-height: 1.25; }
.prod__meta { display: flex; gap: var(--s-3); font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-muted); }
.prod__meta .c { color: var(--g-red); }
.prod__add { margin-top: auto; }

/* ============ CALCULADORA ============ */
.calc-grid { display: grid; grid-template-columns: 380px 1fr; gap: var(--s-7); align-items: start; }
@media (max-width: 960px) { .calc-grid { grid-template-columns: 1fr; } }
.calc-panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s-6); position: sticky; top: 92px; }
.calc-panel h3 { margin-bottom: var(--s-5); display: flex; align-items: center; gap: 10px; }
.calc-panel h3 .ic { width: 22px; height: 22px; color: var(--g-red); }
.calc-fields { display: flex; flex-direction: column; gap: var(--s-4); }
.calc-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.level-pick { display: grid; grid-template-columns: repeat(4,1fr); gap: 6px; }
.level-pick button { padding: 10px 4px; border: 1px solid var(--border); background: var(--surface-2); border-radius: var(--r); font-family: var(--font-mono); font-size: var(--t-xs); color: var(--text-muted); cursor: pointer; text-align: center; transition: all 140ms; }
.level-pick button b { display: block; font-family: var(--font-display); font-size: var(--t-base); color: var(--text); }
.level-pick button.sel { border-color: var(--g-red); background: var(--red-tint); color: var(--g-red); }
.level-pick button.sel b { color: var(--g-red); }

.calc-out { display: flex; flex-direction: column; gap: var(--s-6); }
.calc-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--s-4); }
.calc-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s-5); }
.calc-kpi .v { font-family: var(--font-display); font-weight: 900; font-size: 1.9rem; color: var(--text); line-height: 1; }
.calc-kpi .v.red { color: var(--g-red); }
.calc-kpi .l { font-size: var(--t-xs); color: var(--text-muted); margin-top: 8px; }
@media (max-width: 720px) { .calc-summary { grid-template-columns: 1fr 1fr; } }

/* BOM table */
.bom { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.bom th, .bom td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--border); font-size: var(--t-sm); }
.bom thead th { font-family: var(--font-mono); font-size: var(--t-xs); text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); background: var(--surface-2); }
.bom tbody tr:hover { background: var(--surface-2); }
.bom td.code { font-family: var(--font-mono); color: var(--g-red); font-size: var(--t-xs); }
.bom td.qty { font-family: var(--font-mono); font-weight: 700; text-align: right; }
.bom td.act { text-align: right; width: 1%; }
.bom tfoot td { font-weight: 700; background: var(--surface-2); }

/* ============ COMPARATIVO ============ */
.versus { display: grid; grid-template-columns: 1.4fr 1fr 1fr; }
.versus > div { padding: 0; }
.versus .vhead { padding: var(--s-5); position: sticky; top: 76px; z-index: 2; }
.versus .vhead.gel { background: var(--g-red); color: #fff; border-radius: var(--r-lg) var(--r-lg) 0 0; }
.versus .vhead.conv { background: var(--surface-3); color: var(--text); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.versus .vhead h4 { color: inherit; margin: 0; }
.versus .vhead small { opacity: 0.8; font-size: var(--t-xs); font-family: var(--font-mono); }
.cmp-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; border-bottom: 1px solid var(--border); }
.cmp-row:hover { background: var(--surface-2); }
.cmp-row > div { padding: 16px var(--s-5); display: flex; align-items: center; gap: 10px; font-size: var(--t-sm); }
.cmp-row .item-label { font-family: var(--font-display); font-weight: 600; color: var(--text); }
.cmp-row .item-num { font-family: var(--font-mono); color: var(--text-dim); margin-right: 8px; font-size: var(--t-xs); }
.cmp-row .gel { color: var(--text); background: var(--red-tint); border-left: 2px solid var(--g-red); }
.cmp-row .conv { color: var(--text-muted); }
.cmp-row .gel .ic { color: var(--g-red); width: 18px; height: 18px; flex: none; }
.cmp-row .conv .ic { color: var(--text-dim); width: 18px; height: 18px; flex: none; }
@media (max-width: 720px) {
  .versus, .cmp-row { grid-template-columns: 1fr; }
  .versus .vhead { position: static; }
  .cmp-row > div { border-top: 1px solid var(--border); }
  .cmp-row .item-label { background: var(--surface-2); }
}

/* ============ TIMELINE (laudo) ============ */
.timeline { position: relative; padding-left: var(--s-7); }
.timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding-bottom: var(--s-6); }
.tl-item::before { content: ""; position: absolute; left: -41px; top: 4px; width: 14px; height: 14px; border-radius: 50%; background: var(--g-red); box-shadow: 0 0 0 4px var(--red-tint); }
.tl-item h4 { margin-bottom: 6px; }
.tl-item p { color: var(--text-muted); margin: 0; font-size: var(--t-sm); }

/* checklist */
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
@media (max-width: 720px) { .checklist { grid-template-columns: 1fr; } }
.check-item { display: flex; gap: var(--s-3); padding: var(--s-4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); font-size: var(--t-sm); }
.check-item .ic { width: 20px; height: 20px; color: var(--g-red); flex: none; margin-top: 1px; }

/* ============ FORM CARD (orçamento dados) ============ */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 600px) { .form-grid { grid-template-columns: 1fr; } }

/* print */
@media print {
  .site-header, .topbar, .site-footer, .wa-fab, .scroll-bar, .gc-drawer, .no-print, .mobile-menu { display: none !important; }
  body { background: #fff; color: #000; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
