/* ==========================================================================
   Koadi Technology — Shared design system (public visitor pages)
   Marketplace direction (Variant A) — slate base + brand blue/orange CTAs.
   ========================================================================== */

:root {
  --brand-primary: #1B75BC;
  --brand-primary-hover: #155A94;
  --brand-accent: #F7941D;
  --brand-accent-hover: #E8850F;

  --bg: #f8fafc;
  --bg-elevated: #ffffff;
  --text-primary: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,0.04);
  --shadow-md: 0 6px 20px -8px rgba(15,23,42,0.10);
  --shadow-lg: 0 16px 40px -16px rgba(15,23,42,0.18);
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-feature-settings: 'cv11','ss01';
  color: var(--text-primary);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
@media (min-width: 768px) { .container { padding: 0 32px; } }

/* Brand text spans */
.brand-blue { color: var(--brand-primary); }
.brand-orange { color: var(--brand-accent); }
.blue { color: var(--brand-primary); }
.orange { color: var(--brand-accent); }

/* ==========================================================================
   NAV (consistent across all visitor pages)
   ========================================================================== */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.site-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 24px;
}
.site-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 19px; font-weight: 800;
  color: var(--text-primary); letter-spacing: -0.02em;
}
.site-brand img { width: 32px; height: 32px; border-radius: 8px; }
.site-nav-links {
  display: none; align-items: center; gap: 28px;
}
@media (min-width: 880px) { .site-nav-links { display: flex; } }
.site-nav-links a {
  font-size: 14px; font-weight: 500; color: var(--text-body);
  transition: color .15s;
}
.site-nav-links a:hover { color: var(--text-primary); }
.site-nav-links a.is-active { color: var(--brand-primary); }
.site-nav-cta { display: inline-flex; align-items: center; gap: 8px; }
.site-nav-cta .btn-ghost { display: none; }
@media (min-width: 640px) { .site-nav-cta .btn-ghost { display: inline-flex; } }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color .15s, color .15s, border-color .15s, box-shadow .15s, transform .05s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-lg { height: 54px; padding: 0 28px; font-size: 16px; border-radius: 12px; }

.btn-primary {
  background: var(--brand-accent); color: #fff;
  box-shadow: 0 6px 18px -8px rgba(247,148,29,0.55);
}
.btn-primary:hover { background: var(--brand-accent-hover); }

.btn-secondary {
  background: transparent; color: var(--brand-primary); border-color: var(--brand-primary);
}
.btn-secondary:hover { background: rgba(27,117,188,0.08); }

.btn-ghost {
  background: transparent; color: var(--text-body);
}
.btn-ghost:hover { color: var(--text-primary); background: #f1f5f9; }

.btn-blue {
  background: var(--brand-primary); color: #fff;
}
.btn-blue:hover { background: var(--brand-primary-hover); }

/* On dark backgrounds */
.btn-on-dark {
  background: rgba(255,255,255,0.10); color: #fff;
  border-color: rgba(255,255,255,0.20);
  backdrop-filter: blur(8px);
}
.btn-on-dark:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.32); }

/* ==========================================================================
   FORM CONTROLS (auth pages, contact form)
   ========================================================================== */
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; text-align: left; }
.form-label {
  font-size: 13px; font-weight: 600; color: var(--text-body);
}
.form-input, .form-select, .form-textarea {
  width: 100%; height: 48px; padding: 0 14px;
  background: #fff; color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--radius-md);
  font-size: 15px; font-family: inherit;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(27,117,188,0.18);
}
.form-input::placeholder, .form-textarea::placeholder { color: #94a3b8; }
.form-help { font-size: 13px; color: var(--text-muted); }
.form-help svg { vertical-align: -3px; margin-right: 4px; }

/* Flash / alert */
.flash {
  padding: 12px 16px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500; margin-bottom: 16px;
  text-align: left; line-height: 1.45;
}
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.flash-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.flash-info    { background: #dbeafe; color: #1e3a8a; border: 1px solid #bfdbfe; }

/* Auth (login/register) shell */
.auth-shell {
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--bg);
}
.auth-main {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 48px 20px;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-xl); padding: 40px 36px;
  box-shadow: var(--shadow-lg);
}
.auth-card.wide { max-width: 520px; padding: 36px 36px; }
.auth-header { text-align: center; margin-bottom: 28px; }
.auth-header .site-brand { justify-content: center; margin-bottom: 12px; font-size: 22px; }
.auth-title { font-size: 24px; font-weight: 800; letter-spacing: -0.01em; color: var(--text-primary); }
.auth-sub { margin-top: 6px; font-size: 14px; color: var(--text-muted); }
.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 24px 0; color: var(--text-muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: 0.08em;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-foot {
  text-align: center; font-size: 14px; color: var(--text-muted);
}
.auth-foot a { color: var(--brand-primary); font-weight: 600; }
.auth-foot a:hover { text-decoration: underline; }

/* Role chooser (register page) */
.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.role-grid input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.role-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 12px; border: 2px solid var(--border); border-radius: var(--radius-lg);
  background: #fff; cursor: pointer; transition: border-color .15s, background-color .15s;
  text-align: center;
}
.role-card svg { width: 28px; height: 28px; }
.role-card .role-title { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.role-card .role-desc { font-size: 12px; color: var(--text-muted); }
input[type="radio"]:checked + .role-card { border-color: var(--brand-primary); background: rgba(27,117,188,0.06); }

/* ==========================================================================
   FOOTER (consistent across all visitor pages)
   ========================================================================== */
.site-footer {
  background: #fff; border-top: 1px solid var(--border);
  padding: 56px 0 28px; margin-top: auto;
}
.site-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px;
  margin-bottom: 40px;
}
@media (max-width: 820px) { .site-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; } }
@media (max-width: 480px) { .site-footer-grid { grid-template-columns: 1fr; } }
.site-footer-brand .site-brand { margin-bottom: 14px; }
.site-footer-brand p {
  font-size: 14px; color: var(--text-muted); line-height: 1.55; max-width: 320px;
}
.site-footer-col h4 {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px;
}
.site-footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.site-footer-col a {
  font-size: 14px; color: var(--text-muted); transition: color .15s;
}
.site-footer-col a:hover { color: var(--brand-primary); }
.site-footer-bottom {
  padding-top: 24px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted); flex-wrap: wrap; gap: 16px;
}
.site-footer-legal { display: flex; gap: 24px; }
.site-footer-legal a { color: var(--text-muted); transition: color .15s; }
.site-footer-legal a:hover { color: var(--text-primary); }

/* ==========================================================================
   PAGE HERO (for non-home pages: about, services, contact, etc.)
   ========================================================================== */
.page-hero {
  background: #fff; border-bottom: 1px solid var(--border);
  padding: 64px 0 48px;
}
.page-hero h1 {
  font-size: clamp(32px, 4vw, 44px); font-weight: 800;
  letter-spacing: -0.02em; color: var(--text-primary);
}
.page-hero p {
  margin-top: 14px; max-width: 680px; font-size: 17px;
  color: var(--text-muted); line-height: 1.6;
}
.page-breadcrumb {
  font-size: 13px; color: var(--text-muted); margin-bottom: 14px;
}
.page-breadcrumb a { color: var(--text-muted); }
.page-breadcrumb a:hover { color: var(--brand-primary); }

/* Page hero with image (2-col split) */
.page-hero {
  background:
    radial-gradient(900px 500px at 85% 0%, rgba(247,148,29,0.06), transparent 60%),
    radial-gradient(900px 500px at 0% 50%, rgba(27,117,188,0.07), transparent 60%),
    #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 72px 0 80px;
}
.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.page-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(27,117,188,0.10); color: var(--brand-primary);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600;
}
.page-hero h1 {
  font-size: clamp(36px, 4.6vw, 52px);
  font-weight: 800; letter-spacing: -0.02em;
  line-height: 1.08; color: var(--text-primary); margin-top: 18px;
}
.page-hero h1 .accent { color: var(--brand-primary); display: block; }
.page-hero p.lead {
  margin-top: 22px; font-size: 18px; color: var(--text-muted);
  line-height: 1.6; max-width: 560px;
}
.page-hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 12px; }
.page-hero-img {
  border-radius: 24px; overflow: hidden;
  box-shadow: 0 30px 70px -20px rgba(15,23,42,0.25);
  border: 1px solid var(--border);
  background: #f1f5f9;
  aspect-ratio: 4/3;
}
.page-hero-img img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
@media (max-width: 980px) {
  .page-hero { padding: 48px 0 56px; }
  .page-hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .page-hero-img { aspect-ratio: 16/10; max-width: 560px; margin: 0 auto; }
}

/* ====== Hero with full-bleed background image (home, services, contact) ====== */
/* Uses doubled-class selectors for higher specificity than per-page inline .hero / .page-hero rules. */
.hero.hero--bg,
.page-hero.page-hero--bg {
  background-color: #fff;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
}
.hero.hero--bg {
  background-image:
    linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.92) 30%, rgba(255,255,255,0.55) 55%, rgba(255,255,255,0) 75%),
    url('/assets/images/home-hero-bg.jpg');
}
.page-hero.page-hero--bg[data-bg="services"] {
  background-image:
    linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.92) 30%, rgba(255,255,255,0.55) 55%, rgba(255,255,255,0) 75%),
    url('/assets/images/services-hero-bg.jpg');
}
.page-hero.page-hero--bg[data-bg="contact"] {
  background-image:
    linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.92) 30%, rgba(255,255,255,0.55) 55%, rgba(255,255,255,0) 75%),
    url('/assets/images/contact-hero-bg.jpg');
}
.page-hero.page-hero--bg[data-bg="about"] {
  background-image:
    linear-gradient(90deg, #ffffff 0%, rgba(255,255,255,0.92) 30%, rgba(255,255,255,0.55) 55%, rgba(255,255,255,0) 75%),
    url('/assets/images/about-hero-bg.jpg');
}
.hero.hero--bg .hero-grid,
.page-hero.page-hero--bg .page-hero-grid {
  grid-template-columns: 1fr;
}
.hero.hero--bg .hero-grid > div:first-child,
.page-hero.page-hero--bg .page-hero-grid > div:first-child {
  max-width: 640px;
}
.hero.hero--bg .hero-visual,
.page-hero.page-hero--bg .page-hero-img {
  display: none;
}
@media (max-width: 980px) {
  .hero.hero--bg {
    background-image:
      linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
      url('/assets/images/home-hero-bg.jpg');
    background-position: center;
  }
  .page-hero.page-hero--bg[data-bg="services"] {
    background-image:
      linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
      url('/assets/images/services-hero-bg.jpg');
    background-position: center;
  }
  .page-hero.page-hero--bg[data-bg="contact"] {
    background-image:
      linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
      url('/assets/images/contact-hero-bg.jpg');
    background-position: center;
  }
  .page-hero.page-hero--bg[data-bg="about"] {
    background-image:
      linear-gradient(rgba(255,255,255,0.85), rgba(255,255,255,0.85)),
      url('/assets/images/about-hero-bg.jpg');
    background-position: center;
  }
}

/* Generic section wrapper used across visitor pages */
.section { padding: 80px 0; }
.section-alt { background: #f8fafc; }
.section-dark { background: #0f172a; color: #fff; }
.section-dark h2, .section-dark h3 { color: #fff; }
.section-dark p { color: #cbd5e1; }
.section-eyebrow {
  display: inline-block;
  font-size: 12px; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--brand-primary);
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(28px, 3.4vw, 40px); font-weight: 800;
  letter-spacing: -0.02em; line-height: 1.15; color: var(--text-primary);
}
.section .lead {
  margin-top: 16px; font-size: 17px; color: var(--text-muted);
  line-height: 1.65; max-width: 720px;
}

/* Reusable card grid for service categories, values, etc. */
.card-grid {
  display: grid; gap: 20px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-top: 40px;
}
.k-card {
  background: #fff; border: 1px solid var(--border);
  border-radius: 16px; padding: 28px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.k-card:hover { border-color: var(--brand-primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.k-card-icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: rgba(27,117,188,0.10); color: var(--brand-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 16px;
}
.k-card-icon.accent { background: rgba(247,148,29,0.12); color: var(--brand-accent); }
.k-card-icon.success { background: rgba(16,185,129,0.12); color: #059669; }
.k-card-icon.danger  { background: rgba(239, 68, 68,0.12); color: #dc2626; }
.k-card-icon.purple  { background: rgba(124, 58,237,0.12); color: #7c3aed; }
.k-card h3 { font-size: 18px; font-weight: 700; color: var(--text-primary); margin-bottom: 8px; }
.k-card p  { font-size: 15px; color: var(--text-muted); line-height: 1.6; }
.k-card ul { list-style: none; padding: 0; margin-top: 12px; }
.k-card ul li {
  font-size: 14px; color: var(--text-body); padding: 6px 0 6px 22px;
  position: relative; line-height: 1.5;
}
.k-card ul li::before {
  content: ''; position: absolute; left: 0; top: 13px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-primary);
}

/* Final CTA strip — consistent with homepage */
.cta-strip {
  background: var(--brand-primary); color: #fff;
  padding: 72px 24px; text-align: center; border-radius: 0;
  position: relative; overflow: hidden;
}
.cta-strip::before {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.12) 1px, transparent 0);
  background-size: 24px 24px; opacity: 0.5;
}
.cta-strip-inner { position: relative; max-width: 720px; margin: 0 auto; }
.cta-strip h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.cta-strip p { font-size: 18px; color: #dbeafe; margin: 16px auto 28px; max-width: 560px; line-height: 1.55; }
.cta-strip-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
