/* ============================================
   STYLES — Tu Espacio Online
   ============================================ */

/* --- Reset & Base --- */

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --blue:     #4A9EE8;
  --violet:   #7B4FD4;
  --magenta:  #C044B8;
  --gradient: linear-gradient(135deg, #4A9EE8 0%, #7B4FD4 50%, #C044B8 100%);
  --bg:       #0A0A12;
  --bg-card:  rgba(255, 255, 255, 0.04);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --text:     #E2E2EE;
  --text-dim: #8888A0;
  --surface:  #12121E;
  --radius:   16px;
  --radius-sm: 10px;
  --nav-height: 72px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Gradient helpers --- */

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: var(--gradient);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* --- Buttons --- */

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(74, 158, 232, 0.3),
              0 4px 12px rgba(123, 79, 212, 0.2);
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--bg-card-border);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  border-color: var(--violet);
  background: rgba(123, 79, 212, 0.08);
  transform: translateY(-2px);
}

/* --- Section spacing --- */

section {
  padding: 100px 0;
  position: relative;
}

.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.section-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-dim);
  max-width: 560px;
  line-height: 1.7;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-header .section-subtitle {
  margin: 0 auto;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  background: rgba(10, 10, 18, 0.5);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.navbar.scrolled {
  background: rgba(10, 10, 18, 0.92);
  box-shadow: 0 1px 30px rgba(0, 0, 0, 0.4);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
}

.nav-brand-text {
  display: inline-flex;
  align-items: center;
  letter-spacing: -0.5px;
}

.nav-brand-text .gradient-text {
  background-size: 200% 200%;
  animation: gradientShift 6s ease-in-out infinite;
  margin: 0 6px;
}

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

.nav-links a {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-dim);
  transition: color 0.3s ease;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient);
  transition: width 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
}

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

.nav-cta {
  padding: 10px 24px !important;
  font-size: 0.9rem !important;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0;
  right: 0;
  background: rgba(10, 10, 18, 0.97);
  backdrop-filter: blur(24px);
  padding: 24px;
  flex-direction: column;
  gap: 8px;
  z-index: 999;
}

.mobile-menu.open {
  display: flex;
}

.mobile-menu a {
  padding: 14px 0;
  font-size: 1.05rem;
  color: var(--text-dim);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: color 0.3s ease;
}

.mobile-menu a:hover { color: #fff; }

@media (max-width: 768px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
}

/* ============================================
   HERO
   ============================================ */

.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + 40px);
  position: relative;
  overflow: hidden;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content { position: relative; z-index: 2; }

.hero-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 1.15rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 500px;
}

.hero-ctas {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-visual {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
}

/* Browser mockup */
.browser-mockup {
  width: 100%;
  max-width: 480px;
  background: var(--surface);
  border-radius: 14px;
  border: 1px solid var(--bg-card-border);
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.browser-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid var(--bg-card-border);
}

.browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.browser-dot.red    { background: #ff5f57; }
.browser-dot.yellow { background: #ffbd2e; }
.browser-dot.green  { background: #28ca41; }

.browser-url {
  flex: 1;
  margin-left: 12px;
  padding: 5px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: var(--text-dim);
}

.browser-body {
  padding: 24px;
  min-height: 240px;
  font-family: 'DM Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--text-dim);
  line-height: 1.8;
}

/* Particles canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero .container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-subtitle { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-visual { display: none; }
}

/* ============================================
   VALUE PROPS
   ============================================ */

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  backdrop-filter: blur(12px);
  text-align: center;
}

.value-icon-wrap {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(74, 158, 232, 0.10) 0%, rgba(192, 68, 184, 0.10) 100%);
  border: 1px solid rgba(74, 158, 232, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 22px;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.35s ease,
              box-shadow 0.35s ease;
}

.value-icon-wrap svg {
  width: 30px;
  height: 30px;
}

.value-card:hover .value-icon-wrap {
  transform: scale(1.1) translateY(-2px);
  background: linear-gradient(135deg, rgba(74, 158, 232, 0.18) 0%, rgba(192, 68, 184, 0.18) 100%);
  box-shadow: 0 8px 24px rgba(123, 79, 212, 0.20);
}

.value-card h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.value-card p {
  font-size: 0.93rem;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .value-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 500px) {
  .value-grid { grid-template-columns: 1fr; }
}

/* ============================================
   HOW IT WORKS — Timeline
   ============================================ */

.timeline {
  display: flex;
  gap: 0;
  position: relative;
  justify-content: center;
}

/* Horizontal line behind steps */
.timeline::before {
  content: '';
  position: absolute;
  top: 28px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: var(--bg-card-border);
}

.timeline-step {
  flex: 1;
  text-align: center;
  position: relative;
  padding: 0 16px;
  max-width: 260px;
}

.timeline-dot {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  position: relative;
  z-index: 2;
  transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.timeline-dot.visible {
  border-color: var(--violet);
}

.timeline-number {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 800;
}

.timeline-step h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-step p {
  font-size: 0.9rem;
  color: var(--text-dim);
  line-height: 1.6;
}

@media (max-width: 768px) {
  .timeline {
    flex-direction: column;
    align-items: flex-start;
    padding-left: 40px;
  }

  .timeline::before {
    top: 0;
    bottom: 0;
    left: 27px;
    right: auto;
    width: 2px;
    height: 100%;
  }

  .timeline-step {
    text-align: left;
    padding: 0 0 40px 32px;
    max-width: 100%;
  }

  .timeline-dot {
    position: absolute;
    left: -52px;
    top: 0;
    margin: 0;
    width: 48px;
    height: 48px;
  }
}

/* ============================================
   PORTFOLIO
   ============================================ */

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.portfolio-card {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--bg-card-border);
  background: var(--bg-card);
  backdrop-filter: blur(8px);
  display: block;
  color: inherit;
  text-decoration: none;
  position: relative;
}

.portfolio-card.placeholder {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.1);
  opacity: 0.6;
}

.portfolio-thumb {
  width: 100%;
  height: 220px;
  background: var(--surface);
  display: block;
  position: relative;
  overflow: hidden;
}

.portfolio-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 10, 18, 0.65) 100%);
  pointer-events: none;
  z-index: 1;
}

.portfolio-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.portfolio-card:hover .portfolio-thumb img {
  transform: scale(1.06);
}

.portfolio-info {
  padding: 20px 24px;
}

.portfolio-info h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.portfolio-info .category {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: 14px;
}

.portfolio-info .btn-small {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--bg-card-border);
  color: var(--text);
  transition: border-color 0.3s ease, background 0.3s ease, transform 0.3s ease;
}

.portfolio-card:hover .btn-small {
  border-color: var(--violet);
  background: rgba(123, 79, 212, 0.15);
  transform: translateX(4px);
}

@media (max-width: 1024px) {
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
}

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

/* ============================================
   PRICING
   ============================================ */

.pricing-wrapper {
  display: flex;
  justify-content: center;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: 20px;
  padding: 48px 44px;
  max-width: 460px;
  width: 100%;
  text-align: center;
  backdrop-filter: blur(16px);
  position: relative;
  overflow: hidden;
}

.pricing-amount {
  display: inline-block;
  line-height: 1.1;
  padding: 0 4px;
  /* Avoid the gradient-text descender being clipped by overflow:hidden */
  padding-bottom: 6px;
}

@media (max-width: 600px) {
  .pricing-card {
    padding: 40px 22px;
  }
  .pricing-amount {
    font-size: clamp(2.4rem, 11vw, 3rem) !important;
    letter-spacing: -1px;
  }
  .pricing-currency {
    font-size: 0.92rem;
  }
  .pricing-features li {
    font-size: 0.92rem;
  }
}

/* Top gradient line */
.pricing-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient);
}

.pricing-badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  background: rgba(74, 158, 232, 0.12);
  color: var(--blue);
  margin-bottom: 24px;
}

.pricing-amount {
  font-family: 'Syne', sans-serif;
  font-size: 3.2rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pricing-currency {
  font-size: 1rem;
  color: var(--text-dim);
  margin-bottom: 32px;
  display: block;
}

.pricing-features {
  text-align: left;
  margin-bottom: 36px;
}

.pricing-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 0.98rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.pricing-features li:last-child { border-bottom: none; }

.check-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #fff;
  font-weight: 700;
}

.pricing-note {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-top: 20px;
  line-height: 1.5;
}

/* ============================================
   FORM / CTA SECTION
   ============================================ */

.form-section {
  background: radial-gradient(ellipse at center, rgba(123, 79, 212, 0.08) 0%, transparent 70%);
}

.form-wrapper {
  max-width: 680px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  padding: 16px;
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.form-wrapper iframe {
  border-radius: var(--radius-sm);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
  padding: 60px 0 32px;
  border-top: 1px solid var(--bg-card-border);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
  margin-bottom: 40px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.footer-brand .gradient-text {
  margin: 0 4px;
}

.footer-tagline {
  font-size: 0.9rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links a {
  font-size: 0.9rem;
  color: var(--text-dim);
  transition: color 0.3s ease;
}

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

.footer-social {
  display: flex;
  gap: 12px;
}

.footer-social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--bg-card-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.footer-social a:hover {
  border-color: var(--violet);
  background: rgba(123, 79, 212, 0.12);
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  font-size: 0.82rem;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .footer-top { flex-direction: column; align-items: center; text-align: center; }
  .footer-links { justify-content: center; }
}

/* ============================================
   PRIVACY MODAL
   ============================================ */

.privacy-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.privacy-modal.open {
  display: flex;
}

.privacy-content {
  background: var(--surface);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius);
  max-width: 640px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 40px;
  position: relative;
}

.privacy-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.privacy-content h3 {
  font-family: 'Syne', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 24px;
  margin-bottom: 8px;
}

.privacy-content p {
  font-size: 0.92rem;
  color: var(--text-dim);
  line-height: 1.7;
  margin-bottom: 12px;
}

.privacy-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color 0.3s ease;
  line-height: 1;
}

.privacy-close:hover { color: #fff; }

/* ============================================
   UTILITY
   ============================================ */

.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }
