/* Mercado Automation site styles */

:root {
  color-scheme: only light;
  --ink: #18282e;
  --ink-soft: #4b5c62;
  --paper: #ffffff;
  --concrete: #eceeed;
  --line: #d4dad8;
  --field-line: #b6c1be;
  --green: #0b7a4b;
  --green-deep: #11573a; /* the logo's green */
  --green-tint: #e2f1e8;
  --red: #c4372b;
  --red-tint: #f8e3e0;
  --bubble: #e9eceb;
  --font-body: "Barlow", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", "Helvetica Neue", Arial, sans-serif;
  --wrap: 72rem;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 10px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 48rem) {
  body {
    font-size: 1.125rem;
  }
}

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

h1,
h2,
h3 {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.05;
  text-wrap: balance;
}

h2 {
  font-size: clamp(2rem, 1.5rem + 2vw, 2.9rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.15;
}

p {
  margin: 0 0 1em;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: var(--green-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  top: 12px;
}

/* Header */

.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}

.brand {
  display: inline-flex;
  flex: none;
  align-items: center;
  text-decoration: none;
}

.brand img {
  display: block;
  width: auto;
  height: 46px;
}

.header-cta {
  padding: 11px 16px;
  border: 1.5px solid var(--green);
  border-radius: var(--radius);
  color: var(--green-deep);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.header-cta:hover {
  background: var(--green-tint);
}

/* Language switch in the footer. The main one sits above the phone. */
.lang-switch {
  padding: 6px 2px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.lang-switch:hover {
  color: var(--ink);
  text-decoration-thickness: 2px;
}

@media (max-width: 30rem) {
  .site-header .brand img {
    height: 38px;
  }
}

@media (max-width: 25rem) {
  .site-header .wrap {
    gap: 12px;
  }

  .header-cta {
    padding: 9px 12px;
    font-size: 0.98rem;
  }
}

/* The smallest phones get the hero button right below, so the header keeps only the logo. */
@media (max-width: 22.4rem) {
  .header-cta {
    display: none;
  }
}

/* Buttons and links */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border: 0;
  border-radius: var(--radius);
  background: var(--green);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.button:hover {
  background: var(--green-deep);
}

.button[disabled] {
  opacity: 0.7;
  cursor: progress;
}

.text-link {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
}

/* Hero */

.hero {
  padding-block: clamp(40px, 7vw, 96px) clamp(64px, 8vw, 112px);
}

.hero-grid {
  display: grid;
  gap: 56px;
  align-items: center;
}

@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 64px;
  }
}

.hero h1 {
  max-width: 7.6em;
  font-size: clamp(2.75rem, 1.6rem + 5vw, 4.85rem);
  line-height: 0.97;
  letter-spacing: -0.02em;
}

/* The Spanish headline is longer, so it runs a little smaller and wider. */
html[lang="es"] .hero h1 {
  max-width: 9em;
  font-size: clamp(2.5rem, 1.4rem + 4.4vw, 4.25rem);
}

.hero-lede {
  max-width: 33ch;
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.45rem);
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}

/* Phones held sideways have little height, so the headline shrinks to keep the button in view. */
@media (orientation: landscape) and (max-height: 32rem) {
  .hero {
    padding-block: 28px 56px;
  }

  .hero h1,
  html[lang="es"] .hero h1 {
    max-width: 14em;
    font-size: clamp(2.1rem, 1.2rem + 3vw, 2.9rem);
  }

  .hero-lede {
    max-width: 46ch;
    margin-top: 16px;
  }

  .hero-actions {
    margin-top: 24px;
  }
}

/* Hero text demo */

.demo {
  position: relative;
  width: 100%;
  max-width: 360px;
  justify-self: center;
}

.lang-toggle {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 34px;
}

.lang-toggle button {
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.phone {
  position: relative;
  padding: 10px;
  border-radius: 42px;
  background: var(--ink);
  box-shadow: 0 50px 80px -40px rgba(24, 40, 46, 0.55);
}

.screen {
  overflow: hidden;
  min-height: 452px;
  border-radius: 32px;
  background: var(--paper);
}

.timer {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px 8px 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
  transform: translate(-50%, -50%);
  box-shadow: 0 10px 20px -12px rgba(24, 40, 46, 0.45);
}

.timer-dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
}

.timer[data-state="waiting"] .timer-dot {
  background: var(--red);
  animation: blink 1s ease-in-out infinite;
}

@keyframes blink {
  50% {
    opacity: 0.25;
  }
}

.thread-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 34px 16px 12px;
  border-bottom: 1px solid #e6e9e8;
  background: #f6f7f7;
}

.avatar {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: var(--concrete);
  color: var(--ink-soft);
}

.avatar svg {
  width: 22px;
  height: 22px;
}

.thread-name {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.2;
}

.thread-sub {
  color: var(--ink-soft);
  font-size: 0.78rem;
  line-height: 1.2;
}

.thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
  padding: 14px 14px 22px;
  list-style: none;
  font-size: 0.96rem;
  line-height: 1.38;
}

.thread[hidden] {
  display: none;
}

.note {
  align-self: center;
  max-width: 90%;
  margin: 2px 0 4px;
  color: var(--ink-soft);
  font-size: 0.78rem;
  text-align: center;
}

.bubble {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 19px;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.bubble.biz {
  align-self: flex-start;
  border-bottom-left-radius: 6px;
  background: var(--bubble);
}

.bubble.lead {
  align-self: flex-end;
  border-bottom-right-radius: 6px;
  background: var(--green);
  color: #fff;
}

.typing {
  display: inline-flex;
  align-self: flex-start;
  gap: 5px;
  padding: 13px 15px;
  border-radius: 19px;
  border-bottom-left-radius: 6px;
  background: var(--bubble);
}

.typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8d9a9e;
  animation: typing 1.1s ease-in-out infinite;
}

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

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

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

.alert {
  position: relative;
  z-index: 3;
  width: min(88%, 300px);
  margin: -40px 0 0 auto;
  padding: 12px 15px 13px;
  border-radius: 16px;
  background: var(--ink);
  color: #fff;
  font-size: 0.92rem;
  line-height: 1.38;
  box-shadow: 0 22px 34px -20px rgba(24, 40, 46, 0.75);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

@media (min-width: 62rem) {
  .alert {
    margin-right: -36px;
  }
}

.alert-label {
  display: block;
  margin-bottom: 3px;
  color: #9fd8b8;
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 600;
}

/* The demo starts hidden only when motion is allowed, then plays once in view. */
.motion .demo[data-anim="pending"] .thread:not([hidden]) .bubble,
.motion .demo[data-anim="pending"] .alert,
.demo .is-hidden {
  opacity: 0;
  transform: translateY(8px);
}

/* Bands */

.band {
  padding-block: clamp(56px, 8vw, 104px);
}

.band-concrete {
  background: var(--concrete);
}

.section-lede {
  max-width: 38ch;
  margin-top: 20px;
  font-size: 1.2rem;
  line-height: 1.5;
}

.split {
  display: grid;
  gap: 40px;
}

@media (min-width: 56rem) {
  .split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 64px;
    align-items: center;
  }
}

/* Where leads slip away, styled like missed notifications */

.missed {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.missed li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
}

.missed-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--red-tint);
  color: var(--red);
}

.missed-icon svg {
  width: 22px;
  height: 22px;
}

.missed strong {
  display: block;
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.2;
}

.missed .detail {
  display: block;
  color: var(--ink-soft);
  font-size: 1rem;
  line-height: 1.35;
}

/* How it works */

.steps {
  display: grid;
  gap: 32px;
  margin: 40px 0 0;
  padding: 0;
  list-style: none;
}

.step {
  position: relative;
  padding-left: 64px;
}

.step-num {
  position: absolute;
  top: -6px;
  left: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
}

.step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 46px;
  bottom: -30px;
  left: 21px;
  width: 2px;
  background: var(--line);
}

.step h3 {
  margin-bottom: 8px;
}

.step p {
  max-width: 34ch;
  color: var(--ink-soft);
}

@media (min-width: 56rem) {
  .steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 40px;
  }

  .step {
    padding-top: 64px;
    padding-left: 0;
  }

  .step-num {
    top: 0;
  }

  .step:not(:last-child)::after {
    top: 21px;
    right: -40px;
    bottom: auto;
    left: 56px;
    width: auto;
    height: 2px;
  }
}

/* About */

.about {
  display: grid;
  grid-template-areas:
    "title"
    "photo"
    "body";
  gap: 24px;
}

.about-title {
  grid-area: title;
}

.about-photo {
  grid-area: photo;
  width: 100%;
  max-width: 400px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 18px;
  background: var(--ink);
}

.about-body {
  grid-area: body;
  max-width: 40ch;
  font-size: 1.2rem;
  line-height: 1.5;
}

@media (min-width: 56rem) {
  .about {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    grid-template-areas:
      "photo ."
      "photo title"
      "photo body"
      "photo .";
    grid-template-rows: 1fr auto auto 1fr;
    column-gap: 64px;
    row-gap: 0;
  }

  .about-title {
    margin-bottom: 20px;
  }

  .about-photo {
    max-width: 420px;
    align-self: center;
  }
}

.story {
  max-width: 44ch;
  color: var(--ink-soft);
}

/* Q&A */

.faq {
  display: grid;
  gap: 24px;
}

@media (min-width: 56rem) {
  .faq {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 64px;
  }
}

.faq-list {
  border-top: 1px solid var(--line);
}

.faq-list details {
  border-bottom: 1px solid var(--line);
}

.faq-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.25;
  list-style: none;
  cursor: pointer;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

/* A plus sign that turns into a minus when the answer is open. */
.faq-list summary::after {
  content: "";
  flex: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(var(--green), var(--green)) center / 100% 2px no-repeat,
    linear-gradient(var(--green), var(--green)) center / 2px 100% no-repeat;
}

.faq-list details[open] > summary::after {
  background: linear-gradient(var(--green), var(--green)) center / 100% 2px no-repeat;
}

.faq-list summary:hover {
  color: var(--green-deep);
}

.faq-list details p {
  max-width: 60ch;
  margin: 0;
  padding-bottom: 20px;
  color: var(--ink-soft);
}

.band-divided {
  border-top: 1px solid var(--line);
}

/* Contact */

.contact {
  display: grid;
  gap: 40px;
}

@media (min-width: 60rem) {
  .contact {
    grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
    gap: 72px;
    align-items: start;
  }
}

.contact-intro p {
  max-width: 36ch;
}

.lead-form {
  display: grid;
  gap: 20px;
  padding: clamp(20px, 4vw, 36px);
  border-radius: 18px;
  background: var(--concrete);
}

.two-up {
  display: grid;
  gap: 20px;
}

@media (min-width: 40rem) {
  .two-up {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}

.field {
  display: grid;
  gap: 6px;
  align-content: start;
}

.field label {
  font-size: 1rem;
  font-weight: 600;
}

.opt {
  color: var(--ink-soft);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--field-line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
}

.field textarea {
  min-height: 140px;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--green);
  outline: 3px solid var(--green);
  outline-offset: 1px;
}

.hint {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.92rem;
  line-height: 1.4;
}

.consent {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 6px 12px;
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.consent input {
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  accent-color: var(--green);
}

.consent label {
  font-size: 0.95rem;
  line-height: 1.45;
}

.consent-links {
  grid-column: 2;
  margin: 0;
  font-size: 0.92rem;
}

.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.form-status {
  margin: 0;
  font-size: 1rem;
}

.form-status.is-error {
  color: var(--red);
}

.form-done {
  padding: clamp(24px, 4vw, 40px);
  border-radius: 18px;
  background: var(--green-tint);
}

.form-done:focus {
  outline: none;
}

.form-done h3 {
  margin-bottom: 8px;
  font-size: 1.6rem;
}

/* Footer */

.site-footer {
  padding-block: 48px 32px;
  background: var(--ink);
  color: #dfe6e4;
  font-size: 1rem;
}

.site-footer a {
  color: #fff;
}

.site-footer .brand {
  margin-bottom: 16px;
}

.site-footer .brand img {
  height: 40px;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 48rem) {
  .footer-grid {
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1fr);
  }
}

.footer-grid p {
  max-width: 34ch;
}

.footer-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  justify-items: start;
}

.footer-nav .lang-switch {
  padding: 0;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 400;
  line-height: inherit;
}

.footer-base {
  margin-top: 36px;
}

.footer-base p {
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  color: #b8c4c1;
  font-size: 0.92rem;
}

/* Privacy policy and terms */

.legal {
  padding-block: clamp(40px, 6vw, 80px) clamp(56px, 8vw, 104px);
}

.legal .wrap {
  max-width: 46rem;
}

.legal h1 {
  font-size: clamp(2.4rem, 1.8rem + 2.5vw, 3.4rem);
  letter-spacing: -0.015em;
}

.legal .updated {
  margin-top: 10px;
  color: var(--ink-soft);
}

.legal h2 {
  margin: 2em 0 0.5em;
  font-size: 1.6rem;
  letter-spacing: -0.005em;
}

.legal p {
  max-width: 68ch;
}

/* Page not found */

.notfound {
  padding-block: clamp(64px, 10vw, 128px);
}

.notfound h1 {
  font-size: clamp(2.4rem, 1.8rem + 2.5vw, 3.4rem);
}

.notfound p {
  margin-top: 16px;
  font-size: 1.2rem;
}

@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;
  }
}
