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

:root {
  --gold-light:  #f5d77e;
  --gold-main:   #c9a84c;
  --gold-dark:   #8b6914;
  --gold-muted:  #7a6535;
  --gold-faint:  #4a3f20;
  --bg:          #0a0a0f;
  --text:        #e8d5a3;
  --text-soft:   #c8b88a;
  --danger:      #d9776a;
  --ok:          #a9c97a;
}

html { color-scheme: dark; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Raleway', sans-serif;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(180,120,20,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(180,80,10,.06) 0%, transparent 50%);
  pointer-events: none;
}

.page-root {
  position: relative;
  text-align: center;
  padding: 3rem 1rem;
  max-width: 680px;
  width: 100%;
  animation: reveal .6s ease .1s both;
}
@keyframes reveal { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

a { color: var(--gold-main); }
a:hover { color: var(--gold-light); }

.avatar-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 1.8rem;
}
.avatar-wrap::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: conic-gradient(var(--gold-main), var(--gold-dark), var(--gold-light), var(--gold-dark), var(--gold-main));
  animation: spin 8s linear infinite;
  opacity: .7;
}
.avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: var(--bg);
}
@keyframes spin { to { transform: rotate(360deg); } }
.avatar-wrap img {
  position: relative;
  z-index: 1;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  display: block;
}
.avatar-wrap.small { margin-bottom: 1.2rem; }
.avatar-wrap.small img { width: 72px; height: 72px; }

h1, .brand {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: .1em;
  background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold-main) 40%, var(--gold-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  filter: drop-shadow(0 0 16px rgba(201,168,76,.35));
}
.home-link { text-decoration: none; display: inline-block; }

h2, .card-title {
  font-family: 'Cinzel', serif;
  font-size: 1.05rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-main);
  margin-bottom: 1.2rem;
}
.card-title {
  font-weight: 700;
  background: none;
  -webkit-text-fill-color: currentColor;
  filter: none;
}

.description {
  margin-top: .6rem;
  font-size: .95rem;
  font-weight: 300;
  color: var(--text-soft);
  line-height: 1.7;
  font-style: italic;
}

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.6rem auto;
  max-width: 400px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold-main), transparent);
}
.divider span { color: var(--gold-main); font-size: 1rem; }

.card {
  position: relative;
  border: 1px solid rgba(201,168,76,.2);
  border-radius: 4px;
  padding: 2rem 1.8rem;
  background: rgba(201,168,76,.03);
  box-shadow: 0 0 60px rgba(0,0,0,.6), inset 0 0 40px rgba(0,0,0,.2);
}
.card::before, .card::after {
  content: '';
  position: absolute;
  width: 28px; height: 28px;
  border-color: rgba(201,168,76,.45);
  border-style: solid;
  pointer-events: none;
}
.card::before { top: 8px; left: 8px; border-width: 1px 0 0 1px; }
.card::after  { bottom: 8px; right: 8px; border-width: 0 1px 1px 0; }
.card + .card { margin-top: 1.4rem; }

.links {
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
  justify-content: center;
}
.link-btn, .btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .55rem 1.3rem;
  border: 1px solid rgba(201,168,76,.35);
  border-radius: 2px;
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  letter-spacing: .12em;
  color: var(--gold-main);
  text-decoration: none;
  text-transform: uppercase;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
  background: transparent;
  cursor: pointer;
}
.link-btn:hover, .btn:hover {
  background: rgba(201,168,76,.1);
  color: var(--gold-light);
  border-color: var(--gold-light);
  transform: translateY(-2px);
}
.btn:disabled { opacity: .5; cursor: wait; transform: none; }
.btn.secondary { border-color: rgba(201,168,76,.18); color: var(--gold-muted); }
.link-btn img {
  width: 16px; height: 16px;
  filter: invert(75%) sepia(40%) saturate(400%) hue-rotate(5deg);
  opacity: .8;
}
.contact-wrap { margin-top: 1.4rem; }
.btn-contact { font-size: .82rem; letter-spacing: .15em; padding: .6rem 2rem; }

.form { text-align: left; }
.field + .field { margin-top: 1.1rem; }
.field label {
  display: block;
  font-family: 'Cinzel', serif;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-main);
  margin-bottom: .4rem;
}
.field input, .field textarea {
  width: 100%;
  padding: .65rem .8rem;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: rgba(0,0,0,.35);
  border: 1px solid rgba(201,168,76,.25);
  border-radius: 2px;
}
.field textarea { min-height: 9rem; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--gold-light); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }
.field input::placeholder, .field textarea::placeholder { color: var(--gold-faint); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-actions { display: flex; gap: .8rem; justify-content: center; margin-top: 1.6rem; flex-wrap: wrap; }
.notice { margin-bottom: 1.2rem; padding: .7rem 1rem; border: 1px solid; border-radius: 2px; font-size: .9rem; text-align: center; }
.notice.error { color: var(--danger); border-color: rgba(217,119,106,.45); background: rgba(217,119,106,.07); }
.notice.success { color: var(--ok); border-color: rgba(169,201,122,.45); background: rgba(169,201,122,.07); }
.intro { color: var(--text-soft); font-size: .92rem; margin-bottom: 1.4rem; text-align: center; }

.code-404 {
  font-family: 'Cinzel', serif;
  font-size: clamp(4rem, 18vw, 7rem);
  font-weight: 700;
  line-height: 1;
  filter: drop-shadow(0 0 18px rgba(201,168,76,.35));
}

.footer {
  margin-top: 1.6rem;
  font-size: .72rem;
  letter-spacing: .22em;
  color: var(--gold-faint);
  text-transform: uppercase;
}
.footer nav { display: flex; gap: 1.2rem; justify-content: center; flex-wrap: wrap; margin-bottom: .6rem; }
.footer a { color: var(--gold-muted); text-decoration: none; }
.footer a:hover { color: var(--gold-light); }

@media (prefers-reduced-motion: reduce) {
  .page-root, .avatar-wrap::before { animation: none; }
  .link-btn, .btn { transition: none; }
}
