/* =====================================================================
   home.css : styles used only by index.html (the home page + Contact modal).
   Load AFTER site.css.
   ===================================================================== */

/* ---------- Home page hero ---------- */
.logo {
  width: clamp(96px, 22vw, 132px);
  margin-bottom: 28px;
  filter: drop-shadow(0 0 28px rgba(10, 139, 255, 0.35));
}

h1 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(2.25rem, 7vw, 3.4rem);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.rule { margin: 26px auto 32px; }

/* ---------- Contact modal ---------- */
dialog {
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  padding: 0;
  width: min(92vw, 470px);
  max-height: 92vh;
  color: var(--text);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(10, 139, 255, 0.05);
  overflow: auto;
}
dialog[open] { animation: pop 0.22s ease-out both; }
@keyframes pop {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
dialog::backdrop {
  background: rgba(4, 6, 10, 0.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-body { padding: 28px 28px 26px; text-align: left; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.modal-head h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: -0.01em;
}
.x {
  background: none;
  border: 0;
  font-size: 1.7rem;
  line-height: 1;
  color: var(--muted);
  padding: 4px 8px;
  border-radius: 8px;
}
.x:hover { color: var(--text); }
.x:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}
.lede { margin: 0 0 8px; font-size: 0.95rem; color: var(--muted); }

/* ---------- Form fields ---------- */
label {
  display: block;
  margin: 18px 0 7px;
  font-family: var(--font-ui);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

input[type="text"], input[type="email"], textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem; /* 16px prevents iOS zoom on focus */
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input::placeholder, textarea::placeholder { color: #566074; }
input:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(10, 139, 255, 0.2);
}
textarea { min-height: 132px; resize: vertical; }

/* Keep browser autofill from flashing white */
input:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--field) inset;
  caret-color: var(--text);
}

/* ---------- Modal buttons and status line ---------- */
.actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.actions .btn { padding: 12px 26px; }
.btn.primary {
  border-color: transparent;
  color: #fff;
  background: linear-gradient(135deg, var(--blue), var(--blue-deep));
}
.btn.primary:hover {
  background: linear-gradient(135deg, #2a9bff, #0a6df0);
  box-shadow: 0 6px 22px rgba(10, 139, 255, 0.35);
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

#status { min-height: 1.4em; margin-top: 16px; font-size: 0.92rem; }
#status.error { color: var(--error); }
#status.ok { color: var(--ok); }

/* Honeypot field: invisible to people, tempting to bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Small screens ---------- */
@media (max-width: 480px) {
  .modal-body { padding: 24px 20px 22px; }
  .actions .btn { flex: 1; }
}

/* ---------- Respect "reduce motion" settings ---------- */
@media (prefers-reduced-motion: reduce) {
  dialog[open] { animation: none; }
}
