/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #0e0b09;
  --bg-2:      #15110d;
  --bg-3:      #1e1813;
  --bg-4:      #2a2119;
  --cream:     #f2ebda;
  --cream-2:   #ddd2bc;
  --cream-3:   #8b7e68;
  --accent:    #c5301e;
  --accent-2:  #8f2216;
  --gold:      #c9a35a;
  --gold-2:    #e0c07d;
  --line:      rgba(242, 235, 218, 0.12);

  --serif: "Space Grotesk", "Inter", sans-serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --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);

  --nav-h: 76px;
}

@property --mesh-angle { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
@property --mesh-x     { syntax: "<percentage>"; inherits: false; initial-value: 30%; }
@property --mesh-y     { syntax: "<percentage>"; inherits: false; initial-value: 40%; }

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--cream);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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 { font-family: var(--serif); text-wrap: balance; line-height: 1.08; letter-spacing: -0.01em; }
ul, ol { list-style: none; padding: 0; }
::selection { background: var(--accent); color: var(--cream); }

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

.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .7rem 1.1rem; background: var(--cream); color: var(--bg);
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }

/* =============================================================
   3. Utilities
   ============================================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
.container-narrow { max-width: 760px; }

.kicker {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.section {
  padding-block: clamp(4rem, 9vw, 7.5rem);
  position: relative;
}
.section-alt { background: var(--bg-2); }

.section-title {
  font-size: clamp(1.9rem, 4.4vw, 3rem);
  max-width: 20ch;
  margin-bottom: 1.4rem;
  color: var(--cream);
}
.section-title em { font-style: italic; color: var(--gold); }

.section-lede {
  max-width: 62ch;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  color: var(--cream-2);
  margin-bottom: 2.5rem;
}

/* =============================================================
   4. Reveal on scroll (universal)
   ============================================================= */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .8s var(--ease-soft), transform .8s var(--ease-soft);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   5. Components — buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: 0.95rem 1.7rem;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform .45s var(--ease-soft), box-shadow .45s var(--ease-soft), background-color .3s;
}
.btn-primary {
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  color: #241a0d;
  box-shadow: 0 4px 20px rgba(201, 163, 90, 0.25);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 40px rgba(201, 163, 90, 0.35), 0 8px 18px rgba(197, 48, 30, 0.2);
}
.btn-ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid var(--line);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold);
  transform: translateY(-3px);
}
.btn-large { padding: 1.1rem 2.1rem; font-size: 1.02rem; }
.btn-small { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 200;
  padding-block: 1rem;
  transition: background-color .4s var(--ease-out), backdrop-filter .4s var(--ease-out), box-shadow .4s var(--ease-out), padding .3s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(14, 11, 9, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
  padding-block: 0.7rem;
}
.nav-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  margin-right: auto;
}
.nav-brand-mark { width: 26px; height: 26px; }
.nav-brand-word {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--cream);
}
.nav-brand-word em { font-style: normal; color: var(--accent); }

.nav-links {
  display: none;
  gap: 1.8rem;
}
.nav-link {
  position: relative;
  font-size: 0.92rem;
  color: var(--cream-2);
  padding-block: 0.3rem;
}
.nav-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 1px; background: var(--gold);
  transform: scaleX(0); transform-origin: right;
  transition: transform .45s var(--ease-out);
}
.nav-link:hover { color: var(--cream); }
.nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-cta { display: none; }

.nav-burger {
  width: 40px; height: 40px;
  display: grid; place-items: center; gap: 5px;
  z-index: 210;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; background: var(--cream);
  transition: transform .35s var(--ease-soft), opacity .3s;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed; inset: 0; z-index: 190;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2.4rem;
  clip-path: inset(0 0 100% 0);
  transition: clip-path .6s var(--ease-soft);
}
.nav-mobile[data-open] { clip-path: inset(0); }
.nav-mobile nav { display: flex; flex-direction: column; align-items: center; gap: 1.6rem; }
.nav-mobile-link { font-family: var(--serif); font-size: 1.5rem; color: var(--cream); }
.nav-mobile-link:hover { color: var(--gold); }

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: clip;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -3;
}
.hero-bg-img {
  width: 100%; height: 100%; object-fit: cover;
  object-position: 20% 30%;
  filter: saturate(1.05) contrast(1.05) brightness(0.8);
}
.hero-bg-tint {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(14,11,9,0.28) 0%, rgba(14,11,9,0.4) 40%, rgba(14,11,9,0.86) 78%, var(--bg) 100%);
}
.hero-mesh {
  position: absolute; inset: -10%; z-index: -2;
  background:
    radial-gradient(55% 45% at var(--mesh-x) var(--mesh-y), rgba(197, 48, 30, 0.42), transparent 62%),
    conic-gradient(from var(--mesh-angle), rgba(201, 163, 90, 0.16), rgba(143, 34, 22, 0.14), rgba(197, 48, 30, 0.2), rgba(201, 163, 90, 0.16));
  filter: blur(90px) saturate(120%);
  opacity: 0.85;
  mix-blend-mode: screen;
  animation: meshShift 26s linear infinite;
}
@keyframes meshShift {
  0%   { --mesh-angle: 0deg;   --mesh-x: 26%; --mesh-y: 38%; }
  50%  { --mesh-angle: 180deg; --mesh-x: 72%; --mesh-y: 58%; }
  100% { --mesh-angle: 360deg; --mesh-x: 26%; --mesh-y: 38%; }
}
.hero-grain {
  position: absolute; inset: 0; z-index: -1;
  opacity: 0.05; mix-blend-mode: overlay; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
.hero-inner { padding-block: calc(var(--nav-h) + 2rem) 3rem; }
.hero .kicker { text-shadow: 0 2px 16px rgba(14,11,9,0.7); }
.hero-title {
  font-size: clamp(2.4rem, 7vw, 5.2rem);
  max-width: 16ch;
  margin-bottom: 1.6rem;
  text-shadow: 0 4px 24px rgba(14,11,9,0.55), 0 2px 8px rgba(14,11,9,0.7);
}
.hero-title em { font-style: normal; color: var(--gold); }
.hero-sub {
  max-width: 52ch;
  font-size: clamp(1.02rem, 1.6vw, 1.2rem);
  color: var(--cream-2);
  text-shadow: 0 2px 16px rgba(14,11,9,0.7);
  margin-bottom: 2.2rem;
}
.hero-actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 2.4rem;
}
.hero-badges {
  display: flex; flex-wrap: wrap; gap: 0.6rem 1.8rem;
}
.hero-badges li {
  font-family: var(--mono);
  font-size: 0.78rem;
  color: var(--cream-3);
  letter-spacing: 0.02em;
  display: flex; align-items: center; gap: 0.5rem;
}
.hero-badges li::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--gold);
}

/* =============================================================
   8. Card tilt + halo (SIGNATURE EFFECT)
   ============================================================= */
.card-tilt {
  --rx: 0deg; --ry: 0deg; --mx: 50%; --my: 50%;
  position: relative;
  isolation: isolate;
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transform-style: preserve-3d;
  transition: transform .55s var(--ease-soft), border-color .4s, box-shadow .4s;
}
.card-tilt:hover { transition-duration: .15s; }
.card-tilt::before {
  content: "";
  position: absolute; inset: 0; z-index: -1; border-radius: inherit;
  background: radial-gradient(240px circle at var(--mx) var(--my), rgba(201, 163, 90, 0.22), transparent 60%);
  opacity: 0; transition: opacity .35s;
}
.card-tilt:hover::before { opacity: 1; }

/* =============================================================
   9. Problem section
   ============================================================= */
.problem-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
.problem-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.8rem;
}
.problem-card:hover { border-color: rgba(197, 48, 30, 0.4); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6); }
.problem-icon {
  display: inline-grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: rgba(197, 48, 30, 0.14); color: var(--accent);
  margin-bottom: 1.2rem;
}
.problem-icon svg { width: 20px; height: 20px; }
.problem-card h3 { font-size: 1.15rem; margin-bottom: 0.6rem; }
.problem-card p { color: var(--cream-3); font-size: 0.95rem; }

/* =============================================================
   10. Feature grid (solución)
   ============================================================= */
.feature-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: 1fr;
}
.feature-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 2rem 1.8rem;
}
.feature-card:hover { border-color: rgba(201, 163, 90, 0.4); box-shadow: 0 30px 60px -30px rgba(0,0,0,0.6); }
.feature-num {
  display: block;
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.feature-card p { color: var(--cream-3); font-size: 0.94rem; }

/* =============================================================
   11. Process (vertical)
   ============================================================= */
.process-list {
  display: flex; flex-direction: column;
  max-width: 720px;
}
.process-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  padding-block: 1.8rem;
  border-top: 1px solid var(--line);
}
.process-item:last-child { border-bottom: 1px solid var(--line); }
.process-index {
  font-family: var(--mono);
  font-size: 1.6rem;
  color: var(--accent);
  line-height: 1;
}
.process-body h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.process-body p { color: var(--cream-3); font-size: 0.95rem; max-width: 52ch; }

/* =============================================================
   12. Packages
   ============================================================= */
.packages-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
.package-card {
  background: var(--bg-3);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 2.4rem 2rem;
}
.package-card.is-highlight {
  border-color: rgba(201, 163, 90, 0.45);
  background: linear-gradient(165deg, var(--bg-4), var(--bg-3));
}
.package-head { margin-bottom: 1.6rem; }
.package-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border-radius: 100px;
  background: rgba(197, 48, 30, 0.16);
  color: var(--accent);
  margin-bottom: 1rem;
}
.package-tag-gold { background: rgba(201, 163, 90, 0.18); color: var(--gold); }
.package-head h3 { font-size: 1.4rem; max-width: 22ch; }
.package-list { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.6rem; }
.package-list li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--cream-2);
  font-size: 0.96rem;
}
.package-list li::before {
  content: "";
  position: absolute; left: 0; top: 0.5em;
  width: 8px; height: 8px; border-radius: 2px;
  background: var(--gold);
  transform: rotate(45deg);
}
.package-foot {
  font-size: 0.88rem;
  color: var(--cream-3);
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}

/* =============================================================
   13. Reasons grid
   ============================================================= */
.reasons-grid {
  display: grid; gap: 2rem 1.5rem;
  grid-template-columns: 1fr;
}
.reason-icon {
  display: inline-grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(201, 163, 90, 0.12); color: var(--gold);
  margin-bottom: 1.1rem;
}
.reason-icon svg { width: 20px; height: 20px; }
.reason-item h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.reason-item p { color: var(--cream-3); font-size: 0.92rem; max-width: 34ch; }

/* =============================================================
   14. Portfolio / browser mockups
   ============================================================= */
.portfolio-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: 1fr;
}
.portfolio-card { border-radius: 18px; }
.browser-mock {
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-3);
  border: 1px solid var(--line);
}
.browser-mock-bar {
  display: flex; gap: 6px;
  padding: 0.8rem 1rem;
  background: var(--bg-4);
  border-bottom: 1px solid var(--line);
}
.browser-mock-bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--cream-3); opacity: 0.4;
}
.browser-mock-body { padding: 1.4rem; }
.skeleton-block, .skeleton-line, .skeleton-grid span {
  background: linear-gradient(90deg, rgba(242,235,218,0.06), rgba(242,235,218,0.12), rgba(242,235,218,0.06));
  border-radius: 8px;
}
.skeleton-block-lg { height: 80px; margin-bottom: 1rem; }
.skeleton-line { height: 10px; margin-bottom: 0.6rem; width: 100%; }
.skeleton-line.short { width: 55%; margin-bottom: 1.1rem; }
.skeleton-grid { display: flex; gap: 0.5rem; }
.skeleton-grid span { flex: 1; height: 34px; }
.portfolio-label {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--cream-3);
  text-align: center;
}

/* =============================================================
   15. FAQ
   ============================================================= */
.faq-list { display: flex; flex-direction: column; }
.faq-item {
  border-top: 1px solid var(--line);
  padding-block: 1.4rem;
}
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--cream);
  display: flex; align-items: center; justify-content: space-between;
  list-style: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: var(--sans);
  font-size: 1.3rem;
  color: var(--gold);
  transition: transform .35s var(--ease-soft);
  margin-left: 1rem;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  color: var(--cream-3);
  font-size: 0.96rem;
  max-width: 62ch;
  margin-top: 1rem;
}

/* =============================================================
   16. Final CTA
   ============================================================= */
.section-final {
  position: relative;
  overflow: clip;
  text-align: center;
  isolation: isolate;
}
.hero-mesh-final {
  position: absolute; inset: -20%; z-index: -1;
  opacity: 0.55;
}
.section-title-final { margin-inline: auto; max-width: 22ch; }
.final-cta {
  display: flex; flex-direction: column; align-items: center; gap: 1.1rem;
  margin-bottom: 1.6rem;
}
.final-cta-email {
  font-family: var(--mono);
  font-size: 0.95rem;
  color: var(--cream-2);
  border-bottom: 1px solid var(--line);
  padding-bottom: 2px;
  transition: color .3s, border-color .3s;
}
.final-cta-email:hover { color: var(--gold); border-color: var(--gold); }
.final-location {
  font-size: 0.85rem;
  color: var(--cream-3);
}

/* =============================================================
   17. Footer
   ============================================================= */
.footer {
  padding-block: 2rem;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-inner {
  display: flex; flex-direction: column; gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--cream-3);
}
.footer-credit { opacity: 0.7; }

/* =============================================================
   18. WhatsApp floating button
   ============================================================= */
.whatsapp-float {
  position: fixed;
  right: clamp(1rem, 3vw, 1.8rem);
  bottom: clamp(1rem, 3vw, 1.8rem);
  z-index: 220;
  width: 58px; height: 58px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: linear-gradient(150deg, var(--gold-2), var(--gold));
  color: #241a0d;
  box-shadow: 0 10px 30px rgba(201, 163, 90, 0.35), 0 4px 14px rgba(0,0,0,0.4);
  transition: transform .45s var(--ease-bounce), box-shadow .4s;
}
.whatsapp-float svg { width: 28px; height: 28px; }
.whatsapp-float:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 16px 40px rgba(197, 48, 30, 0.4), 0 6px 18px rgba(0,0,0,0.45);
}
.whatsapp-float.is-hidden { transform: scale(0.4); opacity: 0; pointer-events: none; }

/* =============================================================
   19. Responsive (mobile-first)
   ============================================================= */
@media (min-width: 540px) {
  .problem-grid, .feature-grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .reasons-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 720px) {
  .packages-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-bg-img { object-position: 35% 30%; }
}

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

  .problem-grid, .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .portfolio-grid { grid-template-columns: repeat(3, 1fr); }
  .reasons-grid { grid-template-columns: repeat(4, 1fr); }
  .feature-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 1280px) {
  .hero-title { max-width: 18ch; }
}

/* =============================================================
   20. Reduced-motion (only INTRUSIVE effects)
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  .hero-mesh { animation: none; }
  /* Do NOT disable: tilts, hovers, fades, reveal, underline */
}
