/* FPE - Fábrica Portuguesa de Etiquetas - 2026 */
:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --tint: #eef7f8;
  --ink: #16212e;
  --muted: #5b6675;
  --line: #e6e3dc;
  --accent: #0a86a3;
  --accent-ink: #076a81;
  --accent-soft: #dff1f5;
  --amber: #e39a2d;
  --amber-soft: #fcefd9;
  --green: #4f9a5e;
  --green-soft: #e3f2e5;
  --violet: #4e5bb8;
  --violet-soft: #e7e9f8;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(22, 33, 46, .05), 0 8px 24px rgba(22, 33, 46, .06);
  --shadow-lg: 0 2px 4px rgba(22, 33, 46, .05), 0 18px 40px rgba(22, 33, 46, .10);
  --wrap: 1180px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Plus Jakarta Sans", var(--font);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 14px;
}
.section { padding: 96px 0; }
.section-head { max-width: 760px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); margin-bottom: 16px; }
.section-head p { color: var(--muted); font-size: 18px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 22px; border-radius: 999px;
  font-weight: 600; font-size: 16px; line-height: 1;
  border: 1.5px solid transparent;
  transition: background .2s, color .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(10, 134, 163, .28); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn svg { width: 18px; height: 18px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 247, .85);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 4px 20px rgba(22, 33, 46, .05); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand:hover { text-decoration: none; }
.brand .brand-mark { width: 44px; height: 44px; flex: none; transition: transform .3s; }
.brand:hover .brand-mark { transform: rotate(-8deg); }
.brand .brand-word { height: 30px; width: auto; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 8px 14px; border-radius: 999px;
  color: var(--ink); font-weight: 500; font-size: 15px;
}
.nav-links a:hover { background: var(--accent-soft); text-decoration: none; }
.nav-links .nav-cta {
  background: var(--ink); color: #fff; margin-left: 6px;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-links .nav-cta:hover { background: var(--accent-ink); }
.nav-links .nav-cta svg { width: 15px; height: 15px; }
.lang { display: flex; gap: 4px; margin-left: 8px; }
.lang a { padding: 6px 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.lang img { width: 22px; height: 14px; object-fit: cover; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.lang a { display: inline-flex; align-items: center; gap: 6px; }

.menu-toggle {
  display: none; background: none; border: 0; padding: 8px; cursor: pointer; color: var(--ink);
}
.menu-toggle svg { width: 26px; height: 26px; }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 500px at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(700px 420px at -10% 110%, var(--amber-soft), transparent 60%),
    var(--bg);
  padding: 72px 0 40px;
}
#about { padding-top: 48px; }
.hero-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(38px, 5.6vw, 64px); margin-bottom: 22px; }
.hero h1 .hl { color: var(--accent); }
.hero .lead { font-size: 19px; color: var(--muted); max-width: 520px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-stats { display: flex; gap: 20px 32px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.hero-stats strong { display: block; font-family: var(--font-head); font-size: 23px; letter-spacing: -0.02em; }
.hero-stats span { color: var(--muted); font-size: 14px; }
.hero-stats > div { flex: 1 1 auto; }
@media (min-width: 641px) {
  .hero-stats { display: grid; grid-template-columns: repeat(3, auto); column-gap: 28px; justify-content: start; }
  .hero-stats strong { font-size: 21px; white-space: nowrap; }
  .hero-stats span { font-size: 13.5px; }
}
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; aspect-ratio: 1100 / 742; object-fit: cover;
  border-radius: 28px; box-shadow: var(--shadow-lg);
}
.hero-badge {
  position: absolute; left: -22px; bottom: -22px;
  background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg);
  padding: 14px 18px; display: flex; align-items: center; gap: 12px; font-size: 14px;
}
.hero-badge .dot {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: var(--green-soft); color: var(--green);
}
.hero-badge .dot svg { width: 22px; height: 22px; }
.hero-badge strong { display: block; font-size: 15px; }
.hero-badge span { color: var(--muted); }

/* About / capabilities */
.caps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.cap {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 24px; transition: transform .25s, box-shadow .25s;
}
.cap:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.cap .ico {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px;
}
.cap .ico svg { width: 24px; height: 24px; }
.cap h3 { font-size: 19px; margin-bottom: 8px; }
.cap p { color: var(--muted); font-size: 15px; margin: 0; }
.ico.c1 { background: var(--green-soft); color: var(--green); }
.ico.c2 { background: var(--amber-soft); color: #b8761a; }
.ico.c3 { background: var(--violet-soft); color: var(--violet); }
.ico.c4 { background: var(--accent-soft); color: var(--accent-ink); }
.about-note {
  margin-top: 28px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--tint); border-radius: var(--radius); padding: 20px 26px;
}
.about-note p { margin: 0; font-weight: 500; }
.cert-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--surface); border-radius: 999px; padding: 8px 16px; font-size: 14px; font-weight: 600;
  color: var(--ink); box-shadow: var(--shadow);
}
.cert-chip svg { width: 18px; height: 18px; color: var(--green); }

/* Labels section */
.labels { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.layers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: -16px 0 56px; }
.layer {
  display: flex; align-items: center; gap: 14px;
  border: 1px dashed var(--line); border-radius: 14px; padding: 16px 18px; background: var(--bg);
}
.layer .n {
  flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff; background: var(--accent);
}
.layer:nth-child(2) .n { background: var(--amber); }
.layer:nth-child(3) .n { background: var(--ink); }
.layer strong { display: block; font-size: 16px; }
.layer span { color: var(--muted); font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.card-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s; }
.card:hover .card-img img { transform: scale(1.04); }
.card-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.card h3 { font-size: 21px; margin-bottom: 10px; }
.card-text { color: var(--muted); font-size: 15.5px; }
.card-text p { margin: 0; }
.card.clamped .card-text p {
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.more {
  margin-top: 14px; align-self: flex-start;
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; font-size: 15px; font-weight: 600; color: var(--accent-ink);
  display: inline-flex; align-items: center; gap: 4px;
}
.more svg { width: 16px; height: 16px; transition: transform .2s; }
.more[aria-expanded="true"] svg { transform: rotate(180deg); }
.card-cta {
  display: flex; flex-direction: column; justify-content: center; gap: 14px;
  background: linear-gradient(150deg, var(--accent), #0b6a8a);
  color: #fff; border: 0; padding: 32px; grid-column: span 2;
}
.card-cta h3 { font-size: 24px; margin: 0; }
.card-cta p { color: rgba(255,255,255,.85); margin: 0; }
.card-cta .btn { align-self: flex-start; background: #fff; color: var(--accent-ink); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-list { display: grid; gap: 14px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px;
}
.contact-item .ico { flex: none; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); }
.contact-item .ico svg { width: 22px; height: 22px; }
.contact-item h3 { font-size: 15px; font-family: var(--font); font-weight: 600; color: var(--muted); letter-spacing: 0; margin-bottom: 2px; }
.contact-item p { margin: 0; font-size: 17px; font-weight: 500; }
.contact-item small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }

.mail-btns { display: inline-flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 8px; }
.mail-btns .btn { justify-content: flex-start; }

/* Footer */
.site-footer { background: #f3f1ec; border-top: 1px solid var(--line); padding: 56px 0 32px; font-size: 15px; color: var(--muted); }
.funding { display: grid; gap: 20px; }
.fund-row {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px;
  background: var(--surface); border-radius: var(--radius); padding: 20px 26px; border: 1px solid var(--line);
}
.fund-logos { display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px; }
.fund-logos img { height: 40px; width: auto; }
.fund-logos img.prr { height: 46px; }
.fund-links { display: flex; gap: 10px; flex-wrap: wrap; }
.fund-links a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line);
  color: var(--ink); font-weight: 500; font-size: 14px;
}
.fund-links a:hover { border-color: var(--ink); text-decoration: none; }
.fund-links svg { width: 15px; height: 15px; color: #c0392b; }
.footer-bottom {
  margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: flex-start;
}
.footer-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; opacity: .9; }
.footer-brand img { height: 22px; width: auto; }
.footer-brand img:first-child { width: 36px; height: 36px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--ink); }

/* Cookie notice */
.fpe-aviso {
  position: fixed; left: 20px; bottom: 20px; z-index: 60; max-width: 420px;
  background: var(--ink); color: #e8edf2; border-radius: 16px; padding: 18px 20px;
  box-shadow: 0 18px 50px rgba(0,0,0,.25); font-size: 14px; line-height: 1.5;
  display: none; gap: 14px; align-items: center;
}
.fpe-aviso.show { display: flex; }
.fpe-aviso a { color: #9fdcea; }
.fpe-aviso button {
  flex: none; background: #fff; color: var(--ink); border: 0; border-radius: 999px;
  padding: 10px 18px; font: inherit; font-weight: 600; cursor: pointer;
}
.fpe-aviso button:hover { background: var(--accent-soft); }

/* PDF viewer */
.pdf-modal {
  width: min(1100px, calc(100vw - 48px)); height: calc(100vh - 48px); max-height: none; max-width: none;
  padding: 0; border: 0; border-radius: 18px; overflow: hidden;
  background: var(--surface); box-shadow: 0 30px 80px rgba(0,0,0,.35);
}
.pdf-modal[open] { display: flex; flex-direction: column; }
.pdf-modal::backdrop { background: rgba(22, 33, 46, .6); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.pdf-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px 14px 12px 22px; border-bottom: 1px solid var(--line);
}
.pdf-bar h2 { font-size: 17px; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdf-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.pdf-actions a {
  padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 600;
  color: var(--ink); border: 1px solid var(--line);
}
.pdf-actions a:hover { border-color: var(--ink); text-decoration: none; }
.pdf-close {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--bg); color: var(--ink); display: grid; place-items: center; margin-left: 4px;
}
.pdf-close:hover { background: var(--accent-soft); }
.pdf-close svg { width: 20px; height: 20px; }
#pdf-frame { flex: 1; width: 100%; border: 0; background: #525659; }
.pdf-doc { flex: 1; overflow-y: auto; padding: 28px 32px 40px; }
.doc { max-width: 760px; margin: 0 auto; color: var(--ink); font-size: 16px; }
.doc h3 { font-size: 24px; margin: 8px 0 14px; }
.doc h3:not(:first-child) { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); }
.doc h4 { font-family: var(--font-head); font-size: 17px; margin: 24px 0 6px; letter-spacing: -0.01em; }
.doc p { color: #3b4655; }
.credits { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; }
.credits li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
.credits strong { display: block; }
.credits span { color: var(--muted); font-size: 14px; }
@media (max-width: 640px) {
  .pdf-modal { width: 100vw; height: 100dvh; border-radius: 0; }
  .pdf-doc { padding: 20px 16px 32px; }
  .pdf-bar { padding: 10px 10px 10px 16px; }
}
body.modal-open { overflow: hidden; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .card, .cap, .card-img img, .btn { transition: none; }
}

/* Responsive */
@media (max-width: 1080px) {
  .caps { grid-template-columns: repeat(2, 1fr); }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card-cta { grid-column: auto; }
}
@media (max-width: 920px) {
  .menu-toggle { display: block; }
  .nav-links {
    position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    padding: 12px 16px 18px; display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; font-size: 16px; }
  .nav-links .nav-cta { margin: 8px 0 0; justify-content: center; }
  .lang { margin: 8px 0 0; justify-content: center; }
  .hero { padding: 40px 0 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-badge { left: 12px; bottom: -18px; }
  .contact-grid { grid-template-columns: 1fr; }
  .layers { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .wrap { padding: 0 16px; }
  .section { padding: 64px 0; }
  .brand .brand-mark { width: 36px; height: 36px; }
  .brand .brand-word { height: 22px; }
  .brand { gap: 10px; }
  .caps, .cards { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; }
  .fund-row { padding: 18px; }
  .fund-logos img { height: 32px; }
  .fund-logos img.prr { height: auto; width: 100%; max-width: 420px; }
  .fpe-aviso { left: 12px; right: 12px; bottom: 12px; max-width: none; flex-direction: column; align-items: stretch; }
}
