/* ===== Custom Properties ===== */
:root {
  --color-cream: #FDF6EC;
  --color-warm-white: #FFFDF8;
  --color-espresso: #2C1810;
  --color-mocha: #5C3D2E;
  --color-caramel: #C8956C;
  --color-latte: #E8D5C0;
  --color-dark-roast: #1A0F0A;
  --color-accent-gold: #D4A04A;
  --wa-green-dark: #075e54;
  --wa-bg: #e5ddd5;
  --wa-bubble-user: #d9fdd3;
  --wa-bubble-bot: #fff;
  --wa-time: #667781;
  --wa-time-user: #3a7a4a;
  --wa-send: #00a884;
  --wa-input-bg: #f0f0f0;
  --wa-input-text: #8696a0;
  --wa-date-bg: #e1d8ca;
  --wa-date-text: #54656f;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-espresso);
  background: var(--color-cream);
}

h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  line-height: 1.2;
}

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

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

ul {
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--color-caramel);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-espresso);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px;
  z-index: 200;
  font-size: 0.9rem;
}
.skip-link:focus {
  top: 0;
}

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

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  background: var(--color-caramel);
  color: #fff;
  border: 2px solid var(--color-caramel);
  border-radius: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}

.btn:hover {
  background: var(--color-accent-gold);
  border-color: var(--color-accent-gold);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--color-caramel);
}

.btn-outline:hover {
  background: var(--color-caramel);
  color: #fff;
}

.btn-small {
  padding: 0.5rem 1.25rem;
  font-size: 0.9rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ===== Navigation ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 246, 236, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--color-latte);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-espresso);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-espresso);
  transition: transform 0.3s, opacity 0.3s;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

.nav-menu {
  display: none;
  position: absolute;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-latte);
  padding: 1rem 1.25rem;
  flex-direction: column;
  gap: 1rem;
}

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

.nav-menu a {
  font-weight: 500;
  font-size: 1rem;
  color: var(--color-mocha);
  transition: color 0.2s;
}

.nav-menu a:hover {
  color: var(--color-caramel);
}

/* ===== Sections ===== */
.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--color-warm-white);
}

#integraciones {
  padding-bottom: 1rem;
}

#como-funciona {
  padding-top: 1rem;
}

.section-dark {
  background: var(--color-dark-roast);
  color: var(--color-cream);
}

.section-title {
  font-size: 1.75rem;
  text-align: center;
  margin-bottom: 1rem;
}

.section-sub {
  text-align: center;
  color: var(--color-mocha);
  margin-bottom: 2.5rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Hero ===== */
.hero {
  padding-top: 7rem;
  padding-bottom: 3rem;
  background: var(--color-cream);
}

.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2rem;
  text-align: center;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: var(--color-espresso);
}

.hero-sub {
  font-size: 1.05rem;
  color: var(--color-mocha);
  margin-bottom: 1.5rem;
  max-width: 500px;
}

.hero-note {
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--color-mocha);
}

.hero-demo {
  width: 100%;
  max-width: 420px;
}

.mascot-float {
  animation: float 3s ease-in-out infinite;
  border-radius: 16px;
}

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

/* ===== Problem / Solution ===== */
.problem-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin-top: 2rem;
}

.problem-card, .solution-card {
  padding: 2rem;
  border-radius: 12px;
}

.problem-card {
  background: #fff5f5;
  border-left: 4px solid #c0392b;
}

.solution-card {
  background: #f0faf0;
  border-left: 4px solid #27ae60;
}

.problem-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.problem-card h3, .solution-card h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
}

.problem-card li, .solution-card li {
  padding: 0.4rem 0;
  padding-left: 1.25rem;
  position: relative;
  font-size: 0.95rem;
}

.problem-card li::before {
  content: "\2717";
  position: absolute;
  left: 0;
  color: #c0392b;
}

.solution-card li::before {
  content: "\2714";
  position: absolute;
  left: 0;
  color: #27ae60;
}

/* ===== Features ===== */
.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-latte);
  border-radius: 12px;
  padding: 1.75rem;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44, 24, 16, 0.08);
}

.feature-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.feature-card p {
  color: var(--color-mocha);
  font-size: 0.95rem;
}

/* ===== Integrations ===== */
.integrations-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: 2rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.integration-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 0.75rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid var(--color-latte);
  min-height: 64px;
  position: relative;
}

.integration-badge {
  font-size: 0.65rem;
  color: var(--color-espresso);
  opacity: 0.55;
  margin-top: 0.35rem;
  font-weight: 500;
}

.integration-logo img {
  max-height: 32px;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transition: transform 0.2s;
}

.integration-logo:hover {
  border-color: var(--color-caramel);
}

.integration-logo:hover img {
  transform: scale(1.08);
}

/* ===== How It Works ===== */
.steps {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-top: 2rem;
}

.step {
  text-align: center;
  max-width: 320px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-caramel);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}

.step h3 {
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.step p {
  color: var(--color-mocha);
  font-size: 0.95rem;
}

.step-line {
  width: 2px;
  height: 32px;
  background: var(--color-latte);
}

/* ===== WhatsApp Chat Mock ===== */
.chat-window {
  width: 100%;
  max-width: 420px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(0, 0, 0, 0.1);
  text-align: left;
}

.chat-header {
  background: var(--wa-green-dark);
  color: #fff;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chat-header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-back {
  font-size: 1.2rem;
  opacity: 0.9;
}

.chat-header-icons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.chat-icon {
  font-size: 1.1rem;
  opacity: 0.9;
  cursor: pointer;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--color-caramel);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
}

.chat-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.chat-status {
  font-size: 0.72rem;
  opacity: 0.8;
}

.chat-body {
  background-color: var(--wa-bg);
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23c8b89a' fill-opacity='0.15'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-height: 0;
}

.chat-date {
  text-align: center;
  margin: 0.25rem 0 0.5rem;
}

.chat-date span {
  background: var(--wa-date-bg);
  color: var(--wa-date-text);
  font-size: 0.72rem;
  padding: 0.3rem 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.chat-bubble {
  max-width: 85%;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.chat-time {
  font-size: 0.65rem;
  color: var(--wa-time);
  text-align: right;
  margin-top: 0.2rem;
}

.chat-time-user {
  color: var(--wa-time-user);
}

.chat-user {
  align-self: flex-end;
  background: var(--wa-bubble-user);
  border-bottom-right-radius: 2px;
}

.chat-bot {
  align-self: flex-start;
  background: var(--wa-bubble-bot);
  border-bottom-left-radius: 2px;
}

.chat-input-bar {
  background: var(--wa-input-bg);
  padding: 0.4rem 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-input-field {
  flex: 1;
  background: #fff;
  border-radius: 20px;
  padding: 0.5rem 0.85rem;
  font-size: 0.85rem;
  color: var(--wa-input-text);
}

.chat-input-icon {
  font-size: 1.2rem;
  opacity: 0.6;
  cursor: pointer;
}

.chat-send-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wa-send);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
}

/* Chat animation */
[data-chat-step] {
  opacity: 0;
  filter: blur(8px);
  transform: translateY(8px);
}

[data-chat-step].chat-visible {
  animation: fadeInSharp 0.45s ease-out forwards;
}

@keyframes fadeInSharp {
  0% {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(8px);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

.chat-typing {
  align-self: flex-start;
  background: var(--wa-bubble-bot);
  border-radius: 8px;
  border-bottom-left-radius: 2px;
  padding: 0.65rem 0.85rem;
  display: flex;
  gap: 0.25rem;
  align-items: center;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8696a0;
  animation: typing-dot 1.4s infinite;
}

.chat-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chat-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing-dot {
  0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

/* ===== Pricing ===== */
.pricing-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2rem;
}

.pricing-card {
  background: var(--color-warm-white);
  border: 1px solid var(--color-latte);
  border-radius: 16px;
  padding: 2rem;
  width: 100%;
  max-width: 360px;
  text-align: center;
  position: relative;
}

.pricing-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.price {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-espresso);
  margin-bottom: 0.25rem;
}

.price span {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-mocha);
}

.price-tagline {
  color: var(--color-mocha);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.pricing-card ul {
  text-align: left;
  margin-bottom: 1.5rem;
}

.pricing-card li {
  padding: 0.4rem 0;
  font-size: 0.9rem;
  color: var(--color-mocha);
  border-bottom: 1px solid var(--color-latte);
}

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

/* ===== FAQ ===== */
.faq-list {
  max-width: 700px;
  margin: 2rem auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--color-latte);
}

.faq-item summary {
  padding: 1.15rem 0;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  color: var(--color-espresso);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--color-caramel);
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  padding: 0 0 1.15rem;
  color: var(--color-mocha);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ===== Waitlist ===== */
.waitlist-container {
  text-align: center;
  padding: 2rem 1.5rem;
}

.waitlist-mascot {
  width: 180px;
  margin: 0 auto 1.5rem;
  border-radius: 12px;
}

.section-dark h2 {
  font-size: 1.75rem;
  margin-bottom: 0.75rem;
}

.section-dark p {
  color: var(--color-latte);
  margin-bottom: 1.5rem;
}

.waitlist-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  margin: 0 auto;
}

.waitlist-form label {
  color: var(--color-cream);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: -0.25rem;
  text-align: left;
}

.waitlist-form input[type="email"],
.waitlist-form input[type="tel"],
.waitlist-form input[type="text"] {
  padding: 0.85rem 1rem;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color 0.3s;
  width: 100%;
}

.waitlist-form input[type="email"]::placeholder,
.waitlist-form input[type="tel"]::placeholder,
.waitlist-form input[type="text"]::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.waitlist-form input[type="email"]:focus,
.waitlist-form input[type="tel"]:focus,
.waitlist-form input[type="text"]:focus {
  border-color: var(--color-caramel);
}

.waitlist-success {
  font-size: 1.15rem;
  color: var(--color-cream);
  padding: 1rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--color-dark-roast);
  color: var(--color-latte);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-brand .nav-logo {
  color: var(--color-cream);
  margin-bottom: 0.5rem;
  display: block;
}

.footer-brand p {
  font-size: 0.9rem;
  color: var(--color-latte);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-links a {
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--color-caramel);
}

.footer-contact {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social a {
  transition: color 0.2s;
}

.footer-social a:hover {
  color: var(--color-caramel);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.8rem;
}

/* ===== Legal Pages ===== */
.nav-menu-legal {
  display: flex;
  position: static;
  flex-direction: row;
  background: none;
  border: none;
  padding: 0;
}

.legal-content {
  padding-top: 7rem;
  padding-bottom: 4rem;
  background: var(--color-cream);
}

.legal-content .container {
  max-width: 800px;
}

.legal-content h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
  color: var(--color-espresso);
}

.legal-updated {
  font-size: 0.9rem;
  color: var(--color-mocha);
  margin-bottom: 2.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--color-latte);
}

.legal-content h2 {
  font-size: 1.35rem;
  color: var(--color-espresso);
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1.1rem;
  color: var(--color-mocha);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  margin-bottom: 1rem;
  color: var(--color-mocha);
  font-size: 0.95rem;
  line-height: 1.7;
}

.legal-content ul,
.legal-content ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  list-style: disc;
}

.legal-content ol {
  list-style: decimal;
}

.legal-content li {
  margin-bottom: 0.4rem;
  color: var(--color-mocha);
  font-size: 0.95rem;
  line-height: 1.6;
}

.legal-content a {
  color: var(--color-caramel);
  text-decoration: underline;
  transition: color 0.2s;
}

.legal-content a:hover {
  color: var(--color-accent-gold);
}

/* ===== Tablet (768px+) ===== */
@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }

  .nav-menu {
    display: flex;
    position: static;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    background: none;
    border: none;
    padding: 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .problem-grid {
    flex-direction: row;
  }

  .problem-card, .solution-card {
    flex: 1;
  }

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

  .integrations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
  }

  .integration-logo img {
    max-height: 36px;
  }

  .steps {
    flex-direction: row;
    justify-content: center;
    align-items: flex-start;
    gap: 0;
  }

  .step-line {
    width: 60px;
    height: 2px;
    margin-top: 24px;
  }

  .pricing-grid {
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
  }

  .pricing-card {
    flex: 1;
    max-width: 320px;
  }

  .waitlist-form {
    flex-direction: column;
  }

  .footer-grid {
    flex-direction: row;
    justify-content: space-between;
  }

  .footer-links {
    flex-direction: row;
    gap: 1.5rem;
  }

  .legal-content h1 {
    font-size: 2.5rem;
  }
}

/* ===== Desktop (1024px+) ===== */
@media (min-width: 1024px) {
  .hero-grid {
    flex-direction: row;
    text-align: left;
  }

  .hero-text {
    flex: 1;
  }

  .hero-text h1 {
    font-size: 3rem;
  }

  .hero-demo {
    flex: 0 0 420px;
  }

  .section {
    padding: 5rem 0;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .integrations-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.5rem;
  }

  .integration-logo img {
    max-height: 40px;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .step {
    max-width: 280px;
  }

  .step-line {
    width: 80px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  [data-chat-step] {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
}
