/* =================== */
/* PRE-IMPRESSAO.CSS   */
/* =================== */

:root{
  /* background */
  --page-bg-image: url("../img/prepress/prepress1.webp");
  --page-bg-size: 130%;
  --page-bg-opacity: 0.40;
}

/* Anchor offset for sticky header jump */
#ficheiro{
  scroll-margin-top: 90px;
}

/* HERO spacing rhythm */
.prepress-section{
  padding-top: 54px;
  padding-bottom: 72px;
}

/* ---------- */
/* HERO NOTE  */
/* ---------- */
.hero-note{
  margin-top: 14px;
  max-width: 84ch;
  margin-left: auto;
  margin-right: auto;
}

.hero-highlights{
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.hero-hl{
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.45);
  border: 1px solid rgba(15,23,42,.08);
  color: rgba(15,23,42,.75);
  font-weight: 650;
  font-size: 13px;
  text-align: center;
  min-height: 48px;
  display: grid;
  place-items: center;
}

.hero-actions{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

/* ---------------- */
/* GRID + CARDS     */
/* ---------------- */
.prepress-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 16px;
  align-items: stretch;
}

.prepress-card{
  border-radius: 18px;
  padding: 18px;
}

/* Allow "Vantagens da validação" button to sit in the corner (desktop) */
.prepress-grid > aside.prepress-card{
  display: flex;
  flex-direction: column;
  height: 100%;
}

.prepress-card-title{
  margin: 0 0 6px;
  font-size: 19px;
  letter-spacing: -.01em;
}

.prepress-inline-actions{
  margin-top: auto;
  display: flex;
  justify-content: flex-end; /* desktop: bottom-right corner */
}

.prepress-note{
  margin-top: 12px;
  font-size: 13px;
  color: rgba(15,23,42,.62);
}

/* Footnotes */
.prepress-footnotes{
  margin-top: 12px;
  color: rgba(15,23,42,.70);
  line-height: 1.55;
  font-size: small;
}

/* Centered term explanations under "Equipa e tecnologia" */
.prepress-terms{
  text-align: center;
  max-width: 92ch;
  margin-left: auto;
  margin-right: auto;
}

/* ---------------- */
/* FEATURES LAYOUT  */
/* ---------------- */
.prepress-features{
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.prepress-feature{
  border-radius: 18px;
  padding: 18px;
}

.prepress-num{
  font-weight: 900;
  color: rgba(15,23,42,.70);
  letter-spacing: .06em;
  font-size: 14px;
  text-transform: uppercase;
}

.prepress-feature-title{
  margin: 0px 0 8px;
  font-size: 18px;
  letter-spacing: -.01em;
}

.prepress-feature-text{
  margin: 0;
  color: rgba(15,23,42,.72);
}

/* ---------------- */
/* CHECKLIST        */
/* ---------------- */
.prepress-checklist{
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr;
}

/* ticks list */
.ticks{
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.ticks li{
  padding-left: 26px;
  position: relative;
  color: rgba(15,23,42,.78);
}

.ticks li::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(69,117,180,.20);
  border: 2px solid rgba(69,117,180,.45);
  position: absolute;
  left: 0;
  top: 7px;
}

/* CTA uses shared base component (.cta / .cta-home / .cta-actions) */

/* -------------------------------------------------------
   BACKGROUND SAFETY RULES (aspect/orientation-based)
   ------------------------------------------------------- */

/* Tall portrait (phones, portrait tablets, tall devtools) */
@media (orientation: portrait) and (max-aspect-ratio: 3/4){
  :root{
    --page-bg-image: url("../img/prepress/prepress1m.webp");
    --page-bg-size: 180%;
    --page-bg-pos-y: 50%;
  }
}

/* 4:3-ish landscape (1024×768, 1440×1080, etc.) */
@media (orientation: landscape) and (max-aspect-ratio: 4/3){
  :root{
    --page-bg-size: 170%;
    --page-bg-pos-y: 50%;
  }
}

/* -------------------------------------------------------
   RESPONSIVE (touch only under 1440px)
   ------------------------------------------------------- */
@media (max-width: 980px),(max-width: 1440px) and (hover: none) and (pointer: coarse){

  :root{
    --page-bg-size: 300%;
  }

  /* HERO pills: 2 on top, 1 on bottom (like Offset) */
  .hero-highlights{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hero-highlights .hero-hl:last-child{
    grid-column: 1 / -1;
  }

  /* Hero buttons — side-by-side + stretched */
  .hero-actions{
    justify-content: flex-start;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
  }

  .hero-actions .btn{
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
  }

  .prepress-grid{
    grid-template-columns: 1fr;
  }

  .prepress-features{
    grid-template-columns: 1fr;
  }

  /* Mobile/tablet: keep the validation button centered + stretched */
  .prepress-inline-actions{
    margin-top: 18px;
    justify-content: center;
  }
  .prepress-inline-actions .btn{
    width: 100%;
    display: flex;
    justify-content: center;
  }
}

/* Small phones: swap to mobile background */
@media (max-width: 980px),(max-width: 450px){
  :root{
    --page-bg-image: url("../img/prepress/prepress1m.webp");
    --page-bg-size: 210%;
  }
}