/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:     #0a0a0a;
  --bg-2:   #161616;
  --card:   #131313;
  --ink:    #fafafa;
  --mute:   #a3a3a3;
  --mute-2: #6f6f6f;
  --accent: #00e28a;
  --accent-soft: rgba(0, 226, 138, 0.14);
  --line:   rgba(250, 250, 250, 0.1);
  --gradient-1: #00e28a;
  --gradient-2: #3a86ff;
  --gradient-3: #8338ec;

  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --sans: "Inter", system-ui, sans-serif;

  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 76px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; overflow-x: clip; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; line-height: 1.05; letter-spacing: -0.02em; font-family: var(--display); }
::selection { background: var(--accent); color: #001910; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* =============================================================
   3. Utilities
   ============================================================= */
.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: var(--bg);
  z-index: 9999; border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.kicker {
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); font-weight: 600; margin-bottom: 0.75rem;
}
.section-head { max-width: 46rem; margin: 0 auto 3rem; text-align: center; }
.section-head h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 500; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease-out), transform .7s var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }

/* =============================================================
   4. Buttons
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: 0.9rem 1.6rem; border-radius: 999px; font-weight: 600; font-size: 0.95rem;
  transition: transform .3s var(--ease-out), background .3s var(--ease-out), color .3s var(--ease-out);
}
.btn-primary { background: var(--accent); color: #001910; }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: rgba(250,250,250,0.06); }

/* =============================================================
   5. Nav
   ============================================================= */
.nav {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  backdrop-filter: blur(14px) saturate(140%);
  background: rgba(10,10,10,0.55);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  width: 100%; max-width: 78rem; margin-inline: auto; padding-inline: clamp(1.25rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-brand { font-family: var(--display); font-weight: 600; font-size: 1.1rem; }
.nav-links { display: flex; align-items: center; gap: clamp(1rem, 2vw, 1.75rem); font-size: 0.92rem; }
.nav-links a:not(.nav-cta) { color: var(--mute); position: relative; }
.nav-links a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1px; background: var(--accent);
  transition: right .3s var(--ease-out);
}
.nav-links a:not(.nav-cta):hover { color: var(--ink); }
.nav-links a:not(.nav-cta):hover::after { right: 0; }
.nav-cta {
  background: var(--accent); color: #001910; padding: 0.55rem 1.1rem; border-radius: 999px; font-weight: 600;
}

/* =============================================================
   6. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center; justify-content: center;
  padding: calc(var(--nav-h) + 3rem) 1.5rem 4rem;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  opacity: 0.55;
  filter: saturate(1.1);
}
.hero-gradient {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(circle 640px at var(--mx, 30%) var(--my, 30%), var(--gradient-1) 0%, transparent 55%),
    radial-gradient(circle 720px at calc(var(--mx, 70%) + 10%) calc(var(--my, 70%) - 10%), var(--gradient-2) 0%, transparent 55%),
    radial-gradient(circle 600px at 80% 80%, var(--gradient-3) 0%, transparent 55%),
    rgba(10,10,10,0.55);
  filter: blur(70px) saturate(140%);
  opacity: 0.55;
  transition: background 0.4s ease;
}
.hero-inner { max-width: 46rem; margin-inline: auto; }
.hero-title {
  font-size: clamp(2.2rem, 6.4vw, 4.6rem);
  font-weight: 600;
  max-width: 20ch;
  margin-inline: auto;
}
.hero-title em { color: var(--accent); font-style: normal; }
.hero-sub {
  margin-top: 1.5rem; color: var(--mute); font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 38ch; margin-inline: auto;
}
.hero-actions { margin-top: 2.25rem; display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* =============================================================
   6.5 Audit callout
   ============================================================= */
.audit-callout {
  max-width: 42rem; margin: 0 auto; padding: 4rem 1.5rem 1rem;
  text-align: center;
}
.audit-callout h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 500; }
.audit-callout p:not(.kicker) { color: var(--mute); margin-top: 1rem; }
.audit-callout .btn { margin-top: 1.75rem; }

/* =============================================================
   7. Manifesto
   ============================================================= */
.manifesto {
  max-width: 64rem; margin: 0 auto; padding: 5rem 1.5rem;
}
.manifesto-grid {
  display: grid; gap: 2.5rem; align-items: center;
}
.manifesto-img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 20px;
  filter: saturate(0.9);
}
.manifesto p {
  font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--mute); text-align: center;
}
.manifesto em { color: var(--ink); font-style: normal; }
@media (min-width: 720px) {
  .manifesto-grid { grid-template-columns: 0.8fr 1.2fr; text-align: left; }
  .manifesto p { text-align: left; }
}

/* =============================================================
   8. Services
   ============================================================= */
.services { padding: 5rem 1.5rem; max-width: 64rem; margin-inline: auto; }
.service-list { border-top: 1px solid var(--line); }
.service-row {
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
  display: grid; grid-template-columns: auto 1fr auto; gap: 1.5rem; align-items: start;
  cursor: pointer;
}
.service-num { font-family: var(--display); color: var(--mute-2); font-size: 1rem; padding-top: 0.3rem; }
.service-main h3 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); font-weight: 500; }
.service-short { color: var(--accent); font-size: 0.9rem; margin-top: 0.3rem; }
.service-desc {
  color: var(--mute); margin-top: 1rem; max-width: 52ch;
  display: grid; grid-template-rows: 0fr; opacity: 0;
  transition: grid-template-rows .4s var(--ease-out), opacity .3s var(--ease-out);
}
.service-desc > span { overflow: hidden; }
.service-row.is-open .service-desc { grid-template-rows: 1fr; opacity: 1; }
.service-toggle {
  font-size: 1.4rem; color: var(--mute); transition: transform .3s var(--ease-out);
  padding-top: 0.2rem;
}
.service-row.is-open .service-toggle { transform: rotate(45deg); color: var(--accent); }
.service-row:hover .service-main h3 { color: var(--accent); }

/* =============================================================
   9. Process
   ============================================================= */
.process { padding: 5rem 1.5rem; max-width: 74rem; margin-inline: auto; }
.process-grid { display: grid; gap: 1.5rem; grid-template-columns: 1fr; }
.process-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  padding: 2rem;
}
.process-num { font-family: var(--display); font-size: 2.2rem; color: var(--accent); }
.process-card h3 { margin-top: 1rem; font-size: 1.2rem; font-weight: 500; }
.process-card p { margin-top: 0.6rem; color: var(--mute); font-size: 0.95rem; }

/* =============================================================
   10. Zone
   ============================================================= */
.zone { position: relative; padding: 6rem 1.5rem; text-align: center; overflow: hidden; }
.zone-bg {
  position: absolute; inset: 0; z-index: -2;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(0.85);
}
.zone-overlay {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(10,10,10,0.88) 0%, rgba(10,10,10,0.75) 50%, rgba(10,10,10,0.92) 100%);
}
.zone-content { max-width: 60rem; margin-inline: auto; }
.zone-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.zone-tag {
  border: 1px solid var(--line); padding: 0.6rem 1.2rem; border-radius: 999px;
  font-size: 0.92rem; color: var(--mute);
}

/* =============================================================
   11. CTA final
   ============================================================= */
.cta-final {
  padding: 6rem 1.5rem; text-align: center; max-width: 44rem; margin-inline: auto;
}
.cta-final h2 { font-size: clamp(1.8rem, 4.4vw, 3rem); font-weight: 500; }
.cta-sub { color: var(--mute); margin-top: 1rem; max-width: 34ch; margin-inline: auto; }
.email-link {
  display: inline-block; margin-top: 2.5rem;
  font-family: var(--display); font-size: clamp(1.3rem, 4vw, 2rem);
  border-bottom: 2px solid transparent; transition: border-color .3s var(--ease-out), color .3s var(--ease-out);
}
.email-link:hover { border-color: var(--accent); color: var(--accent); }

/* =============================================================
   12. Footer
   ============================================================= */
.footer {
  padding: 2.5rem 1.5rem; text-align: center; color: var(--mute-2); font-size: 0.85rem;
  border-top: 1px solid var(--line);
}

/* =============================================================
   13. Chat widget (asistente Nova)
   ============================================================= */
.chat-widget { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 200; }
.chat-bubble {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--accent); color: #001910;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; box-shadow: 0 10px 30px -8px rgba(0,226,138,0.5);
  transition: transform .3s var(--ease-out);
}
.chat-bubble:hover { transform: scale(1.06); }

.chat-panel {
  position: absolute; right: 0; bottom: 76px;
  width: min(340px, 88vw); height: min(480px, 70vh);
  background: var(--card); border: 1px solid var(--line); border-radius: 20px;
  display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6);
}
.chat-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 1rem 1.1rem; border-bottom: 1px solid var(--line);
}
.chat-header strong { font-family: var(--display); }
.chat-header p { color: var(--mute); font-size: 0.8rem; margin-top: 0.15rem; }
.chat-close { color: var(--mute); font-size: 1rem; }
.chat-close:hover { color: var(--ink); }

.chat-messages {
  flex: 1; overflow-y: auto; padding: 1rem 1.1rem;
  display: flex; flex-direction: column; gap: 0.75rem;
}
.chat-msg { max-width: 88%; padding: 0.6rem 0.85rem; border-radius: 14px; font-size: 0.9rem; line-height: 1.5; }
.chat-msg.from-user { align-self: flex-end; background: var(--accent); color: #001910; }
.chat-msg.from-bot { align-self: flex-start; background: rgba(250,250,250,0.06); color: var(--ink); }

.chat-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0 1.1rem 0.75rem; }
.chat-suggestion {
  font-size: 0.78rem; color: var(--mute); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.4rem 0.75rem;
}
.chat-suggestion:hover { color: var(--ink); border-color: var(--accent); }

.chat-form {
  display: flex; gap: 0.5rem; padding: 0.9rem;
  border-top: 1px solid var(--line);
}
.chat-form input {
  flex: 1; background: rgba(250,250,250,0.06); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.6rem 1rem; color: var(--ink); font: inherit; font-size: 0.9rem;
}
.chat-form button {
  width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #001910;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

[hidden] { display: none !important; }

/* =============================================================
   14. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .process-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 960px) {
  .nav-links a:not(.nav-cta) { font-size: 0.95rem; }
}
