:root {
  --accent: #c4a574;
  --accent-soft: rgba(196, 165, 116, 0.25);
  --text: #f4efe6;
  --muted: rgba(244, 239, 230, 0.78);
  --ink: #0f1419;
  --panel: rgba(12, 16, 22, 0.55);
  --border: rgba(244, 239, 230, 0.18);
  --danger: #f0a8a0;
  --ok: #a8d5b5;
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--ink);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-color: #0f1419;
  background-image:
    linear-gradient(125deg, rgba(15, 20, 28, 0.72), rgba(20, 28, 22, 0.55) 45%, rgba(40, 28, 18, 0.65)),
    var(--bg-image);
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: bgDrift 28s ease-in-out infinite alternate;
}

.bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, var(--accent-soft), transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 75%, rgba(80, 120, 140, 0.22), transparent 50%),
    linear-gradient(to top, rgba(8, 10, 14, 0.75), transparent 40%);
  animation: veilPulse 12s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes bgDrift {
  from { transform: scale(1.06) translate3d(-1.2%, -0.6%, 0); }
  to { transform: scale(1.1) translate3d(1.4%, 0.8%, 0); }
}

@keyframes veilPulse {
  from { opacity: 0.85; }
  to { opacity: 1; }
}

.wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  align-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  max-width: 720px;
  margin: 0 auto;
}

.brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 0.75rem;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
  animation: fadeUp 0.9s ease both;
}

.lede {
  margin: 0 0 1.75rem;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.55;
  color: var(--muted);
  max-width: 34rem;
  animation: fadeUp 0.9s ease 0.12s both;
}

.panel {
  background: var(--panel);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: clamp(1.1rem, 3vw, 1.6rem);
  animation: fadeUp 0.9s ease 0.22s both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.flash {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.95rem;
  border: 1px solid transparent;
}

.flash.ok {
  color: var(--ok);
  background: rgba(40, 80, 55, 0.35);
  border-color: rgba(168, 213, 181, 0.25);
}

.flash.err {
  color: var(--danger);
  background: rgba(90, 35, 35, 0.35);
  border-color: rgba(240, 168, 160, 0.25);
}

.form {
  display: grid;
  gap: 0.95rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

.field label {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.field input,
.field textarea {
  width: 100%;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border-radius: 10px;
  padding: 0.75rem 0.9rem;
  font: inherit;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.captcha-row {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.captcha-challenge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.captcha-img {
  display: block;
  height: 52px;
  width: 180px;
  max-width: calc(100% - 60px);
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #eee;
  object-fit: cover;
  flex: 0 0 auto;
}

.captcha-reload {
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.captcha-reload:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.captcha-reload:hover svg {
  transform: rotate(90deg);
}

.captcha-reload svg {
  display: block;
  transition: transform 0.25s ease;
}

.captcha-row > input {
  width: 100%;
  height: 52px;
  margin: 0;
}

.submit {
  appearance: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #1a140c;
  background: linear-gradient(135deg, #e4c89a, var(--accent) 45%, #9a7a4a);
  padding: 0.9rem 1.2rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  transition: transform 0.2s ease, filter 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

.submit:active {
  transform: translateY(0);
}

.foot {
  margin: 1.25rem 0 0;
  font-size: 0.8rem;
  color: rgba(244, 239, 230, 0.45);
}

@media (max-width: 520px) {
  .captcha-img {
    width: auto;
    flex: 1 1 auto;
    max-width: none;
  }
}
