*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: #0B1116; color: #E8E2D4; }

.page {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0B1116;
  padding: 36px clamp(20px, 5vw, 72px) 32px;
}

.light {
  position: absolute;
  inset: -15%;
  pointer-events: none;
  will-change: transform, opacity;
}
.light-a {
  background: radial-gradient(42% 52% at 74% 46%, rgba(31,52,66,0.95) 0%, rgba(11,17,22,0) 72%);
  animation: drift-a 34s ease-in-out infinite alternate;
}
.light-b {
  background: radial-gradient(36% 46% at 64% 40%, rgba(92,72,42,0.5) 0%, rgba(11,17,22,0) 70%);
  animation: drift-b 47s ease-in-out infinite alternate;
}
.light-c {
  background: radial-gradient(40% 50% at 24% 34%, rgba(16,42,46,0.7) 0%, rgba(11,17,22,0) 70%);
  animation: drift-c 59s ease-in-out infinite alternate;
}
@keyframes drift-a { 0%{transform:translate3d(0,0,0) scale(1);opacity:1} 100%{transform:translate3d(-7%,3%,0) scale(1.12);opacity:.55} }
@keyframes drift-b { 0%{transform:translate3d(0,0,0) scale(1.05);opacity:.1} 100%{transform:translate3d(5%,-4%,0) scale(1);opacity:.85} }
@keyframes drift-c { 0%{transform:translate3d(0,0,0);opacity:.75} 100%{transform:translate3d(6%,5%,0);opacity:.2} }
@keyframes fade-up { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }

header, main, footer { position: relative; }

header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-weight: 500;
  font-size: 20px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #EDE7D9;
  text-decoration: none;
}
.brand span {
  font-family: 'Cormorant SC', 'EB Garamond', Garamond, 'Times New Roman', serif;
  letter-spacing: 0.03em;
}
.brand:focus-visible, .btn:focus-visible {
  outline: 1px solid #B49A66;
  outline-offset: 4px;
}

.sc {
  font-family: 'Cormorant SC', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-weight: 500;
}
main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 56px 0;
}

.panel {
  width: 100%;
  max-width: 300px;
  text-align: center;
  animation: fade-up 0.8s ease-out both;
}
h1 {
  margin: 0 0 8px;
  font-family: 'Cormorant SC', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.24em;
  color: #B8B2A2;
}

.sub {
  margin: 0 0 32px;
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: #9C9786;
}

.error {
  visibility: hidden;
  min-height: 22px;
  margin: -14px 0 12px;
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: #B49A66;
}
.error:target, .error.show { visibility: visible; }
.btn:disabled { opacity: .6; cursor: default; }

.field {
  display: block;
  width: 100%;
  height: 40px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(180,154,102,0.35);
  border-radius: 0;
  background: transparent;
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-size: 17px;
  letter-spacing: 0.02em;
  color: #E8E2D4;
  outline: none;
  transition: border-color .2s;
}
.field::placeholder { color: #9C9786; opacity: 1; }
.field:focus { border-bottom-color: #B49A66; }
.field:-webkit-autofill {
  -webkit-text-fill-color: #E8E2D4;
  -webkit-box-shadow: 0 0 0 1000px #0B1116 inset;
  caret-color: #E8E2D4;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 20px;
  border: 1px solid rgba(180,154,102,0.55);
  border-radius: 0;
  background: transparent;
  font-family: 'Cormorant SC', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #E8E2D4;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.btn:hover { color: #FFFFFF; border-color: #B49A66; }
.btn-block { width: 100%; margin-top: 18px; }

.note {
  margin: 0;
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-size: 16px;
  letter-spacing: 0.02em;
  line-height: 1.5;
  color: #9C9786;
}

footer {
  border-top: 1px solid rgba(180,154,102,0.24);
  padding-top: 20px;
}
footer p {
  margin: 0;
  font-family: 'Cormorant Garamond', 'EB Garamond', Garamond, 'Times New Roman', serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.03em;
  color: #9C9786;
}

@media (prefers-reduced-motion: reduce) {
  .light, .panel { animation: none; }
}
