/* ==========================================================================
   LFX Labs
   Conceito: preto de base, branco para respirar, vermelho como único acento.
   Os cortes diagonais vêm do X do logo.
   ========================================================================== */

:root {
  --black: #050505;
  --white: #ffffff;
  --red: #f90000;
  --red-hot: #ff2d2d;

  --surface: #101010;
  --text-soft: rgba(255, 255, 255, 0.72);
  --line-on-black: rgba(255, 255, 255, 0.16);
  --text-soft-dark: rgba(5, 5, 5, 0.72);
  --line-on-white: rgba(5, 5, 5, 0.16);

  --font-display: "Michroma", "Eurostile", "Arial Black", Arial, sans-serif;
  --font-body: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --gutter: clamp(16px, 5vw, 48px);
  --max: 1120px;
  --cut: 16px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

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

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 3px solid var(--white);
  outline-offset: 3px;
}

.section-red :focus-visible,
.section-white :focus-visible { outline-color: var(--black); }

.wrap {
  width: 100%;
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.sr-only {
  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: 16px;
  top: -64px;
  z-index: 100;
  background: var(--white);
  color: var(--black);
  padding: 10px 16px;
  font-weight: 700;
}
.skip-link:focus { top: 12px; }

/* ---------- Cabeçalho ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 5, 5, 0.92);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line-on-black); }

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-h);
}

.brand { display: block; line-height: 0; }
.brand img { height: 40px; width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}

.nav a {
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-soft);
  padding-block: 6px;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}
.nav a:hover { color: var(--white); }
.nav a.is-active { color: var(--white); border-bottom-color: var(--red); }

.nav .nav-cta {
  background: var(--red);
  color: var(--black);
  font-weight: 800;
  padding: 10px 18px;
  border-bottom: 0;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
  transition: background 0.15s;
}
.nav .nav-cta:hover { background: var(--white); color: var(--black); }

.menu-toggle {
  display: none;
  align-items: center;
  gap: 10px;
  background: none;
  border: 1px solid var(--line-on-black);
  color: var(--white);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 9px 14px;
  cursor: pointer;
}

.menu-toggle-icon,
.menu-toggle-icon::before {
  display: block;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s;
}
.menu-toggle-icon { position: relative; }
.menu-toggle-icon::before { content: ""; position: absolute; top: 6px; left: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon { transform: translateY(3px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle-icon::before { transform: translateY(-6px) rotate(-90deg); top: 6px; }

/* ---------- Elementos comuns ---------- */

.eyebrow {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 18px;
}

.btn {
  display: inline-block;
  background: var(--red);
  color: var(--black);
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: 16px 28px;
  border: 0;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
  transition: background 0.15s, color 0.15s;
}
.btn:hover { background: var(--white); color: var(--black); }

.link-arrow {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--line-on-black);
  padding-block: 4px;
  transition: border-color 0.15s;
}
.link-arrow:hover { border-bottom-color: var(--red); }

/* ---------- Abertura ---------- */

.hero {
  padding-block: clamp(48px, 9vw, 112px) clamp(56px, 9vw, 120px);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  gap: clamp(40px, 6vw, 72px);
  align-items: center;
}

.hero-copy,
.scale { min-width: 0; }

h1 {
  font-size: clamp(1.7rem, 5.4vw, 3.3rem);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
h1 em { font-style: normal; color: var(--red); }

.lead {
  max-width: 34rem;
  color: var(--text-soft);
  font-size: 1.125rem;
  margin-bottom: 36px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
}

/* Painel de experiência em escala */

.scale {
  background: var(--surface);
  padding: clamp(24px, 4vw, 36px);
  clip-path: polygon(0 0, calc(100% - 28px) 0, 100% 28px, 100% 100%, 28px 100%, 0 calc(100% - 28px));
}

.scale-title {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-soft);
  margin-bottom: 28px;
}

.scale-row + .scale-row { margin-top: 24px; }

.scale-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 10px;
  font-size: 0.95rem;
}
.scale-head strong {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.15rem;
  font-variant-numeric: tabular-nums;
}

.track {
  height: 22px;
  background: rgba(255, 255, 255, 0.08);
}

.bar-fill {
  display: block;
  height: 100%;
  transform-origin: left center;
  animation: grow 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) 0.3s backwards;
}
.bar-marketing {
  width: 92%;
  background: var(--white);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
}
.bar-apps {
  width: 10%;
  min-width: 18px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 14px) 100%, 0 100%);
  animation-delay: 0.6s;
}

.ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  font-size: 0.78rem;
  color: var(--text-soft);
  font-variant-numeric: tabular-nums;
}

.scale-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-on-black);
  color: var(--text-soft);
  font-size: 0.95rem;
}

@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-copy > * { animation: rise 0.7s ease-out backwards; }
.hero-copy > :nth-child(2) { animation-delay: 0.08s; }
.hero-copy > :nth-child(3) { animation-delay: 0.16s; }
.hero-copy > :nth-child(4) { animation-delay: 0.24s; }

/* ---------- Seções ---------- */

.section { padding-block: clamp(64px, 10vw, 120px); scroll-margin-top: var(--header-h); }
.hero { scroll-margin-top: var(--header-h); }

.section-head { margin-bottom: clamp(32px, 5vw, 56px); }
.section-head h2,
.about-title h2,
.contact-copy h2 { font-size: clamp(1.5rem, 4vw, 2.5rem); }

/* Serviços */

.cards {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: var(--surface);
  padding: 28px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: background 0.2s, color 0.2s;
}
.card h3 { font-size: 1.1rem; }
.card p { color: var(--text-soft); transition: color 0.2s; }

.tag {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--red);
  transition: color 0.2s;
}

.card:hover { background: var(--red); color: var(--black); }
.card:hover p,
.card:hover .tag { color: var(--black); }

/* Apps do desenvolvedor */

.section-apps { border-top: 1px solid var(--line-on-black); }

.apps {
  display: grid;
  gap: 16px;
  grid-template-columns: 1fr;
}

.app-card { gap: 12px; }
.app-card p { flex: 1; }

.app-icon {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  object-fit: cover;
  background: var(--black);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.app-icon-fallback {
  display: grid;
  place-items: center;
  background: var(--red);
  color: var(--black);
  font-family: var(--font-display);
  font-size: 1.6rem;
  transition: background 0.2s, color 0.2s;
}
.app-card:hover .app-icon-fallback { background: var(--black); color: var(--white); }

.app-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.store-link {
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  color: inherit;
  border: 2px solid currentColor;
  padding: 8px 14px;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.store-link:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.app-card:hover .store-link:hover { background: var(--black); color: var(--white); border-color: var(--black); }

/* Estado vazio: ainda sem apps cadastrados */
.app-empty {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: clamp(24px, 4vw, 40px);
  border: 1px dashed var(--line-on-black);
  color: var(--text-soft);
}
.app-empty p { max-width: 36rem; }
.app-empty .link-arrow { color: var(--white); }

/* Processo (branco) */

.section-white { background: var(--white); color: var(--black); }
.section-white .eyebrow { color: var(--red); }

.steps {
  display: grid;
  gap: 32px 28px;
  grid-template-columns: 1fr;
}
.steps li {
  min-width: 0;
  border-top: 2px solid var(--black);
  padding-top: 20px;
}
.step-n {
  display: block;
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--red);
  margin-bottom: 18px;
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.05rem; margin-bottom: 10px; }
.steps p { color: var(--text-soft-dark); }

/* Sobre */

.about {
  display: grid;
  gap: 32px;
  align-items: start;
}
.about-title,
.about-body { min-width: 0; }

.about-body p {
  font-size: 1.125rem;
  color: var(--text-soft);
  max-width: 38rem;
}

.principles {
  margin-top: 32px;
  max-width: 38rem;
  border-top: 1px solid var(--line-on-black);
}
.principles li {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-on-black);
  font-weight: 700;
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.principles li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 8px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  transform: translateY(-1px);
}

/* Contato (vermelho) */

.section-red { background: var(--red); color: var(--black); }
.section-red .eyebrow { color: var(--black); }

.contact-copy { max-width: 46rem; min-width: 0; }
.contact-copy h2 { color: var(--black); margin-bottom: 20px; }
.contact-lead { font-size: 1.125rem; max-width: 32rem; margin-bottom: 36px; }

.email {
  display: inline-block;
  font-weight: 800;
  font-size: clamp(1.2rem, 5.2vw, 2.4rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-decoration-thickness: 3px;
  text-underline-offset: 8px;
  margin-bottom: 32px;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: var(--white); color: var(--black); }

.copy-btn {
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  background: transparent;
  color: var(--black);
  border: 2px solid var(--black);
  padding: 14px 22px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.copy-btn:hover { background: var(--black); color: var(--white); }

/* ---------- Rodapé ---------- */

.site-footer {
  background: var(--black);
  border-top: 1px solid var(--line-on-black);
  padding-block: 40px;
  color: var(--text-soft);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  gap: 14px;
  align-items: center;
}
.footer-grid img { height: 44px; width: auto; justify-self: start; }
.footer-grid a { color: var(--white); text-underline-offset: 4px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.copy { font-size: 0.85rem; }

/* ---------- Telas maiores ---------- */

@media (min-width: 640px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .about { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 64px; }
  .footer-grid {
    grid-template-columns: auto 1fr auto;
    gap: 12px 40px;
  }
  .footer-grid .copy { grid-column: 1 / -1; }
}

@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .apps { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* ---------- Telas pequenas: menu ---------- */

@media (max-width: 760px) {
  .menu-toggle { display: inline-flex; }

  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 24px;
    background: var(--black);
    border-bottom: 1px solid var(--line-on-black);
    display: none;
  }
  .nav.is-open { display: flex; }

  .nav a {
    padding: 16px 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--line-on-black);
  }
  .nav a.is-active { border-bottom-color: var(--line-on-black); color: var(--red); }

  .nav .nav-cta {
    margin-top: 20px;
    text-align: center;
    padding: 16px 18px;
    border-bottom: 0;
  }

  .brand img { height: 34px; }
}

/* ---------- Voltar ao topo ---------- */

.to-top {
  position: fixed;
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  z-index: 60;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  background: var(--red);
  color: var(--black);
  border: 0;
  cursor: pointer;
  box-shadow: 0 0 0 2px var(--black), 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s, background 0.15s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--white); }
.to-top:focus-visible { outline: 3px solid var(--white); outline-offset: 4px; }

/* ---------- Página de política de privacidade ---------- */

.legal { padding-block: clamp(40px, 8vw, 96px); }
.legal-body { max-width: 44rem; min-width: 0; }

.back-link {
  display: inline-block;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-soft);
  margin-bottom: 40px;
  border-bottom: 2px solid var(--line-on-black);
  padding-block: 4px;
  transition: color 0.15s, border-color 0.15s;
}
.back-link:hover { color: var(--white); border-bottom-color: var(--red); }

.legal h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); margin-bottom: 16px; }
.legal-date { color: var(--text-soft); margin-bottom: 48px; font-variant-numeric: tabular-nums; }

.legal section { padding-block: 28px; border-top: 1px solid var(--line-on-black); }
.legal h2 { font-size: 1.1rem; margin-bottom: 14px; }
.legal p,
.legal li { color: var(--text-soft); }
.legal p + p { margin-top: 12px; }
.legal a { color: var(--white); text-underline-offset: 4px; text-decoration-thickness: 2px; }
.legal a:hover { color: var(--red-hot); }

.legal ul { display: grid; gap: 10px; }
.legal li {
  display: flex;
  gap: 14px;
  align-items: baseline;
}
.legal li::before {
  content: "";
  flex: none;
  width: 14px;
  height: 8px;
  background: var(--red);
  clip-path: polygon(0 0, 100% 0, calc(100% - 4px) 100%, 0 100%);
  transform: translateY(-1px);
}

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