/* =============================================================
   1. Tokens — oscuro + un solo rojo
   ============================================================= */
:root {
  --bg:     #0b0a0a;
  --bg-2:   #141212;
  --bg-3:   #1c1919;
  --ink:    #f5f2f0;
  --mute:   #a8a29e;
  --dim:    #6b6461;
  --red:    #e5383b;
  --red-d:  #b5161b;
  --wine:   #6a040f;
  --line:   rgba(245,242,240,.10);
  --serif:  "Instrument Serif", Georgia, serif;
  --sans:   "Inter", system-ui, sans-serif;
  --mono:   "JetBrains Mono", ui-monospace, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { font-family: var(--sans); font-size: 16px; line-height: 1.6; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { 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.1; letter-spacing: -0.02em; padding-bottom: .08em; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1180px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 1rem; padding: .6rem 1rem; background: var(--ink); color: var(--bg); z-index: 9999; border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.center { text-align: center; margin-inline: auto; }
.mono { font-family: var(--mono); font-size: .8rem; color: var(--dim); }

/* =============================================================
   4. Typography
   ============================================================= */
.kicker { font-family: var(--mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 1rem; }
.section-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.4rem, 5.6vw, 4.4rem); max-width: 18ch; margin-bottom: 1.3rem; }
.section-title em, .hero-title em, .cta-title em { font-style: italic; color: var(--red); }
.lead { font-size: 1.1rem; color: var(--mute); max-width: 56ch; margin-bottom: 2rem; }

/* =============================================================
   5. Components
   ============================================================= */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; padding: .95rem 1.5rem; border-radius: 999px; font-weight: 600; transition: transform .35s var(--ease-out), background .35s var(--ease-out), box-shadow .35s var(--ease-out), border-color .35s; }
.btn:hover { transform: translateY(-2px); }
.btn-red { background: var(--red); color: #fff; box-shadow: 0 16px 40px -14px rgba(229,56,59,.7); }
.btn-red:hover { background: var(--red-d); box-shadow: 0 20px 50px -14px rgba(229,56,59,.85); }
.btn-line { border: 1px solid rgba(245,242,240,.28); }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { padding: .6rem 1.1rem; font-size: .9rem; }
.btn-lg { padding: 1.15rem 2rem; font-size: 1.08rem; }
.wa-icon { width: 22px; height: 22px; fill: currentColor; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; box-shadow: 0 0 0 0 rgba(34,197,94,.6); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,.6); } 70% { box-shadow: 0 0 0 10px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }

/* Nav */
.nav { position: sticky; top: 0; z-index: 50; transition: background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled { background: rgba(11,10,10,.88); border-bottom-color: var(--line); }
@supports (backdrop-filter: blur(12px)) { .nav.is-scrolled { background: rgba(11,10,10,.6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); } }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .7rem; }
.logo { width: 64px; height: auto; color: var(--ink); }
.logo .halo { stroke: var(--red); }
.brand-name { font-family: var(--mono); font-size: .82rem; letter-spacing: .2em; text-transform: uppercase; color: var(--mute); }
.nav-links { display: none; gap: 2rem; color: var(--mute); font-weight: 500; font-size: .95rem; }
.nav-links a { transition: color .25s; }
.nav-links a:hover { color: var(--ink); }

/* =============================================================
   6. Sections
   ============================================================= */
.hero { position: relative; min-height: 92vh; min-height: 92svh; display: flex; align-items: center; padding: 4rem 0 5rem; overflow: clip; }
.hero-gradient {
  position: absolute; inset: -10%; z-index: -2;
  background:
    radial-gradient(circle 520px at var(--mx, 70%) var(--my, 35%), rgba(229,56,59,.55) 0%, transparent 60%),
    radial-gradient(circle 700px at calc(var(--mx, 70%) - 30%) calc(var(--my, 35%) + 30%), rgba(106,4,15,.75) 0%, transparent 60%),
    var(--bg);
  filter: blur(40px) saturate(130%);
}
.hero-grain { position: absolute; inset: 0; z-index: -1; opacity: .08; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-size: .78rem; color: var(--mute); padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 1.8rem; }
.hero-title { font-family: var(--serif); font-weight: 400; font-size: clamp(3rem, 9.5vw, 7.8rem); max-width: 13ch; margin-bottom: 1.6rem; }
.hero-sub { font-size: 1.15rem; color: #d6d0cc; max-width: 58ch; margin-bottom: 2.2rem; }
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-bottom: 3rem; }
.hero-points { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 1.2rem 2.4rem; color: var(--mute); font-size: .95rem; }
.hero-points span { font-family: var(--mono); color: var(--red); margin-right: .4rem; font-size: .8rem; }

.section { padding: 6rem 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }

.works { display: grid; gap: 1.4rem; }
.work { display: block; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: var(--bg-2); transition: transform .5s var(--ease-out), border-color .5s; }
.work:hover { transform: translateY(-6px); border-color: rgba(229,56,59,.5); }
.work-img { aspect-ratio: 16 / 10; overflow: hidden; }
.work-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.9); transition: transform 1s var(--ease-out), filter 1s; }
.work:hover .work-img img { transform: scale(1.06); filter: saturate(1.1); }
.work-body { padding: 1.6rem 1.6rem 1.8rem; }
.work-tag { font-family: var(--mono); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--red); margin-bottom: .6rem; }
.work-body h3 { font-family: var(--serif); font-weight: 400; font-size: 1.9rem; margin-bottom: .6rem; }
.work-body p { color: var(--mute); }
.work-cta { display: inline-block; margin-top: 1rem; font-weight: 600; background: linear-gradient(var(--red), var(--red)) left bottom / 0 1px no-repeat; transition: background-size .4s var(--ease-out); }
.work:hover .work-cta { background-size: 100% 1px; }

.features { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; margin-top: 1rem; }
.feature { background: var(--bg-2); padding: 2rem 1.8rem; transition: background .4s; }
.feature:hover { background: var(--bg-3); }
.f-num { font-family: var(--mono); font-size: .8rem; color: var(--red); }
.feature h3 { font-size: 1.2rem; font-weight: 600; margin: .8rem 0 .5rem; letter-spacing: -.01em; }
.feature p { color: var(--mute); font-size: .97rem; }

.steps { list-style: none; padding: 0; display: grid; gap: 1rem; margin-top: 1rem; }
.step { display: flex; gap: 1.4rem; align-items: flex-start; padding: 1.8rem 0; border-top: 1px solid var(--line); }
.step-n { font-family: var(--serif); font-style: italic; font-size: 4rem; line-height: .8; color: var(--red); min-width: 3rem; }
.step h3 { font-family: var(--serif); font-weight: 400; font-size: 2rem; margin-bottom: .4rem; }
.step p { color: var(--mute); max-width: 52ch; }

.faq-wrap { display: grid; gap: 2.5rem; }
.faq { display: grid; gap: .6rem; }
.faq details { border: 1px solid var(--line); border-radius: 16px; padding: 1.2rem 1.4rem; background: var(--bg); }
.faq summary { font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font-size: 1.3rem; line-height: 1; transition: transform .3s var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin-top: .8rem; color: var(--mute); }

.cta { position: relative; padding: 8rem 0; text-align: center; overflow: clip; }
.cta-glow { position: absolute; inset: 20% 10%; background: radial-gradient(50% 50% at 50% 50%, rgba(229,56,59,.35), transparent 70%); filter: blur(60px); z-index: -1; }
.cta-inner { display: grid; justify-items: center; }
.cta-title { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 5.6vw, 4.6rem); max-width: 20ch; margin-bottom: 1.2rem; }

.footer { border-top: 1px solid var(--line); padding: 2.5rem 0 6rem; color: var(--mute); font-size: .92rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.credits { font-size: .72rem; color: var(--dim); margin-top: 1rem; }

/* Chat */
.chat-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 60; display: inline-flex; align-items: center; gap: .55rem; padding: .9rem 1.2rem; border-radius: 999px; background: var(--ink); color: var(--bg); font-weight: 600; box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); transition: transform .35s var(--ease-out); }
.chat-fab:hover { transform: translateY(-3px); }
.chat-fab svg { width: 20px; fill: var(--red); }
.chat { position: fixed; right: 1rem; bottom: 1rem; left: 1rem; z-index: 70; max-height: min(640px, calc(100svh - 2rem)); display: flex; flex-direction: column; background: var(--bg-2); border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.9); }
.chat[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.chat-name { font-weight: 700; }
.chat-status { font-size: .78rem; color: var(--mute); display: flex; align-items: center; gap: .45rem; }
.chat-close { font-size: 1.6rem; line-height: 1; width: 36px; height: 36px; border-radius: 50%; }
.chat-close:hover { background: var(--bg-3); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; min-height: 180px; }
.msg { max-width: 85%; padding: .7rem .95rem; border-radius: 16px; font-size: .95rem; line-height: 1.45; white-space: pre-line; }
.msg-bot { background: var(--bg-3); align-self: flex-start; border-bottom-left-radius: 4px; }
.msg-user { background: var(--red); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg-typing { color: var(--mute); font-style: italic; }
.chat-suggest { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1.2rem .8rem; }
.chat-suggest button { font-size: .82rem; padding: .45rem .8rem; border-radius: 999px; border: 1px solid var(--line); }
.chat-suggest button:hover { border-color: var(--red); color: var(--red); }
.chat-form { display: flex; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); }
.chat-form input { flex: 1; min-width: 0; font: inherit; color: var(--ink); padding: .75rem 1rem; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); }
.chat-form button { width: 44px; height: 44px; border-radius: 50%; background: var(--red); color: #fff; flex-shrink: 0; }
.chat-wa { display: block; text-align: center; padding: .75rem; font-weight: 600; color: var(--red); border-top: 1px solid var(--line); }

/* =============================================================
   7. Effects
   ============================================================= */
[data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
[data-reveal].is-revealed, .no-js [data-reveal] { opacity: 1; transform: none; }

/* =============================================================
   8. Responsive
   ============================================================= */
@media (min-width: 720px) {
  .works { grid-template-columns: 1fr 1fr; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .chat { left: auto; width: 380px; }
}
@media (min-width: 960px) {
  .nav-links { display: flex; }
  .works { grid-template-columns: repeat(3, 1fr); }
  .features { grid-template-columns: repeat(3, 1fr); }
  .faq-wrap { grid-template-columns: .8fr 1.2fr; gap: 4rem; }
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
  .step { flex-direction: column; }
}

/* =============================================================
   9. Reduced motion (solo lo intrusivo)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .pulse { animation: none; }
  html { scroll-behavior: auto; }
}
