/* Prowess landing page styles.
   Colour pairs and their contrast ratios are listed in the README. */

:root {
  --navy: #0B1F3A;        /* main colour: hero, footer, headings */
  --teal: #0E6B6B;        /* accent: links, focus ring, rules */
  --teal-light: #9EE3E3;  /* accent on navy backgrounds only */
  --orange: #F28C28;      /* primary button background */
  --orange-hover: #E07B16;
  --bg: #FFFFFF;
  --bg-alt: #F3F6F9;
  --text: #1E2A38;
  --text-muted: #4B5563;
  --text-on-dark: #FFFFFF;
  --border: #5F6B7A;
  --error: #B91C1C;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 720px;
  --space: 1.5rem;
}

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

html {
  font-family: var(--font);
  font-size: 100%;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-size: 1.125rem;
}

h1,
h2,
h3 {
  color: var(--navy);
  line-height: 1.2;
  margin: 0 0 var(--space);
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
}

p,
ul {
  margin: 0 0 var(--space);
}

p:last-child,
ul:last-child {
  margin-bottom: 0;
}

a {
  color: var(--teal);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--space);
}

section,
footer {
  padding: calc(var(--space) * 2.5) 0;
}

/* Header and hero */

.site-header {
  padding: var(--space) 0;
  background: var(--navy);
}

.wordmark {
  display: inline-block;
  color: var(--text-on-dark);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}

.wordmark:focus-visible {
  outline-color: var(--teal-light);
}

.hero {
  background: var(--navy);
  color: var(--text-on-dark);
  padding-top: var(--space);
  padding-bottom: calc(var(--space) * 3);
}

.hero h1 {
  color: var(--text-on-dark);
}

.hero .subhead {
  font-size: clamp(1.125rem, 2.5vw, 1.375rem);
  color: var(--teal-light);
  max-width: 36ch;
}

.hero :focus-visible {
  outline-color: var(--teal-light);
}

.button {
  display: inline-block;
  background: var(--orange);
  color: var(--navy);
  font-weight: 700;
  font-size: 1.125rem;
  padding: 0.85rem 1.5rem;
  border: 0;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
  transition: background-color 150ms ease-out;
}

.button:hover {
  background: var(--orange-hover);
  text-decoration: none;
}

.button:disabled {
  cursor: default;
}

/* Three points */

.points {
  background: var(--bg-alt);
}

.points ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: var(--space);
}

.points li {
  border-left: 4px solid var(--teal);
  padding-left: var(--space);
}

.points strong {
  display: block;
  color: var(--navy);
  font-size: 1.25rem;
}

/* Sign-up form */

.signup {
  background: var(--bg-alt);
}

.field {
  margin-bottom: var(--space);
}

label {
  display: block;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"] {
  width: 100%;
  max-width: 28rem;
  font: inherit;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.form-note {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: var(--space);
}

.form-message {
  margin-top: var(--space);
  font-weight: 600;
}

.form-message.is-error {
  color: var(--error);
}

/* Footer */

.site-footer {
  background: var(--navy);
  color: var(--text-on-dark);
  font-size: 1rem;
}

.site-footer a {
  color: var(--text-on-dark);
}

.site-footer :focus-visible {
  outline-color: var(--teal-light);
}

.site-footer p {
  margin-bottom: 0.5rem;
}

/* Privacy and 404 pages */

.page-body h2 {
  margin-top: calc(var(--space) * 1.5);
}

.page-body .updated {
  color: var(--text-muted);
  font-size: 1rem;
}

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