/* Kerning Consulting — shared design system
 *
 * Mirrors the visual language of index.html and projects.html
 * (neumorphic, dual-theme, Inter + Manrope) and reuses the projectbox
 * canvas pattern as a responsive animated background.
 *
 * The Tailwind CDN supplies utility classes; this file owns the
 * design tokens, component primitives, and the canvas layer.
 */

html { scroll-behavior: smooth; }
body { cursor: default; }

/* ── Architectural grid (used as a static base layer beneath the canvas) ── */
.architectural-grid {
  background-image:
    linear-gradient(to right, rgba(0,0,0,0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0,0,0,0.05) 1px, transparent 1px);
  background-size: 40px 40px;
}
.dark .architectural-grid {
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.03) 1px, transparent 1px);
}

/* ── Pattern canvas (theme-aware variant of projectbox pattern) ── */
.kc-pattern {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.kc-pattern__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── Neumorphic hero text (matches index.html style) ── */
.neumorphic-text {
  color: #F9FAFB;
  text-shadow:
    -12px -12px 24px rgba(255, 255, 255, 1),
    12px 12px 24px rgba(0, 0, 0, 0.15);
  -webkit-background-clip: text;
  transition: text-shadow 0.08s ease-out;
}
.dark .neumorphic-text {
  color: #0A0A0A;
  text-shadow:
    -8px -8px 20px rgba(255, 255, 255, 0.08),
    12px 12px 30px rgba(0, 0, 0, 0.8);
}

/* ── Neumorphic card (matches projects.html cards) ── */
.kc-card {
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    -10px -10px 26px rgba(255, 255, 255, 0.9),
    10px 10px 26px rgba(0, 0, 0, 0.07);
  transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease-out;
}
.dark .kc-card {
  background: #141414;
  box-shadow:
    -8px -8px 22px rgba(255, 255, 255, 0.025),
    10px 10px 28px rgba(0, 0, 0, 0.55);
}

/* Flat-edge variant used for stat strips, FAQ rows, step cards, tiles */
.kc-card-flat {
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 16px;
}
.dark .kc-card-flat {
  background: #141414;
  border-color: rgba(255, 255, 255, 0.07);
}

/* ── Buttons ── */
.kc-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  background: #111111;
  color: #ffffff;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  border: 1.5px solid #111111;
  cursor: pointer;
  white-space: nowrap;
}
.kc-btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.14);
}
.kc-btn-primary:active:not(:disabled) { transform: translateY(0); }
.kc-btn-primary:disabled,
.kc-btn-primary[disabled] {
  opacity: 0.32;
  cursor: not-allowed;
  pointer-events: none;
}
.dark .kc-btn-primary {
  background: #ffffff;
  color: #0A0A0A;
  border-color: #ffffff;
}
.dark .kc-btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 26px rgba(255, 255, 255, 0.1);
}

.kc-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.625rem;
  background: #ffffff;
  color: #111111;
  border: 1.5px solid rgba(17, 17, 17, 0.18);
  border-radius: 999px;
  font-weight: 500;
  font-size: 0.875rem;
  transition: border-color 0.2s ease, background-color 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}
.kc-btn-secondary:hover:not(:disabled) {
  border-color: rgba(17, 17, 17, 0.45);
  background-color: #f4f4f4;
}
.kc-btn-secondary:disabled,
.kc-btn-secondary[disabled] {
  opacity: 0.32;
  cursor: not-allowed;
}
.dark .kc-btn-secondary {
  background: #141414;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.18);
}
.dark .kc-btn-secondary:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.42);
  background-color: #1e1e1e;
}

.kc-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.25rem;
  transition: opacity 0.2s ease;
}
.kc-btn-ghost:hover { opacity: 0.6; }

/* ── Form field wrapper ── */
.kc-field {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ── Form label ── */
.kc-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.45);
  margin-bottom: 0.55rem;
  transition: color 0.15s ease;
}
.dark .kc-label { color: rgba(255, 255, 255, 0.4); }
.kc-field:focus-within .kc-label { color: rgba(17, 17, 17, 0.75); }
.dark .kc-field:focus-within .kc-label { color: rgba(255, 255, 255, 0.7); }
.kc-label-optional {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.68rem;
  opacity: 0.65;
  margin-left: 0.35rem;
}

/* ── Form inputs (used in outreach form + diagnostic results) ── */
.kc-input,
.kc-textarea {
  width: 100%;
  background: #ffffff;
  border: 1.5px solid rgba(17, 17, 17, 0.1);
  border-radius: 10px;
  padding: 0.875rem 1.05rem;
  font-size: 0.925rem;
  color: #111111;
  font-family: 'Inter', sans-serif;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
}
.kc-input::placeholder,
.kc-textarea::placeholder {
  color: rgba(17, 17, 17, 0.28);
  font-size: 0.9rem;
}
.kc-input:hover:not(:focus),
.kc-textarea:hover:not(:focus) {
  border-color: rgba(17, 17, 17, 0.22);
}
.kc-input:focus,
.kc-textarea:focus {
  outline: none;
  border-color: #111111;
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.07), 0 1px 4px rgba(0, 0, 0, 0.05);
}
.kc-textarea {
  resize: vertical;
  min-height: 140px;
  line-height: 1.65;
  padding-top: 0.9rem;
}

.dark .kc-input,
.dark .kc-textarea {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #F9FAFB;
}
.dark .kc-input::placeholder,
.dark .kc-textarea::placeholder { color: rgba(255, 255, 255, 0.25); }
.dark .kc-input:hover:not(:focus),
.dark .kc-textarea:hover:not(:focus) {
  border-color: rgba(255, 255, 255, 0.2);
}
.dark .kc-input:focus,
.dark .kc-textarea:focus {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}

/* ── Diagnostic question tiles ── */
.kc-tile {
  display: flex;
  flex-direction: column;
  text-align: left;
  width: 100%;
  padding: 1.25rem 1.4rem;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 16px;
  background: #ffffff;
  transition: border-color 0.18s ease, background-color 0.18s ease,
              transform 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
  min-height: 92px;
}
.kc-tile:hover {
  border-color: rgba(17, 17, 17, 0.35);
  transform: translateY(-1px);
}
.kc-tile[data-selected="true"] {
  border-color: #111111;
  background: rgba(17, 17, 17, 0.04);
  box-shadow: 0 8px 24px rgba(17, 17, 17, 0.06),
              inset 0 0 0 1px #111111;
}
.kc-tile[data-high-intent="true"] {
  background: linear-gradient(135deg, rgba(17, 17, 17, 0.04), rgba(17, 17, 17, 0.02));
}
.dark .kc-tile {
  border-color: rgba(255, 255, 255, 0.1);
  background: #1a1a1a;
  color: #F9FAFB;
}
.dark .kc-tile:hover { border-color: rgba(255, 255, 255, 0.45); }
.dark .kc-tile[data-selected="true"] {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35),
              inset 0 0 0 1px #ffffff;
}

.kc-tile-label {
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 1.02rem;
  line-height: 1.3;
}
.kc-tile-helper {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: rgba(17, 17, 17, 0.55);
  line-height: 1.45;
}
.dark .kc-tile-helper { color: rgba(255, 255, 255, 0.55); }

/* ── Progress bar ── */
.kc-progress-track {
  height: 3px;
  background: rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  overflow: hidden;
}
.kc-progress-fill {
  height: 100%;
  background: #111111;
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.dark .kc-progress-track { background: rgba(255, 255, 255, 0.1); }
.dark .kc-progress-fill { background: #ffffff; }

/* ── Animations ── */
@keyframes kc-fade-in-up {
  0%   { opacity: 0; transform: translateY(20px); }
  100% { opacity: 1; transform: translateY(0); }
}
.kc-animate-in {
  animation: kc-fade-in-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.kc-reveal-pending { opacity: 0; }

@keyframes kc-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
.kc-float { animation: kc-float 6s ease-in-out infinite; }

/* ── FAQ disclosure ── */
.kc-faq[open] .kc-faq-icon { transform: rotate(45deg); }
.kc-faq-icon { transition: transform 0.25s ease; }
.kc-faq summary::-webkit-details-marker { display: none; }
.kc-faq summary { list-style: none; }

/* ── Score gauge ── */
.kc-score-display {
  font-family: 'Manrope', sans-serif;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.04em;
}

/* ── Module pill / chip ── */
.kc-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.85rem;
  background: rgba(17, 17, 17, 0.05);
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.7);
}
.dark .kc-chip {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.72);
}

/* ── Section label (small uppercase eyebrow) ── */
.kc-eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.55);
}
.dark .kc-eyebrow { color: rgba(255, 255, 255, 0.55); }

/* ── Diagnostic results module card secondary state ── */
.kc-module-secondary { opacity: 0.55; }
.kc-module-secondary:hover { opacity: 0.85; }

/* ── Inline link underline reveal (matches main site nav) ── */
.kc-link {
  position: relative;
  transition: color 0.2s ease;
}
.kc-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 1px;
  width: 0;
  background-color: currentColor;
  transition: width 0.25s ease;
}
.kc-link:hover::after { width: 100%; }
.kc-link[aria-current="page"]::after { width: 100%; }

/* ── Status messages (form submit) ── */
.kc-status-success {
  color: #166534;
  background: rgba(22, 101, 52, 0.08);
  border: 1px solid rgba(22, 101, 52, 0.2);
}
.kc-status-error {
  color: #991b1b;
  background: rgba(153, 27, 27, 0.08);
  border: 1px solid rgba(153, 27, 27, 0.25);
}
.dark .kc-status-success {
  color: #86efac;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.2);
}
.dark .kc-status-error {
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.25);
}
