/* ==========================================================================
   components.css — buttons, overlines, cards, tags, form controls, badges
   (task 2.1; spec §12.4 CTA, §13.2 overline, §22 component system)
   ========================================================================== */

/* ---- Buttons (primary / secondary / inverse / text) ----------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;            /* 44px target floor (WCAG 2.2 AA) */
  padding: 0 20px;             /* 18–20px horizontal (spec §12.4) */
  border-radius: var(--radius-control);
  font-family: var(--font-sora);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  border: 1px solid transparent;
  transition:
    background-color var(--duration-fast) var(--ease-standard),
    border-color var(--duration-fast) var(--ease-standard),
    color var(--duration-fast) var(--ease-standard);
}

.btn--primary {
  background-color: var(--kuneo-blue);
  color: var(--white);
}

.btn--primary:hover {
  background-color: var(--blue-600);
}

.btn--secondary {
  background-color: transparent;
  color: var(--brand-ink);
  border-color: var(--border-strong);
}

.btn--secondary:hover {
  border-color: var(--kuneo-blue);
  color: var(--kuneo-blue);
}

.btn--inverse {
  background-color: var(--white);
  color: var(--kuneo-blue);
}

.btn--inverse:hover {
  background-color: var(--blue-050);
}

.btn--text {
  background-color: transparent;
  color: var(--kuneo-blue);
  padding-inline: 0;
}

.btn--text:hover {
  text-decoration: underline;
}

/* Header CTA: 6px radius per spec §12.4 (deliberate deviation from the
   8px control radius, dictated by the header spec). */
.btn--header {
  min-height: 46px;
  border-radius: 6px;
}

/* ---- Section overline (spec §7.4: 12px/700/uppercase/0.12em) -------- */
.section-label {
  display: inline-block;
  font-size: var(--fs-label);
  font-weight: 700;
  letter-spacing: var(--tracking-overline);
  text-transform: uppercase;
  color: var(--kuneo-blue);
  margin-bottom: var(--space-4);
}

/* ---- Cards (spec §9.3: no shadow by default; border first) ---------- */
.card {
  border: var(--border-subtle);
  border-radius: var(--radius-card);
  background-color: var(--white);
  padding: var(--space-8) var(--space-6);
}

.card--hover:hover {
  border-color: var(--kuneo-blue);
  box-shadow: var(--shadow-hover);
}

/* ---- Tags (spec §9.2: pill radius only for real tags/statuses) ------ */
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-size: var(--fs-label);
  font-weight: 600;
}

/* ---- Badges (semantic — status/validation only, spec §6.4) ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 var(--space-3);
  border-radius: var(--radius-pill);
  font-size: var(--fs-label);
  font-weight: 600;
}

.badge--success { background-color: var(--success); color: var(--white); }
.badge--warning { background-color: var(--warning); color: var(--white); }
.badge--error   { background-color: var(--error);   color: var(--white); }

/* ---- Text links with arrow ------------------------------------------ */
.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  color: var(--kuneo-blue);
  font-weight: 600;
  text-decoration: none;
  min-height: 44px; /* target floor */
}

.link-arrow::after {
  content: "→";
  transition: transform var(--duration-fast) var(--ease-standard);
}

.link-arrow:hover::after,
.link-arrow:focus-visible::after {
  transform: translateX(4px);
}

/* ---- Form controls (spec §22: 52px height, 8px radius) -------------- */
.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.field__label {
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--brand-ink);
}

.field__input,
.field__select,
.field__textarea {
  width: 100%;
  min-height: 52px;
  padding: var(--space-3) var(--space-4);
  background-color: var(--white);
  /* 3:1 field boundary (B09): see --border-field in tokens.css. */
  border: var(--border-field);
  border-radius: var(--radius-control);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--brand-ink);
  transition:
    border-color var(--duration-fast) var(--ease-standard),
    box-shadow var(--duration-fast) var(--ease-standard);
}

.field__textarea {
  min-height: 132px;
  resize: vertical;
}

.field__input:focus-visible,
.field__select:focus-visible,
.field__textarea:focus-visible {
  outline: var(--focus-ring);
  outline-offset: var(--focus-offset);
}

/* Error state: red border + message; adjacent error text below control. */
.field--invalid .field__input,
.field--invalid .field__select,
.field--invalid .field__textarea {
  border-color: var(--error);
}

.field__error {
  display: none;
  font-size: var(--fs-small);
  color: var(--error);
}

/* ---- File input (talent-intent CV, spec §32) ----------------------------
   A file control cannot be styled like a text field: the native button inside
   it is not author-styleable, and forcing the shared `.field__input` look on it
   produced a white box with a browser-default "Choose file" chip floating in
   the middle. This keeps the same frame and focus ring as every other control
   so the field belongs to the form, and styles only what is styleable — the
   hit area, the padding and the type. */
.field__input--file {
  padding: var(--space-2) var(--space-3);
  cursor: pointer;
  font-size: var(--fs-small);
  color: var(--gray-600);
}

.field__input--file::file-selector-button {
  margin-right: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border: 0;
  border-radius: var(--radius-control);
  background-color: var(--blue-050);
  color: var(--kuneo-blue);
  font-family: inherit;
  font-size: var(--fs-small);
  font-weight: 600;
  cursor: pointer;
  transition: background-color var(--duration-fast) var(--ease-standard);
}

.field__input--file:hover::file-selector-button {
  background-color: var(--blue-100);
}

.field--invalid .field__error {
  display: block;
}

/* ---- 44px interactive controls (WCAG 2.2 AA target size) ------------ */
.control-44 {
  min-width: 44px;
  min-height: 44px;
}
/* ---- The two-hairline motif (creative direction 2026-11-10, §2, §3.5) ----
   "The line behind yours": an ink line (the partner) with a blue line 6px
   beneath it (Kuneo). One primitive for dividers and the social card, so every page draws the same relationship.

   Usage:
     <span class="k-lines" aria-hidden="true"></span>            48px divider
     <span class="k-lines k-lines--full" aria-hidden="true">      full width
     <span class="k-lines k-lines--on-ink" aria-hidden="true">    on Ink
   Tunables (custom properties on the element):
     --k-lines-length     total length (default 48px)
     --k-lines-blue-from  where the blue line starts, % of the length (0%)
     --k-lines-blue-to    where the blue line ends, % of the length (100%)
   The motif is always decorative (aria-hidden): whatever it shows is stated
   in text beside it. Meaningful uses set --lines-weight: 2px via
   .k-lines--strong so the line clears 3:1 as a non-text graphic. */
.k-lines {
  --k-lines-ink: var(--line-ink);
  --k-lines-blue: var(--line-blue);
  --k-lines-length: 48px;
  --k-lines-blue-from: 0%;
  --k-lines-blue-to: 100%;
  position: relative;
  display: block;
  width: var(--k-lines-length);
  max-width: 100%;
  height: calc(var(--lines-weight) * 2 + var(--lines-gap));
}

.k-lines::before,
.k-lines::after {
  content: "";
  position: absolute;
  height: var(--lines-weight);
}

.k-lines::before {
  top: 0;
  left: 0;
  right: 0;
  background-color: var(--k-lines-ink);
}

.k-lines::after {
  bottom: 0;
  left: var(--k-lines-blue-from);
  width: calc(var(--k-lines-blue-to) - var(--k-lines-blue-from));
  background-color: var(--k-lines-blue);
  transform-origin: left center;
}

.k-lines--full { --k-lines-length: 100%; }
.k-lines--strong { --lines-weight: 2px; }

.k-lines--on-ink {
  --k-lines-ink: var(--line-ink-on-ink);
  --k-lines-blue: var(--line-blue-on-ink);
}

