/* ============================================================
   WestWebs — styles.css
   Mobile-first • Urbanist • Purple accent
   ============================================================ */

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Urbanist', sans-serif;
  color: #1A1A1A;
  background: #fff;
  overflow-x: hidden;
  line-height: 1.65;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ---------- Variables ---------- */
:root {
  --bg: #FFFFFF;
  --surface: #F5F5F7;
  --text: #1A1A1A;
  --muted: #6B7280;
  --accent: #5B21B6;
  --accent-d: #4C1D95;
  --radius: 14px;
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .07);
  --shadow-md: 0 8px 32px rgba(0, 0, 0, .11);
  --nav-h: 70px;
  --ease: .3s ease;
}

/* ---------- Scroll-reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Utility ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section {
  padding: 96px 0;
}

.section-tag {
  display: inline-block;
  background: rgba(91, 33, 182, .1);
  color: var(--accent);
  font-weight: 700;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 50px;
  margin-bottom: 18px;
}

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin-bottom: 14px;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 520px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 50px;
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform var(--ease), box-shadow var(--ease), background var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91, 33, 182, .33);
}

.btn-accent:hover {
  background: var(--accent-d);
  box-shadow: 0 8px 28px rgba(91, 33, 182, .42);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline:hover {
  background: rgba(91, 33, 182, .06);
}

.btn-wa {
  background: #25D366;
  color: #fff;
  box-shadow: 0 4px 20px rgba(37, 211, 102, .28);
}

.btn-wa:hover {
  background: #1EBE5D;
  box-shadow: 0 8px 28px rgba(37, 211, 102, .38);
}

.btn svg {
  flex-shrink: 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
#navbar {
  position: sticky;
  top: 0;
  z-index: 900;
  height: var(--nav-h);
  background: var(--bg);
  display: flex;
  align-items: center;
  transition: box-shadow var(--ease);
}

#navbar.scrolled {
  box-shadow: 0 2px 18px rgba(0, 0, 0, .09);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 48px;
  width: auto;
  object-fit: contain;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 34px;
}

.nav-links a {
  font-weight: 600;
  font-size: .95rem;
  position: relative;
  padding-bottom: 3px;
  transition: color var(--ease);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transition: width var(--ease);
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-links a:hover::after {
  width: 100%;
}

/* ============================================================
   HERO
   ============================================================ */
#hero {
  min-height: calc(100vh - var(--nav-h));
  background: var(--bg);
  display: flex;
  align-items: center;
}

.hero-inner {
  padding: 80px 0;
  max-width: 780px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(91, 33, 182, .08);
  border: 1px solid rgba(91, 33, 182, .18);
  color: var(--accent);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 7px 16px;
  border-radius: 50px;
  margin-bottom: 28px;
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: .4;
    transform: scale(.65);
  }
}

.hero-headline {
  font-size: clamp(2.5rem, 6.5vw, 4.4rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.025em;
  margin-bottom: 22px;
}

.hero-headline .hl {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-headline .hl::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 4px;
}

.hero-sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--muted);
  max-width: 580px;
  margin-bottom: 36px;
}

/* Stats */
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 0;
  margin-top: 56px;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 580px;
}

.stat-item {
  flex: 1 1 160px;
  text-align: center;
  padding: 24px 20px;
  border-right: 1px solid #E5E7EB;
  background: var(--bg);
}

.stat-item:last-child {
  border-right: none;
}

.stat-num {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}

.stat-label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
}

/* ============================================================
   SERVICIOS
   ============================================================ */
#servicios {
  background: var(--bg);
}

.servicios-header {
  margin-bottom: 52px;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin-bottom: 48px;
}

@media (min-width: 640px) {
  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.service-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: transform var(--ease), box-shadow var(--ease);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.service-icon {
  width: 52px;
  height: 52px;
  background: rgba(91, 33, 182, .1);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.service-icon svg {
  color: var(--accent);
}

.service-name {
  font-size: 1.1rem;
  font-weight: 800;
  margin-bottom: 10px;
}

.service-desc {
  font-size: .95rem;
  color: var(--muted);
}

/* Pricing block */
.pricing-block {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 32px;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}

.pricing-price {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--text);
  margin-bottom: 12px;
}

.pricing-sub {
  font-size: 1rem;
  color: var(--muted);
  max-width: 420px;
  margin: 0 auto 28px;
}

/* ============================================================
   PORTFOLIO PREVIEW (index)
   ============================================================ */
#portfolio-preview {
  background: var(--surface);
}

.portfolio-header {
  margin-bottom: 52px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 44px;
}

@media (min-width: 640px) {
  .portfolio-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Portfolio card */
.p-card {
  background: var(--bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}

.p-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.p-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  background: #1c1c1e;
  cursor: pointer;
  overflow: hidden;
}

.p-card-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(0, 0, 0, .45);
  transition: background var(--ease);
}

.p-card-thumb:hover .play-overlay {
  background: rgba(0, 0, 0, .58);
}

.play-btn {
  width: 58px;
  height: 58px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 22px rgba(91, 33, 182, .5);
  transition: transform var(--ease), box-shadow var(--ease);
  border: none;
  cursor: pointer;
}

.p-card-thumb:hover .play-btn {
  transform: scale(1.1);
  box-shadow: 0 8px 32px rgba(91, 33, 182, .6);
}

.play-btn svg {
  margin-left: 4px;
}

.antes-badge {
  color: #fff;
  font-weight: 700;
  font-size: .73rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  background: rgba(91, 33, 182, .75);
  padding: 5px 14px;
  border-radius: 50px;
}

.p-card-body {
  padding: 22px 24px 26px;
}

.p-card-client {
  font-weight: 800;
  font-size: 1.05rem;
  margin-bottom: 6px;
}

.p-card-desc {
  font-size: .9rem;
  color: var(--muted);
}

/* Center CTA */
.portfolio-cta {
  text-align: center;
}

/* ============================================================
   PORTFOLIO PAGE HERO
   ============================================================ */
.page-hero {
  background: var(--bg);
  padding: 72px 0 60px;
  border-bottom: 1px solid #E5E7EB;
}

.page-hero-title {
  font-size: clamp(2rem, 5vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -.025em;
  margin-bottom: 14px;
}

.page-hero-sub {
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 520px;
}

/* Full portfolio grid */
#portfolio-full {
  background: var(--surface);
}

.portfolio-full-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
}

@media (min-width: 640px) {
  .portfolio-full-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 960px) {
  .portfolio-full-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ============================================================
   CONTACTO
   ============================================================ */
#contacto {
  background: var(--bg);
  text-align: center;
}

.contacto-inner {
  max-width: 660px;
  margin: 0 auto;
}

.contacto-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 16px;
}

.contacto-sub {
  font-size: 1.05rem;
  color: var(--muted);
  margin-bottom: 36px;
}

/* ============================================================
   FOOTER
   ============================================================ */
#footer {
  background: var(--text);
  color: #fff;
  padding: 40px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-logo img {
  height: 36px;
  width: auto;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.footer-info p {
  font-size: .85rem;
  color: rgba(255, 255, 255, .5);
}

.footer-info a {
  color: rgba(255, 255, 255, .75);
  font-weight: 600;
  transition: color var(--ease);
}

.footer-info a:hover {
  color: #fff;
}

@media (max-width:540px) {
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer-info {
    text-align: center;
  }
}

/* ============================================================
   VIDEO MODAL
   ============================================================ */
#video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#video-modal.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .82);
  animation: fadeIn .25s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.modal-box {
  position: relative;
  background: #111;
  border-radius: var(--radius);
  width: 100%;
  max-width: 1200px;
  overflow: hidden;
  animation: scaleIn .25s ease;
  z-index: 1;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(.93);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-box video {
  display: block;
  width: 100%;
  background: #000;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, .15);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  font-family: 'Urbanist', sans-serif;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background var(--ease);
  z-index: 2;
}

.modal-close:hover {
  background: rgba(255, 255, 255, .28);
}

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width:640px) {
  section {
    padding: 64px 0;
  }

  .nav-links {
    gap: 20px;
  }

  .nav-links a {
    font-size: .88rem;
  }

  .hero-stats {
    max-width: 100%;
  }

  .stat-item {
    padding: 20px 14px;
  }

  .stat-num {
    font-size: 1.6rem;
  }
}