/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #f5f0ea;
  --paper:     #ffffff;
  --glass:     rgba(255, 255, 255, 0.55);
  --glass-2:   rgba(255, 255, 255, 0.30);
  --glass-border: rgba(255, 255, 255, 0.6);
  --ink:       #1f2937;
  --ink-soft:  #4b5563;
  --ink-mute:  #8a8f98;
  --accent:    #ff7a59;
  --accent-2:  #6366f1;
  --accent-ink: #ffffff;
  --line:      rgba(31, 41, 55, 0.10);
  --radius:    22px;
  --radius-sm: 14px;
  --shadow-soft: 0 20px 60px -20px rgba(31,41,55,0.25);
  --shadow-card: 0 12px 30px -12px rgba(31,41,55,0.18);

  --sans:  "Inter", system-ui, sans-serif;
  --display: "Manrope", "Inter", system-ui, sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:   cubic-bezier(0.7, 0, 0.84, 0);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { text-wrap: balance; line-height: 1.08; letter-spacing: -0.02em; font-family: var(--display); font-weight: 700; }
ul { list-style: none; padding: 0; }
::selection { background: var(--accent); color: #fff; }

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

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: min(1180px, 100% - 2.5rem); margin-inline: auto; }
.container-narrow { width: min(760px, 100% - 2.5rem); }

.skip-link {
  position: fixed; top: -100px; left: 1rem;
  padding: .6rem 1rem; background: var(--ink); color: #fff;
  z-index: 9999; border-radius: 8px; font-weight: 500;
  transition: top .3s var(--ease-out);
}
.skip-link:focus { top: 1rem; }

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .75rem;
}
.kicker {
  display: inline-block;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--ink-soft);
  background: var(--glass);
  border: 1px solid var(--glass-border);
  padding: .5rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(12px);
}

/* reveal-on-scroll — visible by default (works without JS); only animates once .js is set */
.reveal { opacity: 1; transform: none; }
.js .reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
}
.js .reveal.is-visible { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   4. Typography
   ============================================================= */
.section-title { font-size: clamp(1.9rem, 4.2vw, 2.9rem); max-width: 20ch; }
.section-sub { font-size: 1.05rem; color: var(--ink-soft); max-width: 55ch; margin-top: .9rem; }

/* =============================================================
   5. Components
   ============================================================= */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .95rem 1.7rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: .98rem;
  transition: transform .35s var(--ease-out), box-shadow .35s var(--ease-out), background .35s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #ff9770);
  color: #fff;
  box-shadow: 0 14px 30px -10px rgba(255,122,89,.55);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -10px rgba(255,122,89,.65); }
.btn-lg { padding: 1.15rem 2.2rem; font-size: 1.05rem; }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink); }
.btn-glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(12px);
  color: var(--ink);
}
@supports (backdrop-filter: blur(12px)) {
  .btn-glass { background: var(--glass); }
}

.glass-card {
  background: rgba(255,255,255,0.75); /* solid fallback */
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 2rem;
}
@supports (backdrop-filter: blur(20px)) {
  .glass-card {
    background: var(--glass);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
  }
}

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: sticky; top: 0; z-index: 100;
  padding-block: 1rem;
}
.nav-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: .7rem .9rem .7rem 1.4rem;
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow: var(--shadow-card);
}
.nav-brand {
  font-family: var(--display);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
  flex-shrink: 0;
}
.nav-brand span { color: var(--accent); }
.nav-links { display: none; gap: 1.8rem; }
.nav-links.is-open {
  display: flex; flex-direction: column; gap: .2rem;
  position: absolute; top: calc(100% + .6rem); left: 0; right: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: .8rem;
  box-shadow: var(--shadow-soft);
}
.nav-links.is-open a { padding: .8rem 1rem; border-radius: 10px; }
.nav-links.is-open a:hover { background: var(--bg); }
.nav-links.is-open a::after { display: none; }
.nav-links a {
  position: relative;
  font-size: .92rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding-block: .3rem;
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: 0;
  height: 2px; background: var(--accent);
  transition: right .35s var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { right: 0; }
.nav-cta { display: none; }
.nav-toggle {
  display: flex; flex-direction: column; gap: 5px;
  width: 40px; height: 40px; align-items: center; justify-content: center;
  border-radius: 50%;
}
.nav-toggle span { width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }

@media (min-width: 960px) {
  .nav-links { display: flex; }
  .nav-cta { display: inline-flex; }
  .nav-toggle { display: none; }
}

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  padding-block: clamp(3rem, 8vw, 6rem) 4rem;
  overflow: visible;
}
.hero-mesh {
  position: absolute; inset: -10% -10% 0 -10%; z-index: -1;
  background:
    radial-gradient(at 15% 20%, #ffd6a5 0%, transparent 50%),
    radial-gradient(at 85% 15%, #bdb2ff 0%, transparent 50%),
    radial-gradient(at 50% 90%, #ffadad 0%, transparent 55%);
  filter: blur(70px) saturate(150%);
  opacity: .7;
  animation: meshDrift 28s ease-in-out infinite;
}
@keyframes meshDrift {
  0%, 100% { transform: scale(1) rotate(0deg); }
  50%      { transform: scale(1.15) rotate(8deg); }
}
.hero-inner { max-width: 720px; text-align: left; }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.3rem); margin-bottom: 1.3rem; }
.hero-title em { font-style: normal; color: var(--accent); }
.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 3rem; }

.hero-stats { display: flex; gap: clamp(1.5rem, 4vw, 3rem); flex-wrap: wrap; }
.stat { display: block; }
.stat-num { font-family: var(--display); font-size: 2.1rem; font-weight: 800; color: var(--ink); display: inline; }
.stat-suffix { font-family: var(--display); font-size: 1.3rem; font-weight: 800; color: var(--accent); margin-left: .1rem; }
.stat-label { display: block; font-size: .85rem; color: var(--ink-mute); margin-top: .2rem; }

/* hero mock (CSS-only browser illustration) */
.hero-mock {
  margin-top: 3.5rem;
  perspective: 1400px;
}
.mock-browser {
  max-width: 900px;
  margin-inline: auto;
  border-radius: 18px;
  overflow: hidden;
  background: var(--paper);
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--line);
  transform: rotateX(4deg);
  animation: mockFloat 6s ease-in-out infinite;
}
@keyframes mockFloat {
  0%, 100% { transform: rotateX(4deg) translateY(0); }
  50%      { transform: rotateX(4deg) translateY(-14px); }
}
.mock-bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .8rem 1rem;
  background: #f1f0ee;
  border-bottom: 1px solid var(--line);
}
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: #d8d5d0; }
.mock-dot:nth-child(1) { background: #ff6159; }
.mock-dot:nth-child(2) { background: #ffbd2e; }
.mock-dot:nth-child(3) { background: #28c940; }
.mock-url {
  margin-left: .8rem; padding: .3rem .9rem; border-radius: 999px;
  background: #fff; font-size: .72rem; color: var(--ink-mute);
  flex: 1; max-width: 220px;
}
.mock-body { padding: 1.8rem; background: linear-gradient(180deg, #fbfaf8, #f5f0ea); }
.mock-nav { display: flex; gap: .6rem; margin-bottom: 1.6rem; }
.mock-nav span { width: 46px; height: 8px; border-radius: 4px; background: var(--line); }
.mock-hero { margin-bottom: 1.6rem; }
.mock-line { height: 14px; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .18; margin-bottom: .6rem; }
.mock-line.w60 { width: 60%; height: 22px; opacity: .9; background: var(--ink); }
.mock-line.w40 { width: 40%; opacity: .35; background: var(--ink); }
.mock-btn { width: 130px; height: 34px; border-radius: 999px; background: linear-gradient(135deg, var(--accent), #ff9770); margin-top: 1rem; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; }
.mock-card { height: 70px; border-radius: 10px; background: #fff; border: 1px solid var(--line); }

/* =============================================================
   8. Trust strip
   ============================================================= */
.trust-strip { padding-block: 2rem; }
.trust-label { text-align: center; font-size: .9rem; color: var(--ink-mute); letter-spacing: .02em; }

/* =============================================================
   9. Sections
   ============================================================= */
.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section-alt { background: var(--paper); }

.cards-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.2rem;
  margin-top: 2.8rem;
}
.service-card { transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.service-icon { font-size: 1.9rem; margin-bottom: 1rem; }
.service-card h3 { font-size: 1.2rem; margin-bottom: .5rem; }
.service-card p { color: var(--ink-soft); font-size: .95rem; }

.process-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
  margin-top: 2.8rem;
}
.process-step { position: relative; padding-left: 0; }
.process-num {
  font-family: var(--display); font-weight: 800; font-size: 2.4rem;
  color: transparent; -webkit-text-stroke: 1.5px var(--accent);
  display: block; margin-bottom: .6rem;
}
.process-step h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.process-step p { color: var(--ink-soft); font-size: .93rem; }

.plans-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
  margin-top: 2.8rem;
}
.plan-card { display: flex; flex-direction: column; }
.plan-card.is-highlight {
  border: 1.5px solid var(--accent);
  box-shadow: var(--shadow-soft);
  position: relative;
}
.plan-badge {
  position: absolute; top: -13px; left: 2rem;
  background: linear-gradient(135deg, var(--accent), #ff9770);
  color: #fff; font-size: .72rem; font-weight: 700;
  padding: .3rem .8rem; border-radius: 999px;
  letter-spacing: .03em;
}
.plan-name { font-size: 1.2rem; margin-bottom: .3rem; }
.plan-desc { color: var(--ink-soft); font-size: .9rem; margin-bottom: 1.2rem; }
.plan-price { font-family: var(--display); font-weight: 800; font-size: 2.1rem; margin-bottom: 1.4rem; }
.plan-price small { font-size: .95rem; font-weight: 600; color: var(--ink-mute); }
.plan-features { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1.6rem; flex: 1; }
.plan-features li { font-size: .92rem; color: var(--ink-soft); display: flex; gap: .5rem; align-items: flex-start; }
.plan-features li::before { content: "✓"; color: var(--accent); font-weight: 700; flex-shrink: 0; }
.plans-note { margin-top: 2rem; font-size: .85rem; color: var(--ink-mute); text-align: center; }

.testi-grid {
  display: grid; grid-template-columns: 1fr; gap: 1.4rem;
  margin-top: 2.8rem;
}
.testi-quote { font-size: 1.02rem; color: var(--ink-soft); margin-bottom: 1.3rem; font-style: italic; }
.testi-author { font-weight: 700; font-size: .92rem; }
.testi-role { font-size: .82rem; color: var(--ink-mute); }

.faq-list { margin-top: 2.6rem; display: flex; flex-direction: column; gap: .9rem; }
.faq-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 1.2rem 1.4rem; font-weight: 600; font-size: .98rem; text-align: left;
  cursor: pointer; list-style: none;
}
.faq-q::-webkit-details-marker { display: none; }
.faq-q .icon { transition: transform .35s var(--ease-out); flex-shrink: 0; margin-left: 1rem; color: var(--accent); font-size: 1.3rem; }
.faq-item[open] .faq-q .icon { transform: rotate(45deg); }
.faq-a { padding: 0 1.4rem; }
.faq-a p { color: var(--ink-soft); font-size: .94rem; padding-bottom: 1.2rem; }


/* ---------- Portafolio ---------- */
.work-grid { display: grid; grid-template-columns: 1fr; gap: 1.4rem; margin-top: 2.8rem; }
.work-card { display: flex; flex-direction: column; padding: 1.2rem; overflow: hidden;
  transition: transform .4s var(--ease-out), box-shadow .4s var(--ease-out); }
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-soft); }
.work-preview { border-radius: 14px; overflow: hidden; border: 1px solid var(--line); background: var(--paper); }
.wp-bar { display: flex; align-items: center; gap: .35rem; padding: .55rem .8rem; background: #f1f0ee; border-bottom: 1px solid var(--line); }
.wp-bar span { width: 8px; height: 8px; border-radius: 50%; background: #d8d5d0; }
.wp-bar em { font-style: normal; font-size: .68rem; color: var(--ink-mute); margin-left: .6rem; background: #fff; padding: .15rem .7rem; border-radius: 999px; }
.wp-body { padding: 1.6rem 1.4rem; min-height: 190px; }
.work-preview--a .wp-body { background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 55%, #fce7f3 100%); }
.work-preview--b .wp-body { background: linear-gradient(135deg, #ecfeff 0%, #cffafe 55%, #e0f2fe 100%); }
.wp-line { border-radius: 6px; margin-bottom: .55rem; background: var(--ink); }
.wp-line--title { width: 65%; height: 18px; opacity: .85; }
.wp-line--sub { width: 45%; height: 10px; opacity: .3; }
.wp-btn { width: 110px; height: 28px; border-radius: 999px; margin: 1rem 0 1.3rem; }
.work-preview--a .wp-btn { background: linear-gradient(135deg, #6366f1, #a78bfa); }
.work-preview--b .wp-btn { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.wp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.wp-cards i { height: 44px; border-radius: 8px; background: rgba(255,255,255,.8); border: 1px solid var(--line); }
.wp-shot { aspect-ratio: 16 / 10; overflow: hidden; background: #e9e5df; }
.wp-shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease-out); }
.work-card:hover .wp-shot img { transform: scale(1.04); }
.work-info { padding: 1.4rem .6rem .4rem; display: flex; flex-direction: column; flex: 1; }
.work-cat { font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); margin-bottom: .4rem; }
.work-info h3 { font-size: 1.35rem; margin-bottom: .5rem; }
.work-info > p:not(.work-cat) { color: var(--ink-soft); font-size: .95rem; }
.work-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1rem 0 1.2rem; }
.work-tags li { font-size: .75rem; font-weight: 600; color: var(--ink-soft); background: var(--bg); border: 1px solid var(--line); padding: .25rem .7rem; border-radius: 999px; }
.work-link { margin-top: auto; font-weight: 700; color: var(--ink); transition: color .3s; }
.work-card:hover .work-link { color: var(--accent); }
@media (min-width: 720px) { .work-grid { grid-template-columns: repeat(2, 1fr); } }

/* =============================================================
   10. CTA final
   ============================================================= */
.cta-final { position: relative; text-align: center; overflow: visible; }
.cta-mesh {
  position: absolute; inset: -20% -10%; z-index: -1;
  background:
    radial-gradient(at 30% 40%, #bdb2ff 0%, transparent 55%),
    radial-gradient(at 70% 60%, #ffd6a5 0%, transparent 55%);
  filter: blur(80px) saturate(150%);
  opacity: .6;
  animation: meshDrift 24s ease-in-out infinite reverse;
}
.cta-inner { max-width: 620px; margin-inline: auto; }
.cta-title { font-size: clamp(1.9rem, 4.5vw, 2.7rem); margin-bottom: .9rem; }
.cta-sub { color: var(--ink-soft); font-size: 1.05rem; margin-bottom: 2rem; }

/* =============================================================
   11. Footer
   ============================================================= */
.footer { padding-block: 3.5rem 2.5rem; background: var(--paper); border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .9rem; }
.footer-tag { color: var(--ink-mute); font-size: .9rem; max-width: 40ch; }
.footer-links { display: flex; gap: 1.4rem; flex-wrap: wrap; justify-content: center; margin-block: .6rem; }
.footer-links a { font-size: .88rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }
.footer-copy { font-size: .8rem; color: var(--ink-mute); }

/* =============================================================
   12. WhatsApp float
   ============================================================= */
.whatsapp-float {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 200;
  width: 58px; height: 58px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 30px -8px rgba(37,211,102,.6);
  transition: transform .35s var(--ease-bounce);
}
.whatsapp-float:hover { transform: scale(1.08); }

/* =============================================================
   13. Responsive
   ============================================================= */
@media (min-width: 540px) {
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .testi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 720px) {
  .hero-inner { text-align: left; }
}
@media (min-width: 960px) {
  .cards-grid { grid-template-columns: repeat(3, 1fr); }
  .process-grid { grid-template-columns: repeat(4, 1fr); }
  .plans-grid { grid-template-columns: repeat(3, 1fr); }
  .testi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1280px) {
  .hero-title { font-size: clamp(3rem, 5.2vw, 4.6rem); }
}

/* =============================================================
   14. Reduced motion (only intrusive)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-mesh, .cta-mesh, .mock-browser { animation: none; }
  /* keep: reveal fades, hover tilts, underline, magnetic — they're not intrusive */
}
