@font-face {
  font-family: 'Trajan';
  src: url('../assets/fonts/Trajan.woff2') format('woff2');
  font-display: swap;
}

@font-face {
  font-family: 'Myriad Pro';
  src: url('../assets/fonts/Myriad_Pro.woff2') format('woff2');
  font-display: swap;
}

:root {
  --background: #f4ebe4;
  --panel: #fffaf6;
  --primary: #5a1400;
  --accent: #9b6c52;
  --text: #302c2a;
  --muted: #776f6a;
  --border: #d8c8bd;
  --error: #a9251c;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  background: var(--background);
  color: var(--text);
  font-family: 'Myriad Pro', Arial, sans-serif;
}
button, input, textarea { font: inherit; }
a { color: inherit; }

.background-grid {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(to right, rgba(90, 20, 0, .09) 1px, transparent 1px);
  background-size: 12.5% 100%;
  pointer-events: none;
}

.contact-header {
  display: flex;
  justify-content: center;
  padding: 32px 24px 14px;
}
.contact-header img { display: block; width: 150px; height: auto; }

.contact-page {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(42px, 7vw, 100px);
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(38px, 6vw, 78px) 0 clamp(64px, 8vw, 100px);
  align-items: start;
}

.contact-intro { position: sticky; top: 52px; padding-top: 22px; }
h1 {
  max-width: 460px;
  margin-bottom: 26px;
  color: var(--primary);
  font-family: 'Trajan', Georgia, serif;
  font-size: clamp(30px, 3vw, 44px);
  font-weight: 400;
  line-height: 1.18;
}
.contact-intro > p:last-child {
  max-width: 530px;
  color: var(--muted);
  font-size: clamp(18px, 1.5vw, 21px);
  line-height: 1.65;
}

.form-panel {
  border: 1px solid rgba(155, 108, 82, .32);
  background: rgba(255, 250, 246, .94);
  box-shadow: 0 24px 70px rgba(90, 20, 0, .09);
  padding: clamp(28px, 4.5vw, 54px);
}
.field { display: flex; flex-direction: column; margin-bottom: 26px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
label {
  margin-bottom: 10px;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .025em;
}
input, textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  transition: border-color .2s, box-shadow .2s;
}
input { min-height: 48px; padding: 8px 2px; }
textarea { min-height: 150px; padding: 12px 2px; line-height: 1.55; resize: vertical; }
input:focus, textarea:focus { border-color: var(--primary); box-shadow: 0 1px 0 var(--primary); }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--error); }
textarea::placeholder { color: #9d948e; }
.field-meta { display: flex; justify-content: space-between; gap: 16px; margin-top: 8px; color: var(--muted); font-size: 13px; }
.field-error { min-height: 18px; margin-top: 7px; color: var(--error); font-size: 13px; }
.honeypot { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.form-status { min-height: 22px; margin: -2px 0 16px; color: var(--error); font-size: 15px; }
.submit-button {
  width: 100%;
  min-height: 58px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #f4ebe4;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .09em;
  transition: background .2s, color .2s, transform .2s;
}
.submit-button:hover, .submit-button:focus-visible { background: #fffaf6; color: var(--primary); transform: translateY(-2px); }
.submit-button:disabled { cursor: wait; opacity: .65; transform: none; }

.contact-success {
  display: flex;
  min-height: 500px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  outline: 0;
}
.contact-success[hidden] { display: none; }
.success-mark {
  position: relative;
  display: block;
  width: 68px;
  height: 68px;
  margin-bottom: 26px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
}
.success-mark::after {
  content: '';
  position: absolute;
  top: 19px;
  left: 17px;
  width: 29px;
  height: 15px;
  border-bottom: 2px solid var(--accent);
  border-left: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.contact-success h2 {
  margin-bottom: 18px;
  color: var(--primary);
  font-family: 'Trajan', Georgia, serif;
  font-size: clamp(32px, 3vw, 44px);
  font-weight: 400;
}
.contact-success p {
  max-width: 430px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.6;
}
.contact-success a {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  margin-top: 34px;
  padding: 13px 28px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #f4ebe4;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-decoration: none;
}

.contact-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 20px 24px;
  background: var(--primary);
  color: #fff;
  text-align: center;
  font-size: 16px;
}
.contact-footer strong { font-weight: 500; }
.contact-footer a { color: #f4ebe4; font-size: 13px; font-weight: 600; letter-spacing: .08em; text-underline-offset: 5px; }

@media (max-width: 820px) {
  .contact-page { grid-template-columns: 1fr; gap: 34px; width: min(100% - 36px, 650px); padding-top: 22px; }
  .contact-intro { position: static; padding-top: 0; text-align: center; }
  h1, .contact-intro > p:last-child { margin-left: auto; margin-right: auto; }
  .field-grid { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 520px) {
  .contact-header { padding-top: 24px; }
  .contact-header img { width: 126px; }
  .contact-page { width: calc(100% - 28px); }
  .form-panel { padding: 28px 20px; }
  .contact-footer { flex-direction: column; gap: 10px; font-size: 14px; }
}
