/* Rearcode — site institucional */

@font-face {
  font-family: "Sora";
  src: url("fonts/sora-var-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var-latin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0a0c12;
  --bg-alt: #0e121b;
  --surface: #131824;
  --surface-2: #192030;
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #eef1f6;
  --muted: #a3adbf;
  --accent: #ff6b35;
  --accent-hi: #ff8a5c;
  --accent-ink: #1a0a03;
  --ok: #4ade80;
  --warn: #fbbf24;
  --info: #7aa7ff;
  --radius: 18px;
  --font-head: "Sora", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); margin: 0; line-height: 1.12; letter-spacing: -0.025em; font-weight: 700; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

.container { width: min(1160px, 100% - 40px); margin-inline: auto; }
.container--narrow { width: min(820px, 100% - 40px); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink);
  padding: 10px 16px; border-radius: 10px; font-weight: 600;
}
.skip:focus { top: 12px; }

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

.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon--lg { width: 28px; height: 28px; color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 12, 18, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }

.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__mark { width: 30px; height: 30px; color: var(--accent); }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: -0.03em; }
.brand__name span { color: var(--accent); }

.nav { display: flex; align-items: center; gap: 30px; font-size: 0.95rem; color: var(--muted); }
.nav a:not(.btn) { transition: color 0.2s; }
.nav a:not(.btn):hover { color: var(--text); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line-strong);
  background: transparent; border-radius: 12px; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--text); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 14px; border: 1px solid transparent;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; line-height: 1;
  cursor: pointer; transition: transform 0.2s, background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.btn--sm { min-height: 42px; padding: 0 18px; font-size: 0.92rem; border-radius: 12px; }
.btn--lg { min-height: 60px; padding: 0 34px; font-size: 1.08rem; }
.btn--primary { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 30px -10px rgba(255, 107, 53, 0.65); }
.btn--primary:hover { background: var(--accent-hi); transform: translateY(-2px); box-shadow: 0 16px 34px -10px rgba(255, 107, 53, 0.75); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); background: rgba(255, 255, 255, 0.02); }
.btn--ghost:hover { border-color: rgba(255, 255, 255, 0.32); background: rgba(255, 255, 255, 0.06); }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding: clamp(48px, 8vw, 104px) 0 clamp(56px, 8vw, 96px); }
.hero::before {
  content: ""; position: absolute; inset: -20% -10% auto auto; width: 70%; height: 90%;
  background: radial-gradient(closest-side, rgba(255, 107, 53, 0.16), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 0%, transparent 75%);
  mask-image: radial-gradient(ellipse 70% 60% at 70% 20%, #000 0%, transparent 75%);
}
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(32px, 5vw, 64px); align-items: center; }

.chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px; margin-bottom: 26px;
  border: 1px solid var(--line-strong); border-radius: 16px; background: rgba(255, 255, 255, 0.03);
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em; color: var(--muted);
}
.chip__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.2); }

.hero h1 { font-size: clamp(2.2rem, 4.5vw, 3.45rem); letter-spacing: -0.035em; line-height: 1.07; }
.hero h1 em { font-style: normal; color: var(--accent); }
.lead { margin-top: 24px; max-width: 560px; font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.facts { margin-top: 38px; display: grid; gap: 12px; color: var(--muted); font-size: 0.97rem; }
.facts li { display: flex; align-items: center; gap: 12px; }
.facts .icon { color: var(--ok); width: 18px; height: 18px; }

/* Demo card */
.hero__visual { position: relative; }
.glow { position: absolute; inset: 10% 5% -8% 5%; background: radial-gradient(closest-side, rgba(255, 107, 53, 0.2), transparent 72%); filter: blur(30px); z-index: 0; }
.demo {
  position: relative; z-index: 1; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--line-strong);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
.demo__bar { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.demo__dots { display: inline-flex; gap: 6px; }
.demo__dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.16); }
.demo__title { font-size: 0.88rem; font-weight: 600; }
.demo__tag { margin-left: auto; font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.04em; color: var(--muted); padding: 3px 9px; border: 1px solid var(--line-strong); border-radius: 999px; white-space: nowrap; }
.demo__body { display: flex; flex-direction: column; gap: 14px; padding: 22px 20px 26px; min-height: 410px; }

.msg { max-width: 84%; padding: 11px 15px; border-radius: 16px; font-size: 0.95rem; line-height: 1.45; }
.msg--in { align-self: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg--out { align-self: flex-end; background: var(--accent); color: var(--accent-ink); font-weight: 500; border-bottom-right-radius: 5px; }
.step {
  align-self: center; display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px;
  font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted);
  border: 1px dashed var(--line-strong); border-radius: 999px; background: rgba(255, 255, 255, 0.02);
}
.step__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--info); }
.step--ok { color: var(--ok); border-color: rgba(74, 222, 128, 0.4); }
.step--ok .step__dot { background: var(--ok); }
.card-mini {
  align-self: stretch; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px;
  border-radius: 14px; border: 1px solid rgba(74, 222, 128, 0.32); background: rgba(74, 222, 128, 0.07);
}
.card-mini strong { font-size: 0.92rem; }
.card-mini span { font-size: 0.82rem; color: var(--muted); }

@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
.demo__body > * { animation: pop 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: var(--d, 0s); }

/* ---------- Outcomes ---------- */
.outcomes { padding-bottom: clamp(56px, 8vw, 96px); }
.outcomes__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.outcome { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent); }
.outcome h3 { margin: 18px 0 10px; font-size: 1.25rem; }
.outcome p { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding: clamp(64px, 9vw, 112px) 0; }
.section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }
.section__head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.eyebrow { font-family: var(--font-mono); font-size: 0.8rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); margin-bottom: 14px; }
.section__head h2 { font-size: clamp(1.8rem, 3.6vw, 2.7rem); }
.section__sub { margin-top: 16px; color: var(--muted); font-size: 1.08rem; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card { display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: border-color 0.25s, transform 0.25s, background 0.25s; }
.card:hover { border-color: rgba(255, 107, 53, 0.45); transform: translateY(-4px); background: var(--surface-2); }
.card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; margin-bottom: 22px; color: var(--accent); background: rgba(255, 107, 53, 0.12); border: 1px solid rgba(255, 107, 53, 0.25); }
.card h3 { font-size: 1.22rem; margin-bottom: 12px; }
.card p { color: var(--muted); font-size: 1rem; flex: 1; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.tags li { padding: 4px 11px; font-size: 0.78rem; color: var(--muted); border: 1px solid var(--line-strong); border-radius: 999px; }

/* Niches */
.niches { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.niche { padding: 28px 28px 30px; border-left: 2px solid var(--accent); background: linear-gradient(90deg, rgba(255, 107, 53, 0.07), transparent 70%); border-radius: 4px var(--radius) var(--radius) 4px; }
.niche h3 { font-size: 1.2rem; margin-bottom: 10px; }
.niche p { color: var(--muted); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.steps li { position: relative; padding: 28px 24px 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.steps__n { display: block; font-family: var(--font-head); font-weight: 700; font-size: 2.4rem; letter-spacing: -0.04em; color: var(--accent); opacity: 0.9; margin-bottom: 14px; }
.steps h3 { font-size: 1.18rem; margin-bottom: 10px; }
.steps p { color: var(--muted); font-size: 0.98rem; }

/* Projects */
.projects { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project { display: flex; flex-direction: column; padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.project__top { margin-bottom: 20px; }
.project h3 { font-size: 1.22rem; margin-bottom: 14px; }
.project p { color: var(--muted); font-size: 0.99rem; flex: 1; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; font-size: 0.78rem; font-weight: 600; border-radius: 999px; border: 1px solid; }
.status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status--live { color: var(--ok); border-color: rgba(74, 222, 128, 0.4); background: rgba(74, 222, 128, 0.08); }
.status--pilot { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: rgba(251, 191, 36, 0.08); }
.status--proto { color: var(--info); border-color: rgba(122, 167, 255, 0.4); background: rgba(122, 167, 255, 0.08); }

.stack { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--line); }
.stack__label { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.stack ul { display: flex; flex-wrap: wrap; gap: 10px; }
.stack li { padding: 7px 14px; font-size: 0.88rem; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(255, 255, 255, 0.02); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 4px; cursor: pointer; list-style: none; font-family: var(--font-head); font-weight: 600; font-size: 1.12rem; letter-spacing: -0.015em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 50%; font-family: var(--font-body); font-size: 1.25rem; font-weight: 400; color: var(--accent); transition: transform 0.25s, background 0.25s; }
.faq details[open] summary::after { transform: rotate(45deg); background: rgba(255, 107, 53, 0.12); }
.faq details p { padding: 0 4px 26px; color: var(--muted); max-width: 70ch; }

/* CTA */
.cta-wrap { padding: 0 0 clamp(64px, 9vw, 112px); }
.cta {
  position: relative; overflow: hidden; text-align: center; padding: clamp(44px, 7vw, 84px) clamp(24px, 5vw, 64px);
  border-radius: 28px; border: 1px solid rgba(255, 107, 53, 0.35);
  background: radial-gradient(120% 140% at 50% 0%, rgba(255, 107, 53, 0.2), transparent 60%), var(--surface);
}
.cta h2 { font-size: clamp(1.9rem, 4vw, 3rem); max-width: 18ch; margin-inline: auto; }
.cta > p:not(.cta__phone) { margin: 20px auto 34px; max-width: 52ch; color: var(--muted); font-size: 1.1rem; }
.cta__phone { margin-top: 20px; font-family: var(--font-mono); font-size: 0.95rem; color: var(--muted); }
.cta__phone a { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 4px; transition: color 0.2s, text-decoration-color 0.2s; }
.cta__phone a:hover { color: var(--accent-hi); text-decoration-color: var(--accent-hi); }

/* Footer */
.site-footer { border-top: 1px solid var(--line); padding: 48px 0 28px; background: var(--bg); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 28px 48px; justify-content: space-between; align-items: flex-start; }
.footer-brand { max-width: 340px; }
.footer-brand p { margin-top: 14px; color: var(--muted); font-size: 0.95rem; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 12px 28px; color: var(--muted); font-size: 0.95rem; }
.footer-nav a:hover { color: var(--text); }
.footer-bottom { margin-top: 36px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }

/* ---------- Reveal ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
html.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .cards, .projects { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 560px; }
  .demo__body { min-height: 0; }
  .outcomes__grid, .niches { grid-template-columns: 1fr; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: absolute; left: 0; right: 0; top: 68px; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 20px 22px; background: var(--bg); border-bottom: 1px solid var(--line);
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  }
  .nav.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav a:not(.btn) { padding: 16px 4px; font-size: 1.05rem; border-bottom: 1px solid var(--line); }
  .nav__cta { margin-top: 18px; }
}

@media (max-width: 640px) {
  body { font-size: 1rem; }
  .cards, .projects, .steps { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
  .btn--lg { width: 100%; padding: 0 20px; }
  .msg { max-width: 92%; }
  .demo__tag { display: none; }
  .footer-inner { flex-direction: column; }
}

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