/* ---------- Tokens ---------- */
:root {
  --fog: #EEF1F5;      /* fundo */
  --paper: #FFFFFF;    /* superfícies */
  --ink: #0A1A2F;      /* texto, secções escuras */
  --slate: #5B6B80;    /* texto secundário */
  --line: #D3DAE4;     /* divisórias */
  --signal: #2B3BFF;   /* o "clip": único acento */

  --display: "Unbounded", system-ui, sans-serif;
  --body: "Instrument Sans", system-ui, sans-serif;

  --pad: clamp(20px, 5vw, 72px);
  --max: 1240px;
  --ease: cubic-bezier(.2, .9, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fog);
  color: var(--ink);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
h1, h2, h3 { font-family: var(--display); font-weight: 500; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 4px; }

section { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 140px) var(--pad); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 16px 26px;
  background: var(--signal); color: #fff;
  border: 0; border-radius: 999px;
  font: 600 16px var(--body); text-decoration: none; white-space: nowrap;
  cursor: pointer;
  transition: box-shadow .2s ease, background .2s ease;
}
.btn:hover { box-shadow: 0 12px 34px -10px var(--signal); }
.btn-small { padding: 10px 18px; font-size: 15px; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { box-shadow: 0 12px 34px -10px rgba(255,255,255,.6); }
.btn-block { width: 100%; padding: 18px 26px; font-size: 17px; }
.link { font-weight: 500; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.link:hover { color: var(--signal); }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--pad);
  background: rgba(238, 241, 245, .78);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
.nav.scrolled { border-bottom-color: var(--line); }
.logo { display: flex; align-items: center; gap: 10px; font: 700 20px var(--display); text-decoration: none; letter-spacing: -0.04em; }
.logo-mark { width: 28px; height: 28px; background: url("img/logo.svg") center / contain no-repeat; flex: none; }
.nav-links { display: flex; gap: 32px; }
.nav-links a { text-decoration: none; color: var(--slate); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--ink); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-top: clamp(48px, 7vw, 96px); isolation: isolate; }
#hero-fx {
  position: absolute; inset: 0 0 auto 0; width: 100%; height: clamp(560px, 92vh, 820px);
  z-index: -1; pointer-events: none;
}
.hero-copy { max-width: 1120px; position: relative; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; margin-bottom: 28px;
  border: 1px solid var(--line); border-radius: 999px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(8px);
  font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.hero-tag::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--signal); box-shadow: 0 0 0 4px rgba(43,59,255,.15);
}
.hero h1 { font-size: clamp(34px, 5.6vw, 80px); line-height: 1.02; letter-spacing: -0.04em; }
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; }
.hl { color: var(--signal); }
.lead { margin-top: 28px; max-width: 56ch; font-size: clamp(17px, 1.4vw, 20px); color: var(--slate); }
.hero-actions { margin-top: 36px; display: flex; flex-wrap: wrap; align-items: center; gap: 28px; }

/* Entrada do hero: só com JS (html.fx), dispara em html.is-ready (fx.js) */
html.fx .reveal .line > span { transform: translateY(108%); transition: transform 1s var(--ease); }
html.fx .reveal .line:nth-child(2) > span { transition-delay: .08s; }
html.fx .reveal .line:nth-child(3) > span { transition-delay: .16s; }
html.fx.is-ready .reveal .line > span { transform: none; }
html.fx .reveal-up { opacity: 0; transform: translateY(18px); transition: opacity .8s ease .35s, transform .9s var(--ease) .35s; }
html.fx .machine.reveal-up { transition-delay: .5s; }
html.fx.is-ready .reveal-up { opacity: 1; transform: none; }

/* ---------- Máquina ---------- */
.machine {
  position: relative;
  margin-top: clamp(56px, 7vw, 96px);
  display: grid; grid-template-columns: 1fr 260px; gap: clamp(24px, 4vw, 56px); align-items: center;
  padding: clamp(22px, 3vw, 44px);
  background:
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 40px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 40px 100%,
    var(--paper);
  border-radius: 28px;
  box-shadow: 0 40px 90px -40px rgba(10, 26, 47, .3);
  overflow: hidden;
}
.machine::before { /* suaviza a grelha */
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 30% 40%, rgba(255,255,255,.95), rgba(255,255,255,.78));
  pointer-events: none;
}
.machine > * { position: relative; }
.hud { position: absolute; width: 18px; height: 18px; border: 2px solid var(--signal); z-index: 2; }
.hud-tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-top-left-radius: 6px; }
.hud-tr { top: 14px; right: 14px; border-left: 0; border-bottom: 0; border-top-right-radius: 6px; }
.hud-bl { bottom: 14px; left: 14px; border-right: 0; border-top: 0; border-bottom-left-radius: 6px; }
.hud-br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-bottom-right-radius: 6px; }

.track-head, .track-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--slate); font-variant-numeric: tabular-nums; }
.track-head { margin-bottom: 14px; }
.track-file { display: inline-flex; align-items: center; gap: 8px; }
.rec { width: 8px; height: 8px; border-radius: 50%; background: #FF3B3B; animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { to { visibility: hidden; } }
.track-time { font-weight: 600; color: var(--ink); }
.track-foot { margin-top: 12px; }
.track-stats {
  margin-top: 24px; display: grid; grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}
.track-stats div { padding-top: 14px; display: flex; flex-direction: column; gap: 2px; }
.track-stats span { font-size: 12px; color: var(--slate); }
.track-stats strong { font: 500 18px var(--display); font-variant-numeric: tabular-nums; }

.wave { position: relative; height: 180px; display: flex; align-items: center; gap: 2px; }
.bar { flex: 1; min-width: 1px; background: var(--line); border-radius: 2px; transition: background .25s ease; }
.bar.seen { background: #A9B5C6; }
.bar.hit { background: var(--signal); box-shadow: 0 0 12px rgba(43,59,255,.45); }

.playhead { position: absolute; top: -8px; bottom: -8px; left: 0; width: 2px; background: var(--ink); z-index: 2; }
.playhead::before { content: ""; position: absolute; top: -4px; left: -5px; width: 12px; height: 12px; border-radius: 50%; background: var(--ink); }
.playhead::after { /* rasto de luz */
  content: ""; position: absolute; top: 0; bottom: 0; right: 2px; width: 60px;
  background: linear-gradient(90deg, transparent, rgba(43,59,255,.14));
}
.select {
  position: absolute; top: -14px; bottom: -14px;
  border: 2px solid var(--signal); border-radius: 10px;
  background: rgba(43, 59, 255, .06);
  opacity: 0; transform: scaleX(1.6);
  transition: opacity .35s ease, transform .45s var(--ease);
  z-index: 1;
}
.select.on { opacity: 1; transform: scaleX(1); }
.select span {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--signal);
}

/* Telemóvel */
.phone {
  width: 100%; aspect-ratio: 9 / 16;
  padding: 8px; border-radius: 34px;
  background: var(--ink);
  box-shadow: 0 30px 60px -30px rgba(43,59,255,.6);
  clip-path: inset(50% 50% 50% 50% round 34px);
  transition: clip-path .7s cubic-bezier(.7, 0, .2, 1);
}
.phone.on { clip-path: inset(0 0 0 0 round 34px); }
.phone-screen {
  position: relative; height: 100%; border-radius: 27px; overflow: hidden;
  background: linear-gradient(180deg, #1A2A7A, #2B3BFF 60%, #10194F);
}
.phone-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s linear; }
.phone.on .phone-video { transform: scale(1); }
.phone-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,26,47,.1) 40%, rgba(10,26,47,.75)); }
.caption {
  position: absolute; left: 14px; right: 14px; top: 68%;
  text-align: center; font: 700 17px/1.25 var(--display); color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
}
.caption span { opacity: .25; transition: opacity .15s, color .15s; }
.caption span.on { opacity: 1; }
.caption span.now { color: #FFE14D; }
.phone-stats { position: absolute; left: 14px; bottom: 16px; color: #fff; display: flex; flex-direction: column; line-height: 1.1; }
.phone-stats strong { font: 700 26px var(--display); font-variant-numeric: tabular-nums; }
.phone-stats span { font-size: 12px; opacity: .8; }

/* ---------- Faixa de criadores ---------- */
.marquee {
  overflow: hidden; padding: 22px 0;
  border-block: 1px solid var(--line);
  background: var(--paper);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee-track { display: flex; align-items: center; gap: 36px; width: max-content; animation: marquee 32s linear infinite; }
.marquee-track span { font: 500 clamp(20px, 2.4vw, 30px) var(--display); letter-spacing: -0.03em; white-space: nowrap; }
.marquee-track .more { color: var(--slate); font-weight: 400; }
.marquee-track i { width: 18px; height: 18px; flex: none; background: url("img/logo.svg") center / contain no-repeat; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Resultados ---------- */
.results { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 0; padding-bottom: 0; }
.result { padding: 44px 0; }
.result + .result { padding-left: 32px; border-left: 1px solid var(--line); }
.result strong, .result .unit { font: 500 clamp(48px, 5.4vw, 80px)/1 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.result .unit { color: var(--signal); }
.result p { margin-top: 12px; color: var(--slate); }

/* ---------- Cabeçalhos de secção ---------- */
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 32px; flex-wrap: wrap; margin-bottom: 48px; }
.section-head h2, .gains h2 { font-size: clamp(30px, 3.8vw, 52px); line-height: 1.08; }
.section-head p { color: var(--slate); max-width: 40ch; }

/* ---------- Portefólio ---------- */
.clips { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.clip { margin: 0; }
.clip a { text-decoration: none; display: block; }
.clip-frame {
  position: relative; aspect-ratio: 9 / 16;
  border-radius: 20px; overflow: hidden;
  background: var(--ink);
  transform-style: preserve-3d;
}
.clip-frame img, .clip-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.clip:hover .clip-frame img { transform: scale(1.05); }
.clip-cover { position: absolute; inset: 0; }
.clip-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,26,47,0) 70%, rgba(10,26,47,.6)); }
.clip-hook {
  position: absolute; left: 14px; right: 14px; bottom: 52px;
  font: 700 15px/1.25 var(--display); color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,.4);
}
.clip-views {
  position: absolute; left: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 999px;
  background: rgba(255,255,255,.92); color: var(--ink);
  font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.clip-views::before { content: ""; width: 0; height: 0; border-left: 7px solid var(--signal); border-block: 4.5px solid transparent; }
.clip figcaption { margin-top: 12px; display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.clip figcaption span { color: var(--slate); }
.clip:hover .clip-frame { outline: 2px solid var(--signal); outline-offset: 3px; }

/* ---------- Processo ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; position: relative; }
.steps::before { content: ""; position: absolute; top: 13px; left: 0; right: 0; height: 1px; background: var(--line); }
.steps li { position: relative; }
.step-n {
  position: relative; display: inline-block;
  padding: 4px 12px; border-radius: 999px;
  background: var(--fog); border: 1px solid var(--line);
  font: 500 13px var(--display); color: var(--slate);
}
.steps li:nth-child(1) .step-n { background: var(--signal); border-color: var(--signal); color: #fff; }
.steps h3 { margin-top: 24px; font-size: 20px; }
.steps p { margin-top: 10px; color: var(--slate); font-size: 16px; }

/* ---------- Ganhos ---------- */
.gains { padding-bottom: clamp(24px, 4vw, 56px); }
.gains h2 { max-width: 20ch; margin-bottom: 48px; }
.gains-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 20px; }
.gain { position: relative; padding: 32px; border-radius: 24px; background: var(--paper); display: flex; flex-direction: column; min-height: 240px; overflow: hidden; }
.gain-main { background: var(--signal); color: #fff; }
.gain h3 { font-size: 26px; }
.gain p { margin-top: auto; padding-top: 32px; color: var(--slate); }
.gain-main p { color: rgba(255,255,255,.85); }

/* ---------- Equipa ---------- */
.team {
  max-width: none; margin: 0;
  background: var(--ink); color: #fff;
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 64px; align-items: center;
  padding-left: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
  padding-right: max(var(--pad), calc((100% - var(--max)) / 2 + var(--pad)));
}
.team h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.08; }
.team-copy > p { margin-top: 24px; max-width: 52ch; color: rgba(255,255,255,.7); }
.team-list { margin: 32px 0 40px; padding: 0; list-style: none; }
.team-list li { padding: 14px 0; border-top: 1px solid rgba(255,255,255,.14); }
.team-list li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.team-visual { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.slot {
  aspect-ratio: 9 / 16; border-radius: 16px;
  border: 1.5px dashed rgba(255,255,255,.22);
  display: grid; place-items: center;
  font: 500 15px var(--display); color: rgba(255,255,255,.5);
}
.slot-filled { border: 1.5px solid var(--signal); color: #fff; }
.slot-me { background: var(--signal); border-color: var(--signal); }

/* ---------- Contacto + formulário ---------- */
.contact { display: grid; grid-template-columns: 1fr minmax(320px, 460px); gap: clamp(40px, 6vw, 96px); align-items: center; }
.contact h2 { font-size: clamp(34px, 4.6vw, 64px); line-height: 1.05; max-width: 14ch; }
.contact-copy > p { margin-top: 24px; max-width: 42ch; color: var(--slate); font-size: 19px; }
.contact-alt { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px 24px; font-size: 15px; }

.lead-form {
  position: relative;
  display: grid; gap: 16px;
  padding: clamp(24px, 3vw, 36px);
  background: var(--paper); border-radius: 28px;
  box-shadow: 0 40px 90px -40px rgba(10, 26, 47, .3);
}
.lead-form::before { /* moldura de sinal */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: linear-gradient(140deg, var(--signal), transparent 35%, transparent 65%, var(--signal));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.field { display: grid; gap: 6px; }
.field span { font-size: 14px; font-weight: 600; }
.field input {
  width: 100%; padding: 15px 16px;
  font: 400 16px var(--body); color: var(--ink);
  background: var(--fog); border: 1.5px solid transparent; border-radius: 14px;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
.field input::placeholder { color: #8C99AB; }
.field input:focus { outline: none; background: #fff; border-color: var(--signal); box-shadow: 0 0 0 4px rgba(43,59,255,.12); }
.field input:user-invalid { border-color: #E5484D; }
.form-note { font-size: 13px; color: var(--slate); text-align: center; }
.form-status { font-size: 15px; font-weight: 600; text-align: center; min-height: 1px; }
.form-status.ok { color: var(--signal); }
.form-status.err { color: #E5484D; }
.lead-form.sent .field, .lead-form.sent .btn, .lead-form.sent .form-note { opacity: .4; pointer-events: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.footer {
  max-width: var(--max); margin: 0 auto;
  display: flex; justify-content: space-between;
  padding: 28px var(--pad); border-top: 1px solid var(--line);
  font-size: 14px; color: var(--slate);
}

/* ---------- Responsivo ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .machine { grid-template-columns: 1fr; }
  .phone { max-width: 220px; margin: 0 auto; }
  .clips { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; row-gap: 48px; }
  .steps::before { display: none; }
  .gains-grid { grid-template-columns: 1fr; }
  .gain { min-height: 0; }
  .team { grid-template-columns: 1fr; }
  .team-visual { max-width: 360px; }
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .wave { height: 120px; gap: 1px; }
  .track-stats strong { font-size: 15px; }
  .results { grid-template-columns: 1fr; }
  .result { padding: 28px 0; }
  .result + .result { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .steps { grid-template-columns: 1fr; }
  .clips { gap: 12px; }
  .clip-hook { font-size: 13px; bottom: 46px; }
  .hud { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
