:root {
  --ink: #1a1f24;
  --muted: #4a5560;
  --paper: #f7f3ee;
  --paper-deep: #ebe4da;
  --crimson: #b11226;
  --crimson-deep: #8a0d1c;
  --line: rgba(26, 31, 36, 0.12);
  --focus: #0b6e99;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  font-family: "Source Sans 3", system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(177, 18, 38, 0.08), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-deep) 100%);
  min-height: 100vh;
}

.banner {
  margin: 0;
  line-height: 0;
  background: #111;
}

.banner img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(42vh, 420px);
  object-fit: cover;
  object-position: center;
}

.page {
  width: min(42rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 4rem;
  animation: rise 0.55s ease-out both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(0.6rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 1.25rem;
  color: var(--crimson);
}

.copy p {
  margin: 0 0 1rem;
}

.copy p:last-child {
  margin-bottom: 0;
}

.form {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 0.65rem;
  animation: rise 0.7s ease-out 0.12s both;
}

.form label,
.field-label {
  font-weight: 600;
  margin-top: 0.5rem;
}

.hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 0.95rem;
}

textarea {
  width: 100%;
  font: inherit;
  color: var(--ink);
}

.file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.file-add {
  justify-self: start;
  margin-top: 0.15rem;
  font-weight: 600;
  color: var(--crimson);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.file-add:hover {
  color: var(--crimson-deep);
}

.attachment-list {
  list-style: none;
  margin: 0.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.attachment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.attachment-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.attachment-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--crimson);
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0.15rem 0.25rem;
}

.attachment-remove:hover {
  color: var(--crimson-deep);
  text-decoration: underline;
}

textarea {
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.72);
  resize: vertical;
  min-height: 12rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea:focus,
button:focus-visible,
.file-add:focus-visible,
.attachment-remove:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.25rem;
  width: min(42rem, calc(100% - 2rem));
  margin: 1.5rem auto 0;
  padding: 1.25rem 0 2.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.45;
}

.footer-disclaimer {
  margin: 0;
  flex: 1 1 16rem;
}

.footer-legal {
  flex: 0 0 auto;
  color: var(--muted);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.footer-legal:hover,
.footer-legal:focus-visible {
  color: var(--crimson);
}

.legal .brand {
  margin-bottom: 0.35rem;
}

.legal-section {
  margin-top: 1.75rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--line);
}

.legal-section h2 {
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 0.85rem;
}

.legal-section p {
  margin: 0 0 0.85rem;
  color: var(--ink);
  max-width: 38rem;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.legal .back {
  margin: 0 0 1rem;
  font-size: 0.95rem;
}

.legal .back a {
  color: var(--muted);
  text-decoration: none;
}

.legal .back a:hover {
  color: var(--crimson);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

button[type="submit"] {
  justify-self: start;
  margin-top: 0.35rem;
  appearance: none;
  border: 0;
  border-radius: 2px;
  background: var(--crimson);
  color: #fff;
  font: inherit;
  font-weight: 700;
  padding: 0.75rem 1.35rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease;
}

button[type="submit"]:hover:not(:disabled) {
  background: var(--crimson-deep);
}

button[type="submit"]:active:not(:disabled) {
  transform: translateY(1px);
}

button[type="submit"]:disabled {
  opacity: 0.65;
  cursor: wait;
}

.status {
  margin: 0.25rem 0 0;
  font-weight: 600;
}

.status.ok {
  color: #0f6b3c;
}

.status.err {
  color: var(--crimson-deep);
}

.cf-turnstile {
  margin-top: 0.5rem;
}

@media (max-width: 640px) {
  body {
    font-size: 1.05rem;
  }

  .banner img {
    max-height: 28vh;
  }

  .page {
    padding-top: 1.35rem;
  }
}
