/* =========================================================
   Toledo Web Studio — Portfolio "Neon"
   Tema oscuro vibrante (violeta + azul + naranja + rosa)
   ========================================================= */

:root {
  /* Paleta */
  --bg: #06060e;
  --bg-elev: #0e0b1e;
  --bg-card: rgba(255, 255, 255, 0.04);
  --bg-card-hover: rgba(255, 255, 255, 0.07);
  --ink: #f4f4ff;
  --muted: #a6a6c6;
  --muted-soft: #6f6f93;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);

  --purple: #7b5cff;
  --blue: #2b82ff;
  --blue-soft: #6aa6ff;
  --pink: #ff4d9d;
  --orange: #f27a2e;
  --orange-soft: #ff9a55;

  --grad-brand: linear-gradient(120deg, #7b5cff 0%, #2b82ff 45%, #f27a2e 100%);
  --grad-blue: linear-gradient(135deg, #7b5cff, #2b82ff);

  --shadow: 0 30px 70px rgba(5, 4, 20, 0.6);
  --shadow-glow: 0 18px 60px rgba(123, 92, 255, 0.45);

  --radius: 18px;
  --radius-sm: 12px;
  --radius-pill: 999px;
  --container: 75rem;

  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Space Grotesk", var(--font-body);
  --font-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* Blobs de color fijos al fondo (estilo Neon) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(50rem 32rem at 82% -8%, rgba(123, 92, 255, 0.30), transparent 60%),
    radial-gradient(42rem 30rem at -5% 12%, rgba(255, 77, 157, 0.18), transparent 55%),
    radial-gradient(44rem 32rem at 60% 108%, rgba(43, 130, 255, 0.22), transparent 55%);
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.08;
  margin: 0 0 0.6em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; color: var(--muted); }

button, input, select, textarea { font: inherit; }

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: 1rem; z-index: 60;
  transform: translateY(-160%);
  padding: 0.7rem 1rem; background: var(--blue); color: #fff;
  border-radius: var(--radius-sm);
}
.skip-link:focus { transform: translateY(0); }

/* ---------- Layout ---------- */
.container { width: min(100% - 2.5rem, var(--container)); margin-inline: auto; }
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 0.5rem;
  margin: 0 0 1rem;
  font-family: var(--font-mono);
  font-size: 0.78rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: #c9b8ff;
}
.eyebrow::before {
  content: ""; width: 1.6rem; height: 2px;
  background: var(--grad-brand); border-radius: 2px;
}

.section-head { max-width: 46rem; margin-bottom: 2.6rem; }
.section-head p { font-size: 1.05rem; }

.lead { font-size: 1.15rem; color: var(--muted); max-width: 42rem; }

.gradient-text {
  background: var(--grad-brand);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  min-height: 3rem; padding: 0.85rem 1.4rem;
  font-weight: 600; border-radius: var(--radius-pill);
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--grad-brand); background-size: 160% 160%; color: #fff; box-shadow: 0 12px 38px rgba(123,92,255,0.45); }
.btn--primary:hover { background-position: 100% 0; box-shadow: 0 18px 50px rgba(123,92,255,0.6); }
.btn--blue { background: var(--grad-blue); color: #fff; box-shadow: var(--shadow-glow); }
.btn--blue:hover { filter: brightness(1.08); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--blue); background: var(--bg-card); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 11, 24, 0.72);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 5.5rem;
}
.brand { display: inline-flex; align-items: center; }
.brand__logo { height: clamp(3rem, 6.5vw, 4rem); width: auto; }

.nav { display: flex; align-items: center; gap: 0.35rem; }
.nav a {
  padding: 0.55rem 0.85rem; color: var(--muted); font-size: 0.95rem; font-weight: 500;
  border-radius: var(--radius-pill); transition: color 0.18s, background 0.18s;
}
.nav a:hover { color: var(--ink); background: var(--bg-card); }
.nav .nav-cta { color: #fff; background: var(--grad-blue); padding-inline: 1.1rem; }
.nav .nav-cta:hover { color: #fff; opacity: 0.92; }

.nav-toggle {
  display: none; width: 2.9rem; height: 2.9rem; align-items: center; justify-content: center;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius-sm);
  color: var(--ink); cursor: pointer;
}
.nav-toggle__bar {
  position: relative; display: block; width: 1.25rem; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: background-color 0.2s ease;
}
.nav-toggle__bar::before, .nav-toggle__bar::after {
  content: ""; position: absolute; left: 0; width: 1.25rem; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.25s ease;
}
.nav-toggle__bar::before { transform: translateY(-0.42rem); }
.nav-toggle__bar::after  { transform: translateY(0.42rem); }

/* Hamburguesa → X al abrir */
.nav-toggle[aria-expanded="true"] { color: #fff; border-color: var(--purple); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::before { transform: translateY(0) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bar::after  { transform: translateY(0) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding-block: clamp(3.5rem, 8vw, 6.5rem); overflow: hidden; }
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.chip {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.04em;
  padding: 0.35rem 0.75rem; border-radius: var(--radius-pill);
  background: var(--bg-card); border: 1px solid var(--line); color: var(--muted);
}
.chip--live { color: #7ee8a4; }
.chip--live::before { content: "●"; margin-right: 0.4rem; color: #34d77c; font-size: 0.7rem; }

.hero h1 { margin-bottom: 1.1rem; }
.hero__lead { font-size: 1.18rem; max-width: 36rem; margin-bottom: 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 2.5rem; }

.hero__stats { display: flex; flex-wrap: wrap; gap: 2rem; }
.stat strong { display: block; font-family: var(--font-head); font-size: 1.9rem; color: var(--ink); }
.stat span { font-size: 0.85rem; color: var(--muted-soft); }

.hero__media { position: relative; aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  border-radius: var(--radius);
}
/* Tarjeta de cristal a todo el ancho sobre la imagen del hero */
.hero__glass {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  padding: 1.2rem 1.4rem;
  background: rgba(10, 8, 24, 0.42);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0 0 var(--radius) var(--radius);
}
.hero__glass p {
  margin: 0; color: #fff; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.1rem, 1.7vw, 1.45rem); line-height: 1.25; text-wrap: balance;
}
.hero__media img { box-shadow: 0 40px 90px rgba(123,92,255,0.3); }
.hero__media::after {
  content: ""; position: absolute; inset: -1px;
  border-radius: var(--radius); pointer-events: none;
  box-shadow: inset 0 0 90px rgba(123,92,255,0.18);
}
.float-card {
  position: absolute; left: -1.2rem; bottom: 1.5rem;
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.8rem 1rem; background: rgba(13,20,40,0.92); backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  box-shadow: var(--shadow); font-size: 0.85rem;
}
.float-card .dot { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 10px; background: var(--grad-blue); }
.float-card strong { display: block; color: var(--ink); }
.float-card span { color: var(--muted); }

/* ---------- Logos / marquee ---------- */
.tech-strip { border-block: 1px solid var(--line); background: rgba(255,255,255,0.015); }
.tech-strip .container { display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem 2.2rem; padding-block: 1.4rem; }
.tech-strip span:first-child { font-size: 0.8rem; color: var(--muted-soft); letter-spacing: 0.06em; }
.tech-strip ul { display: flex; flex-wrap: wrap; gap: 1.2rem 2rem; margin: 0; padding: 0; list-style: none; }
.tech-strip li { font-family: var(--font-mono); color: var(--muted); font-size: 0.95rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.25rem; }
.grid--2 { grid-template-columns: 1fr; }
.grid--3 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.card {
  padding: 1.6rem; background: var(--bg-card); border: 1px solid var(--line);
  border-radius: var(--radius); transition: transform 0.2s, border-color 0.2s, background 0.2s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(123,92,255,0.5); background: var(--bg-card-hover); box-shadow: 0 18px 50px rgba(123,92,255,0.18); }
.card__icon {
  width: 3rem; height: 3rem; display: grid; place-items: center; margin-bottom: 1.1rem;
  border-radius: 14px; background: var(--grad-brand); color: #fff;
  font-size: 1.3rem; box-shadow: 0 10px 26px rgba(123,92,255,0.4);
}
.card h3 { color: var(--ink); }
.card p { margin-bottom: 0; font-size: 0.97rem; }
.card__tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.card__tags span { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); padding: 0.2rem 0.55rem; border: 1px solid var(--line); border-radius: var(--radius-pill); }

/* ---------- About ---------- */
.about__grid { display: grid; gap: 2.5rem; align-items: center; }
.about__media { display: block; overflow: hidden; border-radius: var(--radius); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.about__media img { width: 100%; height: auto; display: block; }
.about__list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 0.9rem; }
.about__list li { display: flex; gap: 0.7rem; color: var(--muted); }
.about__list li::before { content: "▹"; color: var(--orange); }

/* ---------- Portfolio ---------- */
.work-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.filter-btn {
  padding: 0.5rem 1rem; border-radius: var(--radius-pill);
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  cursor: pointer; font-size: 0.9rem; transition: all 0.18s;
}
.filter-btn.is-active, .filter-btn:hover { color: #fff; background: var(--grad-blue); border-color: transparent; }

.work-grid { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.work-card {
  position: relative; overflow: hidden; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--bg-elev);
  transition: transform 0.25s, border-color 0.25s;
}
.work-card:hover { transform: translateY(-5px); border-color: var(--purple); box-shadow: 0 22px 55px rgba(123,92,255,0.22); }
.work-card__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
/* Marca de agua en vivo: aparece en cualquier captura de pantalla */
.work-card__media::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image: url("../img/watermark-tile.svg");
  background-repeat: repeat;
}
.work-card:hover .work-card__media img { transform: scale(1.06); }
.work-card__tag {
  position: absolute; top: 0.9rem; left: 0.9rem; z-index: 2;
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.05em;
  padding: 0.3rem 0.7rem; border-radius: var(--radius-pill);
  background: rgba(7,11,24,0.8); border: 1px solid var(--line-strong); color: var(--ink);
}
.work-card__tag--real { background: linear-gradient(120deg, #1f9d57, #34d77c); border-color: transparent; color: #06210f; font-weight: 700; }
.work-card__body { padding: 1.3rem 1.4rem 1.5rem; }
.work-card__body h3 { color: var(--ink); margin-bottom: 0.4rem; }
.work-card__body p { font-size: 0.92rem; margin-bottom: 0.9rem; }
.work-card__link { color: var(--blue-soft); font-weight: 600; font-size: 0.9rem; display: inline-flex; align-items: center; gap: 0.35rem; }
.work-card__link::after { content: "→"; transition: transform 0.2s; }
.work-card:hover .work-card__link::after { transform: translateX(4px); }

/* ---------- Process ---------- */
.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.25rem; counter-reset: step; }
.step { position: relative; padding: 1.6rem; padding-left: 4.4rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.step::before {
  counter-increment: step; content: "0" counter(step);
  position: absolute; left: 1.4rem; top: 1.5rem;
  font-family: var(--font-head); font-size: 1.4rem;
  background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.step h3 { color: var(--ink); margin-bottom: 0.35rem; }
.step p { margin: 0; font-size: 0.95rem; }

/* ---------- Testimonials ---------- */
.quote { padding: 1.8rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.quote__stars { color: var(--orange); letter-spacing: 0.15em; margin-bottom: 0.8rem; }
.quote p { color: var(--ink); font-size: 1.02rem; }
.quote__who { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.2rem; }
.quote__avatar { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--grad-blue); display: grid; place-items: center; font-weight: 700; color: #fff; }
.quote__who strong { display: block; color: var(--ink); font-size: 0.95rem; }
.quote__who span { color: var(--muted-soft); font-size: 0.82rem; }

/* ---------- Blog preview ---------- */
.posts { display: grid; gap: 1.4rem; grid-template-columns: 1fr; }
.post-card {
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
  transition: transform 0.2s, border-color 0.2s;
}
.post-card:hover { transform: translateY(-4px); border-color: var(--purple); box-shadow: 0 18px 45px rgba(123,92,255,0.2); }
.post-card__media { aspect-ratio: 16 / 9; overflow: hidden; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__body { padding: 1.3rem 1.4rem 1.5rem; flex: 1; display: flex; flex-direction: column; }
.post-meta { font-family: var(--font-mono); font-size: 0.76rem; color: var(--muted-soft); margin-bottom: 0.6rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }
.post-meta .tag { color: var(--orange-soft); }
.post-card__body h3 { color: var(--ink); font-size: 1.12rem; }
.post-card__body p { font-size: 0.92rem; flex: 1; }
.post-card__link { color: var(--blue-soft); font-weight: 600; font-size: 0.88rem; margin-top: 0.6rem; }

/* ---------- CTA banner ---------- */
.cta-banner {
  position: relative; overflow: hidden;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  border-radius: var(--radius);
  background:
    linear-gradient(rgba(8, 6, 22, 0.74), rgba(10, 8, 30, 0.84)),
    url("../img/cta.webp") center / cover no-repeat;
  border: 1px solid var(--line-strong);
  text-align: center;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.85); max-width: 36rem; margin-inline: auto; }
.cta-banner .hero__actions { justify-content: center; margin-top: 1.8rem; margin-bottom: 0; }
.cta-banner .btn--ghost { color: #fff; border-color: rgba(255,255,255,0.4); }

/* ---------- Contact ---------- */
.contact__grid { display: grid; gap: 2rem; }
.contact-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: 1rem; }
.contact-list li { display: flex; gap: 0.8rem; align-items: flex-start; }
.contact-list .ic { width: 2.6rem; height: 2.6rem; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--bg-card); border: 1px solid var(--line); color: var(--blue-soft); }
.contact-list strong { display: block; color: var(--ink); }
.contact-list a, .contact-list span { color: var(--muted); }

.form { padding: 1.8rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.field { display: grid; gap: 0.4rem; margin-bottom: 1.1rem; }
.field label { font-size: 0.88rem; color: var(--ink); font-weight: 500; }
.field input, .field select, .field textarea {
  width: 100%; padding: 0.8rem 0.95rem; color: var(--ink);
  background: rgba(7,11,24,0.6); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-soft); }
.check { display: flex; gap: 0.6rem; align-items: flex-start; font-size: 0.85rem; color: var(--muted); margin-bottom: 1.1rem; }
.form-status { font-size: 0.88rem; min-height: 1.2rem; }
.form-status[data-state="ok"] { color: #6ee7a8; }
.form-status[data-state="error"] { color: #ff8da6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Protección de imágenes (disuasoria) ---------- */
.work-card__media img,
.post-card__media img,
.featured-post img,
.about__media img,
.hero__media img,
.article__cover {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgba(255,255,255,0.012); padding-block: 3.5rem 1.8rem; }
.footer-grid { display: grid; gap: 2rem; }
.footer-grid h4 { color: var(--ink); font-family: var(--font-body); font-size: 0.95rem; letter-spacing: 0.04em; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.55rem; }
.footer-grid a { color: var(--muted); font-size: 0.92rem; }
.footer-grid a:hover { color: var(--ink); }
.footer-brand img { height: 3.4rem; margin-bottom: 1rem; }
.footer-brand p { font-size: 0.92rem; max-width: 22rem; }
.socials { display: flex; gap: 0.6rem; margin-top: 1rem; }
.socials a { width: 2.5rem; height: 2.5rem; display: grid; place-items: center; border-radius: 10px; background: var(--bg-card); border: 1px solid var(--line); color: var(--muted); transition: transform 0.18s, color 0.18s, background 0.18s, border-color 0.18s; }
.socials a svg { width: 1.2rem; height: 1.2rem; display: block; }
.socials a:hover { color: #fff; background: var(--grad-blue); border-color: transparent; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid var(--line); margin-top: 2.5rem; padding-top: 1.6rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.8rem; color: var(--muted-soft); font-size: 0.85rem; }

/* ---------- Blog index ---------- */
.page-hero { padding-block: clamp(3rem, 7vw, 5rem) 1rem; }
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.breadcrumbs { font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted-soft); margin-bottom: 1.2rem; }
.breadcrumbs a:hover { color: var(--ink); }

.blog-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2.4rem; }
.blog-tags button {
  padding: 0.45rem 1rem; border-radius: var(--radius-pill); cursor: pointer;
  background: transparent; border: 1px solid var(--line); color: var(--muted); font-size: 0.88rem;
  transition: all 0.18s;
}
.blog-tags button.is-active, .blog-tags button:hover { color: #fff; background: var(--grad-blue); border-color: transparent; }

.featured-post {
  display: grid; gap: 0; overflow: hidden; margin-bottom: 2.5rem;
  background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
}
.featured-post img { width: 100%; height: 100%; object-fit: cover; min-height: 220px; }
.featured-post__body { padding: clamp(1.5rem, 4vw, 2.5rem); display: flex; flex-direction: column; justify-content: center; }
.featured-post__body h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.featured-post__body .post-meta { font-size: 0.8rem; }

/* ---------- Article ---------- */
.article { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(4rem, 8vw, 6rem); }
.article__wrap { width: min(100% - 2.5rem, 46rem); margin-inline: auto; }
.article__cover { width: 100%; border-radius: var(--radius); border: 1px solid var(--line-strong); margin-bottom: 2.2rem; box-shadow: var(--shadow); }
.article h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 1rem; }
.article__meta { display: flex; flex-wrap: wrap; gap: 0.8rem; font-family: var(--font-mono); font-size: 0.82rem; color: var(--muted-soft); margin-bottom: 1.8rem; }
.article__meta .tag { color: var(--orange-soft); }
.prose { font-size: 1.06rem; }
.prose h2 { font-size: 1.7rem; margin-top: 2.4rem; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8rem; color: var(--ink); }
.prose p { color: var(--muted); margin-bottom: 1.2rem; }
.prose strong { color: var(--ink); }
.prose a { color: var(--blue-soft); text-decoration: underline; text-underline-offset: 3px; }
.prose ul, .prose ol { color: var(--muted); padding-left: 1.3rem; margin-bottom: 1.4rem; }
.prose li { margin-bottom: 0.55rem; }
.prose li::marker { color: var(--orange); }
.prose blockquote {
  margin: 1.8rem 0; padding: 1rem 1.4rem; border-left: 3px solid var(--orange);
  background: var(--bg-card); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--ink); font-style: italic;
}
.prose pre {
  background: #060912; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 1.1rem 1.2rem; overflow-x: auto; margin: 1.6rem 0;
  font-family: var(--font-mono); font-size: 0.9rem; color: #cde0ff; line-height: 1.6;
}
.prose code { font-family: var(--font-mono); font-size: 0.88em; background: var(--bg-card); padding: 0.1rem 0.4rem; border-radius: 6px; color: var(--blue-soft); }
.prose pre code { background: none; padding: 0; color: inherit; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.4rem 0; }

.article-cta {
  margin-top: 3rem; padding: 1.8rem; text-align: center;
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
}
.author-box { display: flex; gap: 1rem; align-items: center; margin: 2.5rem 0; padding: 1.4rem; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); }
.author-box img, .author-box .avatar { width: 3.4rem; height: 3.4rem; border-radius: 50%; flex: none; background: var(--grad-blue); display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 1.2rem; }
.author-box strong { color: var(--ink); display: block; }
.author-box p { margin: 0; font-size: 0.9rem; }

@media (min-width: 48rem) {
  .featured-post { grid-template-columns: 1.1fr 1fr; }
}

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (min-width: 48rem) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .work-grid, .posts { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}

@media (min-width: 62rem) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .hero__grid { grid-template-columns: 1.05fr 0.95fr; align-items: stretch; }
  .hero__content { display: flex; flex-direction: column; justify-content: center; }
  .hero__media { min-height: 30rem; aspect-ratio: auto; }
  .hero__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .about__grid { grid-template-columns: 1fr 1fr; align-items: center; }
  .work-grid, .posts { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .contact__grid { grid-template-columns: 0.9fr 1.1fr; align-items: start; }
}

@media (max-width: 62rem) {
  .nav {
    position: fixed; inset: 4.75rem 0.75rem auto 0.75rem; z-index: 50;
    flex-direction: column; align-items: stretch; gap: 0.3rem; padding: 0.8rem;
    background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); display: none;
  }
  .nav.is-open { display: flex; }
  .nav-toggle { display: inline-grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Agente comercial WhatsApp ---------- */
.sales-agent {
  position: fixed;
  right: clamp(1rem, 3vw, 1.6rem);
  bottom: clamp(1rem, 3vw, 1.6rem);
  z-index: 70;
  font-family: var(--font-body);
}

.sales-agent__launcher {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 3.35rem;
  padding: 0.75rem 1rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #18b76b, #0c8f52);
  color: #fff;
  box-shadow: 0 18px 48px rgba(4, 36, 20, 0.5);
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.sales-agent__launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 60px rgba(4, 36, 20, 0.62);
}

.sales-agent__launcher svg {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.sales-agent__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.8rem);
  width: min(26rem, calc(100vw - 2rem));
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(9, 10, 24, 0.96);
  box-shadow: var(--shadow);
  transform: translateY(0.8rem) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sales-agent.is-open .sales-agent__panel {
  opacity: 1;
  pointer-events: auto;
  transform: none;
}

.sales-agent__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.9rem;
  background: linear-gradient(135deg, rgba(24, 183, 107, 0.22), rgba(43, 130, 255, 0.18));
  border-bottom: 1px solid var(--line);
}

.sales-agent__header p {
  margin: 0 0 0.2rem;
  color: #8ff0bd;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sales-agent__header strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1.05rem;
}

.sales-agent__close {
  width: 2.25rem;
  height: 2.25rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
  line-height: 1;
}

.sales-agent__messages {
  height: min(26rem, 52vh);
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  scroll-behavior: smooth;
}

.sales-agent__msg {
  width: fit-content;
  max-width: 86%;
  padding: 0.7rem 0.85rem;
  border-radius: 1rem;
  font-size: 0.92rem;
  line-height: 1.45;
  white-space: pre-line;
}

.sales-agent__msg--bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid var(--line);
  color: var(--ink);
  border-bottom-left-radius: 0.35rem;
}

.sales-agent__msg--user {
  align-self: flex-end;
  background: linear-gradient(135deg, #18b76b, #0c8f52);
  color: #fff;
  border-bottom-right-radius: 0.35rem;
}

.sales-agent__quick {
  display: flex;
  gap: 0.45rem;
  padding: 0 1rem 0.85rem;
  overflow-x: auto;
}

.sales-agent__quick button {
  flex: none;
  padding: 0.45rem 0.7rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.82rem;
  white-space: nowrap;
}

.sales-agent__quick button:hover {
  border-color: #18b76b;
  background: rgba(24, 183, 107, 0.13);
}

.sales-agent__form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  padding: 0.8rem 1rem 0.7rem;
  border-top: 1px solid var(--line);
}

.sales-agent__form input {
  min-width: 0;
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  background: rgba(7, 11, 24, 0.72);
  color: var(--ink);
  padding: 0.72rem 0.9rem;
}

.sales-agent__form input::placeholder {
  color: var(--muted-soft);
}

.sales-agent__form button {
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--grad-brand);
  color: #fff;
  padding: 0.72rem 0.95rem;
  cursor: pointer;
  font-weight: 700;
}

.sales-agent__note {
  margin: 0;
  padding: 0 1rem 1rem;
  color: var(--muted-soft);
  font-size: 0.76rem;
  line-height: 1.4;
}

.sales-agent__handoff {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  width: fit-content;
  max-width: 86%;
  margin-top: 0.15rem;
  padding: 0.68rem 0.85rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #18b76b, #0c8f52);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  align-self: flex-start;
}

@media (max-width: 36rem) {
  .sales-agent {
    right: 0.8rem;
    left: 0.8rem;
    bottom: 0.8rem;
  }

  .sales-agent__launcher {
    margin-left: auto;
  }

  .sales-agent__panel {
    right: 0;
    left: 0;
    width: 100%;
  }

  .sales-agent__messages {
    height: min(27rem, 58vh);
  }
}
