/* ==========================================================================
   Manguito Studio — styles
   ========================================================================== */

:root {
  --cream: #FFF7EA;
  --white: #FFFFFF;
  --ink: #2B1A0E;
  --muted: #5E4636;
  --muted-2: #6B5444;
  --green: #1E5B3F;
  --green-dark: #123826;
  --on-green: #D6E8DD;
  --on-green-2: #CFE3D7;
  --mango: #F4A51C;
  --mango-dark: #B5620A;
  --peach: #FCE3C4;
  --peach-ink: #7A3E00;
  --line: #F0DCC0;
  --dash: #E7B977;

  --font-display: 'Bricolage Grotesque', 'Trebuchet MS', sans-serif;
  --font-body: 'Figtree', 'Segoe UI', system-ui, sans-serif;
}

/* ---- base ---- */
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
}
a { color: var(--green); }
a:not(.btn):hover { color: var(--green-dark); }
h1, h2, h3, p { margin: 0; text-wrap: pretty; }
img { max-width: 100%; display: block; }

.container { max-width: 1200px; margin: 0 auto; }
.section { padding: 96px 32px; }
.section--white { background: var(--white); }
.section--green { background: var(--green); color: var(--white); }

.h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 48px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.h2--sm { font-size: 36px; line-height: 1.1; letter-spacing: 0; }
.muted { color: var(--muted); }

.pill {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--peach);
  font-weight: 600;
  font-size: 15px;
  color: var(--peach-ink);
}
.badge {
  align-self: flex-start;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 700;
}

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.btn--lg { gap: 10px; min-height: 56px; padding: 0 28px; font-size: 18px; }
.btn--nav { min-height: 44px; padding: 0 20px; font-weight: 600; }
.btn--green { background: var(--green); color: var(--white); }
.btn--ink { background: var(--ink); color: var(--cream); }
.btn--outline { border: 2px solid var(--green); color: var(--green); }
.btn--mango { background: var(--mango); color: var(--ink); box-shadow: 0 6px 0 var(--mango-dark); }

/* ---- header ---- */
.site-header {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
a.brand:hover { color: var(--ink); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.brand-sub { font-weight: 700; font-size: 11px; letter-spacing: 0.32em; color: var(--green); margin-top: 3px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-weight: 600; font-size: 16px; }
.nav-link { color: var(--ink); text-decoration: none; }

/* ---- hero ---- */
.hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 32px 96px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(460px, 100%), 1fr));
  gap: 64px;
  align-items: center;
}
.hero-copy { display: flex; flex-direction: column; gap: 28px; }
.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 68px;
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero-title .accent { color: var(--mango-dark); }
.lead { font-size: 21px; color: var(--muted); max-width: 34ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.hero-note { font-size: 15px; color: var(--muted-2); }

/* ---- chat illustration ---- */
.chat {
  position: relative;
  border-radius: 28px;
  background: var(--green);
  box-shadow: 0 30px 60px -24px rgba(30, 91, 63, .55);
  font-size: 15.5px;
  line-height: 1.45;
}
.chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 22px;
  color: var(--white);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
}
.chat-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--mango);
  color: var(--ink);
  font: 800 18px var(--font-display);
  display: grid;
  place-items: center;
}
.chat-id { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-id strong { font-weight: 700; font-size: 16px; }
.chat-id span { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--on-green-2); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #7EE2A8; box-shadow: 0 0 0 3px rgba(126, 226, 168, .22); flex-shrink: 0; }
.chat-body {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px 20px 20px;
  background: #184D35;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 18px 18px;
}
.chat-day {
  align-self: center;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--on-green-2);
  font-size: 12px;
  font-weight: 600;
}
.chat .msg {
  position: relative;
  max-width: 82%;
  padding: 10px 14px 7px;
  border-radius: 16px;
  color: var(--ink);
  box-shadow: 0 1px 1.5px rgba(0, 0, 0, .18);
}
.chat .msg.in { align-self: flex-start; background: var(--white); border-top-left-radius: 4px; }
.chat .msg.out { align-self: flex-end; background: var(--peach); border-top-right-radius: 4px; }
.chat .meta { display: flex; justify-content: flex-end; align-items: center; gap: 4px; margin-top: 3px; font-size: 11px; color: #8A7362; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.chip {
  padding: 5px 12px;
  border: 1.5px solid var(--green);
  border-radius: 999px;
  color: var(--green);
  font-size: 14px;
  font-weight: 600;
  transition: background .25s, color .25s, transform .25s;
}
.chip.picked { background: var(--green); color: var(--white); transform: scale(1.04); }
.chat .confirm { min-width: 240px; padding: 12px 14px 7px; }
.confirm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; color: var(--green); font-weight: 700; }
.confirm-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); }
.confirm-foot { padding-top: 6px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted-2); }
.chat-input {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 16px 16px;
  padding: 8px 8px 8px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: var(--on-green-2);
  font-size: 14px;
}
.chat-input span:first-child { flex: 1; }
.send {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--mango);
  color: var(--ink);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sticker {
  position: absolute;
  right: -18px;
  bottom: -22px;
  padding: 10px 16px;
  border-radius: 14px;
  background: var(--mango);
  color: var(--ink);
  font-weight: 700;
  font-size: 15px;
  transform: rotate(-3deg);
  box-shadow: 0 8px 18px -8px rgba(43, 26, 14, .45);
}
.typing {
  position: absolute;
  display: flex;
  gap: 5px;
  padding: 14px 16px;
  border-radius: 18px 18px 18px 4px;
  background: var(--white);
}
.chat .typing { box-shadow: 0 1px 1.5px rgba(0, 0, 0, .18); border-top-left-radius: 4px; }
.typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--muted-2); animation: dot 1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

/* ---- shared section layout ---- */
.section-body { display: flex; flex-direction: column; gap: 48px; }
.section-head { display: flex; flex-direction: column; gap: 14px; max-width: 720px; }

/* ---- servicios ---- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px; }
.service-card { padding: 28px; border-radius: 24px; background: var(--cream); display: flex; flex-direction: column; gap: 12px; }
.service-card h3 { font-family: var(--font-display); font-size: 24px; font-weight: 700; }
.service-card p { font-size: 16px; color: var(--muted); }
.cta-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 32px;
  border-radius: 24px;
  border: 2px dashed var(--dash);
}
.cta-strip p { font-family: var(--font-display); font-size: 24px; font-weight: 700; max-width: 40ch; }

/* ---- cómo funciona ---- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 40px; }
.step { display: flex; flex-direction: column; gap: 14px; }
.step-num { font-family: var(--font-display); font-size: 64px; font-weight: 800; line-height: 1; color: var(--mango-dark); }
.step h3 { font-family: var(--font-display); font-size: 26px; font-weight: 700; }
.step p { font-size: 17px; color: var(--muted); }

/* ---- planes ---- */
.section--green .section-head p { color: var(--on-green); }
.section--green .section-head strong { color: var(--white); }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 24px; align-items: stretch; }
.plan { padding: 32px; border-radius: 28px; background: var(--cream); color: var(--ink); display: flex; flex-direction: column; gap: 20px; }
.plan--featured { background: var(--mango); box-shadow: 0 10px 0 var(--mango-dark); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.plan h3 { font-family: var(--font-display); font-size: 28px; font-weight: 700; }
.plan-desc { font-size: 16px; color: var(--muted); }
.plan--featured .plan-desc { color: var(--ink); }
.price { font-family: var(--font-display); font-size: 40px; font-weight: 800; }
.price-currency { font-size: 22px; font-weight: 700; margin-right: 4px; }
.price-period { font-size: 17px; font-weight: 500; color: var(--muted); }
.plan--featured .price-period { color: var(--ink); }
.plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 16px; }
.plan-features li::before { content: "✓ "; }
.plan .btn { margin-top: auto; }
.plans-note { font-size: 14px; color: var(--on-green); }

/* ---- quién está detrás ---- */
.about {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr));
  gap: 56px;
  align-items: center;
}
.profile-card {
  max-width: 440px;
  width: 100%;
  box-sizing: border-box;
  padding: 32px;
  border-radius: 32px;
  background: var(--peach);
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.profile-top { display: flex; align-items: center; gap: 20px; }
.profile-avatar {
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 28px;
  background: var(--cream);
  box-shadow: 0 6px 0 var(--dash);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar img { width: 96px; height: 96px; }
.profile-id { display: flex; flex-direction: column; gap: 4px; }
.profile-name { font-family: var(--font-display); font-weight: 800; font-size: 28px; line-height: 1.1; letter-spacing: -0.02em; }
.profile-role { font-size: 15px; font-weight: 600; color: var(--peach-ink); }
.profile-facts { margin: 0; display: flex; flex-direction: column; gap: 12px; font-size: 16px; }
.profile-facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; padding-top: 12px; border-top: 1px solid var(--dash); }
.profile-facts dt { font-weight: 700; color: var(--peach-ink); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; padding-top: 2px; }
.profile-facts dd { margin: 0; }
.profile-note { font-size: 15px; color: var(--peach-ink); padding: 14px 16px; border-radius: 16px; background: var(--cream); }
.about-copy { display: flex; flex-direction: column; gap: 20px; }
.about-copy .btn { align-self: flex-start; }

/* ---- demo + faq ---- */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
  gap: 48px;
  align-items: start;
}
.demo-card { padding: 36px; border-radius: 28px; background: var(--peach); display: flex; flex-direction: column; gap: 16px; }
.faq { display: flex; flex-direction: column; gap: 24px; }
.faq-item { display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.faq-item:last-child { padding-bottom: 0; border-bottom: 0; }
.faq-item h3 { font-size: 19px; font-weight: 700; }
.faq-item p { font-size: 16px; color: var(--muted); }

/* ---- cta final ---- */
.final-cta {
  padding: 64px 48px;
  border-radius: 40px;
  background: var(--mango);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 24px;
}
.final-cta h2 { font-family: var(--font-display); font-weight: 800; font-size: 56px; line-height: 1.02; letter-spacing: -0.03em; max-width: 18ch; }
.final-cta p { font-size: 20px; max-width: 46ch; }

/* ---- footer ---- */
.site-footer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
  font-size: 15px;
  color: var(--muted-2);
  border-top: 1px solid var(--line);
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---- legal pages ---- */
.legal-page { padding: 64px 32px; }
.legal-content { max-width: 760px; margin: 0 auto; }
.legal-content h1 { font-family: var(--font-display); font-weight: 800; font-size: 48px; line-height: 1.05; letter-spacing: -0.02em; margin-bottom: 12px; }
.legal-meta { font-size: 15px; color: var(--muted-2); margin-bottom: 40px; }
.legal-content h2 { font-family: var(--font-display); font-weight: 700; font-size: 22px; margin: 32px 0 10px; color: var(--ink); }
.legal-content p { font-size: 16px; color: var(--muted); line-height: 1.7; margin-bottom: 12px; }
.legal-content ul, .legal-content ol { padding-left: 20px; margin-bottom: 12px; }
.legal-content li { font-size: 16px; color: var(--muted); line-height: 1.7; margin-bottom: 4px; }
.legal-content strong { color: var(--ink); }
.legal-content a { word-break: break-word; }
.legal-table { width: 100%; border-collapse: collapse; margin-bottom: 16px; font-size: 15px; }
.legal-table th { text-align: left; padding: 8px 12px; background: var(--peach); color: var(--peach-ink); font-weight: 700; border-bottom: 2px solid var(--dash); }
.legal-table td { padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.legal-table tr:last-child td { border-bottom: 0; }

/* ---- responsive ---- */
@media (max-width: 640px) {
  .hero-title { font-size: 44px; }
  .h2, .final-cta h2 { font-size: 34px; }
  .profile-top { flex-direction: column; align-items: flex-start; }
  .profile-facts div { grid-template-columns: 1fr; gap: 2px; }
  .chat { font-size: 14.5px; }
  .chat .sticker { right: -6px !important; }
  .chat .msg { max-width: 90%; }
  .footer-links { flex-direction: column; gap: 8px; }
  .legal-content h1 { font-size: 34px; }
  .legal-table { font-size: 13px; }
  .legal-table th, .legal-table td { padding: 6px 8px; }
}

/* ---- motion ---- */
@media (prefers-reduced-motion: no-preference) {
  .btn:hover { transform: translateY(-2px); }
  .btn:active { transform: translateY(2px); }
  .btn--mango:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--mango-dark); }
  .logo-mark { transition: transform .35s cubic-bezier(.34, 1.56, .64, 1); }
  a:hover > .logo-mark { transform: rotate(-10deg); }
  .logo-mark .eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
  @keyframes blink { 0%, 93%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }

  .js .chat .msg, .js .chat .sticker { opacity: 0; }
  .js .chat .msg.in, .js .chat .msg.out { transform: translateY(8px); }
  .chat .msg.show { animation: msgIn .35s ease-out forwards; }
  .chat .sticker.show { animation: pop .55s cubic-bezier(.34, 1.56, .64, 1) forwards; }
  @keyframes msgIn { to { opacity: 1; transform: none; } }
  @keyframes pop { 0% { opacity: 0; transform: rotate(-3deg) scale(.6); } 100% { opacity: 1; transform: rotate(-3deg) scale(1); } }

  .js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .5s ease-out, transform .5s ease-out; }
  .js .reveal.in { opacity: 1; transform: none; }
  .js .stagger > * { opacity: 0; transform: translateY(16px); transition: opacity .45s ease-out calc(var(--i, 0) * 90ms), transform .45s ease-out calc(var(--i, 0) * 90ms); }
  .js .reveal.in .stagger > * { opacity: 1; transform: none; }
}
