/* =========================================================
   KAMAI CHAT AGENCY OFFICIAL — style.css
   Mobile-first, overflow-safe, lightweight vanilla CSS.
   ========================================================= */

/* ---------- 1. MOBILE-OVERFLOW FOUNDATION (mandatory) ---------- */
html {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

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

img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
}

main, header, footer, section, nav {
  max-width: 100%;
}

@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;
    scroll-behavior: auto !important;
  }
}

/* ---------- 2. DESIGN TOKENS ---------- */
:root {
  --color-primary: #4338CA;
  --color-primary-dark: #332C9E;
  --color-primary-light: #6D6BF2;
  --color-accent: #F59E0B;
  --color-accent-dark: #C97A06;
  --color-whatsapp: #25D366;
  --color-whatsapp-dark: #1EBE57;

  --color-bg: #FFFFFF;
  --color-bg-alt: #F6F6FC;
  --color-bg-dark: #16143B;
  --color-surface: #FFFFFF;
  --color-border: #E6E5F2;

  --color-text: #1D1B39;
  --color-text-muted: #5B5978;
  --color-text-invert: #F4F3FF;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-pill: 999px;

  --shadow-sm: 0 2px 8px rgba(29, 27, 57, 0.06);
  --shadow-md: 0 8px 24px rgba(29, 27, 57, 0.09);
  --shadow-lg: 0 16px 40px rgba(29, 27, 57, 0.14);

  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --container-max: 1200px;
}

/* ---------- 3. BASE TYPOGRAPHY ---------- */
body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 16px;
  color: var(--color-text);
  overflow-wrap: anywhere;
}

h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { margin: 0 0 16px; color: var(--color-text-muted); overflow-wrap: anywhere; }

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

ul, ol { padding-left: 1.25rem; color: var(--color-text-muted); }
li { margin-bottom: 8px; overflow-wrap: anywhere; }

strong { color: var(--color-text); }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- 4. LAYOUT / CONTAINER ---------- */
.container {
  width: min(100% - 32px, var(--container-max));
  margin-inline: auto;
}

@media (max-width: 480px) {
  .container { width: min(100% - 24px, var(--container-max)); }
}

.section {
  padding: 64px 0;
}
@media (max-width: 640px) {
  .section { padding: 44px 0; }
}

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

.section-header {
  max-width: 720px;
  margin: 0 auto 40px;
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-primary);
  background: rgba(67, 56, 202, 0.08);
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  margin-bottom: 14px;
}

.section-header p { margin: 0 auto; }

/* ---------- 5. SKIP LINK ---------- */
.skip-link {
  position: absolute;
  left: 8px;
  top: -60px;
  background: var(--color-primary);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 8px;
}

/* ---------- 6. HEADER / NAV ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--color-border);
  width: 100%;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 12px;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-shrink: 1;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-text);
}
.brand:hover { text-decoration: none; }

.brand img {
  height: 38px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

.brand-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-text span { color: var(--color-primary); }

.main-nav {
  display: none;
  min-width: 0;
}

.main-nav ul {
  display: flex;
  align-items: center;
  gap: 6px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.main-nav a {
  display: inline-block;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  color: var(--color-text);
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
}
.main-nav a:hover { background: var(--color-bg-alt); text-decoration: none; }
.main-nav a.active {
  color: var(--color-primary);
  background: rgba(67, 56, 202, 0.09);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.header-cta {
  display: none;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  flex-shrink: 0;
}
.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 960px) {
  .main-nav { display: block; }
  .header-cta { display: inline-flex; }
  .hamburger { display: none; }
}

/* Mobile nav drawer */
.mobile-nav {
  position: fixed;
  inset: 0;
  z-index: 900;
  visibility: hidden;
  pointer-events: none;
}
.mobile-nav.open {
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-overlay {
  position: absolute;
  inset: 0;
  background: rgba(17, 15, 45, 0.5);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.mobile-nav.open .mobile-nav-overlay { opacity: 1; }

.mobile-nav-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(88%, 360px);
  max-width: 100%;
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  padding: 20px;
  transform: translateX(100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.mobile-nav.open .mobile-nav-drawer { transform: translateX(0); }

.mobile-nav-top {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 8px;
}

.mobile-nav-close {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  font-size: 1.1rem;
  cursor: pointer;
}

.mobile-nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 8px;
}
.mobile-nav-links a {
  padding: 14px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text);
  font-weight: 600;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: var(--color-bg-alt);
  color: var(--color-primary);
  text-decoration: none;
}

.mobile-nav-cta {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border);
}

/* ---------- 7. BUTTONS / CTA ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  cursor: pointer;
  max-width: 100%;
  white-space: normal;
  text-align: center;
  min-height: 44px;
  line-height: 1.3;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-primary:hover { filter: brightness(1.06); }

.btn-accent {
  background: linear-gradient(135deg, var(--color-accent), var(--color-accent-dark));
  color: #211200;
  box-shadow: var(--shadow-md);
}
.btn-accent:hover { filter: brightness(1.05); }

.btn-outline {
  background: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover { background: rgba(67, 56, 202, 0.08); }

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.btn-whatsapp:hover { background: var(--color-whatsapp-dark); }

.btn-sm { padding: 10px 18px; font-size: 0.88rem; min-height: 40px; }
.btn-block { width: 100%; }

.cta-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
@media (max-width: 640px) {
  .cta-group {
    flex-direction: column;
    width: 100%;
  }
  .cta-group a, .cta-group button {
    width: 100%;
    max-width: 100%;
  }
}

/* ---------- 8. HERO ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 72px;
  background: linear-gradient(180deg, #F3F1FF 0%, #FFFFFF 65%);
}

.hero-blobs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
}
.hero-blob-1 {
  width: 320px; height: 320px;
  background: var(--color-primary-light);
  top: -80px; left: -60px;
}
.hero-blob-2 {
  width: 260px; height: 260px;
  background: var(--color-accent);
  bottom: -60px; right: -40px;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
}
@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1.1fr 0.9fr;
    gap: 48px;
  }
}

.hero-content { min-width: 0; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}

.hero-content .lede {
  font-size: 1.08rem;
  max-width: 55ch;
}

.hero-media {
  position: relative;
  min-width: 0;
}
.hero-media img {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

.hero-links {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.92rem;
  font-weight: 600;
}

/* ---------- 9. BREADCRUMBS ---------- */
.breadcrumbs {
  padding: 16px 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  border-bottom: 1px solid var(--color-border);
}
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
}
.breadcrumbs li { margin: 0; display: flex; align-items: center; gap: 6px; }
.breadcrumbs a { color: var(--color-text-muted); font-weight: 600; }
.breadcrumbs li[aria-current] { color: var(--color-primary); font-weight: 700; }

/* ---------- 10. GRID / CARDS ---------- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  min-width: 0;
  max-width: 100%;
}

.stat-card {
  text-align: center;
  padding: 28px 20px;
}
.stat-card .stat-value {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-primary);
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}
.stat-card .stat-label {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.icon-badge {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(67, 56, 202, 0.09);
  margin-bottom: 16px;
  flex-shrink: 0;
}

.card h3 { margin-bottom: 8px; }
.card p:last-child { margin-bottom: 0; }

/* Step cards */
.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
  counter-reset: step;
}
@media (min-width: 700px) {
  .steps { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
}
.step-card {
  position: relative;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  min-width: 0;
}
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
  flex-shrink: 0;
}

/* ---------- 11. TABLES ---------- */
.table-wrapper {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  background: var(--color-surface);
}

thead th {
  background: var(--color-bg-alt);
  color: var(--color-text);
  text-align: left;
  padding: 14px 18px;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

tbody td {
  padding: 14px 18px;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: 0.95rem;
}
tbody tr:nth-child(even) { background: rgba(67, 56, 202, 0.02); }
tbody td:first-child { font-weight: 700; color: var(--color-text); }

/* ---------- 12. FAQ ACCORDION ---------- */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  overflow: hidden;
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  background: none;
  border: none;
  text-align: left;
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-text);
  cursor: pointer;
  min-height: 44px;
}
.faq-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--color-bg-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  transition: transform 0.2s ease;
}
.faq-question[aria-expanded="true"] .faq-icon { transform: rotate(45deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
  padding: 0 20px;
}
.faq-answer p { padding-bottom: 18px; margin: 0; }
.faq-item.open .faq-answer { max-height: 600px; }

/* ---------- 13. NOTICE / DISCLAIMER BOX ---------- */
.notice {
  background: #FFF8E9;
  border: 1px solid #F3D98B;
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-size: 0.92rem;
  color: #6B5108;
  margin: 20px 0;
}
.notice strong { color: #6B5108; }

.notice-muted {
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  color: var(--color-text-muted);
}

/* ---------- 14. CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), #6D28D9);
  border-radius: var(--radius-lg);
  padding: 48px 32px;
  text-align: center;
  color: #fff;
}
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner .cta-group { justify-content: center; }

@media (max-width: 640px) {
  .cta-banner { padding: 36px 20px; }
}

/* ---------- 15. FOOTER ---------- */
.site-footer {
  background: var(--color-bg-dark);
  color: #C9C7E8;
  padding: 56px 0 24px;
}
.footer-grid {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.4fr repeat(3, 1fr); }
}
.footer-col { min-width: 0; }
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
  margin-bottom: 12px;
}
.footer-brand img { height: 34px; width: auto; }
.footer-col h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.footer-col p { color: #A9A6D1; font-size: 0.92rem; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #C9C7E8; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }

.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  font-size: 0.85rem;
  color: #8B88B8;
}

/* ---------- 16. FLOATING WHATSAPP BUTTON ---------- */
.whatsapp-float {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 800;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: transform 0.2s ease, background 0.2s ease;
  animation: wa-pulse 2.6s ease-in-out infinite;
}
.whatsapp-float:hover {
  background: var(--color-whatsapp-dark);
  transform: scale(1.06);
}
.whatsapp-float svg { width: 30px; height: 30px; display: block; }

@media (max-width: 480px) {
  .whatsapp-float {
    right: 14px;
    bottom: 14px;
    width: 52px;
    height: 52px;
  }
  .whatsapp-float svg { width: 26px; height: 26px; }
}

@keyframes wa-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45), var(--shadow-lg); }
  50% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0), var(--shadow-lg); }
}
@media (prefers-reduced-motion: reduce) {
  .whatsapp-float { animation: none; }
}

/* ---------- 17. REVEAL ANIMATION ---------- */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- 18. MISC UTILITIES ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(67, 56, 202, 0.09);
  color: var(--color-primary);
}
.badge-accent { background: rgba(245, 158, 11, 0.14); color: var(--color-accent-dark); }

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.two-col {
  display: grid;
  gap: 32px;
  grid-template-columns: 1fr;
  align-items: start;
}
@media (min-width: 860px) {
  .two-col { grid-template-columns: 1fr 1fr; }
}
.two-col > * { min-width: 0; }

.list-check { list-style: none; padding: 0; }
.list-check li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}
.list-check li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(67, 56, 202, 0.12);
  color: var(--color-primary);
  font-weight: 800;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 40px 0;
}

/* Blog cards */
.blog-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}
.blog-card .category {
  align-self: flex-start;
  margin-bottom: 12px;
}
.blog-card h3 { margin-bottom: 10px; }
.blog-card .read-more {
  margin-top: auto;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Contact cards */
.contact-card {
  text-align: center;
}

/* Interview / requirement contrast row */
.req-columns {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .req-columns { grid-template-columns: 1fr 1fr; }
}
