:root {
  --primary: #1e3a8a;
  --primary-dark: #172554;
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #020617;
  --muted: #64748b;
  --border: #e2e8f0;
}

* {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  margin: 0;
  height: 100vh;
  background: linear-gradient(135deg, #f8fafc, #eef2ff);
  color: var(--text);
}

/* Page wrapper */
.contact-page {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

/* Card */
.contact-card {
  width: 100%;
  max-width: 42rem;
  max-height: 90vh;
  background: var(--card);
  padding: 2rem;
  border-radius: 1.2rem;
  box-shadow: 0 20px 40px rgba(2, 6, 23, 0.08);

  display: flex;
  flex-direction: column;
}

/* Header */
.header {
  text-align: center;
  margin-bottom: 1.2rem;
}

.header h1 {
  margin: 0;
  font-size: 2.1rem;
  color: var(--primary);
}

.header p {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* Form */
form {
  display: grid;
  gap: 0.9rem;
}

/* Fields */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
}

input,
textarea {
  padding: 0.65rem 0.75rem;
  font-size: 0.9rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  outline: none;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
}

textarea {
  min-height: 5rem;
  resize: none;
}

.helper {
  font-size: 0.75rem;
  color: var(--muted);
}

/* Button */
button {
  margin-top: 0.6rem;
  padding: 0.8rem;
  font-size: 0.95rem;
  font-weight: 600;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #ffffff;
  border: none;
  border-radius: 0.7rem;
  cursor: pointer;
}

/* =========================
   Mobile Optimization
   ========================= */
@media (max-width: 640px) {
  .contact-card {
    padding: 1.6rem;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  textarea {
    min-height: 4.5rem;
  }

  form {
    gap: 0.8rem;
  }
}

/* Very small devices */
@media (max-width: 360px) {
  .header h1 {
    font-size: 1.6rem;
  }

  .contact-card {
    padding: 1.3rem;
  }
}
    