/* Michael Prinsloo — contact site
   Palette mirrors the CV (cv-layout.typ):
     green #648276  · ink #404040 · navy #303848 */

:root {
  --green: #648276;
  --green-dark: #50685e;
  --ink: #404040;
  --navy: #303848;
  --paper: #ffffff;
  --bg: #eef1ef;
  --line: #d8ddd9;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", Arial, Helvetica, "Liberation Sans", sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

.card {
  width: 100%;
  max-width: 640px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 4px solid var(--green);
  border-radius: 6px;
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem);
  box-shadow: 0 12px 32px rgba(48, 56, 72, 0.08);
}

.hero { text-align: center; }

.hero h1 {
  font-family: var(--serif);
  color: var(--navy);
  font-size: clamp(2rem, 6vw, 2.75rem);
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.01em;
}

.subtitle {
  font-family: var(--serif);
  color: var(--green);
  font-weight: 700;
  font-size: clamp(1rem, 3vw, 1.15rem);
  margin: 0.35rem 0 0;
}

.rule {
  border: none;
  border-top: 1px solid var(--green);
  margin: 1.5rem 0;
}

h2 {
  font-family: var(--serif);
  color: var(--green);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.intro p { margin: 0 0 1.75rem; }

/* ── CV section ───────────────────────────────────────── */
.cv-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.cv-head h2 { margin: 0; }

.cv h3 {
  font-family: var(--serif);
  color: var(--green);
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.5rem 0 0.5rem;
}

.cv p { margin: 0 0 0.5rem; }

.cv-inline { color: var(--ink); }

.cv-roles,
.cv-earlier {
  list-style: none;
  margin: 0;
  padding: 0;
}

.cv-roles > li { margin-bottom: 1rem; }

.role-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
}

.role-title strong { color: var(--navy); }

.role-period {
  color: var(--green-dark);
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

.cv-roles .role-head + p { margin-top: 0.25rem; }

.cv-earlier > li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  flex-wrap: wrap;
  padding: 0.2rem 0;
}

.cv-earlier strong { color: var(--navy); }

/* Outline variant of the button, for the CV download link */
.btn-outline {
  color: var(--green-dark);
  background: transparent;
  border: 1px solid var(--green);
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
  border-radius: 4px;
  font-weight: 700;
  white-space: nowrap;
}

.btn-outline:hover,
.btn-outline:focus-visible {
  color: #fff;
  background: var(--green);
  border-bottom-color: var(--green);
}

a {
  color: var(--green-dark);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

a:hover,
a:focus-visible { border-bottom-color: var(--green-dark); }

/* ── Form ─────────────────────────────────────────────── */
.contact-form { display: grid; gap: 1.1rem; }

.field { display: grid; gap: 0.35rem; }

label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

input,
textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.65rem 0.75rem;
  width: 100%;
}

textarea { resize: vertical; min-height: 8rem; }

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(100, 130, 118, 0.18);
}

.btn {
  justify-self: start;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  background: var(--green);
  border: none;
  border-radius: 4px;
  padding: 0.7rem 1.6rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.btn:hover,
.btn:focus-visible { background: var(--green-dark); }

.btn:disabled { opacity: 0.6; cursor: not-allowed; }

.form-note {
  margin: 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--green-dark);
}

.form-note.error { color: #a3423a; }

/* ── Footer ───────────────────────────────────────────── */
.foot {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: #6b6f6c;
}

.foot p { margin: 0; }
