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

:root {
  /* Aulixa "tierra + brillo" — paleta cálida de la marca */
  --bg: #f8efd8;            /* papel crema */
  --bg-2: #f1e5c8;          /* crema desplazado */
  --surface: #ffffff;
  --surface-soft: #fdf6e3;

  --mostaza: #e4a82c;       /* CTA primaria */
  --mostaza-dark: #c98f1e;
  --coral: #e2553a;         /* acento secundario */
  --coral-dark: #c8442c;
  --musgo: #6b8e4e;         /* éxito / terciario */
  --terracota: #c86b3c;     /* zorro */

  --ink: #2a1f14;           /* texto principal */
  --ink-2: #6b5743;         /* texto secundario */
  --ink-3: #8e7e69;         /* texto terciario */
  --on-dark: #fdf6e3;

  --border: rgba(42, 31, 20, 0.10);
  --border-soft: rgba(42, 31, 20, 0.06);
  --shadow-sm: 0 4px 14px rgba(42, 31, 20, 0.06);
  --shadow-md: 0 14px 32px rgba(42, 31, 20, 0.08);
  --shadow-lg: 0 22px 50px rgba(200, 107, 60, 0.16);

  --nav-height: 68px;
  --section-padding: 120px 0;
  --max-width: 1140px;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  font-family: var(--font-body);
  background:
    radial-gradient(1100px 620px at 78% -8%, rgba(228, 168, 44, 0.16), transparent 60%),
    radial-gradient(900px 600px at 8% 4%, rgba(226, 85, 58, 0.08), transparent 55%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  position: relative;
}

/* Grano de papel sutil sobre todo el lienzo */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.05'/%3E%3C/svg%3E");
}

body > * { position: relative; z-index: 1; }

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

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  letter-spacing: -0.01em;
}

/* === Nav === */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s, border-color 0.3s;
}

#nav.scrolled {
  background: rgba(248, 239, 216, 0.82);
  -webkit-backdrop-filter: saturate(140%) blur(18px);
  backdrop-filter: saturate(140%) blur(18px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo-img {
  height: 40px;
  width: auto;
}

.nav-logo-word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--ink);
  letter-spacing: -0.015em;
}

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

.nav-link {
  color: var(--ink-2);
  font-size: 14.5px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: 10px;
  transition: color 0.2s, background 0.2s;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(42, 31, 20, 0.05);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta {
  background: var(--mostaza);
  color: var(--ink);
  padding: 9px 22px;
  border-radius: 999px;
  font-size: 14.5px;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(228, 168, 44, 0.32);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.nav-cta:hover {
  background: var(--mostaza-dark);
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(228, 168, 44, 0.4);
}

.nav-hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--ink);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
}

/* === Hero === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 56px) 24px 80px;
  gap: 56px;
  max-width: 1300px;
  margin: 0 auto;
}

.hero-content {
  flex: 1;
  max-width: 580px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  margin-bottom: 22px;
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
}

.hero-badge::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--musgo);
}

.hero-content h1 {
  font-size: clamp(40px, 6vw, 60px);
  font-weight: 600;
  line-height: 1.05;
  margin-bottom: 14px;
}

.hero-content h1 span {
  color: var(--coral);
  position: relative;
  white-space: nowrap;
}

.hero-content h1 span::after {
  content: '';
  position: absolute;
  left: 2%;
  right: 2%;
  bottom: 0.06em;
  height: 0.16em;
  background: var(--mostaza);
  border-radius: 999px;
  opacity: 0.55;
  z-index: -1;
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(19px, 2.4vw, 23px);
  color: var(--terracota);
  font-weight: 500;
  margin-bottom: 20px;
}

.hero-desc {
  font-size: 17px;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 14px;
}

.hero-mission {
  font-size: 16px;
  color: var(--musgo);
  font-weight: 600;
  margin-bottom: 32px;
}

.hero-buttons {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--mostaza);
  color: var(--ink);
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(228, 168, 44, 0.32);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
  background: var(--mostaza-dark);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(228, 168, 44, 0.42);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  padding: 15px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: background 0.2s, transform 0.2s, border-color 0.2s;
}

.btn-secondary:hover {
  background: var(--surface-soft);
  border-color: var(--coral);
  transform: translateY(-2px);
}

.hero-image {
  flex: 1;
  max-width: 460px;
  display: flex;
  justify-content: center;
}

.hero-logo-frame {
  position: relative;
  width: 360px;
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-logo-frame::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228, 168, 44, 0.34) 0%, rgba(228, 168, 44, 0.06) 55%, transparent 72%);
  animation: logoGlow 5s ease-in-out infinite;
}

/* Destellos como los de la mascota */
.hero-logo-frame::after {
  content: '';
  position: absolute;
  inset: -6%;
  background-image:
    radial-gradient(circle, var(--mostaza) 50%, transparent 52%),
    radial-gradient(circle, var(--coral) 50%, transparent 52%),
    radial-gradient(circle, var(--musgo) 50%, transparent 52%);
  background-size: 12px 12px, 11px 11px, 10px 10px;
  background-repeat: no-repeat;
  background-position: 6% 22%, 92% 16%, 88% 80%;
  opacity: 0.85;
  animation: sparkle 4.5s ease-in-out infinite;
}

.hero-logo-frame img {
  width: 330px;
  height: auto;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 18px 30px rgba(42, 31, 20, 0.16));
  animation: heroFloat 6s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.04); }
}

@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes sparkle {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.95; }
}

/* === Sections Common === */
.section {
  padding: var(--section-padding);
}

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  text-align: center;
}

.section-tag {
  display: inline-block;
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  margin-bottom: 14px;
}

.section-inner h2 {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 20px;
}

.section-desc {
  font-size: 17px;
  color: var(--ink-2);
  max-width: 680px;
  margin: 0 auto 48px;
  line-height: 1.75;
}

/* === About Section === */
.about-content {
  max-width: 820px;
  margin: 0 auto;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 40px 44px;
  box-shadow: var(--shadow-md);
}

.about-text {
  font-size: 16.5px;
  color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 16px;
}

.about-text:last-child { margin-bottom: 0; }

/* === Features Grid === */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 38px 30px;
  text-align: left;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  border-radius: 18px;
  margin-bottom: 20px;
  background: var(--bg);
  border: 1px solid var(--border-soft);
}

.feature-card:nth-child(1) .feature-icon { background: rgba(228, 168, 44, 0.16); }
.feature-card:nth-child(2) .feature-icon { background: rgba(226, 85, 58, 0.14); }
.feature-card:nth-child(3) .feature-icon { background: rgba(107, 142, 78, 0.16); }

.feature-card h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
}

.feature-card p {
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* === Crintech Section === */
.crintech-block {
  display: flex;
  align-items: center;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 24px;
  padding: 40px 44px;
  box-shadow: var(--shadow-md);
}

.crintech-logo {
  flex-shrink: 0;
  width: 150px;
  height: 150px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.crintech-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.crintech-info h3 {
  font-size: 25px;
  font-weight: 600;
  margin-bottom: 12px;
}

.crintech-info p {
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.75;
  margin-bottom: 20px;
}

.crintech-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--coral);
  font-size: 15px;
  font-weight: 600;
  transition: gap 0.2s;
}

.crintech-link:hover {
  gap: 11px;
}

/* === Process Steps === */
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.process-step {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: 22px;
  padding: 34px 24px;
  text-align: center;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s, box-shadow 0.3s;
}

.process-step:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.step-num {
  width: 52px;
  height: 52px;
  background: var(--mostaza);
  color: var(--ink);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  margin: 0 auto 18px;
  box-shadow: 0 8px 18px rgba(228, 168, 44, 0.3);
}

.process-step:nth-child(2) .step-num { background: var(--coral); color: var(--on-dark); box-shadow: 0 8px 18px rgba(226, 85, 58, 0.3); }
.process-step:nth-child(3) .step-num { background: var(--musgo); color: var(--on-dark); box-shadow: 0 8px 18px rgba(107, 142, 78, 0.3); }
.process-step:nth-child(4) .step-num { background: var(--terracota); color: var(--on-dark); box-shadow: 0 8px 18px rgba(200, 107, 60, 0.3); }

.process-step h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}

.process-step p {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.65;
}

/* === Community / Social === */
.social-grid {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s, box-shadow 0.2s, color 0.2s, border-color 0.2s;
}

.social-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.social-btn.facebook:hover { color: #1877f2; border-color: #1877f2; }
.social-btn.twitter:hover { color: #111; border-color: #111; }
.social-btn.tiktok:hover { color: var(--coral); border-color: var(--coral); }

/* === Footer === */
.footer {
  border-top: 1px solid var(--border-soft);
  padding: 44px 24px;
  background: rgba(253, 246, 227, 0.5);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-link {
  font-size: 14px;
  color: var(--ink-2);
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--coral);
}

.footer-copy {
  font-size: 14px;
  color: var(--ink-3);
}

.footer-copy a {
  color: var(--coral);
  font-weight: 600;
  transition: opacity 0.2s;
}

.footer-copy a:hover {
  opacity: 0.8;
}

/* === Scroll Animations === */
.anim-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.anim-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.features-grid .feature-card:nth-child(2) { transition-delay: 0.1s; }
.features-grid .feature-card:nth-child(3) { transition-delay: 0.2s; }
.process-grid .process-step:nth-child(2) { transition-delay: 0.1s; }
.process-grid .process-step:nth-child(3) { transition-delay: 0.2s; }
.process-grid .process-step:nth-child(4) { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  .anim-up { opacity: 1; transform: none; transition: none; }
  .hero-logo-frame img,
  .hero-logo-frame::before,
  .hero-logo-frame::after { animation: none; }
  html { scroll-behavior: auto; }
}

/* === Legal Pages === */
.legal-page {
  max-width: 820px;
  margin: 0 auto;
  padding: calc(var(--nav-height) + 48px) 24px 80px;
}

.legal-page h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 600;
  margin-bottom: 8px;
}

.legal-updated {
  font-size: 14px;
  color: var(--ink-3);
  margin-bottom: 36px;
}

.legal-page h2 {
  font-size: 21px;
  font-weight: 600;
  margin-top: 34px;
  margin-bottom: 12px;
  color: var(--ink);
}

.legal-page p,
.legal-page li {
  font-size: 15.5px;
  color: var(--ink-2);
  line-height: 1.85;
  margin-bottom: 12px;
}

.legal-page ul {
  padding-left: 24px;
  margin-bottom: 16px;
}

.legal-page strong {
  color: var(--ink);
}

.legal-page a {
  color: var(--coral);
  font-weight: 500;
  transition: opacity 0.2s;
}

.legal-page a:hover {
  opacity: 0.8;
}

.legal-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 40px;
  color: var(--coral);
  font-weight: 600;
  font-size: 15px;
  transition: gap 0.2s;
}

.legal-back:hover {
  gap: 11px;
}

/* === Responsive === */
@media (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --section-padding: 80px 0;
  }

  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: calc(var(--nav-height) + 36px);
    gap: 28px;
    min-height: auto;
    padding-bottom: 60px;
  }

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

  .hero-badge { margin-bottom: 16px; }

  .hero-buttons {
    justify-content: center;
  }

  .hero-image {
    max-width: 280px;
    margin: 0 auto;
    order: -1;
  }

  .hero-logo-frame {
    width: 260px;
    height: 260px;
  }

  .hero-logo-frame img {
    width: 240px;
  }

  .nav-center {
    display: none;
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: rgba(248, 239, 216, 0.97);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border-soft);
    box-shadow: var(--shadow-md);
  }

  .nav-center.open {
    display: flex;
  }

  .nav-hamburger {
    display: block;
  }

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

  .feature-card {
    text-align: center;
  }

  .feature-icon { margin-left: auto; margin-right: auto; }

  .crintech-block {
    flex-direction: column;
    text-align: center;
    padding: 36px 28px;
  }

  .about-content { padding: 32px 26px; }

  .crintech-info p {
    text-align: left;
  }

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

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 36px;
  }

  .hero-tagline {
    font-size: 18px;
  }

  .hero-desc {
    font-size: 15px;
  }

  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .btn-primary, .btn-secondary { width: 100%; justify-content: center; }

  .section-inner h2 {
    font-size: 27px;
  }

  .section-desc {
    font-size: 15px;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

/* === Descarga: App Store + Google Play === */
.hero-download {
  margin-bottom: 26px;
}

.hero-download-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--musgo);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}

.store-badges {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.store-badge {
  width: auto;
  filter: drop-shadow(0 6px 14px rgba(42, 31, 20, 0.12));
  transition: transform 0.2s, filter 0.2s;
}

.store-badge:hover {
  transform: translateY(-2px);
  filter: drop-shadow(0 10px 20px rgba(42, 31, 20, 0.2));
}

.badge-apple { height: 50px; }
.badge-google { height: 65px; }   /* el badge de Google trae padding (~23%); más alto para igualar el botón */

@media (max-width: 768px) {
  .store-badges { justify-content: center; }
  .hero-download-label { text-align: center; }
}

@media (max-width: 480px) {
  .badge-apple { height: 46px; }
  .badge-google { height: 60px; }
}
