/* ============================================================
   TOKENS & RESET
   ============================================================ */
:root {
  --c-bg:       #ffffff;
  --c-ink:      #111111;
  --c-surface:  #fafafa;
  --c-sec:      #666666;
  --c-label:    #999999;
  --c-border:   #e5e5e5;
  --c-wa:       #25D366;

  --nav-h:      64px;
  --radius:     100px;   /* pill buttons */
  --radius-md:  12px;    /* cards / browser */
  --radius-sm:  6px;     /* skeleton lines */

  --ease:       0.18s ease;
  --max-w:      1140px;
}

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

html {
  scroll-behavior: smooth;
  /* Offset anchor targets so sticky nav never covers them */
  scroll-padding-top: var(--nav-h);
  /* Kill horizontal scroll at every breakpoint */
  overflow-x: hidden;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--c-bg);
  color: var(--c-ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a    { text-decoration: none; color: inherit; }
img  { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }


/* ============================================================
   LAYOUT HELPERS
   ============================================================ */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 24px;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
  cursor: pointer;
}
.btn:hover  { opacity: 0.82; transform: translateY(-1px); }
.btn:active { opacity: 1;    transform: translateY(0);    }

/* filled black */
.btn--primary {
  background: var(--c-ink);
  color: var(--c-bg);
}

/* outline */
.btn--outline {
  background: transparent;
  color: var(--c-ink);
  box-shadow: inset 0 0 0 1.5px var(--c-ink);
}
.btn--outline:hover { box-shadow: inset 0 0 0 1.5px var(--c-ink); }


/* ============================================================
   NAV
   ============================================================ */
.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 90;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
}

/* js adds this class on scroll */
.nav.is-scrolled { border-bottom-color: var(--c-border); }

.nav__inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.nav__logo {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}

/* Right cluster */
.nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Language toggle pill */
.lang-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 36px;
  min-width: 52px;
  padding-inline: 14px;
  border-radius: var(--radius);
  border: 1.5px solid var(--c-border);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--c-sec);
  transition: border-color var(--ease), color var(--ease);
}
.lang-toggle:hover { border-color: var(--c-ink); color: var(--c-ink); }

/* Nav CTA — slightly smaller than hero buttons */
.nav .btn--primary { padding: 10px 20px; font-size: 0.85rem; }


/* ============================================================
   HERO
   ============================================================ */
.hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 100px;
  overflow: hidden;
}

/* 2-column grid on desktop, stacked on mobile */
.hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 60px;
}

/* --- Copy side --- */
.hero__copy { display: flex; flex-direction: column; }

.hero__headline {
  font-size: clamp(2.1rem, 4.5vw, 3.1rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.1;
  margin-bottom: 20px;
}

.hero__sub {
  font-size: 1.1rem;
  color: var(--c-sec);
  line-height: 1.65;
  max-width: 460px;
  margin-bottom: 36px;
}

.hero__ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 52px;
}

/* Metrics */
.hero__metrics {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.metric { display: flex; flex-direction: column; gap: 4px; }

.metric__num {
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
}

.metric__label {
  font-size: 0.78rem;
  color: var(--c-label);
  white-space: nowrap;
}

.metric__sep {
  width: 1px;
  height: 32px;
  background: var(--c-border);
  flex-shrink: 0;
}


/* --- Browser mockup --- */
.browser {
  border-radius: var(--radius-md);
  border: 1.5px solid var(--c-border);
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(0,0,0,0.04),
    0 12px 40px rgba(0,0,0,0.08);
  background: var(--c-bg);
}

.browser__bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}

.browser__dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}
.browser__dot--red    { background: #ff5f57; }
.browser__dot--yellow { background: #febc2e; }
.browser__dot--green  { background: #28c840; }

.browser__address {
  flex: 1;
  margin-left: 10px;
  height: 18px;
  border-radius: 4px;
  background: var(--c-border);
  opacity: 0.6;
}

.browser__screen { padding: 20px; }

/* Skeleton lines inside browser */
.browser__skeleton {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.skel {
  border-radius: var(--radius-sm);
  background: var(--c-border);
  animation: shimmer 1.8s ease-in-out infinite;
}

.skel--hero-img { height: 140px; border-radius: 8px; }
.skel--h1       { height: 16px; width: 75%; }
.skel--h2       { height: 14px; width: 55%; }
.skel--body     { height: 12px; width: 90%; }
.skel--btn      { height: 32px; width: 40%; border-radius: var(--radius); }

@keyframes shimmer {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.45; }
}


/* ============================================================
   SECTION SHARED TYPOGRAPHY
   ============================================================ */
.section-eyebrow {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-label);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(1.8rem, 3.8vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.15;
  margin-bottom: 52px;
  max-width: 600px;
}


/* ============================================================
   SERVICES
   ============================================================ */
.services {
  padding-block: 100px;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

/* Card */
.service-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: box-shadow var(--ease), border-color var(--ease);
}
.service-card:hover {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.07);
  border-color: #d0d0d0;
}

/* Icon square */
.service-card__icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--c-ink);
  color: var(--c-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 20px;
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--c-sec);
  line-height: 1.65;
}

/* Tablet: 2 columns */
@media (max-width: 860px) {
  .services__grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile: 1 column */
@media (max-width: 540px) {
  .services { padding-block: 72px; }
  .services__grid { grid-template-columns: 1fr; }
}


/* ============================================================
   AVATAR SHOWCASE
   ============================================================ */
.avatar {
  padding-block: 100px;
  background: var(--c-bg);
}

/* Two-column layout: video left, reveal card right */
.avatar__layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 32px;
}

/* ---- Video placeholder ---- */
.avatar__video {
  position: relative;
  background: #111;
  border-radius: var(--radius-md);
  /* 9:16 portrait ratio — classic avatar/reel format */
  aspect-ratio: 9 / 16;
  max-height: 520px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Subtle inner texture */
.avatar__video::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 30%, #1f1f1f 0%, #0a0a0a 100%);
}

/* Play button */
.avatar__play {
  position: relative;
  z-index: 1;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  /* nudge play icon visually centred */
  padding-left: 3px;
  transition: background var(--ease), transform var(--ease);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.avatar__play:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.06);
}

/* Progress bar row */
.avatar__progress {
  position: absolute;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.avatar__progress-track {
  flex: 1;
  height: 3px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 99px;
  overflow: hidden;
}

.avatar__progress-fill {
  width: 65%;
  height: 100%;
  background: #fff;
  border-radius: 99px;
}

.avatar__timestamp {
  font-size: 0.72rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---- Reveal card ---- */
.avatar__reveal {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  /* vertically center against the video */
  align-self: center;
}

.avatar__reveal-headline {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.avatar__reveal-desc {
  font-size: 1rem;
  color: var(--c-sec);
  line-height: 1.65;
}

/* Responsive */
@media (max-width: 860px) {
  .avatar__layout {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin-inline: auto;
  }

  /* on mobile the video sits above the card */
  .avatar__video { max-height: 360px; }
}

@media (max-width: 540px) {
  .avatar { padding-block: 72px; }
  .avatar__reveal { padding: 28px 24px; }
}


/* ============================================================
   PROCESS
   ============================================================ */
.process {
  padding-block: 100px;
  background: var(--c-surface);
}

/* Limit timeline width for readability */
.process__timeline {
  list-style: none;
  max-width: 560px;
}

/* Each step: circle + line on left, text on right */
.process__step {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 24px;
}

/* Marker column: circle stacked above line */
.process__marker {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Numbered circle */
.process__num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-ink);
  color: var(--c-bg);
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  line-height: 1;
  /* Align circle top with the step title */
  margin-top: 2px;
}

/* Connector line */
.process__line {
  width: 1px;
  flex: 1;
  background: #ddd;
  margin-block: 8px;
  /* Minimum height keeps the line visible even for short descriptions */
  min-height: 32px;
}

/* Body: title + description */
.process__body {
  padding-bottom: 40px;
}

.process__step--last .process__body {
  padding-bottom: 0;
}

.process__step-title {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  /* Vertically align with circle */
  line-height: 1.35;
  padding-top: 3px;
}

.process__step-desc {
  font-size: 0.9rem;
  color: var(--c-sec);
  line-height: 1.65;
}

@media (max-width: 540px) {
  .process { padding-block: 72px; }
  .process__body { padding-bottom: 32px; }
}


/* ============================================================
   PORTFOLIO
   ============================================================ */
.portfolio {
  padding-block: 100px;
  background: var(--c-bg);
}

/* 2×2 on mobile, 4-col on desktop */
.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

@media (min-width: 860px) {
  .portfolio__grid { grid-template-columns: repeat(4, 1fr); }
}

/* Card shell */
.portfolio__card {
  background: #f5f5f5;
  border: 0.5px solid #eee;
  border-radius: 10px;
  /* Fixed height on mobile, auto on desktop */
  min-height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--ease), box-shadow var(--ease);
  cursor: default;
}

.portfolio__card:hover {
  border-color: #d8d8d8;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
}

@media (min-width: 860px) {
  .portfolio__card { min-height: 160px; }
}

/* Inner: icon + label stacked */
.portfolio__card-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px;
}

.portfolio__icon {
  color: #bbb;
  flex-shrink: 0;
}

.portfolio__label {
  font-size: 0.75rem;
  color: #bbb;
  text-align: center;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

@media (max-width: 540px) {
  .portfolio { padding-block: 72px; }
}


/* ============================================================
   FAQ
   ============================================================ */
.faq {
  padding-block: 100px;
  background: var(--c-surface);
}

/* Constrain list width for readability */
.faq__list {
  max-width: 680px;
}

/* Each item: border-bottom separates questions */
.faq__item {
  border-bottom: 1px solid #f0f0f0;
}
.faq__item:first-child {
  border-top: 1px solid #f0f0f0;
}

/* Question button: full-width row */
.faq__question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 18px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-ink);
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--ease);
}
.faq__question:hover { color: var(--c-sec); }

/* Chevron: rotates when open */
.faq__chevron {
  color: #999;
  flex-shrink: 0;
  transition: transform 0.25s ease, color var(--ease);
}
.faq__item.is-open .faq__chevron {
  transform: rotate(180deg);
  color: var(--c-ink);
}

/* Answer panel: hidden by default, animated via max-height */
.faq__answer {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease;
}
/* hidden attr removed by JS; max-height driven by JS inline style */
.faq__answer[hidden] { display: block; visibility: visible; }

.faq__answer p {
  font-size: 0.8125rem;   /* 13px */
  color: var(--c-sec);
  line-height: 1.6;
  padding-bottom: 18px;
}

@media (max-width: 540px) {
  .faq { padding-block: 72px; }
}


/* ============================================================
   CONTACT
   ============================================================ */
.contact {
  padding-block: 100px;
  background: var(--c-bg);
}

/* Two-column: form left, WA card right */
.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}

.contact__desc {
  font-size: 0.95rem;
  color: var(--c-sec);
  line-height: 1.65;
  margin-bottom: 32px;
  margin-top: -32px; /* pull up under section-title's bottom margin */
}

/* ---- Form ---- */
.contact__form { display: flex; flex-direction: column; gap: 20px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--c-ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.form-label-optional {
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--c-label);
}

.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--c-border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.875rem;
  color: var(--c-ink);
  background: var(--c-bg);
  outline: none;
  transition: border-color var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.form-input::placeholder { color: #bbb; }
.form-input:focus { border-color: var(--c-ink); }

/* Select wrapper for custom chevron */
.select-wrap {
  position: relative;
}
.form-select { cursor: pointer; padding-right: 36px; }
.select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--c-label);
  pointer-events: none;
}

.form-textarea { resize: vertical; min-height: 96px; line-height: 1.5; }

/* Success message */
.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: #f0faf4;
  border: 1px solid #b6e8c8;
  border-radius: 8px;
  font-size: 0.875rem;
  color: #1a7a42;
}
.form-success svg { color: #1a7a42; flex-shrink: 0; }

/* Full-width button modifier */
.btn--block { width: 100%; }

/* ---- WhatsApp card ---- */
.contact__wa-col {
  position: sticky;
  top: calc(var(--nav-h) + 24px);
}

.contact__wa-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.contact__wa-heading {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.contact__wa-desc {
  font-size: 0.9rem;
  color: var(--c-sec);
  line-height: 1.6;
}

/* WhatsApp button */
.btn--wa {
  background: var(--c-wa);
  color: #fff;
  margin-top: 4px;
}
.btn--wa:hover { opacity: 0.88; }

/* Responsive */
@media (max-width: 860px) {
  .contact__inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .contact__wa-col { position: static; }
}

@media (max-width: 540px) {
  .contact { padding-block: 72px; }
  /* Extra bottom padding so the fixed WA float never overlaps the submit button */
  .contact { padding-bottom: 100px; }
  .contact__wa-card { padding: 28px 20px; }
}


/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding-block: 48px;
}

.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.footer__logo {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--c-ink);
}

/* Social icons row */
.footer__socials {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__social {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  transition: color var(--ease), background var(--ease);
}
.footer__social:hover {
  color: var(--c-ink);
  background: var(--c-border);
}

/* Español badge */
.footer__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 100px;
  background: #edfaf3;
  color: #1a7a42;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.footer__badge::before { content: "🌎"; font-size: 0.9rem; }

.footer__copy {
  font-size: 0.78rem;
  color: var(--c-label);
}


/* ============================================================
   WHATSAPP FLOAT BUTTON
   ============================================================ */
.wa-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 200;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-wa);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45);
  transition: transform var(--ease), box-shadow var(--ease);
}
.wa-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.58);
}


/* ============================================================
   RESPONSIVE — consolidated global overrides
   (component-level breakpoints live inside each component block)
   ============================================================ */

/* ---- Tablet ≤ 860px ---- */
@media (max-width: 860px) {
  /* Hero: stack copy below mockup */
  .hero__grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .hero__visual {
    order: -1;
    max-width: 460px;
    margin-inline: auto;
    width: 100%;
  }
  .hero__sub { max-width: 100%; }

  /* Section titles: allow full width */
  .section-title { max-width: 100%; }
}

/* ---- Mobile ≤ 540px ---- */
@media (max-width: 540px) {
  /* Hero */
  .hero {
    padding-top: calc(var(--nav-h) + 48px);
    padding-bottom: 72px;
  }
  .hero__ctas { flex-direction: column; }
  .hero__ctas .btn { width: 100%; }
  .metric__sep { display: none; }
  .hero__metrics { gap: 20px; }

  /* All full-width CTAs inside sections */
  .avatar__reveal .btn,
  .contact__form .btn--block { width: 100%; }

  /* WA float: tuck further into corner */
  .wa-float { bottom: 16px; right: 16px; }
}

/* ---- Very small (≤ 400px) — prevent nav overflow ---- */
@media (max-width: 400px) {
  /* Shrink nav CTA to fit alongside logo + toggle */
  .nav .btn--primary {
    padding: 8px 14px;
    font-size: 0.78rem;
  }

  /* Tighten lang toggle */
  .lang-toggle {
    min-width: 40px;
    padding-inline: 10px;
  }
}
