:root {
  --wine: #a72f50;
  --wine-dark: #732a47;
  --plum: #463348;
  --gold: #dfa65e;
  --ink: #2b2530;
  --muted: #6f6871;
  --paper: #fbfaf9;
  --line: #e8e1e4;
  --danger: #a5253d;
  --success: #276749;
}

* { box-sizing: border-box; }

html {
  font-size: 16px;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--paper);
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

img, svg { max-width: 100%; }
button, input, textarea { max-width: 100%; font: inherit; }

.page-shell {
  width: min(calc(100% - 32px), 580px);
  margin-inline: auto;
  padding-block: clamp(36px, 7vw, 72px);
}

.intro { text-align: center; }

.logo {
  display: block;
  width: clamp(118px, 22vw, 166px);
  height: auto;
  margin: 0 auto 18px;
  object-fit: contain;
  animation: logo-in 600ms ease-out both;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--wine);
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: .02em;
}

h1 {
  margin: 0;
  color: var(--plum);
  font-size: clamp(1.8rem, 5vw, 2.35rem);
  line-height: 1.3;
}

.lead {
  margin: 12px auto 27px;
  color: var(--muted);
  font-size: 1rem;
}

.contact-card {
  padding: clamp(23px, 5vw, 34px);
  border: 1px solid var(--line);
  border-top: 3px solid var(--gold);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 14px 38px rgba(70, 51, 72, .07);
}

.contact-card h2 {
  margin: 0 0 22px;
  color: var(--plum);
  font-size: 1.18rem;
}

.field { min-width: 0; margin-bottom: 18px; }

label, .label {
  display: block;
  margin-bottom: 7px;
  font-size: .94rem;
  font-weight: 700;
}

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

input, textarea {
  width: 100%;
  border: 1px solid #d8d0d4;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  padding: 12px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

textarea { min-height: 132px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #999198; }
input:focus, textarea:focus { border-color: var(--wine); box-shadow: 0 0 0 3px rgba(167, 47, 80, .12); }
[aria-invalid="true"] { border-color: var(--danger); }

.field-error { min-height: 1.25em; margin: 5px 2px 0; color: var(--danger); font-size: .82rem; }
.file-input, .honeypot { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 45px;
  margin: 0;
  padding: 9px 15px;
  border: 1px dashed var(--wine);
  border-radius: 10px;
  color: var(--wine-dark);
  background: #fff9fb;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease;
}

.upload-button:hover { background: #fdf1f5; }
.file-input:focus-visible + .upload-button { outline: 3px solid rgba(167, 47, 80, .24); outline-offset: 2px; }
.file-help { margin: 7px 0 0; color: var(--muted); font-size: .78rem; overflow-wrap: anywhere; }
.file-list { display: grid; gap: 7px; margin: 10px 0 0; padding: 0; list-style: none; }
.file-item { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px 10px; border-radius: 8px; background: #f8f5f6; font-size: .82rem; }
.file-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { margin-inline-start: auto; flex: 0 0 auto; color: var(--muted); }
.remove-file { flex: 0 0 auto; width: 32px; height: 32px; border: 0; border-radius: 7px; color: var(--danger); background: transparent; cursor: pointer; }
.remove-file:hover { background: #f7e6ea; }

.submit-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 172px;
  min-height: 48px;
  border: 0;
  border-radius: 10px;
  padding: 11px 22px;
  color: #fff;
  background: var(--wine);
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.submit-button:hover:not(:disabled) { background: var(--wine-dark); transform: translateY(-1px); }
.submit-button:disabled { opacity: .72; cursor: wait; }
:focus-visible { outline: 3px solid rgba(167, 47, 80, .28); outline-offset: 3px; }
.spinner { display: none; width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.is-loading .spinner { display: inline-block; }

.form-status { display: none; margin-top: 17px; padding: 12px 14px; border-radius: 9px; font-size: .92rem; overflow-wrap: anywhere; }
.form-status.success { display: block; color: var(--success); background: #edf8f2; border: 1px solid #bce0cd; }
.form-status.error { display: block; color: var(--danger); background: #fdf0f2; border: 1px solid #edc2cb; }

@keyframes logo-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

@media (max-width: 480px) {
  .page-shell { width: min(calc(100% - 24px), 580px); padding-block: 27px 38px; }
  .logo { width: 112px; margin-bottom: 13px; }
  .lead { margin-bottom: 22px; }
  .contact-card { padding: 21px 16px; border-radius: 15px; }
  input, textarea { font-size: 1rem; }
  .upload-button { width: 100%; justify-content: center; }
  .submit-button { width: 100%; }
  .file-item { flex-wrap: wrap; }
  .file-name { flex: 1 1 calc(100% - 42px); }
  .file-size { order: 3; width: 100%; margin-inline-start: 0; }
}

@media (max-width: 360px) {
  .page-shell { width: min(calc(100% - 16px), 580px); padding-block: 20px 30px; }
  .contact-card { padding-inline: 13px; }
  .lead br { display: none; }
}

@media (min-width: 900px) and (min-height: 850px) {
  .page-shell { padding-block: 64px 80px; }
}
