@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
  color-scheme: light;
  --wine: #2a0a0b;
  --wine-deep: #421213;
  --gold: #e6ad48;
  --ink: #292522;
  --muted: #77716d;
  --line: #d8d4d0;
  --danger: #a63732;
  font-family: 'DM Sans', 'Segoe UI', sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }
html { min-width: 320px; min-height: 100%; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); }
button, input { font: inherit; }

.page {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: stretch center;
  padding: 0;
  background-color: #300b0c;
  background-image: linear-gradient(90deg, rgba(30, 5, 6, .25), rgba(40, 5, 6, .12)), url('/assets/background-reference.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.form-panel {
  width: min(600px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  padding: clamp(34px, 5.2vw, 72px) 24px;
  background: #fff;
}

.panel-content { width: min(100%, 550px); margin-inline: auto; }
h1 { max-width: 520px; margin: 0 0 18px; color: #3b3835; font-family: 'Manrope', 'Segoe UI', sans-serif; font-size: clamp(21px, 2.25vw, 25px); font-weight: 500; line-height: 1.5; letter-spacing: -.55px; }
.message { max-width: 530px; margin: 0 0 28px; color: #6f6964; font-size: 13px; line-height: 1.7; }
.field-group label { display: block; margin-bottom: 8px; color: #35312e; font-size: 16px; font-weight: 700; }
.field-group input { width: 100%; height: 49px; padding: 0 13px; border: 1px solid #d5d3d1; border-radius: 7px; outline: none; color: #282522; background: #fff; font-size: 15px; transition: border-color 150ms ease, box-shadow 150ms ease; }
.field-group input::placeholder { color: #96918d; }
.field-group input:hover { border-color: #a99b8d; }
.field-group input:focus { border-color: #8f3c33; box-shadow: 0 0 0 3px rgba(143, 60, 51, .12); }
.field-group input[aria-invalid="true"] { border-color: #c9574c; }
.field-error { display: none; margin: 7px 0 0; color: var(--danger); font-size: 11px; line-height: 1.5; }
.field-error.is-visible { display: block; }
.submit-button { width: 100%; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: clamp(45px, 8vh, 96px); border: 0; border-radius: 5px; color: #fff; background: var(--wine-deep); cursor: pointer; font-size: 15px; font-weight: 700; transition: background 150ms ease, transform 150ms ease; }
.submit-button span { font-size: 19px; font-weight: 400; line-height: 1; }
.submit-button:hover { background: #641e20; transform: translateY(-1px); }
.submit-button:focus-visible { outline: 3px solid rgba(143, 60, 51, .3); outline-offset: 3px; }
.form-status { margin-top: 13px; padding: 12px 13px; border: 1px solid #e5cda8; border-radius: 6px; color: #5b431d; background: #fff8eb; font-size: 11px; line-height: 1.6; }
.form-status[hidden] { display: none; }

@media (max-width: 650px) {
  .page { place-items: center; padding: 28px 14px; background-position: 65% center; }
  .form-panel { width: 100%; min-height: min(550px, calc(100svh - 56px)); border-radius: 8px; padding: 34px 24px; box-shadow: 0 18px 50px rgba(17, 3, 3, .26); }
  h1 { font-size: clamp(20px, 5.5vw, 24px); }
  .message { margin-bottom: 24px; font-size: 12px; }
  .field-group label { font-size: 14px; }
  .submit-button { margin-top: 54px; }
}

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

.form-status a { color: #5b221d; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
