/* Nexora Web: landing page
   Tipos: Archivo (títulos, versão larga como o logótipo) e Public Sans (texto). Ambas alojadas em assets/fonts. */

@font-face {
  font-family: "Archivo";
  src: url("assets/fonts/archivo-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Public Sans";
  src: url("assets/fonts/public-sans-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --ink: #060d1a;
  --ink-raised: #0c1830;
  --ink-line: #1c2d4a;
  --ink-text: #e9eff8;
  --ink-muted: #9fadc2;

  --paper: #f2f5f9;
  --paper-line: #d3dce8;
  --paper-text: #0a1426;
  --paper-muted: #4a5a72;

  --blue: #2a86ff;
  --blue-hover: #4a98ff;
  --blue-deep: #1456c8;

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --gutter: clamp(20px, 4vw, 40px);
  --section-y: clamp(72px, 10vw, 128px);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 88px; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--ink-text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }

.container { width: min(1200px, 100% - var(--gutter) * 2); margin-inline: auto; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--blue); color: #04101f; padding: 10px 16px; font-weight: 600; text-decoration: none;
}
.skip-link:focus { top: 12px; }

:focus-visible { outline: 3px solid var(--blue-hover); outline-offset: 3px; }
.section--light :focus-visible { outline-color: var(--blue-deep); }

/* ---------- Tipografia de títulos ---------- */
h1, h2, h3 {
  font-family: var(--font-display);
  font-stretch: 112%;
  font-weight: 650;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

/* ---------- Botões e ligações ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--blue); color: #04101f;
  font: 600 1rem/1 var(--font-body);
  text-decoration: none; border: 0; border-radius: 2px; cursor: pointer;
  transition: background-color .2s, transform .2s, box-shadow .2s;
}
.button:hover { background: var(--blue-hover); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(42,134,255,.28); }
.button:active { transform: translateY(0); box-shadow: none; }
.button--small { min-height: 42px; padding: 0 18px; font-size: .9375rem; }
.button--block { width: 100%; }

.link-quiet {
  color: var(--ink-text); font-weight: 500;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px;
  text-decoration-color: var(--ink-muted);
  transition: text-decoration-color .2s;
}
.link-quiet:hover { text-decoration-color: var(--ink-text); }

/* ---------- Cabeçalho ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--ink); border-bottom: 1px solid var(--ink-line);
}
.site-header__inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 76px; position: relative;
}

.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand__mark { width: 28px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong {
  font: 700 1.25rem/1 var(--font-display); font-stretch: 125%;
  letter-spacing: .1em; text-transform: uppercase;
}
.brand__text small {
  margin-top: 6px; font-size: .75rem; letter-spacing: .5em; color: #3fc5f2; text-transform: uppercase;
}

.site-nav { display: flex; align-items: center; gap: 32px; }
.site-nav a:not(.button) {
  color: var(--ink-muted); text-decoration: none; font-size: .9375rem; font-weight: 500;
  padding-block: 8px; border-bottom: 1px solid transparent; transition: color .2s, border-color .2s;
}
.site-nav a:not(.button):hover { color: var(--ink-text); border-bottom-color: var(--blue); }

.menu-toggle {
  display: none; width: 46px; height: 46px; padding: 0;
  background: transparent; color: var(--ink-text);
  border: 1px solid var(--ink-line); border-radius: 2px; cursor: pointer;
  transition: border-color .2s;
}
.menu-toggle:hover { border-color: var(--blue); }
.menu-toggle__bars { position: relative; display: block; width: 20px; height: 14px; margin: auto; }
.menu-toggle__bars i {
  position: absolute; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 1px;
  transition: transform .3s cubic-bezier(.3,.7,.3,1), opacity .2s, top .3s cubic-bezier(.3,.7,.3,1);
}
.menu-toggle__bars i:nth-child(1) { top: 0; }
.menu-toggle__bars i:nth-child(2) { top: 6px; }
.menu-toggle__bars i:nth-child(3) { top: 12px; }
.menu-toggle[aria-expanded="true"] i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.menu-toggle[aria-expanded="true"] i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; background: var(--ink); }
.hero__inner {
  position: relative;
  padding-block: clamp(56px, 9vw, 120px) clamp(64px, 9vw, 112px);
  min-height: min(680px, calc(100svh - 76px));
  display: flex; align-items: center;
}
.hero__copy { position: relative; z-index: 2; max-width: 640px; }

.hero h1 { font-size: clamp(2.125rem, 4.4vw, 3.5rem); line-height: 1.08; }
.hero__lede { margin-top: 24px; max-width: 52ch; color: var(--ink-muted); font-size: 1.1875rem; }
.hero__actions { display: flex; align-items: center; flex-wrap: wrap; gap: 20px 32px; margin-top: 36px; }

.hero__facts {
  display: flex; flex-wrap: wrap; gap: 20px 56px;
  margin-top: clamp(40px, 7vw, 72px); padding-top: 24px; border-top: 1px solid var(--ink-line);
}
.hero__facts dt { font-size: .875rem; color: var(--ink-muted); }
.hero__facts dd { margin-top: 2px; font-weight: 500; }
.hero__facts a { text-decoration: none; }
.hero__facts a:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero__mark {
  position: absolute; z-index: 1;
  right: -110px; bottom: -60px;
  width: min(48vw, 640px); height: auto;
  animation: mark-in 1.1s cubic-bezier(.25, .7, .25, 1) both, mark-float 7s ease-in-out 1.2s infinite;
}
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.hero__copy > * { animation: fade-up .8s cubic-bezier(.25,.7,.25,1) both; }
.hero__copy > :nth-child(1) { animation-delay: .1s; }
.hero__copy > :nth-child(2) { animation-delay: .25s; }
.hero__copy > :nth-child(3) { animation-delay: .4s; }
.hero__copy > :nth-child(4) { animation-delay: .55s; }
@keyframes mark-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes mark-in {
  from { clip-path: polygon(0 0, 0 0, 0 0); }
  to   { clip-path: polygon(0 0, 220% 0, 0 220%); }
}

/* ---------- Secções ---------- */
.section { padding-block: var(--section-y); }
.section--light { background: var(--paper); color: var(--paper-text); }
.section--dark  { background: var(--ink); color: var(--ink-text); }
.section--ruled { border-top: 1px solid var(--paper-line); padding-top: clamp(56px, 8vw, 96px); }

.section h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); line-height: 1.12; }
.section--light p { color: var(--paper-muted); }

.section-head { max-width: 560px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head p { margin-top: 14px; }

/* Serviços */
.split { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(32px, 6vw, 96px); align-items: start; }
.split__head { position: sticky; top: 112px; }
.split__head p { margin-top: 16px; max-width: 36ch; }

.services { border-top: 2px solid var(--paper-text); }
.service {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 24px 36px; align-items: start;
  padding-block: 32px; border-bottom: 1px solid var(--paper-line);
}
.service h3 { font-size: 1.5rem; line-height: 1.2; }
.service__body > p:not(.service__fit) { margin-top: 10px; max-width: 54ch; }
.service__fit { margin-top: 14px; font-size: .9375rem; max-width: 54ch; }
.service__fit span { color: var(--paper-text); font-weight: 600; margin-right: 4px; }

.service__link {
  margin-top: 4px; white-space: nowrap;
  color: var(--blue-deep); font-weight: 600; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 6px;
  transition: text-decoration-thickness .15s;
}
.service__link:hover { text-decoration-thickness: 2px; }

/* Processo */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; position: relative; counter-reset: none; }
.steps::before {
  content: ""; position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--paper-text);
}
.step { position: relative; padding-top: 0; }
.step__n {
  position: relative; z-index: 1;
  display: grid; place-items: center; width: 40px; height: 40px;
  background: var(--paper); border: 1px solid var(--paper-text); border-radius: 50%;
  font: 600 1rem/1 var(--font-display); color: var(--paper-text);
}
.step h3 { margin-top: 24px; font-size: 1.25rem; }
.step p { margin-top: 8px; max-width: 28ch; font-size: 1rem; }

/* Sobre */
.statement {
  display: grid; grid-template-columns: 7fr 5fr; gap: clamp(32px, 6vw, 96px); align-items: end;
  padding-bottom: clamp(48px, 7vw, 88px);
}
.statement h2 { font-size: clamp(1.875rem, 4vw, 3.25rem); line-height: 1.1; }
.statement p { color: var(--ink-muted); max-width: 44ch; }

.values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 32px; }
.values li { border-top: 1px solid var(--ink-line); padding-top: 24px; }
.values h3 { font-size: 1.125rem; }
.values p { margin-top: 10px; color: var(--ink-muted); font-size: 1rem; max-width: 30ch; }

/* Contacto */
.section--contact { border-top: 1px solid var(--ink-line); }
.contact { display: grid; grid-template-columns: 5fr 6fr; gap: clamp(40px, 7vw, 112px); align-items: start; }
.contact__intro h2 { font-size: clamp(1.875rem, 3.6vw, 2.75rem); line-height: 1.1; }
.contact__intro > p { margin-top: 18px; color: var(--ink-muted); max-width: 44ch; }

.contact__details { margin-top: 40px; border-top: 1px solid var(--ink-line); }
.contact__details > div { display: grid; grid-template-columns: 11rem 1fr; gap: 16px; padding-block: 16px; border-bottom: 1px solid var(--ink-line); }
.contact__details dt { color: var(--ink-muted); font-size: .9375rem; }
.contact__details a { text-decoration: none; font-weight: 500; }
.contact__details a:hover { text-decoration: underline; text-underline-offset: 4px; }

.form { background: var(--ink-raised); border: 1px solid var(--ink-line); padding: clamp(24px, 4vw, 40px); }
.field + .field { margin-top: 22px; }
.field label { display: block; margin-bottom: 8px; font-weight: 500; font-size: .9375rem; }
.field__opt { color: var(--ink-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px;
  background: var(--ink); color: var(--ink-text);
  border: 1px solid #34486b; border-radius: 2px;
  font: inherit; font-size: 1rem; line-height: 1.4;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible {
  outline: 2px solid var(--blue-hover); outline-offset: 1px; border-color: var(--blue-hover);
}
.field input[aria-invalid="true"] { border-color: #ff8a80; }
.field__error { margin-top: 8px; color: #ffa59c; font-size: .9375rem; }
.form .button { margin-top: 28px; }
.form__note { margin-top: 14px; color: var(--ink-muted); font-size: .875rem; }

/* ---------- Rodapé ---------- */
.site-footer { background: var(--ink); border-top: 1px solid var(--ink-line); padding-block: 40px; }
.site-footer__inner {
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px 48px; align-items: center;
}
.site-footer__tag { color: var(--ink-muted); font-size: .9375rem; }
.site-footer__nav { display: flex; gap: 28px; }
.site-footer__nav a { color: var(--ink-muted); text-decoration: none; font-size: .9375rem; }
.site-footer__nav a:hover { color: var(--ink-text); }
.site-footer__legal {
  grid-column: 1 / -1; padding-top: 20px; border-top: 1px solid var(--ink-line);
  color: var(--ink-muted); font-size: .875rem;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
}
.site-footer__credit { color: var(--ink-text); }

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .split { grid-template-columns: 1fr; }
  .split__head { position: static; }
  .steps { grid-template-columns: 1fr 1fr; gap: 40px 32px; }
  .steps::before { display: none; }
  .statement, .contact { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr 1fr; gap: 32px; }
  .hero__inner { padding-bottom: 180px; }
  .hero__mark { width: min(44vw, 380px); right: -4vw; bottom: -170px; }
  .site-footer__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  html { scroll-padding-top: 76px; }
  .menu-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: calc(var(--gutter) * -1); right: calc(var(--gutter) * -1);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 8px var(--gutter) 24px; background: var(--ink); border-bottom: 1px solid var(--ink-line);
    opacity: 0; visibility: hidden; transform: translateY(-10px);
    transition: opacity .25s, transform .3s cubic-bezier(.3,.7,.3,1), visibility 0s .3s;
  }
  .site-nav.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
  .site-nav.is-open a { animation: fade-up .45s cubic-bezier(.3,.7,.3,1) both; }
  .site-nav.is-open a:nth-child(2) { animation-delay: .05s; }
  .site-nav.is-open a:nth-child(3) { animation-delay: .1s; }
  .site-nav.is-open a:nth-child(4) { animation-delay: .15s; }
  .site-nav.is-open a:nth-child(5) { animation-delay: .2s; }
  .site-nav a:not(.button) { padding: 16px 0; border-bottom: 1px solid var(--ink-line); }
  .site-nav .button { margin-top: 20px; min-height: 50px; }

  .service { grid-template-columns: 1fr; gap: 20px; }
  .service__img { max-width: 320px; }
  .service__link { margin-top: 0; justify-self: start; }
  .contact__details > div { grid-template-columns: 1fr; gap: 2px; }
  .hero__inner { padding-bottom: 150px; }
  .hero__mark { width: 56vw; right: -8vw; bottom: -28vw; }
  .site-footer__nav { flex-wrap: wrap; gap: 12px 24px; }
}

@media (max-width: 560px) {
  .hero__actions .button { width: 100%; }
}

@media (max-width: 480px) {
  .steps, .values { grid-template-columns: 1fr; }
  .step p, .values p { max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero__mark, .hero__copy > *, .site-nav.is-open a { animation: none !important; }
  * { transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1; transform: none; }
  .js .steps::before { transform: none; }
  .js .step__n { transform: none; }
}

/* ---------- Animações ao rolar ---------- */
.service { position: relative; transition: padding-left .3s cubic-bezier(.3,.7,.3,1); }
.service::before {
  content: ""; position: absolute; left: 0; top: -1px; width: 3px; height: calc(100% + 1px);
  background: var(--blue-deep); transform: scaleY(0); transform-origin: top; transition: transform .3s cubic-bezier(.3,.7,.3,1);
}
.service:hover { padding-left: 20px; }
.service:hover::before { transform: scaleY(1); }
.service h3 { transition: color .2s; }
.service:hover h3 { color: var(--blue-deep); }

.js [data-reveal], .js [data-reveal-group] > * {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s ease, transform .8s cubic-bezier(.25,.7,.25,1);
}
.js [data-reveal].is-in, .js [data-reveal-group].is-in > * { opacity: 1; transform: none; }
.js [data-reveal-group].is-in > :nth-child(2) { transition-delay: .12s; }
.js [data-reveal-group].is-in > :nth-child(3) { transition-delay: .24s; }
.js [data-reveal-group].is-in > :nth-child(4) { transition-delay: .36s; }

/* linha do processo desenha-se, círculos aparecem em sequência */
.js .steps::before { transform: scaleX(0); transform-origin: left; transition: transform 1.2s cubic-bezier(.4,.1,.2,1); }
.js .steps.is-in::before { transform: scaleX(1); }
.js .step__n { transform: scale(.6); transition: transform .5s cubic-bezier(.3,1.6,.5,1) .2s; }
.js .step.is-in .step__n, .js .steps.is-in .step__n { transform: none; }
.js .steps.is-in .step:nth-child(2) .step__n { transition-delay: .5s; }
.js .steps.is-in .step:nth-child(3) .step__n { transition-delay: .8s; }
.js .steps.is-in .step:nth-child(4) .step__n { transition-delay: 1.1s; }
.js .steps > .step[data-reveal] { transition-delay: 0s; }

.service__img { width: 100%; height: auto; border-radius: 4px; overflow: hidden; transition: transform .4s cubic-bezier(.3,.7,.3,1), box-shadow .4s; }
.service:hover .service__img { transform: translateY(-4px); box-shadow: 0 14px 28px rgba(10,20,38,.22); }
