/* =========================================================
   HumanDesk — Live Chat Agents, Not Bots
   Palette: rooted in the Spanish flag, refined for the web
   ========================================================= */

:root {
  --red: #C8102E;
  --red-dark: #7A0C1E;
  --yellow: #FFC72C;
  --yellow-soft: #FFE9A8;
  --ink: #201C1A;
  --ink-soft: #5B534C;
  --paper: #FFFBF2;
  --paper-alt: #FFF3D6;
  --line: rgba(32, 28, 26, 0.12);
  --white: #ffffff;
  --shadow: 0 20px 40px -20px rgba(122, 12, 30, 0.35);
  --radius: 14px;
  --maxw: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: "Fraunces", Georgia, serif;
  color: var(--ink);
  line-height: 1.08;
  margin: 0 0 0.5em;
  font-weight: 600;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; color: var(--ink-soft); }

a { color: inherit; }

img, svg { display: block; max-width: 100%; }

.eyebrow {
  font-family: "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: 0.9em;
}

.eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  background: var(--yellow);
  display: inline-block;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 28px;
}

.flag-bar {
  height: 6px;
  width: 100%;
  background: linear-gradient(90deg, var(--red) 0 20%, var(--yellow) 20% 80%, var(--red) 80% 100%);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.85em 1.6em;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.btn-primary {
  background: var(--red);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--red-dark); }

.btn-ghost {
  background: transparent;
  border-color: var(--ink);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--ink); color: var(--white); }

.btn-block { width: 100%; }

/* ---------- Header ---------- */
header.site {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 251, 242, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
}

.logo {
  font-family: "Fraunces", serif;
  font-weight: 700;
  font-size: 1.35rem;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); border: 2px solid var(--yellow); }

.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  text-decoration: none;
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-soft);
}
.nav-links a:hover { color: var(--red); }

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

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--ink);
  margin: 5px 0;
}

/* ---------- Hero ---------- */
.hero {
  padding: 84px 0 70px;
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.4rem);
}
.hero h1 em {
  font-style: normal;
  color: var(--red);
  position: relative;
}
.hero-sub {
  font-size: 1.1rem;
  max-width: 46ch;
}
.hero-cta { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero-meta {
  margin-top: 26px;
  display: flex;
  gap: 24px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: var(--ink-soft);
}
.hero-meta span { display: flex; align-items: center; gap: 8px; }
.hero-meta .swatch { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }

/* Signature: chat transcript */
.transcript {
  background: var(--white);
  border-radius: 20px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.transcript::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
}
.transcript-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--line);
}
.transcript-head .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--paper-alt);
  display: flex; align-items: center; justify-content: center;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 700;
  color: var(--red-dark);
}
.transcript-head strong { display: block; font-size: 0.92rem; }
.transcript-head span { font-size: 0.75rem; color: var(--ink-soft); }
.online-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #2E9E4E;
  display: inline-block; margin-right: 5px;
}

.bubble {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  margin-bottom: 10px;
  line-height: 1.45;
}
.bubble.visitor {
  background: var(--paper-alt);
  border-bottom-left-radius: 4px;
}
.bubble.bot {
  background: transparent;
  border: 1.5px dashed var(--line);
  color: var(--ink-soft);
  margin-left: auto;
  border-bottom-right-radius: 4px;
  font-style: italic;
  position: relative;
}
.bubble.bot::after {
  content: "✕ scripted bot";
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-style: normal;
  font-size: 0.65rem;
  color: var(--red);
  margin-top: 4px;
  letter-spacing: 0.05em;
}
.bubble.agent {
  background: var(--red);
  color: var(--white);
  margin-left: auto;
  border-bottom-right-radius: 4px;
}
.bubble.agent strong { display: block; font-family: "IBM Plex Mono", monospace; font-size: 0.62rem; letter-spacing: 0.08em; opacity: 0.8; margin-bottom: 3px; text-transform: uppercase; }

/* ---------- Sections generic ---------- */
section { padding: 78px 0; }
.section-head {
  max-width: 640px;
  margin-bottom: 46px;
}
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.alt-bg { background: var(--paper-alt); }

/* ---------- Features ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.feature-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 24px;
}
.feature-card .icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--paper-alt);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  color: var(--red);
}
.feature-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.feature-card p { font-size: 0.92rem; margin: 0; }

/* ---------- How it works ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.step {
  position: relative;
  padding-top: 40px;
}
.step .num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  color: var(--red);
  border: 1.5px solid var(--red);
  border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  position: absolute;
  top: 0; left: 0;
  font-weight: 700;
}
.step h4 { font-size: 1rem; margin-bottom: 6px; }
.step p { font-size: 0.88rem; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: stretch;
}
.plan {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  position: relative;
}
.plan.featured {
  border-color: var(--red);
  box-shadow: var(--shadow);
  transform: translateY(-10px);
}
.plan-badge {
  position: absolute;
  top: -13px;
  left: 26px;
  background: var(--red);
  color: var(--white);
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}
.plan h3 { font-size: 1.15rem; margin-bottom: 4px; }
.plan .plan-desc { font-size: 0.85rem; margin-bottom: 18px; }
.plan .price {
  font-family: "Fraunces", serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 2px;
}
.plan .price span { font-family: "Inter", sans-serif; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); }
.plan .price-note { font-size: 0.78rem; color: var(--ink-soft); margin-bottom: 22px; }
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0 0 26px;
  flex-grow: 1;
}
.plan li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.9rem;
  padding: 7px 0;
  border-bottom: 1px dashed var(--line);
  color: var(--ink);
}
.plan li:last-child { border-bottom: none; }
.plan li svg { flex-shrink: 0; margin-top: 3px; color: var(--red); }

.pricing-footnote {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 28px;
}

/* ---------- FAQ ---------- */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 20px 4px;
  font-family: "Fraunces", serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.faq-q .plus {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.2rem;
  color: var(--red);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-q .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.faq-a p { padding: 0 4px 20px; font-size: 0.94rem; max-width: 68ch; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 50px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 14px; }
.contact-detail {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 20px;
  font-size: 0.92rem;
}
.contact-detail .ico {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center;
  color: var(--red);
  flex-shrink: 0;
}

.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 34px;
  box-shadow: var(--shadow);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.field label .req { color: var(--red); }
.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-family: "Inter", sans-serif;
  font-size: 0.94rem;
  color: var(--ink);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--red);
  background: var(--white);
}
.field textarea { resize: vertical; min-height: 110px; }
.form-note { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 36px 0;
}
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-row .logo { font-size: 1.1rem; }
.footer-links { display: flex; gap: 22px; list-style: none; padding: 0; margin: 0; }
.footer-links a { text-decoration: none; font-size: 0.85rem; color: var(--ink-soft); }
.footer-links a:hover { color: var(--red); }
.footer-copy { font-size: 0.78rem; color: var(--ink-soft); }

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.45);
  z-index: 50;
  text-decoration: none;
  animation: wa-pulse 2.4s infinite;
}
.wa-float svg { width: 30px; height: 30px; }
@keyframes wa-pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55), 0 10px 26px rgba(37, 211, 102, 0.35); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0), 0 10px 26px rgba(37, 211, 102, 0.35); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0), 0 10px 26px rgba(37, 211, 102, 0.35); }
}
@media (prefers-reduced-motion: reduce) {
  .wa-float { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 940px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; }
  .plan.featured { transform: none; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  .nav-links, .nav-cta .btn-ghost { display: none; }
  .menu-toggle { display: block; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 50px 0 40px; }
  section { padding: 56px 0; }
}

body.nav-open .nav-links {
  display: flex;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--paper);
  flex-direction: column;
  padding: 20px 28px;
  border-bottom: 1px solid var(--line);
  gap: 16px;
}
