/* Agency pages (body.brand). Standalone: none of the client demo CSS loads here. */

*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body.brand {
  margin: 0;
  background: var(--tv-bg);
  color: var(--tv-text);
  font-family: var(--tv-font);
  font-size: var(--tv-text-base);
  font-weight: var(--tv-weight-regular);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.brand img {
  display: block;
  max-width: 100%;
  height: auto;
}

.brand :is(h1, h2, h3) {
  margin: 0 0 0.5em;
  font-weight: var(--tv-weight-bold);
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.brand h1 {
  font-size: var(--tv-text-3xl);
}

.brand h2 {
  font-size: var(--tv-text-2xl);
}

.brand h3 {
  font-size: var(--tv-text-lg);
  letter-spacing: -0.01em;
}

.brand p {
  margin: 0 0 1em;
  text-wrap: pretty;
}

/* :where keeps this rule weak, so components can set their own link colors. */
:where(.brand) a:not(.btn) {
  color: var(--tv-link);
}

.brand :focus-visible {
  outline: 3px solid var(--tv-focus);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Coral on off-white only reaches 3.4:1, so it is reserved for large headline words. */
.coral {
  color: var(--tv-coral-text);
}

.wrap {
  width: min(var(--tv-container), 100% - 2rem);
  margin-inline: auto;
}

.band {
  padding-block: var(--tv-space-7);
}

.band--white {
  background: var(--tv-surface);
}

.band--tint {
  background: var(--tv-tint);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--tv-space-3);
  color: var(--tv-text-muted);
  font-size: 0.8125rem;
  font-weight: var(--tv-weight-bold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 1.5rem;
  height: 2px;
  background: var(--tv-coral);
}

.lead {
  max-width: 36rem;
  color: var(--tv-text-muted);
  font-size: var(--tv-text-lg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: var(--tv-radius-pill);
  font: inherit;
  font-weight: var(--tv-weight-bold);
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn--primary {
  background: var(--tv-button);
  color: var(--tv-button-text);
}

.btn--primary:hover {
  background: var(--tv-button-hover);
}

.btn--secondary {
  border-color: var(--tv-border);
  background: var(--tv-surface);
  color: var(--tv-text);
  box-shadow: 0 1px 2px rgb(15 23 42 / 0.06);
}

.btn--secondary:hover {
  border-color: var(--tv-charcoal);
}

.btn--lg {
  min-height: 3.5rem;
  padding-inline: 1.75rem;
  font-size: 1.0625rem;
}

.checks {
  display: grid;
  gap: 0.6rem;
  margin: 0 0 var(--tv-space-5);
  padding: 0;
  list-style: none;
}

.checks li {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.0625rem;
}

.checks svg {
  flex-shrink: 0;
  width: 1.4rem;
  height: 1.4rem;
  padding: 0.25rem;
  border-radius: 50%;
  background: var(--tv-button);
  color: var(--tv-white);
  stroke-width: 3;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--tv-space-3);
}

.skip {
  position: absolute;
  top: -10rem;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  border-radius: var(--tv-radius);
  background: var(--tv-charcoal);
  color: var(--tv-white);
}

.skip:focus {
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Forms of the agency pages: the request form, the activation of a demo, the unsubscribe page. */

.card {
  padding: var(--tv-space-4);
  border: 1px solid var(--tv-border);
  border-radius: calc(var(--tv-radius) * 1.5);
  background: var(--tv-surface);
  box-shadow: 0 20px 50px rgb(15 23 42 / 0.08);
}

.form {
  display: grid;
  gap: var(--tv-space-4);
}

.form__row {
  display: grid;
  gap: var(--tv-space-4);
}

.field {
  display: grid;
  gap: 0.35rem;
  align-content: start;
}

.field label {
  font-weight: var(--tv-weight-bold);
  font-size: var(--tv-text-sm);
}

.field__opt,
.field__hint {
  color: var(--tv-text-muted);
  font-weight: var(--tv-weight-regular);
  font-size: 0.875rem;
}

.field__hint,
.field__error {
  margin: 0;
}

.field input:not([type="checkbox"]),
.field select,
.field textarea {
  width: 100%;
  min-height: 3rem;
  padding: 0.7rem 0.85rem;
  border: 1.5px solid #c3c8d1;
  border-radius: 0.6rem;
  background: var(--tv-white);
  color: var(--tv-text);
  font: inherit;
}

.field textarea {
  resize: vertical;
}

.field :is(input, select, textarea):focus-visible {
  border-color: var(--tv-charcoal);
  outline: 3px solid color-mix(in srgb, var(--tv-coral-dark) 45%, transparent);
  outline-offset: 1px;
}

.field [aria-invalid="true"] {
  border-color: var(--tv-coral-dark);
}

.field__error {
  color: var(--tv-coral-dark);
  font-size: 0.875rem;
  font-weight: var(--tv-weight-medium);
}

.field--check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.35rem 0.75rem;
}

.field--check input {
  width: 1.35rem;
  height: 1.35rem;
  margin-top: 0.15rem;
  accent-color: var(--tv-coral-dark);
}

.field--check label {
  font-weight: var(--tv-weight-regular);
}

.field--check .field__error {
  grid-column: 2;
}

.form__trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__alert {
  padding: var(--tv-space-3);
  border-left: 4px solid var(--tv-coral-dark);
  border-radius: 0.4rem;
  background: var(--tv-coral-soft);
}

/* A message that is not an error */
.form__alert--info {
  border-left-color: var(--tv-charcoal);
  background: var(--tv-tint);
}

.form__alert ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.form .btn {
  justify-self: start;
}

@media (min-width: 640px) {
  .card {
    padding: var(--tv-space-5);
  }

  .form__row {
    grid-template-columns: 1fr 1fr;
  }
}

.form__note {
  margin: 0;
  color: var(--tv-text-muted);
  font-size: var(--tv-text-sm);
}
