/* Feracer modern — ferro.pt inspired. Track B only. Flat colors, no gradients. */

:root {
  /* Exact colors sampled from logo feracer.pdf */
  --navy: #102860;
  --navy-deep: #0a1a40;
  --navy-mid: #163570;
  --navy-soft: #1e457f;
  --steel: #606060;
  --steel-light: #888888;
  --black: #121820;
  --sidebar: #0a1a40;
  --white: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --ink: #1a1f28;
  --gray: #606060;
  --line: #e4e6ea;
  --paper: #f4f5f7;
  --sidebar-w: 72px;
  --menu-panel-w: 168px;
  /* Fixed .brand-corner hex (left 28 + ~40 mark + gap) — content must clear this */
  --brand-safe: 100px;
  --font: "Titillium Web", "Helvetica Neue", Arial, sans-serif;
  --display: "Outfit", "Titillium Web", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
svg { width: 1em; height: 1em; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0;
}

.skip {
  position: absolute;
  left: -9999px;
  background: var(--navy-deep);
  color: #fff;
  padding: 12px 18px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ——— Right sidebar (ferro.pt) ——— */
.rail {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar);
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 22px 0;
  transition: width 0.35s ease, background 0.35s ease, padding 0.35s ease;
}
/* Menu aberto: painel direito branco e mais largo (como ferro.pt) */
body.menu-open .rail {
  width: var(--menu-panel-w);
  background: #fff;
  padding: 28px 0;
}
body.menu-open .rail-icons {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
body.menu-open .rail-spacer {
  height: 56px;
}
/* Menu aberto: logo completo no fundo do painel branco */
.rail-brand {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  margin-top: auto;
  padding: 20px 14px 28px;
  width: 100%;
  box-sizing: border-box;
}
body.menu-open .rail-brand {
  display: flex;
}
.rail-logo {
  width: min(120px, 78%);
  height: auto;
  display: block;
}
.burger {
  position: fixed;
  top: 22px;
  /* Centrado na barra azul da direita */
  right: calc((var(--sidebar-w) - 56px) / 2);
  z-index: 90;
  width: 56px;
  height: 56px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: #fff;
  padding: 0;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
  transition: right 0.35s ease, color 0.2s ease, top 0.35s ease;
}
/* Sempre branco na barra azul; no menu aberto (painel branco) passa a navy */
body.menu-open .burger {
  color: var(--navy);
  right: calc((var(--menu-panel-w) - 56px) / 2);
  top: 24px;
}
.burger span {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  margin-left: -11px;
  background: currentColor;
  transform-origin: center;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease, width 0.2s ease;
}
.burger span:nth-child(1) { top: 20px; }
.burger span:nth-child(2) { top: 27px; }
.burger span:nth-child(3) {
  top: 34px;
  width: 14px;
  margin-left: -3px;
}
.burger[aria-expanded="true"] span:nth-child(1) {
  top: 27px;
  width: 22px;
  margin-left: -11px;
  transform: rotate(45deg);
}
.burger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.burger[aria-expanded="true"] span:nth-child(3) {
  top: 27px;
  width: 22px;
  margin-left: -11px;
  transform: rotate(-45deg);
}
.rail-spacer {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  transition: height 0.35s ease;
}

.rail-icons {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  padding: 20px 0;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.rail-icons a {
  color: rgba(255, 255, 255, 0.85);
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  transition: color 0.2s;
}
.rail-icons a:hover,
.rail-icons a.active { color: #fff; }
.rail-icons svg { width: 22px; height: 22px; stroke: currentColor; }

.rail-cta { display: none; }

/* Full-page menu (ferro.pt) — painel branco à direita; moldura azul no hover */
.menu {
  position: fixed;
  inset: 0;
  right: var(--sidebar-w);
  background: var(--navy);
  color: #fff;
  z-index: 50;
  padding: clamp(100px, 14vh, 140px) clamp(36px, 8vw, 100px) 48px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.35s ease, transform 0.35s ease, visibility 0.35s, right 0.35s ease;
  overflow: hidden;
}
body.menu-open .menu {
  right: var(--menu-panel-w);
}
.menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}
.menu-bg,
.menu-veil,
.menu-frame {
  position: absolute;
  pointer-events: none;
}
.menu-bg,
.menu-veil {
  inset: 0;
  transition: opacity 0.45s ease, background 0.45s ease, mix-blend-mode 0.45s ease,
    top 0.45s ease, right 0.45s ease, bottom 0.45s ease, left 0.45s ease;
}
.menu-bg { z-index: 0; }
.menu-bg-layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.06);
  filter: grayscale(1) contrast(1.08) brightness(0.95);
  transition: opacity 0.5s ease, transform 0.8s ease;
}
.menu.is-preview .menu-bg-layer.is-active {
  opacity: 1;
  transform: scale(1);
}
.menu-veil {
  z-index: 1;
  background: var(--navy);
  opacity: 0;
  mix-blend-mode: normal;
}
.menu.is-preview .menu-veil {
  opacity: 0.8;
  background: #0c234f;
  mix-blend-mode: multiply;
}
/* Moldura só no hover — tons de azul, sem branco */
.menu-frame {
  z-index: 2;
  top: clamp(18px, 2.5vw, 32px);
  left: clamp(18px, 2.5vw, 32px);
  right: clamp(18px, 2.5vw, 32px);
  bottom: clamp(18px, 2.5vw, 32px);
  border: clamp(12px, 1.5vw, 22px) solid var(--navy-soft);
  box-sizing: border-box;
  opacity: 0;
  transform: scale(0.988);
  transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.35s ease;
}
.menu.is-preview .menu-frame {
  opacity: 1;
  transform: scale(1);
  border-color: var(--navy-mid);
}
.menu.is-preview .menu-bg,
.menu.is-preview .menu-veil {
  top: clamp(18px, 2.5vw, 32px);
  left: clamp(18px, 2.5vw, 32px);
  right: clamp(18px, 2.5vw, 32px);
  bottom: clamp(18px, 2.5vw, 32px);
}
.menu nav {
  position: relative;
  z-index: 5;
  display: grid;
  gap: 4px;
  max-width: 720px;
  padding: 0 0 clamp(12px, 2vw, 28px);
  margin-bottom: clamp(8px, 2vh, 24px);
}
.menu a {
  font-family: var(--display);
  font-size: clamp(1.8rem, 4.5vw, 3.2rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  padding: 8px 0;
  color: rgba(255, 255, 255, 0.55);
  border: 0;
  transition: color 0.2s, padding-left 0.2s;
  line-height: 1.15;
}
.menu a:hover,
.menu a.active {
  color: #fff;
  padding-left: 12px;
}

@media (max-width: 720px) {
  :root { --menu-panel-w: 96px; }
}

body.menu-open {
  overflow: hidden;
}
body.menu-open .top-nav {
  visibility: hidden;
  pointer-events: none;
}

.page { margin-right: var(--sidebar-w); }

/* ——— Top bar (Major nav labels + ferro minimal) ——— */
.brand-corner {
  position: fixed;
  top: 28px;
  left: 28px;
  z-index: 70;
  display: grid;
  place-items: start start;
  width: 170px;
  height: 48px;
  text-decoration: none;
  overflow: visible;
}
.brand-word,
.brand-mark {
  grid-area: 1 / 1;
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.brand-word {
  position: relative;
  display: block;
  width: 148px;
  height: 30px;
  margin-top: 8px;
  opacity: 1;
  transform: translateY(0);
}
.brand-word img,
.brand-mark img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
  transition: opacity 0.35s ease;
}
.brand-mark {
  display: block;
  position: relative;
  width: 40px;
  height: 48px;
  opacity: 0;
  transform: translateY(6px) scale(0.92);
  pointer-events: none;
}

/* Default: assume dark hero at top → white wordmark */
.brand-word-white { opacity: 1; }
.brand-word-color { opacity: 0; }
.brand-mark-white { opacity: 1; }
.brand-mark-color { opacity: 0; }

body.brand-compact .brand-word {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
body.brand-compact .brand-mark {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Dark surfaces: white word / white mark */
body.brand-on-dark .brand-word-white { opacity: 1; }
body.brand-on-dark .brand-word-color { opacity: 0; }
body.brand-on-dark .brand-mark-white { opacity: 1; }
body.brand-on-dark .brand-mark-color { opacity: 0; }

/* Light surfaces: logo colors (navy + gray) */
body:not(.brand-on-dark) .brand-word-white { opacity: 0; }
body:not(.brand-on-dark) .brand-word-color { opacity: 1; }
body:not(.brand-on-dark) .brand-mark-white { opacity: 0; }
body:not(.brand-on-dark) .brand-mark-color { opacity: 1; }

/* Menu aberto: só o losango (marca), branco */
body.menu-open .brand-word {
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
}
body.menu-open .brand-mark {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
body.menu-open .brand-word-white { opacity: 1; }
body.menu-open .brand-word-color { opacity: 0; }
body.menu-open .brand-mark-white { opacity: 1; }
body.menu-open .brand-mark-color { opacity: 0; }

.topbar {
  position: absolute;
  top: 0;
  left: 0;
  right: var(--sidebar-w);
  z-index: 20;
  padding: 22px 36px;
  display: flex;
  align-items: center;
  gap: 36px;
  pointer-events: none;
}
.brand-logo {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}
.brand-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.footer-logo img {
  height: 48px;
  width: auto;
  margin-bottom: 16px;
}
.top-nav {
  display: flex;
  gap: 4px;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  pointer-events: auto;
  padding-right: 56px;
}
.top-nav a {
  padding: 8px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s;
}
.top-nav a:hover,
.top-nav a.active { color: #fff; }

/* Major-style dotted heading */
.ot-heading span {
  display: inline-block;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
  position: relative;
  padding-right: 28px;
}
.ot-heading span::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--navy);
  transform: translateY(-50%);
}
.ot-heading h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  font-weight: 500;
}

/* ——— Hero: Major logo-center + ferro photo ——— */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  overflow: hidden;
  background: var(--navy);
}
.hero-media {
  position: absolute;
  inset: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: slow-zoom 22s ease-in-out infinite alternate;
}
.hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.32);
}
.hero-center {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}
.hero-logo {
  width: min(520px, 78vw);
  height: auto;
  margin: 0 auto;
  opacity: 0.95;
}

.scroll-btn {
  position: absolute;
  left: 50%;
  bottom: 36px;
  transform: translateX(-50%);
  z-index: 2;
  width: 28px;
  height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 20px;
  display: grid;
  place-items: start center;
  padding-top: 8px;
}
.scroll-btn span {
  width: 4px;
  height: 8px;
  background: #fff;
  border-radius: 2px;
  animation: scroll-dot 1.6s ease-in-out infinite;
}
@keyframes scroll-dot {
  0%, 100% { opacity: 1; transform: translateY(0); }
  50% { opacity: 0.35; transform: translateY(10px); }
}

@keyframes slow-zoom {
  from { transform: scale(1); }
  to { transform: scale(1.06); }
}

/* ——— Products stage ——— */
.products-stage {
  background: var(--navy-deep);
  color: #fff;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}
.products-stage-media {
  position: relative;
  min-height: 420px;
  overflow: hidden;
}
.products-stage-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
  opacity: 0.85;
}
.products-stage-list {
  padding: clamp(48px, 8vw, 96px) clamp(28px, 5vw, 64px);
  padding-left: max(var(--brand-safe), clamp(28px, 5vw, 64px));
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.products-stage-list .ot-heading {
  margin-bottom: 28px;
}
.products-stage-list .ot-heading span { color: var(--navy); }
.products-stage-list .ot-heading h2 { color: #fff; }
.products-stage-list ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.products-stage-list a {
  display: block;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 1.05rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.78);
  transition: color 0.2s, padding-left 0.2s;
}
.products-stage-list li:last-child a { border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.products-stage-list ul a:hover {
  color: #fff;
  padding-left: 10px;
}
.products-stage-list .explore {
  margin-top: 36px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
}
.products-stage-list .explore i {
  width: 42px;
  height: 42px;
  background: var(--navy);
  display: grid;
  place-items: center;
}
.products-stage-list .explore:hover i { background: var(--navy-deep); }
.products-stage-list .explore svg { width: 16px; height: 16px; }

/* ——— About (Major split + copy) ——— */
.about {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
}
.about-media {
  position: relative;
  min-height: 300px;
  background: #ddd;
  overflow: hidden;
}
.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  inset: 0;
}
.about-body {
  padding: clamp(48px, 7vw, 88px);
  padding-left: max(var(--brand-safe), clamp(48px, 7vw, 88px));
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--paper);
}
.about-body .ot-heading { margin-bottom: 22px; }
.about-body p {
  color: var(--gray);
  margin: 0 0 14px;
  max-width: 46ch;
  font-size: 1.02rem;
}
.about-body .link {
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.about-body .link i {
  width: 42px;
  height: 42px;
  background: var(--navy);
  color: #fff;
  display: grid;
  place-items: center;
}
.about-body .link:hover i { background: var(--navy-deep); }
.about-body .link svg { width: 16px; height: 16px; }

/* ——— Stats (Major counters) ——— */
.stats {
  background: var(--navy-deep);
  color: #fff;
  padding: 64px 0;
}
.stats-inner {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  text-align: center;
}
.stat {
  position: relative;
}
.stat b {
  display: inline;
  font-family: var(--display);
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 500;
  letter-spacing: -0.03em;
}
.stat .plus {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: var(--navy);
  margin-left: 2px;
}
.stat h6 {
  margin: 10px 0 0;
  font-family: var(--font);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

/* ——— Simple home pillars ——— */
.pillars {
  display: grid;
  grid-template-columns: 1fr;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.pillar {
  padding: clamp(48px, 7vw, 72px) clamp(28px, 5vw, 56px);
  /* Never sit under the fixed hex logo when scrolling */
  padding-left: max(var(--brand-safe), clamp(28px, 5vw, 56px));
  background: var(--white);
  transition: background 0.2s;
  border-right: 1px solid var(--line);
}
.pillar:last-child { border-right: 0; }
.pillar:hover { background: var(--paper); }
.pillar .label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 12px;
}
.pillar strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 18px;
}
.pillar .more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--navy);
}
.pillar .more svg { width: 15px; height: 15px; }

@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar { border-right: 0; border-bottom: 1px solid var(--line); }
  .pillar:last-child { border-bottom: 0; }
}

/* ——— Catalogue ——— */
.section,
.stats-inner,
.cta-inner,
.footer-inner,
.page-hero-inner {
  --_band: min(1100px, calc(100% - var(--brand-safe) - 32px));
  width: var(--_band);
  margin-left: max(var(--brand-safe), calc((100% - var(--_band)) / 2));
  margin-right: auto;
}
.section {
  padding: clamp(64px, 9vw, 110px) 0;
}
.section-head { margin-bottom: 40px; max-width: 560px; }
.section-head.row {
  max-width: none;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  flex-wrap: wrap;
}
.section-head .label {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin: 0 0 12px;
  font-weight: 600;
}
.section-head h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 500;
}

/* News (Major novidades) */
.news-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.news-card a {
  display: block;
  background: var(--paper);
  transition: background 0.2s;
}
.news-card a:hover { background: #ececec; }
.news-art {
  height: 180px;
  background: var(--navy);
}
.news-art[data-i="1"] { background: #3d4f6a; }
.news-cat {
  display: inline-block;
  margin: 18px 22px 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}
.news-card h3 {
  margin: 8px 22px 0;
  font-size: 1.35rem;
  font-weight: 500;
}
.news-card p {
  margin: 8px 22px 24px;
  color: var(--gray);
  font-size: 0.95rem;
}

.catalogue {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.catalogue a {
  background: #fff;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  transition: background 0.2s;
}
.catalogue a:hover { background: var(--paper); }
.catalogue-art {
  height: 120px;
  background: var(--navy);
  overflow: hidden;
}
.catalogue-art:has(img) { height: auto; aspect-ratio: 4 / 3; }
.catalogue-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.catalogue a:hover .catalogue-art img { transform: scale(1.04); }
@media (prefers-reduced-motion: reduce) {
  .catalogue a:hover .catalogue-art img { transform: none; }
}
.catalogue-art[data-tone="1"] { background: var(--navy-deep); }
.catalogue-art[data-tone="2"] { background: #3d4f6a; }
.catalogue-art[data-tone="3"] { background: var(--steel); }
.catalogue-art[data-tone="4"] { background: var(--navy-deep); }
.catalogue-art[data-tone="5"] { background: #5a6a7e; }
.catalogue-body { padding: 20px 20px 24px; flex: 1; display: flex; flex-direction: column; }
.catalogue-body h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin-bottom: 8px;
}
.catalogue-body p {
  margin: 0;
  color: var(--gray);
  font-size: 0.92rem;
  flex: 1;
}
.catalogue-body .more {
  margin-top: 16px;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--navy);
}

/* ——— Page hero ——— */
.page-hero {
  position: relative;
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: var(--navy-deep);
  overflow: hidden;
}
.page-hero-media { position: absolute; inset: 0; }
.page-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero-media img[src$="produtos-topo.jpg"] { object-position: center 78%; }
.page-hero-media img[src$="calhas-topo.jpg"] { object-position: center 35%; }
.page-hero-media img[src$="chapas-topo.jpg"] { object-position: center 62%; }
.page-hero-media img[src$="tubo-estrutural-topo.jpg"] { object-position: center 50%; }
.page-hero-media img[src$="tubo-conducao-topo.jpg"] { object-position: center 40%; }
.page-hero-shade {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}
.page-hero-inner {
  position: relative;
  z-index: 1;
  padding: 140px 0 56px;
}
.page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  font-weight: 500;
  margin-bottom: 12px;
}
.page-hero p {
  margin: 0;
  max-width: 42ch;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.05rem;
}

.prose { max-width: 62ch; }
.prose p { color: var(--gray); font-size: 1.05rem; margin: 0 0 16px; }

/* ——— Empresa / Sobre (ferro.pt/sobre) ——— */
.about-hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-deep);
  overflow: hidden;
  color: #fff;
}
.about-hero-media { position: absolute; inset: 0; }
.about-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}
.about-hero-shade {
  position: absolute;
  inset: 0;
  /* Neutral dark wash — avoids pushing photos into navy/blue */
  background: rgba(12, 14, 18, 0.38);
}
.about-hero-center {
  position: relative;
  z-index: 1;
  padding: 0 32px;
}
.about-hero-logo {
  width: min(420px, 70vw);
  height: auto;
}
.about-scroll {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 2;
  width: 48px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: #fff;
}
.about-scroll span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.about-intro {
  background: var(--navy);
  padding: 0;
}
.about-intro-panel {
  background: transparent;
  color: #fff;
  padding: clamp(64px, 10vw, 140px) clamp(28px, 10vw, 160px);
  max-width: 1280px;
  margin: 0 auto;
}
.about-intro-panel h1 {
  font-size: clamp(1.8rem, 4.2vw, 3.2rem);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 28px;
  max-width: 18ch;
}
.about-intro-panel p {
  margin: 0;
  max-width: 52ch;
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
}

.about-copy {
  padding: clamp(72px, 12vw, 140px) clamp(28px, 5vw, 64px);
  padding-left: max(var(--brand-safe), clamp(28px, 5vw, 64px));
  background: var(--white);
}
.about-copy-alt {
  background: var(--paper);
  padding-top: clamp(56px, 8vw, 100px);
  padding-bottom: clamp(56px, 8vw, 100px);
}
.about-copy-inner {
  max-width: 560px;
  margin-left: auto;
  margin-right: clamp(8px, 2vw, 40px);
  text-align: left;
}
.about-mark {
  display: none;
}
.about-copy h2 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 500;
  line-height: 1.12;
  margin: 0 0 24px;
  max-width: 14ch;
  color: var(--ink);
}
.about-copy p {
  margin: 0;
  color: var(--gray);
  font-size: 1.08rem;
  line-height: 1.7;
  max-width: 46ch;
}

.about-bleed {
  position: relative;
  margin: 0;
  height: clamp(240px, 42vh, 460px);
  overflow: hidden;
  background: var(--navy-deep);
}
.about-bleed img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 58%;
}
.about-bleed figcaption {
  position: absolute;
  left: 24px;
  bottom: 40px;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.45);
}

/* ferro.pt "soluções globais" style block */
.about-solution {
  position: relative;
  background: var(--white);
  min-height: clamp(560px, 78vh, 820px);
  padding: clamp(56px, 8vw, 100px) 0 0;
  overflow: hidden;
}
.about-solution-text {
  position: relative;
  z-index: 2;
  width: min(520px, calc(100% - 48px));
  margin-left: clamp(20px, 6vw, 100px);
  padding-bottom: clamp(40px, 8vw, 80px);
}
.about-solution-text h2 {
  font-size: clamp(2rem, 4.8vw, 3.4rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-transform: lowercase;
  margin: 0 0 28px;
  max-width: 12ch;
}
.about-solution-text p {
  margin: 0 0 18px;
  color: var(--steel-light);
  font-size: 1.02rem;
  line-height: 1.7;
  max-width: 42ch;
}
.about-solution-text p:last-child { margin-bottom: 0; }
.about-solution-media {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(58%, 820px);
  margin: 0;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--paper);
}
.about-solution-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

@media (max-width: 900px) {
  .about-solution {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding-bottom: 0;
  }
  .about-solution-text {
    width: auto;
    margin-right: 20px;
    padding-bottom: 36px;
  }
  .about-solution-media {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 11;
  }
}

/* Timeline — ferro.pt white horizontal scrub */
.about-timeline {
  position: relative;
  background: var(--white);
  color: var(--ink);
  padding: clamp(100px, 14vw, 160px) 0 clamp(72px, 10vw, 110px);
  overflow: hidden;
}
.about-timeline-bg {
  position: absolute;
  top: clamp(28px, 5vw, 56px);
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  width: 100%;
  text-align: center;
  font-family: var(--display);
  font-size: clamp(5rem, 16vw, 10rem);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.9;
  color: #eceff3;
  pointer-events: none;
  user-select: none;
}
.about-timeline-track {
  position: relative;
  z-index: 1;
  overflow-x: auto;
  cursor: grab;
  padding: clamp(56px, 9vw, 100px) 0 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.about-timeline-track::-webkit-scrollbar { display: none; }
.about-timeline-track.is-dragging {
  cursor: grabbing;
  user-select: none;
}
.about-timeline-list {
  list-style: none;
  margin: 0;
  padding: 0 clamp(28px, 7vw, 100px);
  display: flex;
  gap: clamp(56px, 9vw, 120px);
  width: max-content;
}
.about-timeline-list li {
  width: min(300px, 66vw);
  flex: 0 0 auto;
}
.about-timeline-list h3 {
  font-family: var(--display);
  font-size: clamp(2.2rem, 4.5vw, 3rem);
  font-weight: 400;
  color: var(--navy);
  margin: 0 0 18px;
  letter-spacing: -0.02em;
}
.about-timeline-list p {
  margin: 0;
  color: #9b9b9b;
  font-size: 1rem;
  line-height: 1.65;
  max-width: 28ch;
}

.about-location {
  padding: clamp(80px, 12vw, 140px) clamp(20px, 4vw, 48px);
  background: var(--white);
  text-align: center;
}
.about-location-inner {
  max-width: 560px;
  margin: 0 auto;
}
.about-location h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  margin: 0 0 18px;
}
.about-location > .about-location-inner > p {
  margin: 0 0 36px;
  color: var(--gray);
  font-size: 1.08rem;
  line-height: 1.6;
}
.about-location address {
  font-style: normal;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 32px;
}
.about-location address strong {
  display: block;
  font-family: var(--display);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.about-location-logo {
  display: inline-block;
  line-height: 0;
  margin-bottom: 12px;
}
.about-location-logo img {
  height: 40px;
  width: auto;
  margin-inline: auto;
}

@media (max-width: 700px) {
  .about-copy-inner {
    margin-left: 0;
    margin-right: 0;
    max-width: none;
  }
  .brand-corner { left: 18px; top: 20px; }
}

.detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}
.detail-art {
  aspect-ratio: 4/3;
  background: var(--navy);
  overflow: hidden;
}
.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.detail h1 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 500;
  margin-bottom: 14px;
}
.detail p { color: var(--gray); }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }

/* ——— Price table (PDF view + download) ——— */
.price-table-panel {
  display: grid;
  gap: 28px;
}
.price-table-intro p {
  margin: 0 0 20px;
  color: var(--gray);
  max-width: 54ch;
  font-size: 1.05rem;
}
.price-table-intro strong { color: var(--ink); font-weight: 600; }
.price-table-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.price-table-viewer {
  background: var(--paper);
  border: 1px solid var(--line);
  overflow: hidden;
  min-height: min(72vh, 820px);
  height: min(72vh, 820px);
}
.price-table-viewer iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #fff;
}

@media (max-width: 720px) {
  .price-table-viewer {
    min-height: 60vh;
    height: 60vh;
  }
}

/* ——— Tubos: ficha técnica compilada (separadores) ——— */
.tube-tabs {
  display: flex;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin-bottom: 36px;
}
.tube-tabs button {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 14px 22px;
  font-family: var(--display);
  font-size: 1rem;
  font-weight: 500;
  color: var(--gray);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}
.tube-tabs button:hover { color: var(--ink); }
.tube-tabs button[aria-selected="true"] {
  color: var(--navy);
  border-bottom-color: var(--navy);
}
.tube-tabs button:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: -2px;
}
.tube-sheet { display: grid; gap: 28px; }
.tube-sheet + .tube-sheet { margin-top: 64px; }
.tube-sheet[hidden] { display: none; }
.tube-sheet-head {
  display: grid;
  grid-template-columns: minmax(180px, 280px) 1fr;
  gap: 36px;
  align-items: center;
}
.tube-sheet-head img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}
.tube-sheet-head h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 500;
  margin-bottom: 10px;
}
.tube-sheet-head p {
  margin: 0 0 22px;
  color: var(--gray);
  max-width: 54ch;
}

@media (max-width: 720px) {
  .tube-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 28px;
  }
  .tube-tabs button { white-space: nowrap; padding: 12px 16px; }
  .tube-sheet-head { grid-template-columns: 1fr; gap: 20px; }
}
.crumb {
  font-size: 0.78rem;
  color: var(--gray);
  margin-bottom: 16px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.crumb a:hover { color: var(--navy); }

.related {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.related a {
  background: #fff;
  padding: 22px;
}
.related a:hover { background: var(--paper); }
.related h3 { font-size: 1.05rem; font-weight: 500; margin-bottom: 6px; }
.related p { margin: 0; color: var(--gray); font-size: 0.9rem; }

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  background: var(--navy);
  color: #fff;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border: 1px solid var(--navy);
  cursor: pointer;
  transition: background 0.2s;
}
.btn:hover { background: var(--navy-deep); border-color: var(--navy-deep); }
.btn svg { width: 15px; height: 15px; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-light {
  background: #fff;
  color: var(--ink);
  border-color: #fff;
}
.btn-light:hover { background: transparent; color: #fff; }

/* ——— CTA ——— */
.cta {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(64px, 9vw, 100px) 0;
  border-top: 1px solid var(--line);
}
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.cta h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 500;
  max-width: 16ch;
  margin-bottom: 10px;
  color: var(--navy);
}
.cta p { margin: 0; color: var(--gray); max-width: 36ch; }
.cta .btn {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.cta .btn:hover {
  background: var(--navy-deep);
  border-color: var(--navy-deep);
}

/* ——— Contact ——— */
.contact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 48px;
}
.contact-form { display: grid; gap: 14px; }
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
}
.contact-form input,
.contact-form textarea,
.contact-form select {
  font: inherit;
  padding: 13px 14px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}
.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}
.contact-form .btn { justify-self: start; margin-top: 4px; }
.form-note { font-size: 0.84rem; color: var(--gray); margin: 0; }
.form-ok {
  display: none;
  padding: 14px;
  background: #eaf7ef;
  border: 1px solid #b7dfc8;
  color: #1d5c3b;
}
.form-ok.show { display: block; }
.form-err {
  display: none;
  padding: 14px;
  background: #fdecec;
  border: 1px solid #f0bcbc;
  color: #8a1f1f;
}
.form-err.show { display: block; }
.form-hp { display: none; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; }
.contact-form.is-invalid input:invalid,
.contact-form.is-invalid textarea:invalid { border-color: var(--navy); }

.contact-info {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.75);
  padding: 36px 32px;
}
.contact-info-logo {
  display: inline-block;
  line-height: 0;
  margin-bottom: 28px;
}
.contact-info-logo img {
  height: 44px;
  width: auto;
  display: block;
}
.contact-info h3 {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 500;
  margin-bottom: 22px;
}
.contact-info ul,
.footer-contact {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}
.contact-info li,
.footer-contact li {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  font-size: 0.94rem;
}
.contact-info svg {
  width: 18px;
  height: 18px;
  color: #fff;
  stroke: #fff;
  stroke-width: 2.25;
  margin-top: 2px;
  flex-shrink: 0;
}
.contact-info li svg,
.footer-contact li svg {
  color: #fff;
  stroke: #fff;
  stroke-width: 2.25;
}
.contact-info a { color: rgba(255, 255, 255, 0.85); }
.contact-info a:hover { color: #fff; }

/* ——— Footer ——— */
.footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.55);
  padding: 64px 0 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.2fr;
  gap: 40px;
}
.footer h4 {
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 600;
}
.footer-brand p { margin: 0; max-width: 36ch; font-size: 0.94rem; }
.footer-nav { display: grid; gap: 10px; }
.footer-nav a:hover,
.footer-contact a:hover { color: #fff; }
.footer-contact svg {
  width: 18px;
  height: 18px;
  color: #fff;
  stroke: #fff;
  stroke-width: 2.25;
  margin-top: 2px;
}
.footer-bottom {
  width: min(1100px, calc(100% - 64px));
  margin: 48px auto 0;
  padding: 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.8rem;
}
.footer-socials { display: flex; gap: 10px; }
.footer-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.75);
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}
.footer-social:hover,
.footer-social:focus-visible {
  color: #fff;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.footer-social svg { width: 18px; height: 18px; }

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1), transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-media img,
  .scroll-btn span { animation: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 980px) {
  .products-stage,
  .about,
  .detail,
  .contact-grid { grid-template-columns: 1fr; }
  .catalogue,
  .related,
  .news-grid { grid-template-columns: 1fr; }
  .stats-inner,
  .footer-inner { grid-template-columns: 1fr; }
  .top-nav { display: none; }
}

@media (max-width: 720px) {
  :root { --sidebar-w: 56px; }
  .topbar { padding: 22px 20px; }
  .catalogue { grid-template-columns: 1fr; }
  .rail-icons { display: none; }
  .related { grid-template-columns: 1fr; }
  .hero-logo { width: min(280px, 78vw); }
}
