/* Democritus Analytics — contact page
   Geometry and colors mirror the approved design ("Democritus Contact"). */

:root {
  --ink: #1F2528;
  --rule: #D4DADC;
  --field-rule: #B8C0C4;
  --placeholder: #9AA3A8;
  --error: #B4541B;
}

body.contact-page {
  min-height: 100%;
  background: linear-gradient(160deg, #FFFFFF 0%, #F4F6F8 55%, #E6EAEE 100%) fixed;
  color: var(--ink);
}

.page {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.page__field {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.page__header {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 36px 48px;
}

.page__brand {
  display: block;
  width: 220px;
}

.page__brand img {
  display: block;
  width: 100%;
  height: auto;
}

/* Uppercase mono link, shared by the Home link, the title style, and the reset. */
.mono-link {
  font: 500 13px/1 "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 1px;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.mono-link:hover { color: var(--blue-hover); }

.page__main {
  position: relative;
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 24px 24px 80px;
}

.contact {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.contact__title {
  margin: 0;
  font: 500 26px/1.2 "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}

/* Success state */
.contact__sent {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.contact__sent[hidden] { display: none; }

.contact__sent-lead {
  margin: 0;
  font: 500 16px/1.5 Inter, system-ui, sans-serif;
}

.contact__sent-note {
  margin: 0;
  font: 400 15px/1.6 Inter, system-ui, sans-serif;
  color: var(--graphite);
}

.contact__reset {
  align-self: flex-start;
  margin-top: 8px;
}

/* Form */
.contact__form {
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.contact__form[hidden] { display: none; }

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field__label {
  font: 500 11px/1 "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--graphite);
}

.field__input {
  font: 400 16px/1.4 Inter, system-ui, sans-serif;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.7);
  border: 0;
  border-bottom: 1px solid var(--field-rule);
  border-radius: 0;
  padding: 10px 0;
  outline: none;
  width: 100%;
}

.field__input:focus { border-bottom-color: var(--blue); }

.field__input--area {
  line-height: 1.5;
  border: 1px solid var(--field-rule);
  border-radius: 2px;
  padding: 12px 14px;
  resize: vertical;
}

.field__input--area:focus { border-color: var(--blue); }

.field__input::placeholder { color: var(--placeholder); }

.field__input[aria-invalid="true"] { border-color: var(--error); }

.contact__error {
  margin: 0;
  font: 400 14px/1.5 Inter, system-ui, sans-serif;
  color: var(--error);
}

.contact__error[hidden] { display: none; }

.contact__actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 6px;
}

.button {
  font: 500 13px/1 "IBM Plex Mono", ui-monospace, Menlo, monospace;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #FFFFFF;
  background: var(--blue);
  border: 0;
  padding: 16px 28px;
  border-radius: 2px;
  cursor: pointer;
}

.button:hover { background: var(--blue-hover); }

.button[disabled] {
  background: var(--blue);
  opacity: 0.6;
  cursor: default;
}

/* Honeypot: off-screen for people, present for bots. */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact__error a { color: var(--blue); }

.button:focus-visible,
.mono-link:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
}

@media (max-width: 767px) {
  .page__header { padding: 24px 20px; }
  .page__brand { width: 160px; }
  .page__main { padding: 16px 16px 64px; }
  .contact { gap: 28px; }
  .contact__title { font-size: 20px; }
}
