/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg:        #ffffff;
  --bg-alt:    #f3f4f6;
  --bg-dark:   #1F2937;
  --bg-dark-2: #161d29;
  --ink:       #1F2937;
  --ink-soft:  #3d4757;
  --ink-mute:  #6b7280;
  --cream:     #ffffff;
  --accent:    #2563EB;
  --accent-2:  #1d4fd0;
  --line:      rgba(31, 41, 55, 0.12);
  --line-light: rgba(255, 255, 255, 0.18);

  --sans: Arial, Helvetica, "Helvetica Neue", sans-serif;

  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.25, 0.46, 0.45, 0.94);

  --nav-h: 118px;
  --radius: 18px;
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  tab-size: 2;
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}
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 {
  font-family: var(--sans);
  font-weight: 700;
  text-wrap: balance;
  line-height: 1.08;
  letter-spacing: -0.01em;
}
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: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 720px) { .container { padding-inline: 2rem; } }

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

.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: .6rem;
}
.eyebrow-light { color: #8fb0ff; }

.section { padding-block: clamp(3.5rem, 7vw, 6.5rem); }
.section-alt { background: var(--bg-alt); }
.section-dark { background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-dark-2) 100%); color: #fff; }

.section-title {
  font-size: clamp(1.9rem, 4.2vw, 2.6rem);
  max-width: 22ch;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.title-light { color: #fff; }

/* =============================================================
   4. Reveal / scroll-in
   ============================================================= */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.is-revealed { opacity: 1; transform: none; }
.reveal[data-split] { opacity: 1; transform: none; }

/* =============================================================
   5. Buttons
   ============================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .85rem 1.5rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .98rem;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background-color .25s var(--ease-out);
  white-space: nowrap;
}
.btn-primary {
  background: #25D366;
  color: #08170e;
  box-shadow: 0 10px 24px rgba(37, 211, 102, .35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(37, 211, 102, .45); }
.btn-primary:active { transform: translateY(0); }

.btn-lg { padding: 1.05rem 2rem; font-size: 1.05rem; }

.nav-cta { padding: .6rem 1.1rem; font-size: .9rem; }

/* =============================================================
   6. Nav
   ============================================================= */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 500;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition: background-color .3s var(--ease-out), box-shadow .3s var(--ease-out), backdrop-filter .3s var(--ease-out);
}
.nav.is-scrolled {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  box-shadow: 0 1px 0 var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo { height: 96px; width: auto; }

/* =============================================================
   7. Hero
   ============================================================= */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  overflow: clip;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}
.hero-tint {
  position: absolute; inset: 0; z-index: -2;
  background:
    linear-gradient(180deg, rgba(31,41,55,.55) 0%, rgba(31,41,55,.35) 35%, rgba(31,41,55,.55) 65%, rgba(31,41,55,.92) 100%);
}
.hero-glow {
  position: absolute; inset: -20% -10% auto -10%; height: 70%; z-index: -1;
  background: radial-gradient(50% 60% at 50% 0%, rgba(37,99,235,.35), transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}
.hero-content {
  position: relative;
  padding-block: clamp(7rem, 17vw, 9rem) clamp(3rem, 8vw, 5rem);
  color: #fff;
}
.hero-meta {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: #dbe4ff;
  margin-bottom: 1rem;
}
.hero-meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .25);
}
.hero-title {
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: .98;
  max-width: 14ch;
  margin-bottom: 1.1rem;
  text-shadow: 0 4px 30px rgba(0,0,0,.35);
}
.hero-sub {
  font-size: clamp(1.02rem, 2vw, 1.2rem);
  color: #e6ebf5;
  max-width: 42ch;
  margin-bottom: 1.9rem;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }

.hero-scroll {
  position: absolute;
  bottom: 1.4rem;
  right: 1.4rem;
  z-index: 2;
  color: #fff;
  opacity: .8;
  width: 44px; height: 44px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-light);
  border-radius: 50%;
  animation: bob 2.2s ease-in-out infinite;
}
@media (min-width: 720px) { .hero-scroll { display: flex; } }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

/* =============================================================
   8. Cards (services)
   ============================================================= */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 640px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  position: relative;
  padding: 1.9rem 1.7rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .6);
  border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 18px 30px -22px rgba(31,41,55,.25);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out), border-color .3s var(--ease-out);
}
@supports (backdrop-filter: blur(16px)) {
  .card {
    background: rgba(255, 255, 255, .55);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
  }
}
.card:hover {
  transform: translateY(-6px);
  border-color: rgba(37, 99, 235, .35);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 28px 40px -22px rgba(37, 99, 235, .28);
}
.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(37, 99, 235, .1);
  margin-bottom: 1.1rem;
}
.card h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.card p { color: var(--ink-mute); font-size: .95rem; }

/* =============================================================
   9. Portfolio grid
   ============================================================= */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
@media (min-width: 640px)  { .portfolio-grid { grid-template-columns: repeat(3, 1fr); gap: 1rem; } }
@media (min-width: 960px)  { .portfolio-grid { grid-template-columns: repeat(4, 1fr); } }

.portfolio-item {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  background: var(--bg-dark);
}
.portfolio-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease-out), filter .6s var(--ease-out);
}
.portfolio-item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(15,20,28,.88) 100%);
  opacity: 0;
  transition: opacity .35s var(--ease-out);
}
.portfolio-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: .9rem .9rem 1rem;
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .35s var(--ease-out), transform .35s var(--ease-out);
  z-index: 1;
}
.portfolio-item:hover img,
.portfolio-item:focus-within img { transform: scale(1.08); filter: saturate(1.1); }
.portfolio-item:hover::after,
.portfolio-item:focus-within::after { opacity: 1; }
.portfolio-item:hover figcaption,
.portfolio-item:focus-within figcaption { opacity: 1; transform: none; }

/* Always show captions on touch devices (no hover) */
@media (hover: none) {
  .portfolio-item::after { opacity: 1; }
  .portfolio-item figcaption { opacity: 1; transform: none; }
}

/* =============================================================
   10. Why-us
   ============================================================= */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
}
@media (min-width: 640px) { .why-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .why-grid { grid-template-columns: repeat(4, 1fr); } }

.why-card {
  padding: 1.9rem 1.6rem;
  border-radius: var(--radius);
  background: #fff;
  border: 1px solid var(--line);
  transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
}
.why-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -26px rgba(31,41,55,.3); }
.why-stat {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}
.why-stat-suffix {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
}
.why-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px; height: 52px;
  border-radius: 14px;
  color: var(--accent);
  background: rgba(37, 99, 235, .1);
  margin-bottom: .3rem;
}
.why-card h3 { font-size: 1.05rem; margin-top: .7rem; margin-bottom: .35rem; }
.why-card p { color: var(--ink-mute); font-size: .92rem; }

/* =============================================================
   11. Contact / cierre
   ============================================================= */
.contact-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.contact-icon { width: 128px; height: 128px; margin-bottom: 1.2rem; opacity: .95; }
.contact-phone {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2rem;
  letter-spacing: .01em;
}
.contact-phone svg { color: #8fb0ff; }
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}
.contact-yappy {
  margin-top: 1rem;
  font-size: .9rem;
  color: #9aa4b5;
}
.contact-yappy strong { color: #fff; }

.yappy-card {
  margin-top: 2rem;
  padding: 1rem 1rem .9rem;
  max-width: 158px;
  width: 100%;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.yappy-logo {
  height: 16px;
  width: auto;
  margin-bottom: .55rem;
}
.yappy-name {
  font-weight: 700;
  color: #fff;
  font-size: .7rem;
  text-align: center;
  padding-bottom: .5rem;
  margin-bottom: .5rem;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
  width: 100%;
}
.yappy-title {
  font-weight: 600;
  color: #cbd5f5;
  font-size: .62rem;
  margin-bottom: .55rem;
  text-align: center;
}
.yappy-qr {
  width: 100%;
  max-width: 88px;
  height: auto;
  border-radius: 6px;
  background: #fff;
  padding: .3rem;
}

/* =============================================================
   12. Footer
   ============================================================= */
.footer { background: var(--bg-dark-2); color: #9aa4b5; padding-block: 2.4rem; }
.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  text-align: center;
  font-size: .85rem;
}
.footer-icon { width: 88px; height: 88px; border-radius: 12px; margin-bottom: .5rem; }
.footer-copy { color: #6b7488; }

/* =============================================================
   13. Floating WhatsApp
   ============================================================= */
.wa-float {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 600;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: #25D366;
  color: #08170e;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 28px rgba(37, 211, 102, .45);
  transition: transform .25s var(--ease-out);
}
.wa-float:hover { transform: scale(1.08); }
.wa-float::before {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, .55);
  animation: pulse-ring 2.4s ease-out infinite;
}
@keyframes pulse-ring {
  0%   { transform: scale(.9); opacity: .8; }
  80%  { transform: scale(1.5); opacity: 0; }
  100% { opacity: 0; }
}

/* =============================================================
   14. Reduced motion — only intrusive effects
   ============================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-scroll { animation: none; }
  .wa-float::before { animation: none; }
}
