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

@font-face {
  font-family: 'Norse';
  src: url('fonts/Norse.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Norse';
  src: url('fonts/Norsebold.otf') format('opentype');
  font-weight: bold;
  font-style: normal;
}

:root {
  --gold: #c9a84c;
  --gold-dark: #8b6914;
  --gold-light: #e8d48b;
  --gold-glow: rgba(201, 168, 76, 0.25);
  --bg-dark: #080602;
  --bg-card: #130e07;
  --bg-input: #0a0703;
  --text: #d4c9b3;
  --text-muted: #7a6e5a;
  --border: #2a1f0e;
  --border-light: #3a2f1e;
  --danger: #8b2f2f;
  --danger-bg: rgba(139, 47, 47, 0.12);
  --success: #3a7a3a;
  --success-bg: rgba(58, 122, 58, 0.12);
  --font-display: 'Norse', 'Cinzel', serif;
  --font-body: 'Rajdhani', sans-serif;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-dark);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  background-image:
    radial-gradient(ellipse at 20% 20%, rgba(139, 105, 20, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 80% 80%, rgba(201, 168, 76, 0.05) 0%, transparent 45%),
    radial-gradient(ellipse at 50% 50%, rgba(10, 7, 3, 0.5) 0%, transparent 100%);
}

.background-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(201, 168, 76, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(139, 105, 20, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 20% 50%, rgba(100, 80, 30, 0.02) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 50%, rgba(100, 80, 30, 0.02) 0%, transparent 40%);
  pointer-events: none;
}

.ambient-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}

.ambient-glow::before,
.ambient-glow::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  animation: ambientFloat 15s ease-in-out infinite;
}

.ambient-glow::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(201, 168, 76, 0.05), transparent);
  top: -150px;
  right: -100px;
}

.ambient-glow::after {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(100, 80, 30, 0.04), transparent);
  bottom: -100px;
  left: -100px;
  animation-delay: -7s;
}

@keyframes ambientFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(20px, -30px) scale(1.05); }
  66% { transform: translate(-10px, 15px) scale(0.95); }
}

.floating-runes {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  font-family: 'Norse', serif;
  font-size: 1.8rem;
  color: var(--gold-dark);
  opacity: 0.12;
}

.floating-runes span {
  position: absolute;
  animation: runeFloat var(--dur) ease-in-out infinite;
  animation-delay: var(--del);
}

@keyframes runeFloat {
  0% {
    transform: translateY(110vh) rotate(0deg);
    opacity: 0;
  }
  10% { opacity: 0.12; }
  90% { opacity: 0.12; }
  100% {
    transform: translateY(-10vh) rotate(360deg);
    opacity: 0;
  }
}

.container {
  max-width: 740px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  text-align: center;
  padding: 1.5rem 0 2.5rem;
  position: relative;
}

header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 240px;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--gold-dark) 25%, var(--gold) 50%, var(--gold-dark) 75%, transparent 95%);
}

.logo-wrapper {
  margin-bottom: 1.25rem;
  position: relative;
  display: inline-block;
}

.logo-ring {
  position: absolute;
  inset: -14px;
  border: 1.5px solid rgba(201, 168, 76, 0.1);
  border-radius: 50%;
  animation: logoPulse 3.5s ease-in-out infinite;
}

.logo-ring:nth-child(2) {
  inset: -8px;
  animation-delay: -1.75s;
  border-color: rgba(201, 168, 76, 0.05);
  opacity: 0.6;
}

@keyframes logoPulse {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.2); opacity: 0.04; }
}

.site-logo {
  width: 100px;
  height: 100px;
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.15));
  animation: logoGlow 3.5s ease-in-out infinite;
}

@keyframes logoGlow {
  0%, 100% { filter: drop-shadow(0 0 20px rgba(201, 168, 76, 0.15)) brightness(1); }
  50% { filter: drop-shadow(0 0 60px rgba(201, 168, 76, 0.35)) brightness(1.1); }
}

h1 {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 2.4rem;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 8px;
  text-shadow: 0 0 50px rgba(201, 168, 76, 0.12);
}

.subtitle {
  font-family: var(--font-display);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 0.6rem;
  letter-spacing: 5px;
  text-transform: uppercase;
}

.mini-charter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 1px;
  opacity: 0.6;
}

.mini-charter .dot {
  color: var(--gold-dark);
  font-weight: 700;
  opacity: 0.5;
}

.card {
  background: linear-gradient(165deg, #1a140c 0%, #0f0b05 40%, #0c0904 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 2.5rem;
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.7),
    0 2px 8px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(201, 168, 76, 0.04);
  flex: 1;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 5%,
    var(--gold-dark) 15%,
    var(--gold) 30%,
    var(--gold-light) 50%,
    var(--gold) 70%,
    var(--gold-dark) 85%,
    transparent 95%
  );
  opacity: 0.25;
}

.card::after {
  content: '◆';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  font-size: 10px;
  opacity: 0.4;
}

.card-header {
  text-align: center;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.divider-rune {
  font-family: var(--font-display);
  font-size: 1.4rem;
  letter-spacing: 16px;
  color: var(--gold-dark);
  margin-bottom: 1rem;
  opacity: 0.4;
}

.card-header p {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.7;
}

.form-section {
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(42, 31, 14, 0.25);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.012);
  transition: border-color 0.35s, background 0.35s, box-shadow 0.35s;
  position: relative;
}

.section-rune {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-family: 'Norse', serif;
  font-size: 1.8rem;
  color: var(--gold-dark);
  opacity: 0.15;
  line-height: 1;
  pointer-events: none;
  transition: opacity 0.35s, color 0.35s;
}

.form-section:hover .section-rune {
  opacity: 0.3;
  color: var(--gold);
}

.form-section:has(input:focus) .section-rune,
.form-section:has(textarea:focus) .section-rune {
  opacity: 0.4;
  color: var(--gold-light);
}

.form-section:hover {
  border-color: rgba(201, 168, 76, 0.1);
}

.form-section:has(input:focus),
.form-section:has(textarea:focus) {
  border-color: rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.015);
  box-shadow: 0 0 30px rgba(201, 168, 76, 0.02);
}

.form-section:last-of-type {
  margin-bottom: 0;
}

.form-group {
  margin-bottom: 0;
}

.question-label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.78rem;
  color: var(--gold-light);
  letter-spacing: 2px;
  margin-bottom: 0.75rem;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-label::before {
  content: '';
  display: inline-block;
  width: 16px;
  height: 1px;
  background: var(--gold-dark);
  opacity: 0.4;
}

.required {
  color: var(--danger);
  font-weight: 700;
}

label {
  display: block;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--gold);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

input[type="text"],
textarea {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
  outline: none;
  letter-spacing: 0.3px;
}

input[type="text"]:focus,
textarea:focus {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.015);
  box-shadow:
    0 0 0 3px rgba(201, 168, 76, 0.06),
    inset 0 1px 0 rgba(201, 168, 76, 0.03);
}

input::placeholder,
textarea::placeholder {
  color: #3a3025;
  font-style: italic;
  letter-spacing: 0;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.char-count {
  display: block;
  text-align: right;
  font-size: 0.73rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
  font-style: italic;
  opacity: 0.7;
}

.help-text {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.5rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  font-style: italic;
  opacity: 0.6;
}

.help-text svg {
  flex-shrink: 0;
  opacity: 0.4;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.7rem 1rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s, transform 0.2s, box-shadow 0.25s;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  position: relative;
  overflow: hidden;
}

.radio-option::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(201, 168, 76, 0.04), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.radio-option:hover {
  border-color: rgba(201, 168, 76, 0.2);
  background: rgba(201, 168, 76, 0.03);
  transform: translateX(4px);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.radio-option:hover::before {
  opacity: 1;
}

.radio-option:active {
  transform: translateX(2px);
}

.radio-option input[type="radio"],
.radio-option input[type="checkbox"] {
  display: none;
}

.radio-custom {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 1;
}

.check-custom {
  width: 24px;
  height: 24px;
  border: 2px solid var(--border);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.3s, background 0.3s, transform 0.3s, box-shadow 0.3s;
  position: relative;
  z-index: 1;
}

.radio-option input[type="radio"]:checked + .radio-custom {
  border-color: var(--gold);
  background: var(--gold-dark);
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.25);
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-light);
  animation: radioPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.radio-option input[type="checkbox"]:checked + .check-custom {
  border-color: var(--gold);
  background: var(--gold-dark);
  transform: scale(1.15);
  box-shadow: 0 0 16px rgba(201, 168, 76, 0.25);
}

.radio-option input[type="checkbox"]:checked + .check-custom::after {
  content: '✓';
  font-size: 15px;
  color: var(--gold-light);
  font-weight: 700;
  animation: radioPop 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes radioPop {
  0% { transform: scale(0); }
  60% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.radio-option:has(input[type="radio"]:checked),
.radio-option:has(input[type="checkbox"]:checked) {
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
  box-shadow: 0 0 24px rgba(201, 168, 76, 0.04);
  transform: translateX(4px);
}

button {
  width: 100%;
  padding: 1.15rem 2rem;
  background: linear-gradient(135deg, #5a4410 0%, var(--gold-dark) 25%, var(--gold) 55%, #d4b85a 80%, var(--gold-dark) 100%);
  background-size: 250% 100%;
  background-position: 0% 50%;
  border: none;
  border-radius: 12px;
  color: var(--bg-dark);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.35s, opacity 0.3s, background-position 0.6s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  position: relative;
  overflow: hidden;
}

button::before {
  content: '᚛';
  position: absolute;
  left: 1.2rem;
  font-size: 1.1rem;
  opacity: 0.25;
  transition: opacity 0.3s;
}

button::after {
  content: '᚜';
  position: absolute;
  right: 1.2rem;
  font-size: 1.1rem;
  opacity: 0.25;
  transition: opacity 0.3s;
}

button:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow:
    0 12px 40px rgba(201, 168, 76, 0.3),
    0 0 80px rgba(201, 168, 76, 0.05);
  background-position: 100% 50%;
}

button:hover:not(:disabled)::before,
button:hover:not(:disabled)::after {
  opacity: 0.5;
}

button:active:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.2);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-loader .spinner {
  width: 22px;
  height: 22px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.message {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  border-radius: 12px;
  text-align: center;
  font-size: 0.95rem;
  display: none;
  line-height: 1.6;
  animation: messageSlide 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes messageSlide {
  0% {
    opacity: 0;
    transform: translateY(-10px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.message.success {
  display: block;
  background: var(--success-bg);
  border: 1px solid rgba(58, 122, 58, 0.25);
  color: #8fcf8f;
}

.message.error {
  display: block;
  background: var(--danger-bg);
  border: 1px solid rgba(139, 47, 47, 0.25);
  color: #cf8f8f;
}

input.error, textarea.error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(139, 47, 47, 0.1);
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.radio-option.error {
  border-color: var(--danger);
  background: rgba(139, 47, 47, 0.04);
}

footer {
  text-align: center;
  padding: 2.5rem 0 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-style: italic;
  position: relative;
  opacity: 0.7;
}

footer::before {
  content: '';
  display: block;
  width: 140px;
  height: 1px;
  margin: 0 auto 1rem;
  background: linear-gradient(90deg, transparent 5%, var(--gold-dark), transparent 95%);
  opacity: 0.4;
}

@media (max-width: 600px) {
  .container {
    padding: 1.5rem 1rem 2rem;
  }

  .card {
    padding: 1.25rem;
    border-radius: 16px;
  }

  .form-section {
    padding: 1rem;
    margin-bottom: 1.25rem;
    border-radius: 10px;
  }

  h1 {
    font-size: 1.5rem;
    letter-spacing: 4px;
  }

  .subtitle {
    font-size: 0.7rem;
    letter-spacing: 3px;
  }

  .site-logo {
    width: 64px;
    height: 64px;
  }

  .logo-ring {
    font-size: 0.85rem;
    letter-spacing: 2px;
    padding: 1rem 1.5rem;
  }

  button::before,
  button::after {
    display: none;
  }

  .radio-option {
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
  }

  .question-label::before {
    display: none;
  }
}

@media (min-width: 1200px) {
  .container {
    padding-top: 3.5rem;
  }

  .card {
    padding: 3rem;
  }

  h1 {
    font-size: 2.6rem;
    letter-spacing: 10px;
  }
}
