:root {
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;

  --color-background: #eef3f8;
  --color-surface: #ffffff;
  --color-panel: #102a43;
  --color-panel-secondary: #163d5c;
  --color-primary: #1769aa;
  --color-primary-hover: #0f548b;
  --color-text: #1f2933;
  --color-muted: #52606d;
  --color-border: #bcccdc;
  --color-error: #b42318;
  --color-success: #067647;
  --color-focus: #f4b942;
  --shadow-card: 0 24px 60px rgb(16 42 67 / 16%);
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--color-text);
  background:
    radial-gradient(circle at top left, rgb(23 105 170 / 14%), transparent 35%),
    var(--color-background);
}

button,
input,
textarea {
  font: inherit;
}

.page-shell {
  display: grid;
  min-height: 100vh;
  padding: 40px 20px;
  place-items: center;
}

.contact-card {
  display: grid;
  width: min(100%, 1050px);
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid rgb(188 204 220 / 70%);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.contact-introduction {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(36px, 6vw, 72px);
  color: #ffffff;
  background:
    linear-gradient(
      145deg,
      rgb(16 42 67 / 98%),
      rgb(22 61 92 / 96%)
    );
}

.eyebrow {
  margin: 0 0 14px;
  color: #9fd3ff;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.contact-introduction h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.2rem, 5vw, 4rem);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.introduction-text {
  max-width: 45ch;
  margin: 24px 0 0;
  color: #d9e8f5;
  font-size: 1rem;
  line-height: 1.7;
}

.architecture-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 32px 0 0;
  list-style: none;
}

.architecture-list li {
  padding: 8px 12px;
  color: #e8f4fc;
  font-size: 0.82rem;
  font-weight: 700;
  background: rgb(255 255 255 / 9%);
  border: 1px solid rgb(255 255 255 / 16%);
  border-radius: 999px;
}

.contact-form {
  padding: clamp(32px, 6vw, 64px);
}

.form-field {
  margin-bottom: 22px;
}

.form-field label {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 750;
}

.form-field input,
.form-field textarea {
  display: block;
  width: 100%;
  padding: 13px 14px;
  color: var(--color-text);
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  outline: none;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.form-field textarea {
  min-height: 145px;
  line-height: 1.5;
  resize: vertical;
}

.form-field input:hover,
.form-field textarea:hover {
  border-color: #829ab1;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px rgb(23 105 170 / 14%);
}

.form-field input[aria-invalid="true"],
.form-field textarea[aria-invalid="true"] {
  border-color: var(--color-error);
}

.form-field input[aria-invalid="true"]:focus,
.form-field textarea[aria-invalid="true"]:focus {
  box-shadow: 0 0 0 4px rgb(180 35 24 / 12%);
}

.field-error {
  min-height: 20px;
  margin: 6px 0 0;
  color: var(--color-error);
  font-size: 0.8rem;
  line-height: 1.4;
}

.message-details {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.character-count {
  margin: 6px 0 0;
  color: var(--color-muted);
  font-size: 0.8rem;
  white-space: nowrap;
}

.contact-form button {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  color: #ffffff;
  font-weight: 800;
  cursor: pointer;
  background: var(--color-primary);
  border: 0;
  border-radius: 10px;
  transition:
    background-color 160ms ease,
    transform 160ms ease,
    box-shadow 160ms ease;
}

.contact-form button:hover:not(:disabled) {
  background: var(--color-primary-hover);
  box-shadow: 0 10px 20px rgb(23 105 170 / 18%);
  transform: translateY(-1px);
}

.contact-form button:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}

.contact-form button:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.form-status {
  display: none;
  padding: 13px 14px;
  margin-top: 18px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 10px;
}

.form-status.is-visible {
  display: block;
}

.form-status.is-success {
  color: var(--color-success);
  background: #ecfdf3;
  border: 1px solid #abefc6;
}

.form-status.is-error {
  color: var(--color-error);
  background: #fef3f2;
  border: 1px solid #fecdca;
}

@media (max-width: 780px) {
  .page-shell {
    padding: 20px 14px;
  }

  .contact-card {
    grid-template-columns: 1fr;
  }

  .contact-introduction h1 {
    max-width: 15ch;
  }
}

@media (max-width: 480px) {
  .page-shell {
    padding: 0;
  }

  .contact-card {
    border: 0;
    border-radius: 0;
  }

  .contact-introduction,
  .contact-form {
    padding: 32px 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
