/* ─────────────────────────────────────────────────────────────────────────
   MetaloRep — página de pré-lançamento (metalorep.com)
   Sistema claro e amigável (referência Benbase): cartões suaves
   arredondados, tipografia primeiro, grená #7F1734 só como acento,
   escala de 8 px, Archivo + JetBrains Mono (números e eyebrows).
   ───────────────────────────────────────────────────────────────────────── */
@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/jbmono-latin.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --ink: #1a1a1a;
  --ink-soft: #3c4046;
  --muted: #6a7076;
  --line: #e4e7eb;
  --bg: #ffffff;
  --bg-soft: #f5f6f7;
  --garnet: #7f1734;
  --garnet-hover: #6a132c;
  --s1: 8px;
  --s2: 16px;
  --s3: 24px;
  --s4: 32px;
  --s6: 48px;
  --s8: 64px;
  --s12: 96px;
  --radius-card: 16px;
  --radius-btn: 6px;
  --maxw: 72rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
body {
  font-family: "Archivo", system-ui, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.mono {
  font-family: "JetBrains Mono", ui-monospace, monospace;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--garnet);
  outline-offset: 2px;
}
img,
video {
  max-width: 100%;
  display: block;
}
.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--s3);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: var(--s1) var(--s2);
  z-index: 50;
}
.skip-link:focus {
  left: 0;
}

/* ── Botões ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  border: 0;
  border-radius: var(--radius-btn);
  background: var(--garnet);
  color: #fff;
  padding: 12px 20px;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.btn:hover {
  background: var(--garnet-hover);
}
.btn:active {
  transform: translateY(1px);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header .wrap {
  display: flex;
  align-items: center;
  gap: var(--s2);
  padding-block: 12px;
}
.wordmark {
  font-weight: 800;
  font-size: 1.32rem;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
}
.wordmark b {
  color: var(--garnet);
  font-weight: 800;
}
.header__spacer {
  flex: 1;
}
.lang {
  display: flex;
  font-size: 0.875rem;
}
.lang a {
  color: var(--muted);
  text-decoration: none;
  padding: 12px 10px;
}
.lang a[aria-current="true"] {
  color: var(--ink);
  font-weight: 600;
}
.header .btn {
  padding: 8px 16px;
}

/* ── Cabeças de secção ──────────────────────────────────────────────────── */
.eyebrow {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.head-center {
  text-align: center;
}
h2 {
  margin-top: 12px;
  font-size: clamp(1.75rem, 1vw + 1.4rem, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.section {
  padding-block: clamp(80px, 6vw + 48px, 128px);
}
.section--soft {
  background: var(--bg-soft);
}

/* ── Herói (centrado, vídeo náutico) ────────────────────────────────────── */
.hero {
  padding-block: clamp(96px, 12vh, 144px) var(--s8);
  text-align: center;
}
.hero h1,
.hero__sub {
  margin-inline: auto;
}
.hero h1 {
  font-size: clamp(2.25rem, 4.6vw + 0.25rem, 3.9rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hero__sub {
  margin-top: var(--s3);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-wrap: balance;
}
.hero__actions {
  margin-top: var(--s4);
}
.hero__figure {
  position: relative;
  margin-top: var(--s8);
  margin-inline: auto;
  max-width: 56rem;
  aspect-ratio: 16 / 9;
  max-height: 440px;
  border-radius: var(--radius-card);
  overflow: hidden;
}
@media (max-width: 640px) {
  .hero__figure {
    aspect-ratio: 16 / 10;
  }
}
.hero__figure img,
.hero__figure video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__figure video {
  opacity: 0;
  transition: opacity 0.4s ease;
}
.hero__figure video.is-on {
  opacity: 1;
}
.video-toggle {
  position: absolute;
  right: var(--s1);
  bottom: var(--s1);
  z-index: 2;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  font-size: 0.75rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

/* ── Obra — faixa em movimento contínuo ─────────────────────────────────── */
.obra-marquee {
  margin-top: var(--s6);
  overflow: hidden;
}
.obra-track {
  display: flex;
  width: max-content;
  animation: obra-scroll 55s linear infinite;
}
@media (hover: hover) and (pointer: fine) {
  .obra-marquee:hover .obra-track {
    animation-play-state: paused;
  }
}
@keyframes obra-scroll {
  to {
    transform: translateX(-50%);
  }
}
.obra-set {
  display: flex;
  gap: var(--s3);
  padding-inline-end: var(--s3);
  list-style: none;
}
.obra-set figure {
  flex: 0 0 auto;
  margin: 0;
}
.obra-track img {
  height: clamp(200px, 26vw, 300px);
  width: auto;
  border-radius: var(--radius-card);
}
.obra-track figcaption {
  margin-top: 12px;
  font-size: 0.875rem;
  color: var(--muted);
  text-align: center;
}
@media (prefers-reduced-motion: reduce) {
  .obra-track {
    animation: none;
  }
  .obra-marquee {
    overflow-x: auto;
    padding-bottom: var(--s2);
  }
}

/* ── Divisões — cartões suaves ──────────────────────────────────────────── */
.div-cards {
  margin-top: var(--s6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(21rem, 1fr));
  gap: var(--s3);
}
.div-card {
  background: var(--bg-soft);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.div-card > img {
  width: calc(100% - 2 * var(--s2));
  height: clamp(180px, 18vw, 240px);
  flex: 0 0 auto;
  margin: var(--s2) var(--s2) 0;
  object-fit: cover;
  object-position: center 60%;
  border-radius: 12px;
}
.div-card__body {
  padding: var(--s3) var(--s4) var(--s4);
  display: flex;
  flex-direction: column;
  flex: 1;
}
.div-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
}
.div-card__line {
  margin-top: 4px;
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--ink);
}
.pills {
  margin-top: var(--s3);
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s1);
}
.pills li {
  background: #fff;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.875rem;
  color: var(--ink-soft);
}
.specline {
  margin-top: auto;
  padding-top: var(--s3);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: var(--muted);
}

/* ── Valores — cartões suaves ───────────────────────────────────────────── */
.values {
  margin-top: var(--s6);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: var(--s3);
}
.value {
  background: #fff;
  border-radius: var(--radius-card);
  padding: var(--s3) var(--s3) var(--s4);
}
.value h3 {
  font-size: 1.0625rem;
  font-weight: 600;
}
.value p {
  margin-top: var(--s1);
  font-size: 0.9375rem;
  color: var(--ink-soft);
}

/* ── Fundador ───────────────────────────────────────────────────────────── */
.founder {
  margin-top: var(--s6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.founder a {
  display: block;
  border-radius: var(--radius-card);
}
.founder img {
  width: 176px;
  height: 176px;
  object-fit: cover;
  border-radius: var(--radius-card);
}
.founder__name {
  margin-top: var(--s2);
  font-size: 1.125rem;
  font-weight: 600;
}
.founder__role {
  margin-top: 4px;
  font-size: 0.9375rem;
  color: var(--muted);
}

/* ── Contacto ───────────────────────────────────────────────────────────── */
.contact {
  text-align: center;
}
.contact .wrap {
  max-width: 40rem;
}
.contact__phone {
  display: inline-block;
  margin-top: var(--s4);
  padding-block: var(--s1);
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  color: var(--ink);
  text-decoration: none;
}
.contact__phone:hover {
  text-decoration: underline;
  text-decoration-color: var(--garnet);
  text-underline-offset: 6px;
}
.contact__city {
  margin-top: var(--s2);
  color: var(--ink-soft);
}
#contactos {
  scroll-margin-top: 96px;
}

/* ── Rodapé (com a brand promise) ───────────────────────────────────────── */
.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.72);
  padding-block: var(--s8) var(--s4);
  font-size: 0.875rem;
}
.footer__line {
  color: #fff;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.015em;
}
.footer__row {
  margin-top: var(--s6);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--s3);
}
.footer .wordmark {
  font-size: 1.75rem;
  color: #fff;
}
.footer__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s1) var(--s3);
}
.footer a {
  display: inline-block;
  padding-block: var(--s1);
  color: inherit;
  text-decoration: none;
}
.footer a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}
.footer :focus-visible {
  outline-color: #fff;
}

/* ── Afinações mobile ───────────────────────────────────────────────────── */
.btn {
  white-space: nowrap;
}
.obra-track img {
  max-width: none;
}
.obra-set figcaption {
  width: 0;
  min-width: 100%;
}
@media (max-width: 520px) {
  .header .wrap {
    gap: 6px;
    padding-inline: 12px;
  }
  .wordmark {
    font-size: clamp(0.9rem, 4.2vw, 1.05rem);
  }
  .lang a {
    padding: 12px 5px;
  }
  .header .btn {
    padding: 8px 10px;
    font-size: 0.8125rem;
  }
}

/* ── Botão voltar ao topo ───────────────────────────────────────────────── */
.to-top {
  position: fixed;
  right: var(--s3);
  bottom: var(--s3);
  z-index: 20;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(26, 26, 26, 0.08);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, color 0.15s ease;
}
.to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.to-top:hover {
  color: var(--garnet);
}

/* ── Barra de progresso de leitura ──────────────────────────────────────── */
.progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 30;
  background: var(--garnet);
  transform-origin: 0 50%;
  transform: scaleX(0);
  pointer-events: none;
}

/* Grená claro no rodapé escuro (contraste AA sobre carvão). */
.footer .wordmark b {
  color: #d8798f;
}
