/* Hireanex marketing kit: the product look (ENG-245 "Look X") as plain CSS.
   Tokens are copied from apps/web/app/globals.css; component rules mirror
   apps/web/components/ui/* (button, badge, card, input) so a visitor who
   clicks a demo sees what the app looks like. No Tailwind, no CDN.

   Scopes
     :root / .light   light tokens (the marketing pages are light)
     .dark            the warm-charcoal dark tokens (the interview rooms open dark)
   Rooms also use --room-bg for the video stage. */

@font-face {
  font-family: "Geist";
  src: url("/prototypes/assets/fonts/geist-sans.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Geist Mono";
  src: url("/prototypes/assets/fonts/geist-mono.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --room-bg: #0b0d12;
  --radius: 0.5rem;              /* 8px: buttons, inputs, nav items */
  --radius-sm: calc(var(--radius) * 0.6);
  --radius-md: calc(var(--radius) * 0.8);
  --radius-lg: var(--radius);
  --radius-xl: 0.75rem;          /* 12px: cards and the work area */
  --radius-2xl: calc(var(--radius) * 1.8);
  --radius-4xl: calc(var(--radius) * 2.6);
  --shadow-soft: 0 1px 2px oklch(0.145 0 0 / 0.05), 0 2px 6px oklch(0.145 0 0 / 0.05);
  --shadow-pop: 0 2px 4px oklch(0.145 0 0 / 0.05), 0 10px 24px oklch(0.145 0 0 / 0.09);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  /* Type steps from the app (ENG-245) */
  --text-2xs: 0.6875rem;
  --text-title: 1.75rem;
  --text-section: 1rem;
}

:root,
.light {
  color-scheme: light;
  --background: oklch(0.983 0.005 78.3);   /* work area, cream #fbf9f6 */
  --foreground: oklch(0.145 0 0);
  --card: oklch(1 0 0);
  --card-foreground: oklch(0.145 0 0);
  --popover: oklch(1 0 0);
  --popover-foreground: oklch(0.145 0 0);
  --muted: oklch(0.954 0.009 78.3);         /* #f3efe9 */
  --muted-foreground: oklch(0.529 0.008 286.1); /* #6b6b70 */
  --accent: var(--muted);
  --accent-foreground: oklch(0.145 0 0);
  --border: oklch(0.927 0.011 76.6);        /* #ebe6df */
  --input: oklch(0.855 0.017 76.1);         /* #d6cec3 */
  --ring: oklch(0.216 0.006 56);
  --frame: oklch(0.942 0.009 78.3);         /* #efebe5 */
  --frame-foreground: oklch(0.216 0.006 56);
  --frame-muted-foreground: oklch(0.475 0.016 71.1);
  --frame-muted: oklch(0.905 0.012 79.8);
  --frame-accent: oklch(1 0 0);
  --frame-hover: oklch(0.216 0.006 56 / 4.5%);
  --frame-border: oklch(0.216 0.006 56 / 7%);
  --brand: oklch(0.705 0.173 53.7);         /* #f07c12 */
  --brand-foreground: oklch(0.145 0 0);
  --brand-muted: oklch(0.96 0.04 55);
  --brand-text: oklch(0.53 0.15 55);        /* #aa4d00, text only */
  --ink: oklch(0.21 0.006 285.9);           /* #18181b */
  --ink-foreground: oklch(0.985 0 0);
  --primary: var(--ink);
  --primary-foreground: var(--ink-foreground);
  --secondary: var(--muted);
  --secondary-foreground: oklch(0.145 0 0);
  --ok: oklch(0.509 0.132 150.2);
  --ok-muted: oklch(0.959 0.021 156.8);
  --warn: oklch(0.531 0.118 64.6);
  --warn-muted: oklch(0.962 0.031 81.8);
  --risk: oklch(0.5 0.182 29.5);
  --risk-muted: oklch(0.954 0.02 28.9);
  --destructive: var(--risk);
  --ai-tint: oklch(0.705 0.173 53.7 / 12%);
  --ai-border: oklch(0.705 0.173 53.7 / 35%);
}

.dark {
  color-scheme: dark;
  --background: oklch(0.221 0.009 59.2);    /* #1e1a17 */
  --foreground: oklch(0.957 0.008 73.7);    /* #f4f0eb */
  --card: oklch(0.255 0.01 67.4);           /* #26221e */
  --card-foreground: oklch(0.957 0.008 73.7);
  --popover: oklch(0.269 0.01 61);
  --popover-foreground: oklch(0.957 0.008 73.7);
  --muted: oklch(0.289 0.012 67.3);         /* #2f2a25 */
  --muted-foreground: oklch(0.7 0.016 70.8); /* #a59d94 */
  --accent: var(--muted);
  --accent-foreground: oklch(0.957 0.008 73.7);
  --border: oklch(1 0 0 / 8%);
  --input: oklch(1 0 0 / 14%);
  --ring: oklch(0.957 0.008 73.7);
  --frame: oklch(0.194 0.006 56);           /* #171412 */
  --frame-foreground: oklch(0.957 0.008 73.7);
  --frame-muted-foreground: oklch(0.7 0.016 70.8);
  --frame-muted: oklch(0.251 0.01 67.4);
  --frame-accent: oklch(1 0 0 / 9%);
  --frame-hover: oklch(1 0 0 / 5%);
  --frame-border: oklch(1 0 0 / 7%);
  --brand: oklch(0.764 0.151 62.4);         /* #f59a3c */
  --brand-foreground: oklch(0.145 0 0);
  --brand-muted: oklch(0.25 0.04 55);
  --brand-text: oklch(0.789 0.139 64.8);    /* #f7a650 */
  --ink: oklch(0.957 0.008 73.7);
  --ink-foreground: oklch(0.194 0.006 56);
  --primary: var(--ink);
  --primary-foreground: var(--ink-foreground);
  --secondary: var(--muted);
  --secondary-foreground: oklch(0.957 0.008 73.7);
  --ok: oklch(0.871 0.136 154.4);
  --ok-muted: oklch(0.723 0.192 149.6 / 14%);
  --warn: oklch(0.879 0.153 91.6);
  --warn-muted: oklch(0.769 0.165 70.1 / 15%);
  --risk: oklch(0.808 0.103 19.6);
  --risk-muted: oklch(0.637 0.208 25.3 / 15%);
  --destructive: var(--risk);
  --ai-tint: oklch(0.764 0.151 62.4 / 16%);
  --ai-border: oklch(0.764 0.151 62.4 / 40%);
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.3);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; border-color: var(--border); }
html { font-family: var(--font-sans); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--background);
  color: var(--foreground);
  font-size: 0.9375rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }
a { color: inherit; }
h1, h2, h3, h4, p { margin: 0; }
.hx-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.hx-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Visible focus everywhere: see the ring rule after the components, below. */

/* The AI-working treatment: a soft orange light top-right and a warm border. */
.hx-ai-working {
  border-color: var(--ai-border) !important;
  background-image: radial-gradient(120% 100% at 100% 0%, var(--ai-tint), transparent 60%);
}

/* ---------- Marketing type (same family, larger scale) ---------- */
.hx-display {
  font-size: clamp(2.125rem, 1.4rem + 3.2vw, 3.75rem);
  line-height: 1.04;
  font-weight: 650;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.hx-h2 {
  font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.25rem);
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.025em;
  text-wrap: balance;
}
.hx-h3 { font-size: 1.125rem; line-height: 1.35; font-weight: 600; letter-spacing: -0.01em; }
.hx-title { font-size: var(--text-title); line-height: 2.125rem; font-weight: 650; letter-spacing: -0.02em; }
.hx-section { font-size: var(--text-section); line-height: 1.375rem; font-weight: 600; }
.hx-lede {
  font-size: clamp(1.0625rem, 1rem + 0.4vw, 1.25rem);
  line-height: 1.5;
  color: var(--muted-foreground);
  text-wrap: pretty;
  max-width: 38em;
}
.hx-eyebrow {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand-text);
}
.hx-muted { color: var(--muted-foreground); }
.hx-small { font-size: 0.8125rem; line-height: 1.25rem; }
.hx-2xs { font-size: var(--text-2xs); line-height: 1rem; }

/* ---------- Button (ui/button.tsx) ---------- */
.hx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  flex-shrink: 0; height: 2rem; padding: 0 0.625rem;
  border: 1px solid transparent; border-radius: var(--radius-lg);
  background: var(--primary); color: var(--primary-foreground);
  font-size: 0.875rem; font-weight: 500; line-height: 1; white-space: nowrap;
  cursor: pointer; user-select: none; text-decoration: none;
  box-shadow: var(--shadow-xs);
  transition: color 150ms var(--ease-out-quart), background-color 150ms var(--ease-out-quart),
    border-color 150ms var(--ease-out-quart), box-shadow 150ms var(--ease-out-quart),
    transform 150ms var(--ease-out-quart);
}
.hx-btn svg { width: 1rem; height: 1rem; flex-shrink: 0; pointer-events: none; }
.hx-btn:hover { background: color-mix(in oklch, var(--primary) 90%, transparent); box-shadow: var(--shadow-soft); }
.hx-btn:active { transform: scale(0.98); }
.hx-btn:disabled { pointer-events: none; opacity: 0.5; }
.hx-btn--brand { background: var(--brand); color: var(--brand-foreground); font-weight: 600; }
.hx-btn--brand:hover { background: color-mix(in oklch, var(--brand) 90%, transparent); }
.hx-btn--ink { background: var(--ink); color: var(--ink-foreground); font-weight: 600; }
.hx-btn--ink:hover { background: color-mix(in oklch, var(--ink) 90%, transparent); }
.hx-btn--outline { background: var(--card); color: var(--foreground); border-color: var(--input); }
.hx-btn--outline:hover { background: var(--muted); }
.hx-btn--secondary { background: var(--secondary); color: var(--secondary-foreground); box-shadow: none; }
.hx-btn--secondary:hover { background: color-mix(in oklch, var(--secondary) 80%, transparent); }
.hx-btn--ghost { background: transparent; color: inherit; box-shadow: none; }
.hx-btn--ghost:hover { background: var(--muted); color: var(--foreground); }
.hx-btn--destructive { background: color-mix(in oklch, var(--destructive) 10%, transparent); color: var(--destructive); box-shadow: none; }
.hx-btn--destructive:hover { background: color-mix(in oklch, var(--destructive) 20%, transparent); }
.hx-btn--link { background: none; box-shadow: none; color: var(--primary); height: auto; padding: 0; text-underline-offset: 4px; }
.hx-btn--link:hover { text-decoration: underline; background: none; }
.hx-btn--xs { height: 1.5rem; padding: 0 0.5rem; font-size: 0.75rem; gap: 0.25rem; border-radius: min(var(--radius-md), 10px); }
.hx-btn--xs svg { width: 0.75rem; height: 0.75rem; }
.hx-btn--sm { height: 1.75rem; padding: 0 0.625rem; font-size: 0.8rem; gap: 0.25rem; border-radius: min(var(--radius-md), 12px); }
.hx-btn--sm svg { width: 0.875rem; height: 0.875rem; }
.hx-btn--lg { height: 2.25rem; padding: 0 0.75rem; }
.hx-btn--xl { height: 2.75rem; padding: 0 1.125rem; font-size: 0.9375rem; border-radius: 0.625rem; }
.hx-btn--icon { width: 2rem; padding: 0; }
.hx-btn--icon-sm { width: 1.75rem; height: 1.75rem; padding: 0; border-radius: min(var(--radius-md), 12px); }

/* ---------- Badge (ui/badge.tsx) ---------- */
.hx-badge {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.25rem;
  height: 1.25rem; width: fit-content; padding: 0.125rem 0.5rem;
  border: 1px solid transparent; border-radius: var(--radius-4xl);
  background: var(--primary); color: var(--primary-foreground);
  font-size: 0.75rem; font-weight: 500; line-height: 1; white-space: nowrap;
}
.hx-badge svg { width: 0.75rem; height: 0.75rem; }
.hx-badge--secondary { background: var(--secondary); color: var(--secondary-foreground); }
.hx-badge--outline { background: transparent; border-color: var(--border); color: var(--foreground); }
.hx-badge--destructive { background: color-mix(in oklch, var(--destructive) 10%, transparent); color: var(--destructive); }
/* Status chips: squarer than a pill, a 6px dot in the text colour. */
.hx-badge--ok, .hx-badge--warn, .hx-badge--risk, .hx-badge--neutral {
  height: 22px; gap: 0.375rem; border-radius: var(--radius-md); font-weight: 600;
}
.hx-badge--ok::before, .hx-badge--warn::before, .hx-badge--risk::before, .hx-badge--neutral::before {
  content: ""; width: 6px; height: 6px; flex-shrink: 0; border-radius: 9999px; background: currentColor;
}
.hx-badge--ok { background: var(--ok-muted); color: var(--ok); }
.hx-badge--warn { background: var(--warn-muted); color: var(--warn); }
.hx-badge--risk { background: var(--risk-muted); color: var(--risk); }
.hx-badge--neutral { background: var(--muted); color: var(--muted-foreground); }

/* ---------- Card (ui/card.tsx) ---------- */
.hx-card {
  display: flex; flex-direction: column; gap: 1rem; overflow: hidden;
  padding: 1rem 0; border-radius: var(--radius-xl);
  background: var(--card); color: var(--card-foreground);
  box-shadow: 0 0 0 1px var(--border);
  font-size: 0.875rem;
}
.hx-card--sm { gap: 0.75rem; padding: 0.75rem 0; }
.hx-card--flat { padding: 0; gap: 0; }
.hx-card__header { display: grid; gap: 0.25rem; padding: 0 1rem; align-items: start; }
.hx-card--sm .hx-card__header { padding: 0 0.75rem; }
.hx-card__title { font-size: 1rem; line-height: 1.375; font-weight: 600; }
.hx-card--sm .hx-card__title { font-size: 0.875rem; }
.hx-card__description { font-size: 0.875rem; color: var(--muted-foreground); }
.hx-card__content { padding: 0 1rem; }
.hx-card--sm .hx-card__content { padding: 0 0.75rem; }
.hx-card__footer {
  display: flex; align-items: center; padding: 1rem; margin-bottom: -1rem;
  border-top: 1px solid var(--border); background: color-mix(in oklch, var(--muted) 50%, transparent);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.hx-card--sm .hx-card__footer { padding: 0.75rem; margin-bottom: -0.75rem; }

/* ---------- Input (ui/input.tsx, textarea.tsx) ---------- */
.hx-input, .hx-textarea {
  width: 100%; min-width: 0; height: 2rem; padding: 0.25rem 0.625rem;
  border: 1px solid var(--input); border-radius: var(--radius-lg);
  background: transparent; color: var(--foreground);
  font-size: 0.875rem; line-height: 1.25rem; outline: none;
  transition: border-color 150ms, box-shadow 150ms;
}
.hx-textarea { height: auto; min-height: 4rem; padding: 0.5rem 0.625rem; resize: vertical; }
.hx-input::placeholder, .hx-textarea::placeholder { color: var(--muted-foreground); }
.hx-input:focus-visible, .hx-textarea:focus-visible { border-color: var(--ring); }
.hx-input:disabled, .hx-textarea:disabled { cursor: not-allowed; opacity: 0.5; background: color-mix(in oklch, var(--input) 50%, transparent); }
.dark .hx-input, .dark .hx-textarea { background: color-mix(in oklch, var(--input) 30%, transparent); }
.hx-label { display: block; font-size: 0.875rem; font-weight: 500; line-height: 1; margin-bottom: 0.5rem; }

/* ---------- Switch (the room's "Hide transcript" style toggle) ---------- */
.hx-switch {
  position: relative; display: inline-flex; align-items: center; flex-shrink: 0;
  width: 2rem; height: 1.15rem; padding: 0; border: 1px solid transparent; border-radius: 9999px;
  background: var(--input); cursor: pointer; transition: background-color 150ms var(--ease-out-quart);
}
.hx-switch::after {
  content: ""; position: absolute; left: 1px; top: 50%; width: 0.9rem; height: 0.9rem; border-radius: 9999px;
  background: var(--card); transform: translateY(-50%); box-shadow: var(--shadow-xs);
  transition: transform 150ms var(--ease-out-quart);
}
.hx-switch[aria-checked="true"] { background: var(--primary); }
.hx-switch[aria-checked="true"]::after { transform: translate(0.85rem, -50%); background: var(--primary-foreground); }
.dark .hx-switch::after { background: var(--foreground); }
.dark .hx-switch[aria-checked="true"]::after { background: var(--primary-foreground); }

/* ---------- Chips ---------- */
/* Tappable answer chip (candidate chat): a pill, 44px tall, ink outline. */
.hx-chip {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.375rem;
  min-height: 2.75rem; padding: 0.5rem 1rem;
  border: 1px solid color-mix(in oklch, var(--foreground) 80%, transparent); border-radius: 9999px;
  background: var(--card); color: var(--foreground);
  font-size: 0.9375rem; font-weight: 500; line-height: 1.25; text-align: left; cursor: pointer;
  transition: background-color 150ms var(--ease-out-quart), color 150ms, border-color 150ms, transform 150ms;
}
.hx-chip:hover { background: var(--muted); }
.hx-chip:active { transform: scale(0.98); }
.hx-chip[aria-pressed="true"], .hx-chip.is-selected { background: var(--primary); color: var(--primary-foreground); border-color: var(--primary); }
.hx-chip:disabled { cursor: default; opacity: 0.55; }
/* Small ask chip (one scrolling row above a composer). */
.hx-chip--sm { min-height: 2rem; padding: 0.25rem 0.75rem; font-size: 0.8125rem; border-color: var(--input); font-weight: 500; }
/* Segmented control (Assist: Auto / Manual / Pause) */
.hx-seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: var(--radius-lg); background: var(--muted); }
.hx-seg__item {
  height: 1.625rem; padding: 0 0.625rem; border: 0; border-radius: calc(var(--radius-lg) - 2px);
  background: transparent; color: var(--muted-foreground); font-size: 0.75rem; font-weight: 600; cursor: pointer;
}
.hx-seg__item[aria-pressed="true"] { background: var(--card); color: var(--foreground); box-shadow: var(--shadow-xs); }
.dark .hx-seg__item[aria-pressed="true"] { background: var(--frame-accent); }

/* ---------- Layout helpers for pages ---------- */
.hx-container { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 640px) { .hx-container { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .hx-container { padding-inline: 2rem; } }
.hx-frame { background: var(--frame); color: var(--frame-foreground); }

/* ---------- Focus ring (ring/50, 3px), as the components draw it ----------
   Drawn as an outline, which follows the border radius and never fights a variant's or a
   state's box-shadow (ghost `none`, a selected tab's shadow, a hover shadow). :is() gives the
   rule (0,2,0). Pages and demos.css inherit it; nothing needs its own ring rule. */
:is(a, button, summary, input, textarea, select, [tabindex]):focus-visible {
  outline: 3px solid color-mix(in oklch, var(--ring) 50%, transparent);
  outline-offset: 0;
  border-color: var(--ring);
}

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