/* Variables y estilos base */
:root {
  --morado: #6f3fa8;
  --morado-oscuro: #4b2876;
  --lila: #b494f2;
  --azul-suave: #8fb8ff;
  --gris-texto: #333333;
  --gris-suave: #f6f6fb;
  --blanco: #ffffff;
  --shadow-soft: 0 18px 40px rgba(30, 10, 60, 0.12);
  --radius-card: 18px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--gris-texto);
  background-color: var(--blanco);
}

/* Layout */
.container {
  width: min(1080px, 100% - 3rem);
  margin: 0 auto;
}

.section {
  padding: 4.5rem 0;
}

.section-alt {
  background: var(--gris-suave);
}

.section-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.section-header h3 {
  font-size: 1.9rem;
  margin: 0 0 0.5rem;
  color: var(--morado-oscuro);
}

.section-header p {
  margin: 0;
  color: #555;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(10px);
  box-shadow: 0 1px 8px rgba(0,0,0,0.04);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.brand-role {
  font-size: 0.8rem;
  color: #666;
}

/* Logo copa árbol (estilizado) */
.logo-tree {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 20%, var(--azul-suave), var(--morado));
  position: relative;
  overflow: hidden;
}

.logo-tree::before {
  content: "";
  position: absolute;
  inset: 40% 35% 0;
  background: #4b2d13;
  border-radius: 50% 50% 20% 20%;
}

.logo-tree::after {
  content: "";
  position: absolute;
  inset: 10% 10% 40%;
  background: radial-gradient(circle at 20% 20%, #ffffffaa, transparent 50%),
              radial-gradient(circle at 80% 30%, #ffffff88, transparent 55%),
              radial-gradient(circle at 45% 70%, #ffffff55, transparent 55%);
}

.logo-tree.large {
  width: 90px;
  height: 90px;
}

.logo-tree.small {
  width: 32px;
  height: 32px;
}

/* Navegación */
.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-nav a {
  text-decoration: none;
  color: #555;
  font-size: 0.9rem;
  position: relative;
}

.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.3rem;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--morado), var(--azul-suave));
  transition: width 0.2s ease;
}

.main-nav a:hover::after,
.main-nav a:focus-visible::after {
  width: 100%;
}

/* Botón hamburguesa */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 0.25rem;
  flex-direction: column;
  gap: 0.25rem;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--morado-oscuro);
  border-radius: 999px;
}

/* Hero */
.hero {
  padding-top: 5.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.5fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--morado-oscuro);
  margin-bottom: 0.75rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 3vw, 2.8rem);
  margin: 0;
  color: var(--morado-oscuro);
}

.hero h2 {
  font-size: 1.35rem;
  margin: 0.4rem 0 1rem;
  color: #555;
}

.hero-description {
  margin: 0 0 0.75rem;
}

.hero-scope {
  margin: 0 0 1.25rem;
  font-weight: 500;
  color: #444;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.hero-contact {
  font-size: 0.9rem;
  color: #555;
}

.hero-contact a {
  color: var(--morado-oscuro);
}

.hero-visual {
  position: relative;
  min-height: 230px;
}

.hero-blob {
  position: absolute;
  inset: 10% 0 0 10%;
  background: radial-gradient(circle at 0 0, var(--azul-suave), transparent 50%),
              radial-gradient(circle at 80% 20%, var(--lila), transparent 55%),
              radial-gradient(circle at 30% 90%, var(--morado), transparent 55%);
  opacity: 0.28;
  filter: blur(3px);
  border-radius: 40% 60% 50% 50%;
}

.hero-logo-circle {
  position: relative;
  width: 220px;
  height: 220px;
  margin-left: auto;
  border-radius: 36px;
  background: linear-gradient(145deg, #ffffff, #f2ebff);
  box-shadow: var(--shadow-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Secciones en split */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 2.1fr);
  gap: 2.5rem;
  align-items: center;
}

.logo-panel {
  background: linear-gradient(145deg, var(--azul-suave), var(--lila));
  border-radius: 32px;
  padding: 2.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-soft);
}

/* Tarjetas */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--blanco);
  border-radius: var(--radius-card);
  padding: 1.75rem 1.6rem;
  box-shadow: 0 12px 30px rgba(30, 10, 60, 0.08);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  right: -12%;
  top: -25%;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle at 30% 30%, var(--azul-suave), transparent 60%);
  opacity: 0.25;
}

.card h4 {
  margin: 0 0 0.6rem;
  color: var(--morado-oscuro);
}

.card p {
  margin: 0 0 0.75rem;
}

.card-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  text-decoration: none;
  color: var(--morado-oscuro);
  font-weight: 500;
}

.card-link::after {
  content: "›";
  font-size: 0.9rem;
}

/* Botones */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.7rem 1.75rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn.primary {
  background: linear-gradient(135deg, var(--morado), var(--azul-suave));
  color: #fff;
  box-shadow: 0 12px 26px rgba(111, 63, 168, 0.35);
}

.btn.ghost {
  background: transparent;
  color: var(--morado-oscuro);
  border: 1px solid rgba(111, 63, 168, 0.5);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(111, 63, 168, 0.25);
}

/* Otros elementos */
.bullet-list {
  padding-left: 1.1rem;
}

.bullet-list li {
  margin-bottom: 0.5rem;
}

/* Modalidades */
.two-columns {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.section-note {
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}

/* Pasos */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}

.steps li {
  background: var(--blanco);
  border-radius: var(--radius-card);
  padding: 1.5rem 1.6rem 1.6rem;
  box-shadow: 0 10px 26px rgba(30, 10, 60, 0.08);
  position: relative;
}

.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: 1rem;
  right: 1.4rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  color: #fff;
  background: linear-gradient(135deg, var(--morado), var(--azul-suave));
}

.steps h4 {
  margin: 0 0 0.6rem;
  color: var(--morado-oscuro);
}

/* Testimonios */
.testimonials-grid .testimonial {
  position: relative;
}

.testimonial-text {
  margin: 0;
  font-style: italic;
}

.testimonial::before {
  content: "“";
  position: absolute;
  font-size: 3.5rem;
  color: rgba(111, 63, 168, 0.16);
  top: -1.2rem;
  left: 0.3rem;
}

/* FAQ */
.accordion details {
  border-radius: 14px;
  background: var(--gris-suave);
  padding: 1rem 1.25rem;
  margin-bottom: 0.8rem;
}

.accordion summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--morado-oscuro);
}

.accordion summary::-webkit-details-marker {
  display: none;
}

/* Frase central */
.section-highlight {
  background: radial-gradient(circle at top left, #f2ebff 0, #ffffff 55%);
}

.highlight-inner {
  position: relative;
  padding: 2.5rem 2.2rem;
  border-radius: 28px;
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  text-align: center;
}

.logo-tree.faded {
  position: absolute;
  width: 200px;
  height: 200px;
  opacity: 0.18;
  right: -30px;
  top: -40px;
}

.highlight-text {
  max-width: 560px;
  margin: 0 auto 1.4rem;
  font-size: 1.1rem;
}

/* Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
  gap: 2.2rem;
  align-items: flex-start;
}

.contact-info p {
  margin: 0 0 0.5rem;
}

.contact-info .btn {
  margin-top: 1rem;
}

.contact-scope {
  margin-top: 0.5rem;
  color: #555;
}

.contact-form {
  background: var(--gris-suave);
  border-radius: 22px;
  padding: 1.75rem 1.6rem 1.9rem;
}

.form-row {
  display: flex;
  flex-direction: column;
  margin-bottom: 0.9rem;
}

.form-row label {
  font-size: 0.86rem;
  margin-bottom: 0.25rem;
  color: #555;
}

.form-row input,
.form-row select,
.form-row textarea {
  border-radius: 999px;
  border: 1px solid #ddd;
  padding: 0.55rem 0.9rem;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
}

.form-row textarea {
  border-radius: 16px;
  resize: vertical;
}

/* Footer */
.site-footer {
  background: var(--morado-oscuro);
  color: #eee;
  padding: 1.8rem 0 2.4rem;
  margin-top: 1.5rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-text {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
}

.footer-text a {
  color: #fff;
  text-decoration: none;
}

.footer-note {
  font-size: 0.78rem;
  max-width: 620px;
  color: #ddd;
}

/* Animaciones on scroll */
.section,
.site-header {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.section.in-view,
.site-header.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* Responsivo */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
    max-width: 360px;
    margin: 0 auto 1.5rem;
  }

  .split {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .container {
    width: min(100% - 2.4rem, 100%);
  }

  .section {
    padding: 3.2rem 0;
  }

  .header-inner {
    padding-inline: 0;
  }

  .main-nav {
    position: absolute;
    inset: 100% 0 auto 0;
    background: rgba(255, 255, 255, 0.98);
    max-height: 0;
    overflow: hidden;
    box-shadow: 0 12px 25px rgba(0,0,0,0.08);
    transition: max-height 0.25s ease;
  }

  .main-nav.open {
    max-height: 260px;
  }

  .main-nav ul {
    flex-direction: column;
    padding: 0.75rem 1.25rem 1rem;
    gap: 0.7rem;
  }

  .nav-toggle {
    display: flex;
  }

  .hero {
    padding-top: 4.5rem;
  }

  .highlight-inner {
    padding-inline: 1.5rem;
  }
}