:root {
    --ink: #221F1A;
    --paper: #FFFFFF;
    --cream: #FFF8F3;
    --orange: #FF5A1F;
    --orange-2: #FF7A3D;
    --orange-soft: #FFE9DC;
    --gray: #7A7A72;
    --line: #F0E7DE;
    --radius: 12px;
  }
  * { margin: 0; padding: 0; box-sizing: border-box; }
  body { font-family: 'Poppins', sans-serif; background: var(--paper); color: var(--ink); overflow-x: hidden; }
  @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; } }
  a { color: inherit; }
  img { max-width: 100%; display: block; }

  /* ---------- SCROLL REVEAL ---------- */
  .reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
  .reveal.is-visible { opacity: 1; transform: translateY(0); }
  .reveal-stagger.is-visible > * { transition-delay: calc(var(--i, 0) * 90ms); }

  /* ---------- TOP BAR ---------- */
  .topbar { background: var(--ink); color: #fff; font-size: 0.8rem; display: flex; justify-content: space-between; padding: 10px 6vw; }
  .topbar .left { display: flex; gap: 24px; }
  .topbar a { text-decoration: none; color: #fff; opacity: 0.9; }
  .topbar .social { display: flex; gap: 14px; }
  @media (max-width: 700px) { .topbar .left span:last-child { display: none; } }

  /* ---------- PROMO BAR (mensajes rotativos) ---------- */
  .promo-bar {
    background: var(--orange); color: #fff; text-align: center;
    padding: 10px 6vw; font-size: 0.85rem; font-weight: 700;
    position: relative; overflow: hidden; height: 40px;
    display: flex; align-items: center; justify-content: center;
  }
  .promo-bar .promo-msg {
    position: absolute; opacity: 0; transform: translateY(100%);
    transition: opacity .4s ease, transform .4s ease;
    display: flex; align-items: center; gap: 8px; white-space: nowrap;
  }
  .promo-bar .promo-msg.active { opacity: 1; transform: translateY(0); }
  .promo-bar .promo-msg.leaving { opacity: 0; transform: translateY(-100%); }

  /* ---------- CATEGORÍAS ---------- */
  .categorias-row {
    display: flex; align-items: center; gap: 26px; padding: 14px 6vw;
    border-bottom: 1px solid var(--line); overflow-x: auto; white-space: nowrap;
    scrollbar-width: none;
  }
  .categorias-row::-webkit-scrollbar { display: none; }
  .categorias-row .todas {
    display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 0.88rem;
    color: var(--ink); text-decoration: none; border-bottom: 2px solid var(--orange); padding-bottom: 4px; flex-shrink: 0;
  }
  .categorias-row a.cat-link {
    font-size: 0.85rem; font-weight: 500; color: var(--gray); text-decoration: none;
    flex-shrink: 0; transition: color .2s ease;
  }
  .categorias-row a.cat-link:hover { color: var(--orange); }

  /* ---------- NAV ---------- */
  nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 6vw; position: sticky; top: 0; z-index: 60;
    background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; }
  .logo-mark {
    width: 38px; height: 38px; border-radius: var(--radius);
    background: linear-gradient(135deg, var(--orange), var(--orange-2));
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 900; font-size: 1.15rem;
  }
  .logo span { color: var(--orange); }
  nav ul { list-style: none; display: flex; gap: 32px; }
  nav ul a { text-decoration: none; font-weight: 600; font-size: 0.9rem; position: relative; }
  nav ul a::after {
    content: ''; position: absolute; left: 0; bottom: -6px; width: 0; height: 2px;
    background: var(--orange); transition: width .25s ease;
  }
  nav ul a:hover::after { width: 100%; }
  nav ul a:hover { color: var(--orange); }
  .cta-nav {
    background: var(--orange); color: #fff; text-decoration: none;
    font-weight: 700; font-size: 0.85rem; padding: 13px 26px; border-radius: var(--radius);
    transition: transform .15s ease, box-shadow .2s ease;
  }
  .cta-nav:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255,90,31,0.3); }

  /* Mobile menu toggle */
  .menu-toggle {
    display: none; flex-direction: column; gap: 5px; background: none; border: none;
    cursor: pointer; padding: 8px; z-index: 70;
  }
  .menu-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: transform .3s ease, opacity .3s ease; }
  .menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .menu-toggle.open span:nth-child(2) { opacity: 0; }
  .menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

  .mobile-menu {
    position: fixed; inset: 0; background: #fff; z-index: 55;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 30px;
    transform: translateY(-100%); transition: transform .35s ease;
  }
  .mobile-menu.open { transform: translateY(0); }
  .mobile-menu a { text-decoration: none; font-weight: 700; font-size: 1.4rem; color: var(--ink); }
  .mobile-menu a:hover { color: var(--orange); }
  .mobile-menu .cta-nav { margin-top: 10px; }

  @media (max-width: 900px) {
    nav ul { display: none; }
    .menu-toggle { display: flex; }
  }

  /* ---------- HERO ---------- */
  .hero { background: var(--cream); padding: 70px 6vw 90px; }
  .hero-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 1fr 0.9fr; gap: 60px; align-items: center; }
  .badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--orange-soft); color: var(--orange); font-weight: 700;
    font-size: 0.8rem; padding: 9px 18px; border-radius: var(--radius); margin-bottom: 22px;
  }
  h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 800; line-height: 1.18; letter-spacing: -0.01em; }
  h1 em { font-style: normal; color: var(--orange); }
  .hero-sub { margin-top: 22px; max-width: 460px; font-size: 1.02rem; color: var(--gray); line-height: 1.7; }
  .hero-actions { margin-top: 34px; display: flex; gap: 14px; flex-wrap: wrap; }
  .btn-primary {
    background: var(--orange); color: #fff; font-weight: 700; font-size: 0.92rem;
    padding: 17px 32px; border-radius: var(--radius); text-decoration: none;
    box-shadow: 0 10px 24px rgba(255,90,31,0.3); transition: transform .15s ease, box-shadow .2s ease;
  }
  .btn-primary:hover { transform: translateY(-3px); box-shadow: 0 16px 30px rgba(255,90,31,0.4); }
  .btn-outline {
    border: 2px solid var(--ink); color: var(--ink); text-decoration: none;
    font-weight: 700; font-size: 0.92rem; padding: 15px 30px; border-radius: var(--radius);
    display: inline-flex; align-items: center; gap: 8px; transition: background .2s ease, color .2s ease, transform .15s ease;
  }
  .btn-outline:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }

  .hero-visual { position: relative; }
  .browser-card {
    background: #fff; border-radius: 18px; box-shadow: 0 30px 60px rgba(34,31,26,0.15);
    overflow: hidden; border: 1px solid var(--line);
    animation: float 5s ease-in-out infinite;
  }
  @keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-12px); } }
  .browser-bar { background: #F3EEE7; padding: 12px 16px; display: flex; gap: 6px; }
  .browser-bar span { width: 10px; height: 10px; border-radius: 50%; background: #DCD4C9; }
  .browser-content { padding: 26px; background: linear-gradient(160deg, var(--orange-soft), #fff 60%); }
  .browser-content .mini-h { height: 14px; width: 60%; background: var(--ink); border-radius: 4px; margin-bottom: 10px; opacity: 0.85; }
  .browser-content .mini-p { height: 8px; width: 85%; background: #D8D2C8; border-radius: 4px; margin-bottom: 8px; }
  .browser-content .mini-btn { margin-top: 18px; width: 130px; height: 34px; background: var(--orange); border-radius: var(--radius); }
  .browser-content .mini-cards { margin-top: 24px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
  .browser-content .mini-cards div { height: 60px; background: #fff; border-radius: 10px; border: 1px solid var(--line); }
  .float-badge {
    position: absolute; bottom: -18px; left: -18px;
    background: #fff; border-radius: var(--radius); padding: 16px 20px;
    box-shadow: 0 15px 30px rgba(34,31,26,0.12); display: flex; align-items: center; gap: 12px;
  }
  .float-badge .icon-circle { width: 40px; height: 40px; border-radius: 50%; background: var(--orange-soft); display:flex; align-items:center; justify-content:center; font-size: 1.1rem; }
  .float-badge b { display: block; font-size: 1.1rem; }
  .float-badge span { font-size: 0.75rem; color: var(--gray); }

  @media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .float-badge { position: static; margin-top: 20px; display: inline-flex; }
  }

  /* ---------- BENEFICIOS ---------- */
  .beneficios { max-width: 1400px; margin: -40px auto 0; padding: 0 6vw; position: relative; z-index: 2; }
  .beneficios-inner {
    background: #fff; border-radius: 18px; box-shadow: 0 20px 50px rgba(34,31,26,0.08);
    display: grid; grid-template-columns: repeat(4, 1fr); padding: 34px 10px;
  }
  .beneficio { display: flex; align-items: center; gap: 14px; padding: 10px 24px; border-right: 1px solid var(--line); transition: transform .2s ease; }
  .beneficio:hover { transform: translateY(-4px); }
  .beneficio:last-child { border-right: none; }
  .beneficio .ic { font-size: 1.5rem; }
  .beneficio b { display: block; font-size: 0.92rem; }
  .beneficio span { font-size: 0.78rem; color: var(--gray); }
  @media (max-width: 900px) { .beneficios-inner { grid-template-columns: 1fr 1fr; } .beneficio { border-right: none; border-bottom: 1px solid var(--line); } }

  /* ---------- SECTION HEAD ---------- */
  section { padding: 100px 6vw; }
  .section-head { text-align: center; max-width: 620px; margin: 0 auto 50px; }
  .section-head .badge { margin-bottom: 16px; }
  h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 800; }
  h2 em { font-style: normal; color: var(--orange); }

  /* ---------- SERVICIOS ---------- */
  .servicios-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .servicio-card { background: var(--cream); border-radius: 16px; padding: 34px 26px; transition: transform .25s ease, box-shadow .25s ease; }
  .servicio-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(34,31,26,0.1); }
  .servicio-card .icon-circle {
    width: 52px; height: 52px; border-radius: 50%; background: var(--orange);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem; margin-bottom: 20px; transition: transform .3s ease;
  }
  .servicio-card:hover .icon-circle { transform: rotate(-10deg) scale(1.08); }
  .servicio-card h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 10px; }
  .servicio-card p { font-size: 0.87rem; color: var(--gray); line-height: 1.6; margin-bottom: 18px; }
  .servicio-card .ver-mas { color: var(--orange); font-weight: 700; font-size: 0.85rem; text-decoration: none; }
  @media (max-width: 1000px) { .servicios-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .servicios-grid { grid-template-columns: 1fr; } }

  /* ---------- PORTAFOLIO ---------- */
  .portafolio { background: var(--cream); }
  .portafolio-grid { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
  .proyecto-card {
    background: #fff; border-radius: 16px; overflow: hidden; text-decoration: none;
    box-shadow: 0 10px 30px rgba(34,31,26,0.06); transition: transform .25s ease, box-shadow .25s ease;
  }
  .proyecto-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(34,31,26,0.12); }

  .proyecto-thumb { height: 180px; position: relative; overflow: hidden; background: var(--orange-soft); }
  .proyecto-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
  .proyecto-card:hover .proyecto-thumb img { transform: scale(1.08); }

  /* Sin imagen: solo nombre con efecto hover */
  .proyecto-thumb.no-img {
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, var(--orange-soft), #FFF3EA);
  }
  .proyecto-thumb.no-img .name-fallback {
    font-size: 1.5rem; font-weight: 800; color: var(--ink); opacity: 0.75;
    transition: color .3s ease, transform .3s ease, opacity .3s ease;
    text-align: center; padding: 0 20px;
  }
  .proyecto-card:hover .proyecto-thumb.no-img .name-fallback { color: var(--orange); transform: scale(1.06); opacity: 1; }

  .proyecto-body { padding: 22px 24px; }
  .proyecto-body .tag { font-size: 0.72rem; color: var(--orange); font-weight: 700; text-transform: uppercase; }
  .proyecto-body h3 { font-size: 1.1rem; font-weight: 700; margin: 8px 0 4px; }
  .proyecto-body .link { font-size: 0.8rem; color: var(--gray); }
  @media (max-width: 900px) { .portafolio-grid { grid-template-columns: 1fr 1fr; } }
  @media (max-width: 560px) { .portafolio-grid { grid-template-columns: 1fr; } }

  /* ---------- TESTIMONIOS ---------- */
  .testimonios-grid { max-width: 1000px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
  .testimonio-card { background: var(--cream); border-radius: 16px; padding: 32px; transition: transform .2s ease; }
  .testimonio-card:hover { transform: translateY(-6px); }
  .testimonio-card p { font-size: 0.98rem; line-height: 1.7; margin-bottom: 20px; }
  .testimonio-card .author { display: flex; align-items: center; gap: 12px; }
  .avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--orange); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; }
  .author-name { font-weight: 700; font-size: 0.9rem; }
  .author-role { font-size: 0.78rem; color: var(--gray); }
  @media (max-width: 700px) { .testimonios-grid { grid-template-columns: 1fr; } }

  /* ---------- CTA BANNER ---------- */
  .cta-banner {
    max-width: 1400px; margin: 0 auto; background: linear-gradient(120deg, var(--orange), var(--orange-2));
    border-radius: 20px; padding: 44px 44px; display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 20px; color: #fff; position: relative; overflow: hidden;
  }
  .cta-banner::before {
    content: ''; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px;
    border-radius: 50%; background: rgba(255,255,255,0.12); animation: pulse-slow 4s ease-in-out infinite;
  }
  @keyframes pulse-slow { 0%,100% { transform: scale(1); opacity: .12; } 50% { transform: scale(1.15); opacity: .2; } }
  .cta-banner-text { position: relative; z-index: 1; }
  .cta-banner-text h3 { font-size: 1.3rem; font-weight: 800; margin-bottom: 6px; }
  .cta-banner-text p { font-size: 0.9rem; opacity: 0.9; }
  .cta-banner .btn-white {
    background: #fff; color: var(--orange); font-weight: 700; text-decoration: none;
    padding: 15px 30px; border-radius: var(--radius); position: relative; z-index: 1; white-space: nowrap;
    transition: transform .15s ease;
  }
  .cta-banner .btn-white:hover { transform: translateY(-3px); }

  /* ---------- FOOTER ---------- */
  footer { background: var(--ink); color: #fff; padding: 60px 6vw 26px; }
  .footer-top { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 40px; max-width: 1400px; margin: 0 auto 40px; }
  .footer-brand .logo { color: #fff; margin-bottom: 12px; }
  .footer-brand p { font-size: 0.85rem; color: #A8A49C; max-width: 280px; line-height: 1.6; }
  .footer-links { display: flex; gap: 60px; flex-wrap: wrap; }
  .footer-col h4 { font-size: 0.85rem; margin-bottom: 16px; }
  .footer-col a { display: block; font-size: 0.85rem; color: #A8A49C; text-decoration: none; margin-bottom: 10px; transition: color .2s ease; }
  .footer-col a:hover { color: var(--orange); }
  .footer-bottom {
    max-width: 1400px; margin: 0 auto; padding-top: 24px; border-top: 1px solid #3A362F;
    font-size: 0.8rem; color: #A8A49C; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  }
