/* Reset, document defaults, typography primitives and form controls. */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--accent);
}

img {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

::selection {
  background: var(--accent);
  color: var(--fg);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Visually hidden but reachable by screen readers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--accent);
  color: var(--fg);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  transition: top 0.2s var(--ease);
}

.skip-link:focus {
  top: 12px;
  color: var(--fg);
}

/* ---- Typographic utilities ------------------------------------------- */

.mono {
  font-family: var(--font-mono);
}

/* The "/ 01 — SOLUTIONS" section marker. */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--accent);
  margin-bottom: 16px;
}

.label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--dim);
}

.section-title {
  font-weight: 700;
  font-size: clamp(28px, 2.8vw, 46px);
  line-height: 1.05;
}

.section-title--spaced {
  margin-bottom: 46px;
}

/* ---- Form controls ---------------------------------------------------- */

input,
textarea,
button,
select {
  font-family: inherit;
  font-size: 14px;
}

.field {
  width: 100%;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--line);
  color: var(--fg);
  padding: 13px 14px;
  transition: border-color 0.2s var(--ease);
}

.field::placeholder {
  color: var(--dim);
}

.field:focus {
  outline: none;
  border-color: var(--accent);
}

textarea.field {
  resize: vertical;
}

/* Only flag invalid fields the user has actually interacted with — see
   js/forms.js, which sets .is-validated on submit. */
.is-validated .field:invalid {
  border-color: var(--accent);
}

.field-error {
  display: none;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-top: 6px;
}

.field-error.is-visible {
  display: block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.1em;
  padding: 19px 34px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: box-shadow 0.25s var(--ease), transform 0.25s var(--ease),
    background 0.25s var(--ease);
}

.btn--primary {
  background: var(--accent);
  color: var(--fg);
}

.btn--primary:hover {
  color: var(--fg);
  box-shadow: 0 0 46px rgba(255, 31, 31, 0.55);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  border-color: var(--accent);
  color: var(--fg);
}

.btn--ghost:hover {
  background: var(--accent);
  color: var(--fg);
  box-shadow: 0 0 40px var(--accent-glow);
}

.btn--block {
  width: 100%;
}

/* Underlined text link used as a secondary call to action. */
.link-cta {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--dim);
  border-bottom: 1px solid var(--line);
  padding-bottom: 5px;
}

.link-cta:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.link-cta--accent {
  color: var(--fg);
  border-color: var(--accent);
}
