:root {
  --navy: #091c36;
  --navy-2: #102b51;
  --gold: #e3a52a;
  --gold-dark: #be7c10;
  --ink: #0d2342;
  --copy: #475467;
  --muted: #667085;
  --surface: #ffffff;
  --background: #f7f8fb;
  --line: #e5eaf1;
  --soft: #f4f6fa;
  --shadow: 0 10px 30px rgba(16, 24, 40, .07);
  --radius: 10px;
  --max: 1240px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font: 400 14px/1.6 "Segoe UI", Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--gold-dark); }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0 0 10px; color: var(--ink); font-weight: 750; line-height: 1.15; letter-spacing: -.04em; }
h1 { font-size: clamp(2.15rem, 4.4vw, 3.55rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 16px; color: var(--copy); }
.container { width: min(var(--max), calc(100% - 48px)); margin: 0 auto; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 10px; z-index: 99; background: white; padding: 8px; }

.site-header { position: sticky; top: 0; z-index: 20; color: white; background: var(--navy); border-bottom: 1px solid rgba(255,255,255,.06); }
.header-row { min-height: 72px; display: flex; align-items: center; gap: 36px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: #fff; font-size: .93rem; font-weight: 800; letter-spacing: .02em; line-height: 1.05; text-transform: uppercase; }
.brand:hover { color: #fff; }
.brand-mark { width: 42px; height: 42px; flex: 0 0 42px; background: url("/assets/images/logo-mark.svg") center/contain no-repeat; font-size: 0; }
.brand span:last-child { display: block; max-width: 152px; }
.brand span:last-child small { display: block; color: var(--gold); font-size: .84em; font-weight: 800; line-height: 1.1; }
.site-header .brand span:last-child::first-line { color: #fff; }
.nav { display: flex; align-items: center; gap: 30px; color: #f3f5f9; font-size: .9rem; font-weight: 500; }
.nav a:hover { color: var(--gold); }
.nav-cta { display: none; }
.header-search { position: relative; width: 242px; margin-left: 18px; }
.header-search input { width: 100%; height: 39px; padding: 0 42px 0 15px; border: 1px solid rgba(255,255,255,.2); border-radius: 7px; color: #fff; background: rgba(255,255,255,.025); font: inherit; }
.header-search input::placeholder { color: #8c9ab0; }
.header-search::after { content: "⌕"; position: absolute; right: 14px; top: 5px; color: #d8e0ed; font-size: 21px; }
.menu-button { display: none; color: #fff; border: 0; background: transparent; font-size: 1.5rem; }

.hero { background: #fff; }
.hero-stage { position: relative; min-height: 550px; display: grid; align-items: center; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; z-index: 0; }
.hero-stage::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.98) 34%, rgba(255,255,255,.38) 59%, rgba(255,255,255,0) 100%); }
.hero-copy { position: relative; z-index: 2; max-width: 495px; padding: 76px 0 88px; }
.hero-copy h1 span { color: var(--gold-dark); }
.hero-copy p { margin: 20px 0 30px; max-width: 420px; font-size: 1.04rem; }
.button { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; padding: 0 24px; border-radius: 7px; font-weight: 650; transition: .18s ease; }
.button-primary { color: #fff; background: var(--navy); }
.button-primary:hover { color: #fff; background: var(--navy-2); transform: translateY(-1px); }
.button-secondary { border: 1px solid #d5ddea; background: #fff; }
.button-secondary:hover { border-color: var(--gold); color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-actions .button-primary::after { content: "→"; font-size: 18px; }

.feature-strip { position: relative; z-index: 3; margin-top: -30px; margin-bottom: 25px; display: grid; grid-template-columns: repeat(3,1fr); gap: 0; padding: 25px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); }
.feature-item { display: flex; align-items: center; justify-content: center; gap: 16px; padding: 0 22px; border-right: 1px solid var(--line); }
.feature-item:last-child { border: 0; }
.feature-icon { width: 40px; height: 40px; display: grid; place-items: center; color: var(--gold); border: 2px solid var(--gold); border-radius: 10px; font-size: 1.05rem; font-weight: 750; }
.feature-item strong { display: block; font-size: 1.25rem; line-height: 1.1; }
.feature-item span:last-child { color: var(--ink); line-height: 1.2; }

.showcase { padding: 28px 0 24px; }
.benefit-card { min-height: 477px; display: grid; grid-template-columns: 43% 57%; border-radius: 13px; overflow: hidden; background: var(--navy); }
.benefit-copy { position: relative; padding: 56px 55px; color: white; background: linear-gradient(135deg, #0c2342, #112e55); clip-path: polygon(0 0, 100% 0, 78% 100%, 0 100%); margin-right: -105px; z-index: 1; }
.benefit-copy h2 { color: #fff; font-size: 2rem; max-width: 230px; margin-bottom: 28px; }
.benefit-list { display: grid; gap: 19px; max-width: 270px; }
.benefit { display: flex; gap: 15px; }
.benefit em { flex: 0 0 30px; height: 30px; color: var(--gold); font-style: normal; font-size: 22px; }
.benefit strong { display: block; color: #fff; font-size: .95rem; }
.benefit span { color: #d4ddeb; font-size: .82rem; }
.benefit-photo { width: 100%; height: 100%; object-fit: cover; object-position: center; }

.site-footer { margin-top: 28px; color: #d7dfeb; background: var(--navy); border-radius: 12px 12px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.55fr .8fr .8fr 1fr; gap: 44px; padding: 45px 48px 36px; }
.site-footer h3 { margin-bottom: 19px; color: #fff; font-size: .95rem; letter-spacing: 0; }
.site-footer p { color: #b9c5d7; font-size: .85rem; }
.newsletter { display: flex; margin-top: 25px; }
.newsletter input { min-width: 180px; height: 46px; padding: 0 14px; border: 0; border-radius: 7px 0 0 7px; }
.newsletter button { height: 46px; border: 0; border-radius: 0 7px 7px 0; padding: 0 17px; color: #fff; background: var(--gold); font-weight: 650; }
.footer-links { display: grid; gap: 9px; color: #d3dbe7; font-size: .86rem; }
.footer-links a:hover { color: var(--gold); }
.footer-bottom { padding: 15px 48px 25px; color: #9eacc1; font-size: .82rem; text-align: center; }

.catalog-page, .calculation-page { background: var(--background); min-height: calc(100vh - 72px); }
.page-hero { padding: 47px 0 22px; background: transparent; }
.page-hero h1 { font-size: clamp(2rem, 3vw, 2.65rem); }
.page-hero p { font-size: .95rem; max-width: 650px; }
.breadcrumb { margin-bottom: 17px; color: var(--muted); font-size: .83rem; }
.breadcrumb a { color: var(--muted); }
.catalog-bar { display: block; margin: 0 0 26px; }
.search { display: none; }
.filter-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.filter-button { min-width: 114px; padding: 11px 18px; border: 1px solid #dbe2ee; border-radius: 7px; color: var(--ink); background: white; font: inherit; cursor: pointer; }
.filter-button.active { color: #fff; border-color: var(--navy); background: var(--navy); }
.catalog-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 36px; }
.tool-card { --tool-accent: var(--navy-2); --tool-tint: #f1f5fb; min-height: 220px; padding: 26px 23px; border: 1px solid var(--line); border-radius: 9px; background: #fff; box-shadow: 0 3px 13px rgba(16,24,40,.04); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.tool-card[data-category="civil"] { --tool-accent: #d98c18; --tool-tint: #fff7e9; }
.tool-card[data-category="hidraulica"] { --tool-accent: #087da7; --tool-tint: #eaf8fd; }
.tool-card[data-category="eletrica"] { --tool-accent: #d2830b; --tool-tint: #fff5e4; }
.tool-card[data-category="mecanica"] { --tool-accent: #324e86; --tool-tint: #eef3fc; }
.tool-card:hover { border-color: color-mix(in srgb, var(--tool-accent) 28%, var(--line)); box-shadow: 0 14px 28px rgba(9,28,54,.1); transform: translateY(-4px); }
.tool-card-head { display: flex; gap: 15px; align-items: start; margin-bottom: 15px; }
.tool-icon { width: 45px; height: 45px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; color: var(--tool-accent); background: var(--tool-tint); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tool-accent) 18%, transparent); transition: transform .22s ease, background .22s ease; }
.tool-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tool-card:hover .tool-icon { transform: translateY(-2px) scale(1.07); background: color-mix(in srgb, var(--tool-accent) 13%, white); }
.tool-card h3 { font-size: .98rem; line-height: 1.3; margin: 2px 0 0; }
.tool-card p { min-height: 54px; margin-bottom: 14px; font-size: .86rem; line-height: 1.55; }
.text-link { color: var(--navy); font-size: .85rem; font-weight: 650; }
.center-action { padding: 2px 0 48px; text-align: center; }
.small-button { min-height: 45px; border: 1px solid #233b5d; padding: 0 29px; border-radius: 7px; font-weight: 600; background: #fff; }
.tag, .eyebrow, .ad-slot, .category-grid, .trust-grid { display: none; }

.calc-top { padding: 35px 0 18px; }
.calc-top h1 { font-size: clamp(1.85rem, 2.4vw, 2.25rem); margin-bottom: 5px; }
.calc-top p { font-size: .88rem; }
.calc-with-rail { display: grid; grid-template-columns: minmax(0, 1fr) 176px; gap: 20px; align-items: start; }
.workbench { display: grid; grid-template-columns: 1.02fr .78fr 1.32fr; gap: 22px; padding-bottom: 22px; }
.panel { border: 1px solid var(--line); border-radius: 9px; background: #fff; padding: 22px; box-shadow: 0 3px 12px rgba(16,24,40,.035); }
.panel h2 { margin-bottom: 20px; font-size: 1rem; letter-spacing: 0; }
.calculator.panel { padding: 22px; }
.field-grid { display: grid; gap: 14px; margin-bottom: 18px; }
.field label { display: block; color: var(--ink); font-size: .83rem; font-weight: 550; }
.field-control { margin-top: 6px; }
.field-control.field-with-unit { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 7px; }
.field input, .field select { width: 100%; height: 45px; margin-top: 0; padding: 0 13px; border: 1px solid #dbe3ef; border-radius: 6px; color: var(--ink); background: #fff; font: inherit; }
.field .unit-select { padding-inline: 9px; color: var(--navy); font-weight: 600; background: var(--soft); }
.field input:focus, .field select:focus { outline: 2px solid rgba(19,48,87,.18); border-color: var(--navy-2); }
.calculate { width: 100%; border: 0; font: inherit; cursor: pointer; }
.result-panel { display: block; margin: 0; padding: 0; background: transparent; }
.result-panel span { display: block; color: var(--muted); font-size: .8rem; margin-top: 12px; }
.result-panel span:first-child { margin-top: 0; }
.result-panel strong { display: block; margin: 2px 0 12px; color: var(--ink); font-size: 1.45rem; letter-spacing: -.03em; }
.result-panel strong small { color: var(--copy); font-size: .7em; font-weight: 500; }
.result-panel ul { margin: 0; padding: 0; list-style: none; }
.result-panel li { margin-top: 12px; color: var(--copy); font-size: .84rem; }
.diagram-tabs { display: flex; margin: 2px 0 26px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.diagram-tabs span { flex: 1; padding: 10px 7px; text-align: center; color: var(--copy); font-size: .8rem; }
.diagram-tabs .active { color: #fff; background: var(--navy); }
.diagram { display: block; width: 100%; height: 198px; }
.formula-panel { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 28px; padding: 25px 28px; margin-bottom: 48px; }
.formula-panel h2 { margin-bottom: 14px; }
.formula-lines { color: var(--copy); font-size: .87rem; line-height: 2; }
.download { min-width: 210px; border: 1px solid #90a4c0; background: #fff; }
.formula, .notice, .sidebar, .article-content { margin-top: 24px; }
.standard-calc, .calc-layout { display: grid; grid-template-columns: minmax(470px, 760px) 295px; gap: 28px; padding: 34px 0 62px; }
.standard-calc .calculator, .calc-layout .calculator { border: 1px solid var(--line); border-radius: 9px; background: white; padding: 29px; }
.standard-calc .calc-result, .calc-layout .calc-result { margin-top: 20px; padding: 19px; border-radius: 7px; background: var(--soft); }
.standard-calc .calc-result:not(.visible), .calc-layout .calc-result:not(.visible) { display: none; }
.standard-calc .calc-result strong, .calc-layout .calc-result strong { display: block; color: var(--navy); font-size: 1.8rem; }
.formula, .notice { padding: 18px; border-radius: 7px; color: var(--copy); background: var(--soft); font-size: .87rem; }
.notice { border-left: 3px solid var(--gold); }
.sidebar { display: grid; gap: 17px; align-content: start; }
.related { padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.related a { display: block; border-bottom: 1px solid var(--line); padding: 9px 0; color: var(--navy); }
.related a:last-child { border: 0; }
.ad-slot { min-height: 90px; place-items: center; border: 1px dashed var(--line); background: #fff; color: var(--muted); }
.content-page { max-width: 800px; padding: 60px 0 85px; }
.contact-card { margin: 26px 0; padding: 26px; background: var(--soft); border-radius: 9px; }
.hidden { display: none !important; }
.ad-unit {
  width: min(var(--max), calc(100% - 48px));
  min-height: 98px;
  margin: 18px auto;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
  text-align: center;
}
.ad-label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.ad-unit-pending {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  border: 1px dashed #d7deea;
  color: #8c99ae;
  background: #fafbfd;
}
.ad-unit-pending span { color: var(--muted); font-size: .71rem; letter-spacing: .15em; text-transform: uppercase; }
.ad-unit-pending small { color: #98a4b5; }
.ad-unit-header { margin-top: 14px; margin-bottom: 12px; }
.catalog-grid .ad-unit-catalog {
  grid-column: 1 / -1;
  width: 100%;
  margin: 1px 0;
}
.sidebar .ad-unit-sidebar { width: 100%; margin: 0; min-height: 250px; }
.feature-ad-rail .ad-unit-sidebar { position: sticky; top: 90px; width: 100%; min-height: 420px; margin: 0; }
.ad-unit-result { width: 100%; margin: 20px 0 0; min-height: 102px; }
.workbench + .ad-unit-sidebar { margin-top: 0; margin-bottom: 22px; min-height: 112px; }
.ad-unit-footer { margin-top: 28px; margin-bottom: 20px; min-height: 108px; }

@media (max-width: 980px) {
  .container { width: min(var(--max), calc(100% - 32px)); }
  .header-search { display: none; }
  .nav { display: none; }
  .menu-button { display: block; }
  .nav.open { position: absolute; top: 72px; left: 0; right: 0; display: flex; flex-direction: column; align-items: stretch; padding: 18px 24px; background: var(--navy); }
  .hero-stage { min-height: 610px; align-items: start; }
  .hero-stage::after { background: linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(255,255,255,.93) 52%, rgba(255,255,255,.15) 100%); }
  .hero-copy { padding-top: 42px; }
  .hero-photo { object-position: 68% bottom; }
  .feature-strip, .catalog-grid { grid-template-columns: repeat(2,1fr); }
  .feature-item { margin: 12px 0; }
  .benefit-card, .workbench, .standard-calc, .calc-layout, .calc-with-rail { grid-template-columns: 1fr; }
  .feature-ad-rail .ad-unit-sidebar { position: static; min-height: 112px; margin-bottom: 22px; }
  .benefit-copy { margin: 0; clip-path: none; }
  .benefit-photo { max-height: 360px; }
  .formula-panel { display: block; }
  .download { margin-top: 18px; }
  .footer-grid { grid-template-columns: repeat(2,1fr); padding-inline: 26px; }
}
@media (max-width: 600px) {
  h1 { font-size: 2.35rem; }
  .header-row { min-height: 66px; }
  .brand { font-size: .84rem; }
  .brand-mark { width: 38px; height: 38px; flex-basis: 38px; }
  .hero-stage { min-height: 705px; }
  .hero-copy { padding-top: 36px; }
  .hero-copy p { font-size: .96rem; }
  .hero-actions .button { width: 100%; }
  .feature-strip, .catalog-grid, .footer-grid { grid-template-columns: 1fr; }
  .feature-item { justify-content: start; border: 0; }
  .benefit-copy { padding: 37px 30px; }
  .page-hero { padding-top: 34px; }
  .filter-button { min-width: 0; }
  .tool-card { min-height: 0; }
  .standard-calc { grid-template-columns: 1fr; }
  .formula-panel { margin-bottom: 28px; }
  .ad-unit { width: calc(100% - 32px); }
  .catalog-grid .ad-unit-catalog, .ad-unit-result, .sidebar .ad-unit-sidebar { width: 100%; }
}
@media print {
  .site-header, .download, .ad-unit { display: none; }
  .calculation-page { background: #fff; }
  .workbench { display: grid; grid-template-columns: 1fr 1fr; }
  .workbench .panel:nth-child(3), .formula-panel { grid-column: 1 / -1; }
  .panel { box-shadow: none; }
}
