
@font-face {
  font-family: 'Redacted';
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url('/assets/fonts/Redacted/Redacted-Regular.woff2') format('woff2');
}

/**
 * Shared skeleton tokens for the market content blocks.
 *
 * Every block concatenates this with its own `style.css` into
 * `makeElement({ style })` — via `./skeleton.ts`, which also prepends the
 * Redacted @font-face — so a block carries everything `[skeleton]` needs and
 * nothing has to be linked globally for the mode to work.
 *
 * The values are the wireframe's grey ramp expressed against `--text` /
 * `--background` rather than the flat hexes it was drawn with, so a skeleton
 * follows the site into dark mode instead of staying a light-mode artifact.
 */
:root {
  /* Redacted has no italic or bold cut — the fallback keeps metrics sane if the
     woff2 is missing, in which case a skeleton degrades to plain grey text. */
  --market-skeleton-font: 'Redacted', var(--font-primary, sans-serif);

  --market-skeleton-heading: color-mix(in srgb, var(--background), var(--text) 70%);
  --market-skeleton-copy: color-mix(in srgb, var(--background), var(--text) 30%);
  --market-skeleton-kicker: color-mix(in srgb, var(--background), var(--text) 24%);
  --market-skeleton-media: color-mix(in srgb, var(--background), var(--text) 38%);
  --market-skeleton-rule: color-mix(in srgb, var(--background), var(--text) 12%);
  --market-skeleton-surface: color-mix(in srgb, var(--background), var(--text) 2%);
}

market-contact-form {
  --contact-form-muted: color-mix(in srgb, var(--background), var(--text) 62%);
  --contact-form-field: color-mix(in srgb, var(--background), var(--text) 24%);
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 56px;
  width: 100%;
  padding: 44px;
  box-sizing: border-box;
}

@media (max-width: 900px) {
  market-contact-form {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 32px 20px;
  }
}

market-contact-form [intro] {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

market-contact-form [headline] {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.5rem);
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--text);
}

market-contact-form [copy] {
  margin: 6px 0 0;
  max-width: 32rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--contact-form-muted);
}

market-contact-form [enquiry] {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

market-contact-form [fields] {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

/* Full width unless the field asks for a half — so a form that says nothing
   about layout still stacks sensibly. */
market-contact-form [field] {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

market-contact-form [field][half] {
  grid-column: span 1;
}

/* A carried value holds only a hidden input, so it takes no grid cell rather than an empty one.
   It does still count for the `:nth-child` skeleton rules below, which is harmless: the skeleton
   renders `filler`, and `filler` declares no hidden fields. */
market-contact-form [field][carried] {
  display: none;
}

@media (max-width: 520px) {
  market-contact-form [field][half] {
    grid-column: span 2;
  }
}

market-contact-form [field-label] {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--contact-form-muted);
}

market-contact-form :is(input, textarea) {
  width: 100%;
  padding: 0.75rem 0.875rem;
  border: 1.5px solid var(--contact-form-field);
  border-radius: 8px;
  background: var(--background);
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text);
  box-sizing: border-box;
}

market-contact-form textarea {
  resize: vertical;
  min-height: 96px;
}

market-contact-form :is(input, textarea):focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

market-contact-form button {
  align-self: flex-start;
  min-width: 160px;
  height: 42px;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 8px;
  background: var(--text);
  font-size: 1rem;
  font-weight: 700;
  color: var(--background);
  cursor: pointer;
  transition: background ease 300ms;
}

market-contact-form button:hover {
  background: color-mix(in srgb, var(--text), var(--background) 18%);
}

market-contact-form button:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  market-contact-form button {
    transition: none;
  }
}

market-contact-form [status] {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
}

market-contact-form :is([headline], [copy], [field-label], [status]):empty {
  display: none;
}

/* ---------------- SKELETON ---------------- */

market-contact-form[skeleton],
market-contact-form[skeleton] * {
  font-family: var(--market-skeleton-font);
  font-weight: 400;
  letter-spacing: normal;
}

market-contact-form[skeleton] {
  background: var(--market-skeleton-surface);
  pointer-events: none;
  user-select: none;
}

market-contact-form[skeleton] :is([headline], [copy], [field-label]):empty {
  display: revert;
}

/* An empty field already *is* the wireframe's shape; only the browser's
   disabled tint has to come off, or it reads as a state rather than a blank. */
market-contact-form[skeleton] :is(input, textarea) {
  border-color: var(--market-skeleton-rule);
  background: var(--background);
  opacity: 1;
}

market-contact-form[skeleton] button {
  background: var(--market-skeleton-heading);
  color: var(--background);
  opacity: 1;
}

market-contact-form[skeleton] [headline] {
  color: var(--market-skeleton-heading);
}

market-contact-form[skeleton] [headline]:empty::before {
  content: 'Tell us what you are after';
}

market-contact-form[skeleton] [copy] {
  color: var(--market-skeleton-copy);
}

market-contact-form[skeleton] [copy]:empty::before {
  content: 'Three lines about what happens once the form is sent, and how long it usually takes to hear back.';
}

market-contact-form[skeleton] [field-label] {
  color: var(--market-skeleton-kicker);
}

market-contact-form[skeleton] [field]:nth-child(2n + 1) [field-label]:empty::before {
  content: 'Field';
}

market-contact-form[skeleton] [field]:nth-child(2n + 2) [field-label]:empty::before {
  content: 'Another field';
}
