/* ========================================================================
   Kabware Services — 2026 Redesign
   "Editorial Engineering" — precision typography meets warm confidence
   ======================================================================== */

/* ── Design Tokens (Dark default) ── */
:root {
  --c-bg: #09090b;
  --c-surface: #111113;
  --c-elevated: #1a1a1e;
  --c-text: #fafafa;
  --c-text-2: #a1a1aa;
  --c-text-3: #63636e;
  --c-brand: #10b981;
  --c-brand-dim: rgba(16, 185, 129, 0.10);
  --c-accent: #f59e0b;
  --c-border: rgba(255, 255, 255, 0.06);
  --c-border-h: rgba(255, 255, 255, 0.13);
  --r: 14px;
  --r-sm: 8px;
  --r-lg: 20px;
  --shadow: 0 2px 20px rgba(0,0,0,0.25);
  --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
  --f-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --f-body: 'DM Sans', system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.3s var(--ease);
  --t-fast: 0.15s var(--ease);
  --container: 1140px;
  --gutter: 24px;
  color-scheme: dark light;
}

/* ── Light mode (auto) ── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --c-bg: #fafaf9;
    --c-surface: #f0efed;
    --c-elevated: #ffffff;
    --c-text: #1a1a1a;
    --c-text-2: #5c5c66;
    --c-text-3: #9c9ca6;
    --c-brand: #059669;
    --c-brand-dim: rgba(5, 150, 105, 0.07);
    --c-accent: #d97706;
    --c-border: rgba(0, 0, 0, 0.07);
    --c-border-h: rgba(0, 0, 0, 0.14);
    --shadow: 0 2px 20px rgba(0,0,0,0.05);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.08);
  }
}

/* ── Explicit overrides ── */
:root[data-theme="dark"] {
  --c-bg: #09090b; --c-surface: #111113; --c-elevated: #1a1a1e;
  --c-text: #fafafa; --c-text-2: #a1a1aa; --c-text-3: #63636e;
  --c-brand: #10b981; --c-brand-dim: rgba(16,185,129,0.10); --c-accent: #f59e0b;
  --c-border: rgba(255,255,255,0.06); --c-border-h: rgba(255,255,255,0.13);
  --shadow: 0 2px 20px rgba(0,0,0,0.25); --shadow-lg: 0 12px 48px rgba(0,0,0,0.4);
}
:root[data-theme="light"] {
  --c-bg: #fafaf9; --c-surface: #f0efed; --c-elevated: #ffffff;
  --c-text: #1a1a1a; --c-text-2: #5c5c66; --c-text-3: #9c9ca6;
  --c-brand: #059669; --c-brand-dim: rgba(5,150,105,0.07); --c-accent: #d97706;
  --c-border: rgba(0,0,0,0.07); --c-border-h: rgba(0,0,0,0.14);
  --shadow: 0 2px 20px rgba(0,0,0,0.05); --shadow-lg: 0 12px 48px rgba(0,0,0,0.08);
}


/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul, ol { list-style: none; }


/* ── Noise Grain ── */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}

/* ── Ambient glow ── */
body::before {
  content: "";
  position: fixed;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 1200px;
  height: 600px;
  background: radial-gradient(ellipse, var(--c-brand-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: -1;
}


/* ── Layout ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-alt {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  border-bottom: 1px solid var(--c-border);
}


/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(38px, 6vw, 72px); }
h2 { font-size: clamp(28px, 4vw, 48px); }
h3 { font-size: clamp(20px, 2.5vw, 26px); }

h1 em, h2 em, h3 em {
  font-style: italic;
  color: var(--c-brand);
}

.section-label {
  display: inline-block;
  font-family: var(--f-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-brand);
  margin-bottom: 12px;
}

.section-header { margin-bottom: 48px; }
.section-header h2 { margin-top: 4px; }

.lead {
  font-size: clamp(17px, 1.8vw, 20px);
  color: var(--c-text-2);
  line-height: 1.65;
  max-width: 620px;
}

p + p { margin-top: 16px; }


/* ── Header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--c-border);
  background: color-mix(in srgb, var(--c-bg) 82%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.01em;
}
.brand img { filter: drop-shadow(0 2px 6px rgba(0,0,0,0.15)); }

.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  padding: 7px 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--c-text-2);
  border-radius: var(--r-sm);
  transition: color var(--t-fast), background var(--t-fast);
}
.nav a:hover, .nav a[aria-current="page"] {
  color: var(--c-text);
  background: var(--c-brand-dim);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-sm);
  color: var(--c-text-2);
  transition: color var(--t-fast), background var(--t-fast);
}
.menu-toggle:hover { color: var(--c-text); background: var(--c-brand-dim); }
.menu-toggle svg { width: 22px; height: 22px; }

@media (max-width: 640px) {
  .menu-toggle { display: flex; }
  .nav {
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    flex-direction: column;
    padding: 12px var(--gutter) 20px;
    background: color-mix(in srgb, var(--c-bg) 95%, transparent);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--c-border);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--t), transform var(--t);
  }
  .nav.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav a { padding: 12px 16px; font-size: 16px; width: 100%; border-radius: var(--r-sm); }
}


/* ── Hero (homepage) ── */
.hero {
  position: relative;
  min-height: clamp(520px, 88vh, 960px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 25%;
}
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      color-mix(in srgb, var(--c-bg) 5%, transparent) 0%,
      color-mix(in srgb, var(--c-bg) 25%, transparent) 35%,
      color-mix(in srgb, var(--c-bg) 70%, transparent) 65%,
      var(--c-bg) 100%
    );
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-bottom: clamp(48px, 8vw, 96px);
  max-width: 720px;
}

.hero-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-brand);
  padding: 6px 14px;
  border: 1px solid var(--c-brand);
  border-radius: 999px;
  margin-bottom: 24px;
  background: var(--c-bg);
  backdrop-filter: blur(8px);
}

.hero-title {
  margin-bottom: 20px;
}

.hero-sub {
  font-size: clamp(16px, 1.8vw, 19px);
  color: var(--c-text-2);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 32px;
}

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  color: var(--c-text-3);
  animation: float 2.4s ease-in-out infinite;
}
.hero-scroll svg { width: 24px; height: 24px; }

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.5; }
  50% { transform: translateX(-50%) translateY(6px); opacity: 1; }
}

@media (max-width: 640px) {
  .hero { min-height: 70vh; }
  .hero-bg img { object-position: 60% 20%; }
}


/* ── Page Hero (subpages) ── */
.page-hero {
  padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px);
  border-bottom: 1px solid var(--c-border);
}
.page-hero .section-label { margin-bottom: 16px; }
.page-hero h1 { margin-bottom: 16px; }
.page-hero .lead { margin-top: 8px; }


/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--c-border);
  transition: transform var(--t-fast), box-shadow var(--t), border-color var(--t), background var(--t), color var(--t);
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--c-brand);
  border-color: var(--c-brand);
  color: #fff;
}
.btn-primary:hover {
  box-shadow: 0 4px 24px color-mix(in srgb, var(--c-brand) 35%, transparent);
}

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-h);
}
.btn-ghost:hover {
  background: var(--c-brand-dim);
  border-color: color-mix(in srgb, var(--c-brand) 20%, var(--c-border));
}

.btn-outline {
  background: transparent;
  color: var(--c-text);
  border-color: var(--c-border-h);
}
.btn-outline:hover {
  background: var(--c-brand-dim);
  border-color: color-mix(in srgb, var(--c-brand) 20%, var(--c-border));
}

.cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}


/* ── Cards ── */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-surface);
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
  overflow: hidden;
}

/* Gradient top-line on hover */
.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 15%;
  right: 15%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-brand), transparent);
  opacity: 0;
  transition: opacity var(--t);
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--c-border-h);
  box-shadow: var(--shadow-lg);
}
.card:hover::before { opacity: 0.6; }

.card-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-sm);
  background: var(--c-brand-dim);
  margin-bottom: 18px;
}
.card-icon img { width: 24px; height: 24px; color: var(--c-brand); }

.card-title {
  font-family: var(--f-display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 8px;
}

.card-desc {
  color: var(--c-text-2);
  font-size: 15px;
  line-height: 1.55;
  flex: 1;
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  font-size: 14px;
  font-weight: 600;
  color: var(--c-brand);
  transition: gap var(--t);
}
.card:hover .card-link { gap: 10px; }

.card-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; margin-bottom: 12px; }
.card-actions--stack { flex-direction: column; }
.btn-sm { font-size: 12px; padding: 6px 14px; }
.btn-full { width: 100%; text-align: center; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

@media (max-width: 640px) {
  .card-grid { grid-template-columns: 1fr; }
  .card { padding: 24px 20px; }
}


/* ── About teaser (homepage) ── */
.about-teaser {
  text-align: center;
  max-width: 680px;
  margin: 0 auto;
}
.about-teaser h2 { margin-bottom: 20px; }
.about-teaser p {
  color: var(--c-text-2);
  font-size: 17px;
  line-height: 1.7;
  margin-bottom: 28px;
}


/* ── Two-column layout ── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.two-col p {
  color: var(--c-text-2);
  font-size: 17px;
  line-height: 1.7;
}
@media (max-width: 768px) {
  .two-col { grid-template-columns: 1fr; gap: 32px; }
}


/* ── Service detail ── */
.service-layout {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
@media (max-width: 920px) {
  .service-layout { grid-template-columns: 1fr; }
  .service-image { order: -1; }
}

.service-block { margin-bottom: 48px; }
.service-block:last-child { margin-bottom: 0; }

.service-image img {
  border-radius: var(--r-lg);
  border: 1px solid var(--c-border);
  width: 100%;
  background: #0c1220;
}

/* Check list for problems / outcomes */
.check-list { padding: 0; margin-top: 16px; }
.check-list li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--c-text-2);
  line-height: 1.55;
}
.check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-brand);
  opacity: 0.6;
}

/* Feature grid (on service detail) */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.feature-card {
  padding: 20px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-surface);
}
.feature-card strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 17px;
  margin-bottom: 6px;
}
.feature-card p {
  color: var(--c-text-2);
  font-size: 14px;
  line-height: 1.55;
}
.feature-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.feature-list li {
  color: var(--c-text-2);
  font-size: 14px;
  line-height: 1.55;
  padding: 4px 0 4px 18px;
  position: relative;
}
.feature-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c-brand);
  opacity: 0.5;
}

@media (max-width: 640px) {
  .feature-grid { grid-template-columns: 1fr; }
}


/* ── FAQ ── */
.faq-list { margin-top: 16px; }
.faq-item {
  border-bottom: 1px solid var(--c-border);
}
.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
  transition: color var(--t-fast);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 20px;
  font-weight: 300;
  color: var(--c-text-3);
  transition: transform var(--t);
}
.faq-item[open] summary::after {
  transform: rotate(45deg);
}
.faq-item summary:hover { color: var(--c-brand); }
.faq-item .faq-answer {
  padding: 0 0 18px;
  color: var(--c-text-2);
  line-height: 1.65;
  font-size: 15px;
}


/* ── Forms & Inputs ── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--c-text-2);
  margin-bottom: 6px;
}

input, textarea {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  font-family: var(--f-body);
  color: var(--c-text);
  background: var(--c-elevated);
  border: 1px solid var(--c-border);
  border-radius: var(--r-sm);
  outline: none;
  transition: border-color var(--t), box-shadow var(--t);
}
input::placeholder, textarea::placeholder { color: var(--c-text-3); }
input:focus, textarea:focus {
  border-color: var(--c-brand);
  box-shadow: 0 0 0 3px var(--c-brand-dim);
}
textarea { min-height: 140px; resize: vertical; }

.contact-form {
  display: grid;
  gap: 16px;
  max-width: 520px;
}

.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-info h2 {
  margin-bottom: 16px;
}
.contact-info p {
  color: var(--c-text-2);
  line-height: 1.7;
  margin-bottom: 24px;
}
.contact-detail {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-border);
  color: var(--c-text-2);
  font-size: 15px;
}
.contact-detail svg { width: 18px; height: 18px; color: var(--c-brand); flex-shrink: 0; }

@media (max-width: 768px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-form { max-width: 100%; }
}


/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--c-border);
  margin-top: 0;
  padding: 48px 0 36px;
  background: var(--c-surface);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  color: var(--c-text-2);
}
.footer-brand img { opacity: 0.6; }

.footer-links {
  display: flex;
  gap: 24px;
}
.footer-links a {
  font-size: 14px;
  color: var(--c-text-3);
  transition: color var(--t-fast);
}
.footer-links a:hover { color: var(--c-text); }

.footer-copy {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: var(--c-text-3);
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}


/* ── Theme Toggle ── */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  color: var(--c-text-3);
  transition: color var(--t-fast), background var(--t-fast);
  margin-left: 4px;
}
.theme-toggle:hover { color: var(--c-text); background: var(--c-brand-dim); }
.theme-toggle svg { width: 18px; height: 18px; }


/* ── Scroll Reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children in card grids */
.card-grid .card { transition-delay: calc(var(--i, 0) * 0.07s); }


/* ── Values grid (about page) ── */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 32px;
}
.value-item {
  padding: 28px 24px;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-surface);
}
.value-item h3 {
  font-size: 19px;
  margin-bottom: 8px;
}
.value-item p {
  color: var(--c-text-2);
  font-size: 15px;
  line-height: 1.55;
}


/* ── Status message ── */
.status-msg {
  padding: 12px 16px;
  border-radius: var(--r-sm);
  font-size: 15px;
  background: var(--c-brand-dim);
  color: var(--c-brand);
  border: 1px solid color-mix(in srgb, var(--c-brand) 20%, transparent);
}
.status-msg:empty { display: none; }
.status-msg.status-success {
  background: var(--c-brand-dim);
  color: var(--c-brand);
  border-color: color-mix(in srgb, var(--c-brand) 20%, transparent);
}
.status-msg.status-error {
  background: color-mix(in srgb, #ef4444 8%, transparent);
  color: #ef4444;
  border-color: color-mix(in srgb, #ef4444 20%, transparent);
}


/* ── Misc utilities ── */
.muted { color: var(--c-text-2); }
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-48 { margin-bottom: 48px; }

/* Concordis privacy/legal page */
.policy-content {
  max-width: 880px;
}

.policy-section {
  padding: 36px 0;
  border-bottom: 1px solid var(--c-border);
}

.policy-section:last-child {
  border-bottom: 0;
}

.policy-section h2 {
  margin-bottom: 16px;
}

.policy-section p,
.policy-section li {
  color: var(--c-text-2);
  font-size: 16px;
  line-height: 1.7;
}

.policy-section a {
  color: var(--c-brand);
}

.policy-section ul,
.policy-section ol {
  list-style: disc;
  padding-left: 24px;
  margin-top: 14px;
}

.policy-section ol {
  list-style: decimal;
}

.policy-section li + li {
  margin-top: 8px;
}

.policy-table-wrapper {
  overflow-x: auto;
  margin: 18px 0;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  background: var(--c-surface);
}

.policy-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.policy-table th,
.policy-table td {
  padding: 14px 16px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-border);
}

.policy-table th {
  color: var(--c-text);
  font-weight: 600;
  background: var(--c-elevated);
}

.policy-table tr:last-child td {
  border-bottom: 0;
}
