/* =============================================
   K&L Services and Solutions
   Premium Healthcare Technology Brand
   Apple × Stripe × Philips Healthcare aesthetic
   ============================================= */

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

:root {
  --black:    #1F1F1F;
  --dark:     #2c2c2c;
  --mid:      #6b6b6b;
  --light:    #a0a0a0;
  --rule:     #e8e8e8;
  --bg:       #F8F8F6;
  --bg2:      #f0f0ed;
  --white:    #ffffff;
  --green:    #5a9e3a;
  --green-l:  #6db347;
  --green-bg: #f0f7ec;
  --display:  'Sora', sans-serif;
  --body:     'Inter', sans-serif;
  --max:      1160px;
  --nav-h:    72px;
  --nav-h-tall: 96px;
  --ease:     cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); font-size: 18px; }
body {
  font-family: var(--body);
  color: var(--dark);
  background: var(--white);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ── TYPOGRAPHY SCALE ── */
.t-label {
  font-family: var(--body);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}
.t-hero {
  font-family: var(--display);
  font-size: clamp(2.8rem, 5.5vw, 4.2rem);
  font-weight: 200;
  color: var(--black);
  letter-spacing: -0.035em;
  line-height: 1.08;
}
.t-section {
  font-family: var(--display);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 200;
  color: var(--black);
  letter-spacing: -0.025em;
  line-height: 1.15;
}
.t-sub {
  font-family: var(--display);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 300;
  color: var(--black);
  letter-spacing: -0.015em;
}
.t-body {
  font-size: 1rem;
  font-weight: 300;
  color: var(--mid);
  line-height: 1.8;
}
.t-body-sm {
  font-size: 0.85rem;
  color: var(--mid);
  line-height: 1.75;
}

/* ── LAYOUT ── */
.container { max-width: var(--max); margin: 0 auto; padding: 0 32px; }
.section-pad { padding: 100px 32px; }
.section-pad-sm { padding: 72px 32px; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--body);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.btn-green {
  background: var(--green);
  color: var(--white);
}
.btn-green:hover { background: var(--green-l); transform: translateY(-1px); }
.btn-dark {
  background: var(--black);
  color: var(--white);
}
.btn-dark:hover { background: var(--dark); transform: translateY(-1px); }
.btn-ghost {
  background: transparent;
  color: var(--black);
  border: 1.5px solid #d0d0d0;
}
.btn-ghost:hover { border-color: var(--black); }
.btn-text {
  background: transparent;
  color: var(--green);
  padding: 0;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  border-bottom: 1px solid var(--green);
  border-radius: 0;
}
.btn-text:hover { color: var(--green-l); }
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ── NAV ── */
#site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  min-height: var(--nav-h-tall);
  contain: layout;
}
.kl-nav {
  background: #ffffff;
  border-bottom: 1px solid var(--rule);
  height: var(--nav-h-tall);
  transition: height 0.3s ease, box-shadow 0.3s ease;
  will-change: height;
}
.kl-nav.no-transition,
.kl-nav.no-transition .kl-logo img { transition: none !important; }
.kl-nav.scrolled {
  height: var(--nav-h);
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  background: #ffffff;
}
.kl-nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (max-width: 860px) {
  .kl-nav-inner { padding: 0 16px; }
}
.kl-logo img {
  height: 54px;
  width: auto;
  display: block;
  transition: height 0.3s ease;
  will-change: height;
}
.kl-nav.scrolled .kl-logo img { height: 36px; }
.kl-links {
  display: flex;
  align-items: center;
  gap: 36px;
  list-style: none;
}
.kl-links a {
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--dark);
  letter-spacing: 0.02em;
  transition: color 0.2s;
  white-space: nowrap;
}
.kl-links a:hover,
.kl-links a.active { color: var(--green); }
.kl-links .kl-cta a {
  background: var(--green);
  color: #fff !important;
  padding: 11px 22px;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background 0.2s;
}
.kl-links .kl-cta a:hover { background: var(--green-l); }

/* hamburger */
.kl-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  z-index: 202;
  position: relative;
}
.kl-burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: transform 0.25s, opacity 0.25s, background 0.25s;
  border-radius: 2px;
}

/* mobile dropdown */
.kl-mobile-menu {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--black);
  z-index: 201;
  flex-direction: column;
  justify-content: center;
  padding: 40px;
  overflow-y: auto;
}
.kl-mobile-menu.open { display: flex; }
.kl-mob-close {
  position: absolute;
  top: 20px; right: 20px;
  background: none; border: none;
  color: #fff; font-size: 1.4rem;
  cursor: pointer; padding: 8px;
  line-height: 1; z-index: 202;
}
.kl-mobile-links {
  list-style: none;
  display: flex;
  flex-direction: column;
}
.kl-mobile-links li {
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.kl-mobile-links li:last-child { border-bottom: none; }
.kl-mobile-links a {
  display: block;
  padding: 20px 0;
  font-family: 'Sora', sans-serif;
  font-size: 1.8rem;
  font-weight: 200;
  color: #fff;
  letter-spacing: -0.02em;
  transition: color 0.2s;
}
.kl-mobile-links a:hover { color: var(--green-l); }
.kl-mobile-links .kl-mob-cta {
  margin-top: 28px;
  border-top: none;
}
.kl-mobile-links .kl-mob-cta a {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 16px 36px;
  font-size: 0.88rem;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 0;
}

/* burger → X when open */
.kl-burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); background: #fff; }
.kl-burger.open span:nth-child(2) { opacity: 0; }
.kl-burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); background: #fff; }

@media (max-width: 860px) {
  .kl-links { display: none; }
  .kl-burger { display: flex; }
}

/* ── FOOTER ── */
.site-footer {
  background: var(--black);
  color: #999;
}
.footer-main {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  border-bottom: 1px solid #2e2e2e;
}
.footer-brand img { height: 48px; display: block; }
.footer-brand p { font-size: 0.82rem; color: #666; line-height: 1.75; max-width: 230px; }
.footer-brand .footer-socials { display: flex; gap: 12px; margin-top: 20px; }
.footer-col h5 {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  margin-bottom: 20px;
}
.footer-col ul { display: flex; flex-direction: column; gap: 11px; }
.footer-col ul a { font-size: 0.82rem; color: #666; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--green-l); }
.footer-col .footer-contact a {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.82rem; color: #666; margin-bottom: 10px;
  transition: color 0.2s;
}
.footer-col .footer-contact a:hover { color: var(--green-l); }
.footer-bottom {
  max-width: var(--max);
  margin: 0 auto;
  padding: 24px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: #444;
}
.footer-bottom a { color: var(--green-l); }

@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 36px; padding: 56px 24px 40px; }
  .footer-bottom { flex-direction: column; gap: 8px; text-align: center; padding: 20px 24px; }
}
@media (max-width: 600px) {
  .footer-main { grid-template-columns: 1fr; gap: 28px; padding: 48px 24px 36px; }
}

/* ── CONTACT FORM ── */
.contact-section { background: var(--bg); }
.contact-section .cs-inner {
  max-width: var(--max);
  margin: 0 auto;
}
.cs-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 80px;
  align-items: start;
}
.cs-info .t-label { margin-bottom: 14px; }
.cs-info .t-section { margin-bottom: 20px; }
.cs-info .t-body { margin-bottom: 36px; }
.cs-channels { display: flex; flex-direction: column; gap: 20px; }
.cs-channel {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: box-shadow 0.2s;
}
.cs-channel:hover { box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.cs-channel-icon {
  width: 44px; height: 44px;
  background: var(--green-bg);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.cs-channel-icon svg { width: 22px; height: 22px; }
.cs-channel-text strong { display: block; font-size: 0.88rem; font-weight: 500; color: var(--black); margin-bottom: 2px; }
.cs-channel-text span { font-size: 0.82rem; color: var(--mid); }

/* Form - Sky Moving style */
.contact-form { background: var(--white); border: 1px solid var(--rule); padding: 44px; }
.form-row { display: flex; gap: 16px; }
.form-group { flex: 1; margin-bottom: 20px; }
.form-group label {
  display: block; font-size: 0.72rem; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--dark); margin-bottom: 7px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: var(--white);
  border: 1.5px solid #dde0e4;
  border-radius: 6px;
  padding: 11px 14px;
  font-family: var(--body);
  font-size: 0.92rem;
  color: var(--dark);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  -webkit-appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(90,158,58,0.12);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: #b0b5bc; }
.form-group select { cursor: pointer; color: var(--mid);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%236B7280' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}
.form-group textarea { min-height: 110px; resize: vertical; }
.form-submit { text-align: right; margin-top: 8px; }

/* Phone field */
.kl-phone-row {
  display: flex;
  align-items: center;
  border: 1.5px solid #dde0e4;
  border-radius: 6px;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--white);
}
.kl-phone-row:focus-within {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(90,158,58,0.12);
}
.kl-phone-prefix {
  font-size: 0.88rem;
  color: var(--mid);
  white-space: nowrap;
  padding: 11px 10px 11px 14px;
  border-right: 1.5px solid #dde0e4;
  flex-shrink: 0;
  background: var(--bg);
  font-weight: 500;
}
.kl-phone-row input {
  border: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
  padding: 11px 14px !important;
  flex: 1;
  min-width: 0;
}
.kl-phone-not-sg {
  font-size: 0.75rem;
  color: var(--green);
  cursor: pointer;
  margin-top: 5px;
  display: inline-block;
  text-decoration: underline;
}

@media (max-width: 860px) {
  .cs-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-form { padding: 28px 20px; }
  .form-row { flex-direction: column; gap: 0; }
}
/* ── GLOBAL MOBILE FIXES ── */
@media (max-width: 600px) {
  html { font-size: 16px; }
  .section-pad { padding: 64px 20px; }
  .section-pad-sm { padding: 48px 20px; }
  .container { padding: 0 20px; }
  /* Kill justify on mobile — causes word-spacing clipping */
  p, li, blockquote { text-align: left !important; }
  /* Equal-width paired buttons */
  .prod-actions, .hero-actions, .cta-actions, .prod-cta, .product-cta { flex-direction: column; }
  .prod-actions .btn, .hero-actions .btn, .cta-actions .btn, .prod-cta .btn, .product-cta .btn { width: 100%; max-width: 360px; justify-content: center; }
}

/* ── WA FAB ── */
.wa-fab { position: fixed; bottom: 28px; right: 24px; z-index: 300; }
.wa-fab-btn {
  width: 54px; height: 54px; background: #25D366;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.35);
  cursor: pointer; transition: transform 0.22s var(--ease), box-shadow 0.22s;
}
.wa-fab-btn:hover { transform: scale(1.08); box-shadow: 0 6px 28px rgba(37,211,102,0.45); }
.wa-fab-btn svg { width: 28px; height: 28px; fill: #fff; }
.wa-bubble {
  position: absolute; bottom: 68px; right: 0;
  background: var(--white); border: 1px solid var(--rule);
  border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  width: 260px; padding: 16px; display: none; flex-direction: column; gap: 8px;
}
.wa-bubble.open { display: flex; }
.wa-bubble-title { font-size: 0.7rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--light); margin-bottom: 6px; }
.wa-bubble a {
  display: block; background: #f0fae6; border: 1px solid #c5e89a;
  border-radius: 6px; padding: 10px 13px; font-size: 0.82rem;
  color: var(--dark); line-height: 1.4; transition: background 0.15s;
}
.wa-bubble a:hover { background: #d9f1b0; }

/* ── REVEAL ANIMATION ── */
.reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
  }
  .reveal.in-view { opacity: 1; transform: none; }
  .reveal-delay-1 { transition-delay: 0.1s; }
  .reveal-delay-2 { transition-delay: 0.2s; }
  .reveal-delay-3 { transition-delay: 0.3s; }
}

/* ── STAT COUNTER ── */
.stat-num { font-variant-numeric: tabular-nums; }

/* ── LANG TOGGLE ── */
.kl-lang-toggle {
  background: none;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 6px 12px;
  font-family: var(--body);
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--dark);
  white-space: nowrap;
  transition: border-color 0.2s;
}
.kl-lang-toggle:hover { border-color: var(--green); }
.kl-lang-active { font-weight: 600; color: var(--green); }
.kl-lang-sep { color: var(--light); margin: 0 2px; }
.kl-lang-zh { color: var(--mid); }
.kl-lang-en { color: var(--mid); }

/* CJK body adjustments */
.lang-zh-active { word-break: break-all; }
.lang-zh-active .t-hero,
.lang-zh-active .t-section,
.lang-zh-active .t-sub { letter-spacing: 0; }
.lang-zh-active p,
.lang-zh-active li { line-height: 1.9; }

/* ── STAT COLOR FIX ── */
.stat-item .num span { color: var(--green); }

/* Nav right group (lang toggle + burger) */
.kl-nav-right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.kl-lang-inline {
  font-size: 0.72rem;
  padding: 5px 10px;
}
@media (min-width: 861px) {
  .kl-nav-right { display: none; }
}
