/* ============================================================
   Vortexix Consulting — folha de estilos
   ============================================================ */

:root {
  --bg:            #070b16;
  --bg-soft:       #0c1224;
  --surface:       #101830;
  --surface-2:     #16203c;
  --border:        #22305a;
  --text:          #e8edf9;
  --text-muted:    #9aa8c7;
  --accent:        #4ea8ff;
  --accent-2:      #7b6cff;
  --accent-3:      #22d3c5;
  --ring:          rgba(78, 168, 255, .45);
  --max:           1160px;
  --radius:        16px;
  --shadow:        0 24px 60px -24px rgba(3, 8, 22, .9);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #041024; padding: 12px 18px; border-radius: 0 0 10px 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- Header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 22, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--border); background: rgba(7, 11, 22, .92); }

.header-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 76px;
}

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); font-weight: 700; letter-spacing: -.02em; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-name { font-size: 1.05rem; }
.brand-name span { color: var(--text-muted); font-weight: 500; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 9px 14px; border-radius: 10px;
  color: var(--text-muted); font-size: .94rem; font-weight: 500;
  transition: color .2s ease, background .2s ease;
}
.nav-links a:hover { color: var(--text); background: rgba(255, 255, 255, .06); text-decoration: none; }

.lang-switch { display: flex; gap: 2px; padding: 3px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.lang-switch button {
  border: 0; background: none; color: var(--text-muted); cursor: pointer;
  font: inherit; font-size: .8rem; font-weight: 600; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 999px; transition: all .2s ease;
}
.lang-switch button:hover { color: var(--text); }
.lang-switch button[aria-pressed="true"] { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #05101f; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; font-size: .95rem; cursor: pointer; font-family: inherit;
  transition: transform .18s ease, box-shadow .18s ease, background .2s ease, border-color .2s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #04101f; box-shadow: 0 10px 30px -12px var(--ring);
}
.btn-primary:hover { box-shadow: 0 16px 36px -12px var(--ring); }
.btn-ghost { border-color: var(--border); color: var(--text); background: rgba(255, 255, 255, .03); }
.btn-ghost:hover { border-color: var(--accent); background: rgba(78, 168, 255, .08); }
.btn-sm { padding: 9px 18px; font-size: .9rem; }

.nav-toggle {
  display: none; width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  cursor: pointer; align-items: center; justify-content: center;
}

/* ---------- Hero ---------- */

.hero { position: relative; padding: 96px 0 88px; overflow: hidden; }

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.hero-bg::before,
.hero-bg::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .5;
}
.hero-bg::before { width: 620px; height: 620px; top: -220px; right: -160px; background: radial-gradient(circle, #2f6dff 0%, transparent 68%); }
.hero-bg::after  { width: 520px; height: 520px; bottom: -260px; left: -140px; background: radial-gradient(circle, #7b6cff 0%, transparent 68%); }

.hero-grid {
  position: absolute; inset: 0; z-index: 0; opacity: .32;
  background-image: linear-gradient(rgba(78,168,255,.10) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(78,168,255,.10) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 62% at 50% 20%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 62% at 50% 20%, #000 30%, transparent 78%);
}

.hero-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-3);
  border: 1px solid rgba(34, 211, 197, .28); background: rgba(34, 211, 197, .07);
  padding: 6px 14px; border-radius: 999px;
}

.hero h1 {
  margin: 22px 0 0;
  font-size: clamp(2.6rem, 6vw, 4.1rem);
  line-height: 1.04; letter-spacing: -.035em; font-weight: 800;
  background: linear-gradient(120deg, #ffffff 15%, #a9c8ff 55%, #8f7dff 95%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-subtitle { margin: 20px 0 0; font-size: clamp(1.05rem, 2vw, 1.26rem); color: var(--text); max-width: 48ch; }
.hero-tagline {
  margin: 18px 0 0; padding-left: 16px; border-left: 2px solid var(--accent);
  color: var(--text-muted); font-style: italic; max-width: 46ch;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-visual { display: grid; place-items: center; }
.vortex { width: min(100%, 380px); animation: spin 46s linear infinite; }
.vortex .ring-b { animation: spin-rev 34s linear infinite; transform-origin: 200px 200px; }
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes spin-rev { to { transform: rotate(-360deg); } }
@media (prefers-reduced-motion: reduce) {
  .vortex, .vortex .ring-b { animation: none; }
  html { scroll-behavior: auto; }
}

.hero-stats {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  margin-top: 72px; padding-top: 34px; border-top: 1px solid var(--border);
}
.stat-v { font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em;
  background: linear-gradient(120deg, var(--accent), var(--accent-3));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat-l { color: var(--text-muted); font-size: .92rem; margin-top: 4px; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 12%, var(--bg-soft) 88%, var(--bg) 100%); }

.kicker {
  font-size: .78rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--accent); margin: 0 0 12px;
}
.section h2 {
  margin: 0; font-size: clamp(1.9rem, 4vw, 2.7rem); line-height: 1.15;
  letter-spacing: -.03em; font-weight: 700;
}
.section-lead { color: var(--text-muted); font-size: 1.08rem; margin: 16px 0 0; max-width: 60ch; }
.section-head { max-width: 62ch; margin-bottom: 52px; }

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.about-grid p { color: var(--text-muted); font-size: 1.04rem; margin: 0 0 20px; }
.about-grid p:last-child { margin-bottom: 0; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 22px; }

.card {
  position: relative; padding: 30px 28px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(78, 168, 255, .55); background: var(--surface-2); box-shadow: var(--shadow); }
.card-num {
  font-size: .78rem; font-weight: 700; letter-spacing: .1em; color: var(--accent);
  opacity: .7; margin-bottom: 14px;
}
.card-icon {
  width: 44px; height: 44px; border-radius: 12px; margin-bottom: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(78,168,255,.18), rgba(123,108,255,.18));
  border: 1px solid rgba(78,168,255,.28); color: var(--accent);
}
.card h3 { margin: 0 0 10px; font-size: 1.12rem; letter-spacing: -.01em; }
.card p { margin: 0; color: var(--text-muted); font-size: .97rem; }

.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.why-item { padding-top: 22px; border-top: 2px solid var(--border); transition: border-color .22s ease; }
.why-item:hover { border-top-color: var(--accent); }
.why-item h3 { margin: 0 0 10px; font-size: 1.1rem; }
.why-item p { margin: 0; color: var(--text-muted); font-size: .97rem; }

/* ---------- Contacto ---------- */

.contact-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: 56px; align-items: start; }

.info-list { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 20px; }
.info-list dt, .info-label {
  font-size: .76rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-muted); margin-bottom: 4px;
}
.info-value { font-size: 1.02rem; color: var(--text); }
.info-value a { color: var(--accent); word-break: break-word; }

.form { display: grid; gap: 18px; padding: 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.field { display: grid; gap: 7px; }
.field label { font-size: .86rem; font-weight: 600; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; padding: 12px 14px; border-radius: 10px;
  background: var(--bg-soft); border: 1px solid var(--border); color: var(--text);
  font: inherit; font-size: .96rem; transition: border-color .2s ease, box-shadow .2s ease;
}
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(78, 168, 255, .18);
}
.field textarea { resize: vertical; min-height: 130px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-note { font-size: .84rem; color: var(--text-muted); margin: 0; }

/* ---------- Footer ---------- */

.site-footer { border-top: 1px solid var(--border); padding: 48px 0 36px; background: var(--bg-soft); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.footer-legal { color: var(--text-muted); font-size: .88rem; margin: 8px 0 0; }
.footer-links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-links a { color: var(--text-muted); font-size: .9rem; }
.footer-links a:hover { color: var(--text); }

/* ---------- Reveal on scroll ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- Responsive ---------- */

@media (max-width: 960px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { order: -1; }
  .vortex { width: min(78%, 300px); }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
}

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; order: 3; }
  .nav { margin-left: auto; gap: 10px; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg-soft); border-bottom: 1px solid var(--border);
    padding: 12px 24px 20px; display: none;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 12px 8px; font-size: 1rem; }
  .nav .btn { display: none; }
  .hero { padding: 64px 0 60px; }
  .hero-stats { grid-template-columns: 1fr; gap: 22px; margin-top: 48px; }
  .section { padding: 72px 0; }
  .form { padding: 24px; }
  .form-row { grid-template-columns: 1fr; }
  .brand-name span { display: none; }
}

/* ============================================================
   3D — vórtice WebGL, luz única e medidor de profundidade
   Tudo o que muda o aspeto está sob .has-3d: sem WebGL, ou com
   "reduzir movimento", a página é exatamente a versão anterior.
   ============================================================ */

#vortex {
  position: fixed; inset: 0; width: 100%; height: 100%;
  z-index: 0; display: block; pointer-events: none;
  background: var(--bg);
}
.has-3d main, .has-3d .site-footer { position: relative; z-index: 1; }

/* A capa deixa de precisar de brilhos CSS nem da ilustração SVG: o vórtice é real */
.has-3d .hero-bg, .has-3d .hero-grid, .has-3d .hero-visual { display: none; }
.has-3d .hero-inner { grid-template-columns: minmax(0, 1fr); perspective: 1200px; }
.hero-copy { max-width: 640px; }
.has-3d .hero-copy { transform-style: preserve-3d; will-change: transform; }

/* Secções: véus translúcidos em vez de fundos opacos, para o vórtice passar por trás */
.has-3d .section-alt {
  background: linear-gradient(180deg, transparent 0%, rgba(9, 14, 28, .66) 9%, rgba(9, 14, 28, .66) 91%, transparent 100%);
}
.has-3d .site-footer { background: rgba(9, 14, 28, .8); }
.has-3d .site-header { background: rgba(7, 11, 22, .55); }
.has-3d .site-header.is-scrolled { background: rgba(7, 11, 22, .82); }

/* Luz única: --sx/--sy (sombra projetada), --rx/--ry (aresta iluminada) e --lit
   são escritos por depth.js a partir da posição do olho do vórtice */
.has-3d .card,
.has-3d .form {
  background: rgba(14, 21, 42, .84);
  box-shadow:
    var(--sx, 0px) var(--sy, 0px) 44px -16px rgba(0, 0, 0, .78),
    inset var(--rx, 0px) var(--ry, 0px) 0 0 rgba(78, 168, 255, var(--lit, .2));
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}
.has-3d .card:hover {
  background: rgba(20, 29, 58, .92);
  box-shadow:
    var(--sx, 0px) var(--sy, 0px) 56px -14px rgba(0, 0, 0, .85),
    inset var(--rx, 0px) var(--ry, 0px) 0 0 rgba(78, 168, 255, .9);
}
.has-3d .why-item {
  border-top-color: rgba(78, 168, 255, var(--lit, .25));
  transition: border-color .3s ease;
}
.has-3d .why-item:hover { border-top-color: var(--accent); }

/* Medidor de profundidade */
.depth-gauge {
  position: fixed; right: 26px; top: 50%; transform: translateY(-50%);
  height: min(44vh, 360px); width: 150px; z-index: 40;
  display: none;
}
@media (min-width: 1440px) { .has-3d .depth-gauge { display: block; } }
.gauge-track { position: absolute; right: 6px; top: 0; bottom: 0; width: 1px; background: var(--border); }
.gauge-marker {
  position: absolute; left: -4px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-3); box-shadow: 0 0 14px var(--accent-3);
  transform: translateY(-50%); transition: top .12s linear;
}
.gauge-tick {
  position: absolute; right: 22px; transform: translateY(-50%);
  font-size: .66rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  color: var(--text-muted); white-space: nowrap; padding: 6px 0;
  transition: color .2s ease;
}
.gauge-tick::after {
  content: ""; position: absolute; right: -16px; top: 50%; width: 8px; height: 1px;
  background: var(--border); transition: background .2s ease, width .2s ease;
}
.gauge-tick.is-active { color: var(--text); }
.gauge-tick.is-active::after { background: var(--accent-3); width: 12px; }
.gauge-tick:hover { color: var(--accent); text-decoration: none; }

/* ============================================================
   Serviços — seis pólos com âmbito desdobrável
   ============================================================ */

.card { display: flex; flex-direction: column; }
.card .card-tagline { margin: 0 0 16px; }   /* mais específico que .card p */

.card-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.card-list li { position: relative; padding-left: 16px; font-size: .92rem; line-height: 1.5; color: var(--text); }
.card-list li::before {
  content: ""; position: absolute; left: 0; top: .58em; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); opacity: .85;
}

.card-detail { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--border); }
.card-detail p { font-size: .92rem; line-height: 1.6; }

.card-toggle {
  margin-top: auto; padding: 18px 0 0;
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  background: none; border: 0; cursor: pointer;
  font: inherit; font-size: .88rem; font-weight: 600; color: var(--accent);
}
.card-toggle svg { transition: transform .2s ease; }
.card-toggle[aria-expanded="true"] svg { transform: rotate(180deg); }
.card-toggle:hover { text-decoration: underline; }

.services-note {
  margin: 32px 0 0; max-width: 72ch; padding-left: 14px;
  border-left: 2px solid var(--border);
  font-size: .86rem; line-height: 1.6; color: var(--text-muted);
}

/* ---------- Estado do formulário e campo-armadilha ---------- */

.field-honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form { position: relative; }

.form-status { margin: 0; font-size: .92rem; line-height: 1.5; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); }
.form-status.is-sending { color: var(--text-muted); }
.form-status.is-success { color: var(--accent-3); border-color: rgba(34, 211, 197, .35); background: rgba(34, 211, 197, .08); }
.form-status.is-error   { color: #ffb4b4; border-color: rgba(255, 120, 120, .35); background: rgba(255, 120, 120, .08); }
.form-status.is-error a { color: inherit; font-weight: 600; }
