/* ===== apaldis · Cálido y cercano ===== */
:root {
  --bg: #fdf9f5;
  --bg-alt: #f3eee7;
  --bg-card: #fffbf7;
  --dark: #2c2419;
  --dark-soft: #304038;
  --text: #2c2419;
  --text-muted: #6b5d52;
  --accent: #b87452;
  --accent-light: #d5a078;
  --accent-soft: rgba(184, 116, 82, 0.14);
  --accent-glow: rgba(184, 116, 82, 0.2);
  --sage: #64796b;
  --sage-dark: #26352f;
  --sage-soft: rgba(100, 121, 107, 0.16);
  --success: #486e53;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --font-head: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: hidden; }
body {
  overflow-x: hidden;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; transition: color 0.2s var(--ease); }
ul { list-style: none; }
button, input, textarea { font: inherit; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 1000;
  background: var(--dark);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
}
.skip-link:focus { top: 1rem; }

:focus-visible {
  outline: 3px solid rgba(193, 127, 89, 0.4);
  outline-offset: 3px;
}

/* ===== Fondo ===== */
.page-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}
.pattern-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(193, 127, 89, 0.12) 1px, transparent 0);
  background-size: 28px 28px;
  opacity: 0.42;
}
/* ===== Header ===== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 249, 245, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(44, 36, 25, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1140px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.03em;
}
.logo-symbol {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 1.35rem;
}
.nav-links a {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
}
.nav-links a:hover,
.nav-links a:focus-visible { color: var(--accent); }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--text);
  transition: 0.2s var(--ease);
}
.nav-overlay { display: none; }

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 3.25rem 1.5rem 3rem;
  max-width: 1140px;
  margin: 0 auto;
}
.hero-inner { position: relative; z-index: 2; max-width: 690px; }
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}
.hero-badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.45rem 1rem;
  border-radius: 100px;
}
.hero-badge-1to1 {
  color: var(--dark);
  background: rgba(44, 36, 25, 0.08);
}
.hero-title {
  font-family: var(--font-head);
  font-size: clamp(2.5rem, 4.4vw, 3.6rem);
  font-weight: 600;
  line-height: 1.06;
  color: var(--dark);
  margin-bottom: 0.9rem;
  letter-spacing: 0;
}
.hero-title em {
  font-style: italic;
  color: var(--accent);
  font-weight: 500;
}
.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  max-width: 620px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 1rem 1.85rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}
.btn-primary {
  background: var(--accent);
  color: white;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px var(--accent-glow);
}
.btn-secondary {
  background: rgba(44, 36, 25, 0.06);
  color: var(--dark);
  border: 1px solid rgba(44, 36, 25, 0.1);
}
.btn-secondary:hover,
.btn-secondary:focus-visible { background: rgba(44, 36, 25, 0.1); }
.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 1.4rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.hero-stats strong { color: var(--accent); }
.stat-divider { margin: 0 0.5rem; opacity: 0.5; }
.hero-shape {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: clamp(280px, 35vw, 400px);
  max-width: 100%;
  opacity: 0.94;
}
.hero-shape svg {
  display: block;
  width: 100%;
  height: auto;
  animation: shapeFloatSoft 11s ease-in-out infinite;
}
@keyframes shapeFloatSoft {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-10px) scale(1.015); }
  50% { transform: translateY(-4px) scale(0.995); }
  75% { transform: translateY(8px) scale(1.01); }
}
@keyframes shapeFloatMobile {
  0%, 100% { transform: translateY(0) scale(1); }
  25% { transform: translateY(-8px) scale(1.015); }
  50% { transform: translateY(-3px) scale(0.995); }
  75% { transform: translateY(6px) scale(1.01); }
}
/* ===== Secciones base ===== */
.section {
  position: relative;
  padding: 5.5rem 0;
}
.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.section-header { margin-bottom: 3.5rem; }
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.75rem;
  letter-spacing: 0;
}
.section-intro {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 620px;
  line-height: 1.65;
}

/* ===== Waves ===== */
.wave-top, .wave-bottom {
  position: absolute;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg-alt);
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V40c240-40 360 40 720 40s480-80 720-40v40H0z' fill='white'/%3E%3C/svg%3E");
  mask-size: cover;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 80' preserveAspectRatio='none'%3E%3Cpath d='M0 80V40c240-40 360 40 720 40s480-80 720-40v40H0z' fill='white'/%3E%3C/svg%3E");
  -webkit-mask-size: cover;
}
.wave-top { top: 0; }
.wave-bottom { bottom: 0; }

/* ===== Nosotros ===== */
#nosotros {
  background: var(--bg-alt);
  padding-top: 7rem;
}
.about-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}
.about-text-block p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}
.about-text-block strong { color: var(--dark); }
.about-cards {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.about-card {
  position: relative;
  background: var(--bg-card);
  padding: 1.75rem 2rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(44, 36, 25, 0.1);
  overflow: hidden;
  transition: border-color 0.2s var(--ease);
}
.about-card:hover {
  border-color: rgba(184, 116, 82, 0.24);
}
.about-card h3 {
  position: relative;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--sage-dark);
  margin-bottom: 0.5rem;
}
.about-card p {
  position: relative;
  font-size: 0.96rem;
  color: var(--text-muted);
}
/* ===== Servicios ===== */
.section-dark {
  background: var(--sage-dark);
  color: white;
  padding: 6rem 0;
}
.section-header-light .section-label { color: var(--accent-light); }
.section-header-light .section-title { color: white; }
.section-header-light .section-intro { color: rgba(255, 255, 255, 0.75); }
.spec-bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: auto auto;
  gap: 1.25rem;
}
.spec-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2rem;
  border-radius: var(--radius-md);
  transition: background 0.2s var(--ease);
}
.spec-item:hover {
  background: rgba(255, 255, 255, 0.08);
}
.spec-item-lg { grid-row: span 2; }
.spec-item-wide { grid-column: span 2; }
.spec-num, .spec-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}
.spec-item h3 {
  font-family: var(--font-head);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.6rem;
  color: white;
}
.spec-item p {
  font-size: 0.96rem;
  color: rgba(255, 255, 255, 0.82);
}

/* ===== Metodología ===== */
.methodology-flow {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}
.method-card,
.contact-card {
  background: var(--bg-card);
  border: 1px solid rgba(44, 36, 25, 0.1);
  border-radius: var(--radius-md);
  box-shadow: 0 8px 24px rgba(44, 36, 25, 0.04);
}
.method-card {
  padding: 2rem;
}
.method-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}
.method-dot {
  width: 12px;
  height: 12px;
  background: var(--sage);
  border-radius: 50%;
  flex-shrink: 0;
}
.method-line {
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--sage) 0%, transparent 100%);
  border-radius: 1px;
}
.method-card h3 {
  font-family: var(--font-head);
  font-size: 1.18rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5rem;
}
.method-card p {
  color: var(--text-muted);
  font-size: 0.96rem;
}

/* ===== Opiniones ===== */
.section-testimonials { background: var(--bg-alt); }
.testimonial-carousel { position: relative; }
.testimonial-track {
  display: flex;
  gap: 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  margin: 0 -1px;
  padding: 0.25rem 1px 0.5rem;
}
.testimonial-track::-webkit-scrollbar { display: none; }
.testimonial-card {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 min(360px, 82vw);
  scroll-snap-align: start;
  background: var(--bg-card);
  border: 1px solid rgba(44, 36, 25, 0.1);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: 0 8px 24px rgba(44, 36, 25, 0.04);
  transition: border-color 0.2s var(--ease);
}
.testimonial-card:hover { border-color: rgba(184, 116, 82, 0.24); }
.testimonial-mark {
  font-family: var(--font-head);
  font-size: 2.75rem;
  line-height: 1;
  color: var(--accent);
  opacity: 0.35;
  margin-bottom: 0.25rem;
}
.testimonial-card blockquote {
  font-size: 0.97rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}
.testimonial-card figcaption {
  margin-top: auto;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--sage-dark);
  font-size: 1rem;
}
.testimonial-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 1.75rem;
}
.carousel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(44, 36, 25, 0.15);
  background: var(--bg-card);
  color: var(--dark);
  cursor: pointer;
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease);
}
.carousel-btn svg { width: 18px; height: 18px; }
.carousel-btn:hover:not(:disabled) { background: var(--accent-soft); border-color: rgba(184, 116, 82, 0.3); }
.carousel-btn:disabled { opacity: 0.35; cursor: default; }
.testimonial-dots { display: flex; align-items: center; gap: 0.5rem; }
.testimonial-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(44, 36, 25, 0.18);
  cursor: pointer;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.testimonial-dot.active { background: var(--accent); transform: scale(1.25); }

/* ===== CTA ===== */
.cta-section {
  padding: 6rem 0;
  position: relative;
}
.cta-bg {
  position: absolute;
  inset: 0;
  background: var(--sage-dark);
  z-index: 0;
}
.cta-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 640px;
  margin: 0 auto;
}
.cta-title {
  font-family: var(--font-head);
  font-size: clamp(1.85rem, 3.5vw, 2.35rem);
  font-weight: 600;
  color: white;
  margin-bottom: 1rem;
}
.cta-text {
  color: rgba(255, 255, 255, 0.92);
  margin-bottom: 2rem;
}
.btn-cta {
  background: white;
  color: var(--sage-dark);
}
.btn-cta:hover,
.btn-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

/* ===== FAQ ===== */
.section-faq { background: var(--bg); }
.faq-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem 1.5rem;
}
.faq-item {
  border-top: 1px solid rgba(44, 36, 25, 0.12);
  padding-top: 1rem;
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--dark);
  padding-right: 2rem;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--accent);
  line-height: 1;
}
.faq-item[open] summary::after {
  content: "−";
}
.faq-item p {
  margin-top: 0.85rem;
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 36rem;
}

/* ===== Contacto ===== */
.section-contact {
  background: var(--bg-alt);
  padding-top: 6rem;
}
.section-contact .section-header {
  text-align: center;
}
.section-contact .section-intro {
  margin-left: auto;
  margin-right: auto;
}
.contact-layout {
  max-width: 920px;
  margin: 0 auto;
}
.contact-card {
  padding: 2.2rem;
  background: var(--bg-card);
  border: 1px solid rgba(44, 36, 25, 0.1);
  box-shadow: 0 8px 24px rgba(44, 36, 25, 0.05);
}
.contact-form {
  display: block;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.form-group { margin-bottom: 1.25rem; }
.form-group label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 0.4rem;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.92rem 1rem;
  font-size: 1rem;
  border: 1px solid rgba(44, 36, 25, 0.12);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-status {
  font-size: 0.92rem;
  color: var(--text-muted);
}
.form-status {
  min-height: 1.5rem;
  margin-top: 0.9rem;
}
.form-status.is-success { color: var(--success); }
.form-status.is-error { color: #92400e; }
.btn-full { width: 100%; }

.section-contact .btn-primary {
  min-height: 56px;
  font-size: 1.02rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.75);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.footer-logo {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 600;
  color: white;
  margin-bottom: 0.35rem;
}
.footer-tagline {
  font-size: 0.94rem;
  margin-bottom: 1rem;
}
.footer-copy {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ===== Animaciones ===== */
[data-animate] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
[data-animate].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .hero {
    text-align: center;
    min-height: auto;
    overflow: hidden;
    padding: 4rem 1.5rem 3rem;
  }
  .hero-inner { max-width: none; }
  .hero-badges,
  .hero-actions,
  .hero-stats { justify-content: center; }
  .hero-subtitle {
    margin-left: auto;
    margin-right: auto;
  }
  .hero-shape {
    position: absolute;
    width: 260px;
    top: 1rem;
    right: -5rem;
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.18;
    z-index: 1;
  }
  .hero-shape svg { animation: shapeFloatMobile 11s ease-in-out infinite; }
  .about-layout,
  .spec-bento,
  .methodology-flow,
  .form-row {
    grid-template-columns: 1fr;
  }
  .faq-layout {
    grid-template-columns: 1fr 1fr;
  }
  .spec-item-lg,
  .spec-item-wide {
    grid-row: span 1;
    grid-column: span 1;
  }
  .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 98;
    background: rgba(28, 23, 18, 0.35);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s var(--ease);
  }
  .nav-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links {
    align-items: stretch;
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: var(--bg);
    flex-direction: column;
    padding: 5rem 2rem 2rem;
    gap: 1.5rem;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.08);
    transition: right 0.3s var(--ease);
    z-index: 99;
  }
  .nav-links.active { right: 0; }
  .nav-links a {
    min-height: 44px;
    display: flex;
    align-items: center;
    font-size: 1rem;
  }
  .nav-toggle {
    display: flex;
    z-index: 101;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
  }
  .nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }
  .nav-toggle.active span:nth-child(2) { opacity: 0; }
  .nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }
}

@media (max-width: 600px) {
  body { font-size: 1rem; }
  .container { padding: 0 1rem; }
  .nav { padding: 0.75rem 1rem; }
  .section { padding: 3.25rem 0; }
  #nosotros,
  .section-contact { padding-top: 4rem; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: 1.8rem; }
  .section-intro,
  .hero-subtitle,
  .cta-text { font-size: 1rem; }
  .hero {
    padding: 3rem 1rem 2.5rem;
  }
  .hero-title { font-size: clamp(2rem, 8vw, 2.7rem); }
  .hero-stats { font-size: 0.9rem; }
  .hero-shape {
    width: 220px;
    top: 0.75rem;
    right: -5.5rem;
  }
  .faq-layout {
    grid-template-columns: 1fr;
  }
  .about-card,
  .spec-item,
  .method-card,
  .testimonial-card,
  .contact-card { padding: 1.25rem; }
  .faq-item { padding-top: 0.9rem; }
  .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [data-animate] {
    opacity: 1;
    transform: none;
  }
  .hero-shape,
  .hero-shape svg { animation: none; }
}
