/*
 * Kultive design foundations — pilot v1.
 *
 * This file intentionally contains primitives only. Page and component styles
 * consume the semantic aliases instead of inventing new colors, spacing or
 * control sizes. The landing page is the first pilot consumer.
 */
:root {
  color-scheme: light;

  /* Typography */
  --k-font-sans: "Geist", "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --k-font-brand: "DM Sans", ui-sans-serif, system-ui, sans-serif;
  --k-font-size-xs: 0.75rem;
  --k-font-size-sm: 0.875rem;
  --k-font-size-md: 1rem;
  --k-font-size-lg: 1.25rem;
  --k-font-size-xl: 1.5rem;
  --k-font-size-2xl: 2rem;
  --k-line-body: 1.6;

  /* Spacing */
  --k-space-1: 0.25rem;
  --k-space-2: 0.5rem;
  --k-space-3: 0.75rem;
  --k-space-4: 1rem;
  --k-space-6: 1.5rem;
  --k-space-8: 2rem;
  --k-space-12: 3rem;
  --k-space-16: 4rem;

  /* Shape and controls */
  --k-radius-control: 0.75rem;
  --k-radius-card: 1rem;
  --k-radius-modal: 1.25rem;
  --k-radius-pill: 999px;
  --k-control-md: 2.75rem;
  --k-control-lg: 3rem;

  /* Brand and semantic colors */
  --k-color-brand: #f36b21;
  --k-color-brand-hover: #e65a12;
  --k-color-brand-text: #a63d00;
  --k-color-action: #c84a00;
  --k-color-action-hover: #b54100;
  --k-color-action-text: #ffffff;
  --k-color-bg: #fffaf7;
  --k-color-surface: #ffffff;
  --k-color-surface-soft: #fff4ed;
  --k-color-text: #15110f;
  --k-color-text-muted: #5f5149;
  --k-color-text-subtle: #786a62;
  --k-color-border: #e7c7b7;
  --k-color-border-strong: #d9a98f;
  --k-color-focus: #8f3500;
  --k-color-danger: #b42318;
  --k-color-success: #18794e;
  --k-color-warning: #9a6700;

  /* Elevation and motion */
  --k-shadow-card: 0 16px 48px rgba(42, 26, 18, 0.08);
  --k-shadow-overlay: 0 28px 80px rgba(42, 26, 18, 0.18);
  --k-duration-fast: 140ms;
  --k-duration-default: 200ms;
  --k-ease-standard: cubic-bezier(0.2, 0, 0, 1);
}

[data-theme="dark"] {
  color-scheme: dark;
  --k-color-brand: #ff7a2f;
  --k-color-brand-hover: #ff8b47;
  --k-color-brand-text: #ff9b5d;
  --k-color-action: #c84a00;
  --k-color-action-hover: #df580b;
  --k-color-bg: #140e0a;
  --k-color-surface: #1f1712;
  --k-color-surface-soft: #2a1c14;
  --k-color-text: #fff8f2;
  --k-color-text-muted: #c7b2a4;
  --k-color-text-subtle: #a98f7f;
  --k-color-border: #4a2e1d;
  --k-color-border-strong: #6a4128;
  --k-color-focus: #ff9b5d;
  --k-shadow-card: 0 18px 52px rgba(0, 0, 0, 0.3);
  --k-shadow-overlay: 0 32px 88px rgba(0, 0, 0, 0.5);
}

:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--k-color-focus);
  outline-offset: 3px;
}

.k-skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100000;
  display: inline-flex;
  align-items: center;
  min-height: var(--k-control-md);
  padding: 0 var(--k-space-4);
  transform: translateY(-200%);
  border-radius: var(--k-radius-control);
  background: var(--k-color-action);
  color: var(--k-color-action-text);
  font-family: var(--k-font-sans);
  font-size: var(--k-font-size-sm);
  font-weight: 750;
  text-decoration: none;
  box-shadow: var(--k-shadow-overlay);
}

.k-skip-link:focus,
.k-skip-link:focus-visible {
  transform: translateY(0) !important;
}

.k-sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

:where(button, input, textarea, select):disabled,
[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: 0.58;
}

@media (forced-colors: active) {
  :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible {
    outline: 3px solid Highlight;
  }
  .k-skip-link {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
    forced-color-adjust: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
