/* ========================================
   KCG BPO home page: the category standard, done properly.
   White and pale-green sections, slate ink, brand green actions.
   Fonts and shared tokens live in style.css (:root).
   ======================================== */

.home { color: var(--ink); background: #fff; }

.section-h2 {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.1rem, 3.6vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 64px; align-items: end; margin-bottom: 40px; }
.section-head p { font-size: 1.125rem; line-height: 1.6; max-width: 54ch; color: var(--ink-2); }
.section-head--ink p { color: #cbd5e1; }

.home p a, .home dd a, .home td a, .manifest__more a, .nearshore__more a {
  color: var(--green);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
.home p a:hover, .home dd a:hover, .manifest__more a:hover, .nearshore__more a:hover { color: var(--green-deep); }

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.button--primary { background: var(--green); color: #fff; }
.button--primary:hover { background: var(--green-deep); }
.button--quiet { border: 1.5px solid #cbd5e1; color: var(--ink); background: #fff; }
.button--quiet:hover { border-color: var(--green); color: var(--green); }

/* ---------- First viewport ---------- */
.hero-b2b {
  padding: calc(108px + clamp(40px, 6vh, 72px)) 0 80px; /* fixed top bar + header */
  background: linear-gradient(180deg, var(--tint) 0%, #fff 100%);
  border-bottom: 1px solid var(--line);
}
.hero-b2b__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 460px); gap: 64px; align-items: center; }
.hero-b2b__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.75rem, 5.4vw, 4.5rem);
  line-height: 1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
.hero-b2b__lead { margin-top: 22px; font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.6; color: var(--ink-2); max-width: 46ch; }
.hero-b2b__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 22px; font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.hero-b2b__facts li { display: flex; align-items: center; gap: 8px; }
.hero-b2b__facts li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.hero-b2b__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.models { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); }
.models a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink-2);
  transition: border-color 0.2s ease, color 0.2s ease;
}
.models a:hover { border-color: var(--green); color: var(--green); }

/* ---------- Quote form card ---------- */
.order {
  position: relative;
  background: #fff;
  color: var(--ink);
  padding: 30px 30px 26px;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}
.order__title { font-family: var(--font-heading); font-weight: 800; font-size: 2rem; line-height: 1.05; }
.home .order__note { margin: 6px 0 20px; font-size: 0.95rem; color: var(--ink-3); text-wrap: wrap; }
.order__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

.field { display: block; margin-bottom: 14px; }
.field__label { display: block; margin-bottom: 6px; font-size: 0.9rem; font-weight: 600; color: var(--ink); }
.field__label i { font-style: normal; font-weight: 400; color: var(--ink-3); }
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font-size: 1rem; /* 16px stops iOS zooming in on focus */
  color: var(--ink);
  background: #fff;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 104px; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #94a3b8; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px rgba(21, 128, 61, 0.18); }
.field [aria-invalid="true"], .field [aria-invalid="true"]:focus, .field input:user-invalid { border-color: #b91c1c; }
.field [aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(185, 28, 28, 0.16); }
.field__error { margin-top: 6px; font-size: 0.875rem; font-weight: 600; color: #b91c1c; }
.field__error:empty { display: none; }
.consent .field__error { grid-column: 2; margin-top: 4px; }

.consent { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 0 10px; align-items: start; margin: 4px 0 18px; font-size: 0.875rem; line-height: 1.5; color: var(--ink-3); cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--green); }
.consent a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }

.order__send {
  width: 100%;
  min-height: 54px;
  background: var(--green);
  color: #fff;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  transition: background-color 0.2s ease;
}
.order__send:hover { background: var(--green-deep); }
.order__send:disabled { cursor: progress; opacity: 0.85; }
.order .form__status { margin-top: 14px; border-radius: 10px; }

/* Success: the panel replaces the form's fields */
.order[data-state="success"] > :not(.order__done) { display: none; }
.order__done { padding: 8px 0 4px; outline: none; }
.order__done h3 { font-family: var(--font-heading); font-weight: 800; font-size: 2rem; line-height: 1.05; color: var(--green-deep); }
.order__done h3::before { content: ""; display: block; width: 44px; height: 44px; margin-bottom: 16px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 22px no-repeat; }
.order__done p { margin: 12px 0 22px; color: var(--ink-2); line-height: 1.6; }
.order__done a { color: var(--green); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.order__again { min-height: 44px; padding: 0 18px; border: 1.5px solid #cbd5e1; border-radius: 10px; font-weight: 700; color: var(--ink); }
.order__again:hover { border-color: var(--green); color: var(--green); }

/* Team photo band: renders only when the real photo exists */
.team-photo { margin-top: 56px; }
.team-photo img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; border-radius: 16px; }

/* ---------- Five ways to buy: comparison table ---------- */
.manifest-section { padding: 96px 0; }
.manifest { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 1rem; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--card-shadow); overflow: hidden; }
.manifest thead th { background: #f8fafc; color: var(--ink-3); text-align: left; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.manifest tbody tr:not(:last-child) > * { border-bottom: 1px solid var(--line); }
.manifest tbody tr:hover > * { background: #fbfdfb; }
.manifest th[scope="row"], .manifest td { padding: 22px 20px; vertical-align: top; text-align: left; }
.manifest th[scope="row"] { width: 20%; }
.manifest th[scope="row"] a { font-family: var(--font-heading); font-weight: 800; font-size: 1.5rem; line-height: 1.05; color: var(--ink); }
.manifest th[scope="row"] a:hover { color: var(--green); }
.manifest td { color: var(--ink-2); line-height: 1.55; }
.manifest__action { width: 1%; white-space: nowrap; }
.manifest__action a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 10px;
  border: 1.5px solid var(--green);
  color: var(--green) !important;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.manifest__action a:hover { background: var(--green); color: #fff !important; }
.manifest__more { margin-top: 20px; }

/* ---------- Specialties ---------- */
.specialties { background: var(--tint); padding: 72px 0; border-block: 1px solid #dcfce7; }
.specialties__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 16px 56px; align-items: center; }
.specialties .section-h2 { font-size: clamp(1.9rem, 3vw, 2.5rem); }
.specialties__list { display: flex; flex-wrap: wrap; gap: 6px 36px; }
.specialties__list li { font-family: var(--font-heading); font-weight: 800; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.2; color: var(--ink); }
.specialties__list li { display: flex; align-items: center; gap: 12px; }
.specialties__list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0; }
.specialties__also { grid-column: 2; color: var(--ink-2); }

/* ---------- Owner-led: who we are and how we work ---------- */
.works { padding: 104px 0; }
.works__grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 64px; align-items: start; }
.works__intro .section-h2 { margin-bottom: 22px; }
.works__intro p { max-width: 60ch; color: var(--ink-2); margin-bottom: 16px; line-height: 1.7; }
.works__intro .works__lead { font-size: 1.2rem; color: var(--ink); }
.spec { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.spec div { padding: 22px 0; border-top: 1px solid var(--line); }
.spec dt { font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; line-height: 1.1; margin-bottom: 8px; }
.spec dd { color: var(--ink-2); font-size: 0.98rem; line-height: 1.6; }

/* ---------- Proof (renders only with real material) ---------- */
.proof { padding: 96px 0; background: #f8fafc; }
.proof .section-h2 { margin-bottom: 40px; }
.proof__metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 48px; }
.proof__metrics div { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.proof__metrics dt { font-weight: 600; color: var(--ink-3); }
.proof__metrics dd { font-family: var(--font-heading); font-weight: 800; font-size: 2.6rem; line-height: 1.1; margin-top: 4px; }
.proof__metrics .proof__source { font-family: var(--font-sans); font-weight: 400; font-size: 0.82rem; color: var(--ink-3); }
.proof__quote { max-width: 760px; margin-bottom: 32px; }
.proof__quote blockquote { font-size: 1.35rem; line-height: 1.5; }
.proof__quote figcaption { margin-top: 10px; font-weight: 600; color: var(--ink-3); }

/* ---------- Onboarding steps ---------- */
.route { background: var(--ink); color: #fff; padding: 104px 0; }
.route__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; counter-reset: step; }
.route__steps li { counter-increment: step; background: #1e293b; border: 1px solid #334155; border-radius: var(--radius); padding: 24px; }
.route__steps li::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin-bottom: 18px;
  border-radius: 50%;
  background: #22c55e;
  color: var(--ink);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.3rem;
}
.route__steps h3 { font-family: var(--font-heading); font-weight: 800; font-size: 1.35rem; line-height: 1.1; margin-bottom: 10px; }
.route__steps p { color: #cbd5e1; font-size: 0.98rem; line-height: 1.6; }

/* ---------- Nearshore ---------- */
.nearshore { padding: 104px 0; }
.nearshore__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; }
.nearshore__facts div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 20px; padding: 20px 0; border-top: 1px solid var(--line); }
.nearshore__facts div:last-child { border-bottom: 1px solid var(--line); }
.nearshore__facts dt { font-weight: 700; color: var(--green); }
.nearshore__facts dd { font-size: 1.08rem; line-height: 1.6; color: var(--ink-2); }
.nearshore__more { grid-column: 2; }

/* ---------- Careers ---------- */
.home .careers { padding: 104px 0; background: #f8fafc; }
.careers__grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 64px; align-items: start; }
.home .careers .section-h2 { margin-bottom: 18px; }
.home .careers__lead { max-width: 58ch; color: var(--ink-2); font-size: 1.1rem; line-height: 1.65; }
.careers__perks { margin: 26px 0; display: grid; gap: 10px; }
.careers__perks li { display: flex; gap: 12px; align-items: baseline; color: var(--ink); }
.careers__perks li::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; transform: translateY(-2px); }
.careers__apply { color: var(--ink-2); }
.roles { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--card-shadow); overflow: hidden; }
.roles caption { text-align: left; font-family: var(--font-heading); font-weight: 800; font-size: 1.6rem; padding-bottom: 14px; }
.roles th, .roles td { text-align: left; padding: 16px 20px; vertical-align: top; }
.roles tr:not(:last-child) > * { border-bottom: 1px solid var(--line); }
.roles th { font-weight: 600; }
.roles td { color: var(--ink-3); font-size: 0.92rem; white-space: nowrap; }

/* ---------- FAQ ---------- */
.home .faq { padding: 104px 0; background: #fff; }
.faq__grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px 64px; align-items: start; }
.home .faq__list { max-width: none; margin: 0; }
.home .faq-item__question { min-height: 44px; }
.home .faq-item__answer p { max-width: 68ch; }

/* ---------- Closing contact ---------- */
.closing { background: var(--tint); padding: 104px 0 112px; border-top: 1px solid #dcfce7; }
.closing__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 540px); gap: 64px; align-items: start; }
.closing__copy > p { margin-top: 18px; font-size: 1.15rem; max-width: 40ch; color: var(--ink-2); }
.closing__contacts { margin-top: 32px; }
.closing__contacts div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-top: 1px solid #bbf7d0; }
.closing__contacts dt { font-weight: 600; color: var(--ink-3); }
.closing__contacts dd { font-size: 1.1rem; font-weight: 600; }
.closing .order__title { margin-bottom: 18px; }

/* ---------- Mobile quote bar ---------- */
.quote-bar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-b2b__grid, .closing__grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero-b2b .order { max-width: 560px; }
  .works__grid, .careers__grid, .nearshore__grid, .faq__grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .nearshore__more { grid-column: 1; }
  .specialties__inner { grid-template-columns: minmax(0, 1fr); }
  .specialties__also { grid-column: 1; }
  .route__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .hero-b2b { padding-bottom: 56px; }
  .hero-b2b__actions .button { flex: 1 1 100%; }
  .order { padding: 24px 20px 22px; }
  .order__row { grid-template-columns: minmax(0, 1fr); }
  .manifest-section, .works, .route, .nearshore, .home .careers, .home .faq, .closing { padding: 72px 0; }
  .spec { grid-template-columns: minmax(0, 1fr); }
  .specialties__list { flex-direction: column; }
  .manifest th[scope="row"] { padding: 4px 0; }

  /* Comparison rows become stacked cards */
  .manifest { border: 0; box-shadow: none; background: none; border-radius: 0; overflow: visible; }
  .manifest thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .manifest, .manifest tbody, .manifest tr, .manifest th[scope="row"], .manifest td { display: block; width: auto; }
  .manifest tbody tr { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 18px 18px 20px; margin-bottom: 14px; }
  .manifest tbody tr > * { border-bottom: 0 !important; padding: 4px 0; background: none !important; }
  .manifest td[data-label]::before { content: attr(data-label); display: block; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin-top: 10px; }
  .manifest__action { white-space: normal; padding-top: 14px !important; }

  .route__steps { grid-template-columns: minmax(0, 1fr); }
  .nearshore__facts div, .closing__contacts div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .roles td { white-space: normal; }

  .quote-bar {
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 12px;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 54px;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 12px 28px -10px rgba(15, 23, 42, 0.45);
    transform: translateY(140%);
    visibility: hidden; /* not focusable while off-screen */
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.1, 1), visibility 0.3s;
  }
  .quote-bar.is-visible { transform: translateY(0); visibility: visible; }
  .has-quote-bar .back-to-top { display: none; } /* one floating control at a time */
}
@media (max-width: 768px) and (prefers-reduced-motion: reduce) {
  .quote-bar { transition: none; }
}

/* Infographics (inline SVG from images/*.svg) */
.infographic { margin: 28px 0 36px; }
.infographic svg { display: block; width: 100%; height: auto; border-radius: 12px; }
.infographic figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--ink-3); }
.infographic--map { margin: 28px 0 0; max-width: 460px; }
.infographic--map svg { border: 1px solid var(--line); }
