/* ============================================================================
   AI Consulting — shared draft theme
   Ported from Services-Website (Shadowglass Software) design tokens.
   Deep space + neon + glass, OKLCH palette. Standalone: no build step.
   When this moves into the Next.js app, these map 1:1 to @theme tokens in
   Services-Website/app/globals.css.
============================================================================ */

:root {
  color-scheme: dark;

  /* Backgrounds */
  --bg-0: oklch(0.08 0.02 270);
  --bg-1: oklch(0.13 0.03 270);
  --bg-2: oklch(0.18 0.04 270);

  /* Foregrounds */
  --fg-0: oklch(0.97 0.01 270);
  --fg-1: oklch(0.8 0.02 270);
  --fg-2: oklch(0.6 0.02 270);

  /* Neon accents */
  --cyan: oklch(0.82 0.18 200);
  --violet: oklch(0.65 0.27 295);
  --magenta: oklch(0.7 0.3 330);
  --lime: oklch(0.9 0.2 130);

  /* Status */
  --success: oklch(0.78 0.18 145);
  --warning: oklch(0.85 0.18 75);
  --danger: oklch(0.65 0.24 25);

  --border: oklch(0.3 0.03 270 / 0.6);
  --radius-glass: 1.25rem;

  --ff-display: "Space Grotesk", system-ui, sans-serif;
  --ff-body: "Geist", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", ui-monospace, monospace;

  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  border-color: var(--border);
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  background-color: var(--bg-0);
  background-image: radial-gradient(
    75% 60% at 50% -5%,
    oklch(0.18 0.06 285 / 0.8),
    transparent 60%
  );
  color: var(--fg-1);
  font-family: var(--ff-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--ff-display);
  color: var(--fg-0);
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-wrap: balance;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

::selection {
  background-color: oklch(0.65 0.27 295 / 0.4);
  color: var(--fg-0);
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
  border-radius: 4px;
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb {
  background: var(--bg-2);
  border-radius: 999px;
  border: 2px solid var(--bg-0);
}

/* --------------------------------------------------------------------------
   Reusable primitives
-------------------------------------------------------------------------- */
.glass {
  background: color-mix(in oklch, var(--bg-1) 88%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid oklch(0.97 0.01 270 / 0.08);
}

.text-gradient {
  background-image: linear-gradient(
    110deg,
    var(--cyan),
    var(--violet) 45%,
    var(--magenta)
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grid-bg {
  background-image:
    linear-gradient(oklch(0.97 0.01 270 / 0.04) 1px, transparent 1px),
    linear-gradient(90deg, oklch(0.97 0.01 270 / 0.04) 1px, transparent 1px);
  background-size: 56px 56px;
}

.glow-cyan {
  box-shadow: 0 0 0 1px oklch(0.82 0.18 200 / 0.3),
    0 8px 40px -8px oklch(0.82 0.18 200 / 0.45);
}
.glow-violet {
  box-shadow: 0 0 0 1px oklch(0.65 0.27 295 / 0.3),
    0 8px 40px -8px oklch(0.65 0.27 295 / 0.5);
}

.eyebrow {
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--cyan);
}

.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.8rem 1.5rem;
  border-radius: 0.9rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out-quart),
    box-shadow 0.2s var(--ease-out-quart), background 0.2s;
  color: var(--fg-0);
}
.btn:hover { transform: translateY(-2px); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(110deg, var(--cyan), var(--violet) 60%, var(--magenta));
  color: oklch(0.14 0.03 270);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 8px 40px -8px oklch(0.65 0.27 295 / 0.6);
}
.btn-ghost {
  background: oklch(0.97 0.01 270 / 0.05);
  border-color: var(--border);
  color: var(--fg-0);
}
.btn-ghost:hover { background: oklch(0.97 0.01 270 / 0.1); }

/* Form controls */
label.field { display: block; margin-bottom: 1.5rem; }
.field > .label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.field .label-text {
  font-family: var(--ff-display);
  font-weight: 500;
  color: var(--fg-0);
  font-size: 0.98rem;
}
.field .req { color: var(--magenta); }
.field .hint { color: var(--fg-2); font-size: 0.82rem; }

.input,
.textarea,
.select {
  width: 100%;
  font-family: var(--ff-body);
  font-size: 0.98rem;
  color: var(--fg-0);
  background: oklch(0.1 0.02 270 / 0.7);
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px oklch(0.82 0.18 200 / 0.18);
}
.input::placeholder,
.textarea::placeholder { color: var(--fg-2); }

/* Segmented radio / choice groups */
.choice-grid {
  display: grid;
  gap: 0.6rem;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.choice {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  background: oklch(0.1 0.02 270 / 0.55);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
.choice:hover { transform: translateY(-1px); border-color: oklch(0.5 0.05 270); }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice .choice-title {
  font-family: var(--ff-display);
  font-weight: 600;
  color: var(--fg-0);
  font-size: 0.95rem;
}
.choice .choice-sub { font-size: 0.78rem; color: var(--fg-2); }
.choice:has(input:checked) {
  border-color: var(--cyan);
  background: oklch(0.82 0.18 200 / 0.1);
  box-shadow: 0 0 0 1px var(--cyan), 0 8px 30px -12px oklch(0.82 0.18 200 / 0.5);
}
.choice:has(input:focus-visible) { outline: 2px solid var(--cyan); outline-offset: 2px; }

.error-text {
  color: var(--danger);
  font-size: 0.8rem;
  margin-top: 0.35rem;
  min-height: 1rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--ff-mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--fg-1);
  background: oklch(0.97 0.01 270 / 0.04);
}
