/* Pipefitter Academy — homepage institucional.
   Design tokens alinhados com src/styles/tokens.css (navy institucional + latão/
   laranja industrial de ação). Base CLARA com bandas navy. Tipografia de sistema
   (zero pedidos externos, CSP estrita, performance). Único look deliberado (não
   é theme-aware): página de marca, não o dashboard da app. */

:root {
  --navy-900: #0A1A33;
  --navy-800: #0F2040;
  --navy-700: #162B55;
  --navy-600: #1E3A6E;
  --navy-500: #2E4E8A;

  --ink:      #111827;
  --ink-2:    #3f4855;
  --muted:    #5b6573;
  --line:     #e5e7eb;

  --paper:    #ffffff;
  --paper-2:  #f5f7fa;
  --paper-3:  #eef2f8;

  /* Laranja industrial — ação/destaque. --accent para preenchimentos (texto
     branco bold, AA large); --accent-text para texto sobre branco (AA ≥ 4.5:1). */
  --accent:      #C0530A;
  --accent-hover:#A5450A;
  --accent-text: #A5450A;
  --accent-tint: rgba(192, 83, 10, 0.10);
  --steel:       #5A8AAA;

  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 20px;

  --shadow-1: 0 1px 2px rgba(16,24,40,.05), 0 1px 3px rgba(16,24,40,.08);
  --shadow-2: 0 6px 18px rgba(16,24,40,.08), 0 2px 6px rgba(16,24,40,.06);

  --maxw: 1200px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --header-h: 64px;
}

/* ── Reset mínimo ─────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
dl, dd { margin: 0; }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 3px solid var(--navy-500); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--navy-800); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { left: 12px; }

/* ── Botões ───────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 16px; line-height: 1;
  padding: 14px 22px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  cursor: pointer; transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
  white-space: nowrap;
}
.btn-sm { padding: 10px 16px; font-size: 14px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { background: rgba(255,255,255,.10); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }
.btn-outline { background: transparent; color: var(--navy-700); border-color: var(--navy-600); }
.btn-outline:hover { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
@media (prefers-reduced-motion: no-preference) {
  .btn:active { transform: translateY(1px); }
}

.link-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--accent-text); font-weight: 700; margin-top: auto;
}
.link-cta span[aria-hidden] { transition: transform .18s ease; }
.link-cta:hover span[aria-hidden] { transform: translateX(3px); }

.eyebrow {
  text-transform: uppercase; letter-spacing: .14em; font-size: 12.5px; font-weight: 700;
  color: var(--accent-text); margin-bottom: 14px;
}
.eyebrow-light { color: #E9B48A; }

/* ── Header ───────────────────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; color: var(--navy-800); }
.brand-mark { border-radius: 7px; }
/* Logo do cabeçalho ~2.5x: ancora no topo e transborda para baixo (sobre o hero),
   sem crescer a barra nem cortar em cima. z-index acima do hero. */
.site-header .brand-mark {
  width: 86px; height: 86px; border-radius: 16px;
  margin: 4px 0 -26px; position: relative; z-index: 3;
}
.site-header .brand { align-items: flex-start; }
.site-header .brand-name { align-self: center; }
.brand-name { font-size: 17px; letter-spacing: -0.01em; }

.nav-desktop { display: none; margin-left: 8px; gap: 26px; }
.nav-desktop a { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.nav-desktop a:hover { color: var(--navy-800); }

.header-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.lang-btn {
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; padding: 7px 12px; cursor: pointer;
}
.lang-btn.is-active { background: var(--navy-800); color: #fff; }

.nav-app-cta { display: none; }

.menu-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 42px; height: 42px; padding: 0 10px; background: transparent; border: 1px solid var(--line);
  border-radius: 10px; cursor: pointer;
}
.menu-toggle span { height: 2px; background: var(--navy-800); border-radius: 2px; transition: transform .2s ease, opacity .2s ease; }
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: flex; flex-direction: column; gap: 4px; padding: 12px 24px 20px;
  border-top: 1px solid var(--line); background: var(--paper);
}
.nav-mobile a { font-size: 17px; font-weight: 600; color: var(--ink); padding: 12px 4px; border-bottom: 1px solid var(--paper-3); }
.nav-mobile a.btn { border: none; color: #fff; margin-top: 12px; justify-content: center; }
.nav-mobile[hidden] { display: none; }

/* ── Hero ─────────────────────────────────────────────────────────────── */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy-900); }
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; opacity: .5; }
.hero-scrim {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(10,26,51,.55) 0%, rgba(10,26,51,.75) 60%, rgba(10,26,51,.92) 100%),
    radial-gradient(1000px 600px at 15% 10%, rgba(46,78,138,.45), transparent 60%);
}
.hero-inner { position: relative; z-index: 1; padding: 96px 24px 104px; max-width: 900px; }
.hero-title { font-size: clamp(2rem, 6vw, 3.9rem); letter-spacing: -0.03em; }
.hero-sub { font-size: clamp(1.05rem, 2.4vw, 1.35rem); color: rgba(255,255,255,.86); margin-top: 22px; max-width: 42ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-tagline { margin-top: 40px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; color: #E9B48A; }

/* ── Secções genéricas ────────────────────────────────────────────────── */
.section { padding: 84px 0; }
.section-alt { background: var(--paper-2); }
.section-navy { background: var(--navy-800); color: #fff; }
.section-navy h2 { color: #fff; }
.section-navy p { color: rgba(255,255,255,.82); }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3.6vw, 2.5rem); }
.section-head p { margin-top: 14px; font-size: 1.075rem; color: var(--muted); }

/* ── Pilares ──────────────────────────────────────────────────────────── */
.pillars { display: grid; grid-template-columns: 1fr; gap: 22px; }
.card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; box-shadow: var(--shadow-1); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}
.card h3 { font-size: 1.28rem; color: var(--navy-800); }
.card p { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) {
  .card:hover { box-shadow: var(--shadow-2); transform: translateY(-3px); border-color: #d7deea; }
}
.pillar-icon {
  width: 52px; height: 52px; border-radius: 13px; background-color: var(--accent-tint);
  background-repeat: no-repeat; background-position: center; background-size: 26px 26px; margin-bottom: 6px;
}
.pillar-icon[data-icon="training"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0530A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 10L12 5 2 10l10 5 10-5z'/%3E%3Cpath d='M6 12v5c0 1 2.7 3 6 3s6-2 6-3v-5'/%3E%3C/svg%3E"); }
.pillar-icon[data-icon="app"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0530A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='2'/%3E%3Cline x1='8' y1='7' x2='16' y2='7'/%3E%3Cline x1='8' y1='11' x2='9' y2='11'/%3E%3Cline x1='12' y1='11' x2='13' y2='11'/%3E%3Cline x1='8' y1='15' x2='9' y2='15'/%3E%3C/svg%3E"); }
.pillar-icon[data-icon="jobs"] { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0530A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8 7V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2'/%3E%3Cline x1='3' y1='12' x2='21' y2='12'/%3E%3C/svg%3E"); }

/* ── Profissionais ────────────────────────────────────────────────────── */
.pros-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.pros-grid li {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 16px 18px; font-weight: 600; color: var(--navy-800);
  border-left: 3px solid var(--accent);
}

/* ── Aplicação (bloco central, sem screenshots) ───────────────────────── */
.app-solo { max-width: 720px; margin: 0 auto; text-align: center; }
.app-solo .lead { font-size: 1.1rem; color: var(--muted); margin: 16px auto 26px; max-width: 52ch; }
.app-solo .feature-list { text-align: left; max-width: 560px; margin: 0 auto 30px; }

/* ── Split (aplicação — legado) ───────────────────────────────────────── */
.split { display: grid; grid-template-columns: 1fr; gap: 40px; align-items: center; }
.split-text .lead { font-size: 1.1rem; color: var(--muted); margin: 16px 0 22px; }
.feature-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 18px; margin: 0 0 26px; }
.feature-list li { position: relative; padding-left: 26px; font-weight: 600; color: var(--ink-2); }
.feature-list li::before {
  content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0530A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.split-media { position: relative; min-height: 300px; }
.split-media .shot {
  border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-2);
  background: var(--paper);
}
.split-media .shot-1 { width: 78%; }
.split-media .shot-2 { width: 58%; margin: -16% 0 0 auto; position: relative; }
.split-media .shot-3 { width: 48%; margin: -14% auto 0 6%; position: relative; }

/* ── Formação presencial (factos) ─────────────────────────────────────── */
.facts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.fact {
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius); padding: 22px;
}
.fact dt { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: #E9B48A; font-weight: 700; }
.fact dd { font-size: 1.7rem; font-weight: 800; margin-top: 8px; }
.onsite-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; margin-top: 34px; }
.onsite-note { font-weight: 700; color: #fff !important; }

/* ── Grids de cards ───────────────────────────────────────────────────── */
.cards-3 { display: grid; grid-template-columns: 1fr; gap: 22px; }
.cards-2 { display: grid; grid-template-columns: 1fr; gap: 22px; }
.card.is-soon { background: var(--paper-3); border-style: dashed; }
.badge {
  align-self: flex-start; font-size: 12px; font-weight: 700; letter-spacing: .02em;
  background: var(--navy-800); color: #fff; padding: 5px 11px; border-radius: 999px;
}
.check-list { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 22px; }
.check-list li { position: relative; padding-left: 26px; font-weight: 600; color: var(--ink-2); }
.check-list li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23C0530A' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center/contain no-repeat;
}
.check-list.muted li { color: var(--muted); }
.check-list.muted li::before { filter: grayscale(1); opacity: .5; }

/* ── Sobre ────────────────────────────────────────────────────────────── */
.about-inner { max-width: 780px; }
.about-inner h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); }
.about-desc { font-size: 1.15rem; margin-top: 18px; }
.about-mission {
  font-size: 1.35rem; font-weight: 800; color: #fff !important; margin-top: 28px;
  padding-left: 20px; border-left: 4px solid var(--accent); letter-spacing: -0.01em;
}

/* ── Footer ───────────────────────────────────────────────────────────── */
.site-footer { background: var(--navy-900); color: #fff; padding: 64px 0 28px; }
.footer-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.footer-brand { grid-column: 1 / -1; }
.footer-brand .brand { color: #fff; }
.footer-brand .brand-name { color: #fff; }
.footer-tagline { color: rgba(255,255,255,.66); margin-top: 16px; max-width: 34ch; }
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-col h4 { text-transform: uppercase; letter-spacing: .1em; font-size: 12px; color: #E9B48A; font-weight: 700; margin-bottom: 4px; }
.footer-col a { color: rgba(255,255,255,.78); font-size: 15px; }
.footer-col a:hover { color: #fff; }
.footer-bottom { margin-top: 44px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); }
.footer-bottom p { color: rgba(255,255,255,.6); font-size: 14px; }

/* ── Página 404 ───────────────────────────────────────────────────────── */
.nf { min-height: 100vh; display: flex; align-items: center; }
.nf .about-inner { text-align: center; margin: 0 auto; }
.nf .brand, .nf .brand-name { color: #fff; }
.nf .brand { justify-content: center; margin-bottom: 24px; }
.nf .eyebrow { text-align: center; }
.nf h1 { color: #fff; font-size: clamp(1.6rem, 4vw, 2.4rem); }

/* ── Reveal (respeitando reduced-motion) ──────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .reveal.is-visible { opacity: 1; transform: none; }
}

/* ── Responsivo ───────────────────────────────────────────────────────── */
@media (min-width: 720px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .cards-3 { grid-template-columns: repeat(3, 1fr); }
  .cards-2 { grid-template-columns: 1fr 1fr; }
  .facts { grid-template-columns: repeat(4, 1fr); }
  .pros-grid { grid-template-columns: repeat(4, 1fr); }
  .footer-inner { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: auto; }
}
@media (min-width: 960px) {
  .nav-desktop { display: flex; }
  .nav-app-cta { display: inline-flex; }
  .menu-toggle { display: none; }
  .nav-mobile { display: none !important; }
  .split { grid-template-columns: 1.05fr 1fr; gap: 56px; }
  .hero-inner { padding: 120px 24px 128px; }
}
