:root {
  --ink: #e9e5d6;
  --ink-soft: #c7bea8;
  --bg-deep: #15130f;
  --bg-mid: #2a241b;
  --accent-metal: #d8a85f;
  --accent-ember: #d55e2c;
  --accent-cyan: #4eb7b1;
  --panel: rgba(20, 19, 16, 0.72);
  --panel-border: rgba(216, 168, 95, 0.35);
  --danger-shadow: rgba(213, 94, 44, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Teko", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 10% 20%, rgba(78, 183, 177, 0.12), transparent 35%),
    radial-gradient(circle at 90% 15%, rgba(213, 94, 44, 0.2), transparent 40%),
    linear-gradient(130deg, var(--bg-deep) 10%, var(--bg-mid) 52%, #1f1a14 100%);
  letter-spacing: 0.02em;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

.bg-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.bg-layer-top {
  background:
    repeating-linear-gradient(
      120deg,
      transparent 0,
      transparent 28px,
      rgba(216, 168, 95, 0.03) 29px,
      rgba(216, 168, 95, 0.03) 30px
    );
}

.bg-layer-bottom {
  background:
    radial-gradient(circle at 80% 120%, rgba(78, 183, 177, 0.09), transparent 55%),
    radial-gradient(circle at 20% 120%, rgba(213, 94, 44, 0.1), transparent 45%);
}

.shell {
  position: relative;
  z-index: 2;
  width: min(1120px, 92vw);
  margin: 0 auto;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.2fr 0.95fr;
  gap: 2.2rem;
  align-items: center;
  padding: 2rem 0;
}

.hero {
  animation: rise 900ms ease-out both;
}

.kicker {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin: 0 0 0.5rem;
}

h1 {
  font-family: "Cinzel", serif;
  font-size: clamp(2.4rem, 7vw, 5.4rem);
  line-height: 0.95;
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

.subtitle {
  font-size: clamp(1.2rem, 2.4vw, 1.75rem);
  color: var(--ink-soft);
  max-width: 34ch;
  margin: 1rem 0 0;
  line-height: 1.2;
}

.hero-tags {
  margin-top: 1.6rem;
  display: flex;
  gap: 0.7rem;
  flex-wrap: wrap;
}

.hero-tags span {
  border: 1px solid rgba(78, 183, 177, 0.4);
  color: var(--accent-cyan);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-size: 1.1rem;
  text-transform: uppercase;
  backdrop-filter: blur(3px);
}

.login-card {
  animation: rise 1000ms 120ms ease-out both;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 18px;
  padding: 1.6rem;
  box-shadow:
    0 22px 46px -28px #000,
    0 0 0 1px rgba(216, 168, 95, 0.1) inset,
    0 0 50px var(--danger-shadow);
  backdrop-filter: blur(5px);
}

.crest {
  width: 62px;
  height: 62px;
  margin-bottom: 0.7rem;
  border-radius: 16px;
  background:
    conic-gradient(from 180deg at 50% 50%, #d8a85f, #e2c389, #d55e2c, #d8a85f);
  position: relative;
}

.crest::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 12px;
  background: linear-gradient(145deg, #2d271f, #15130f);
}

.login-card h2 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.35rem, 3vw, 2rem);
  letter-spacing: 0.02em;
}

.card-subtitle {
  margin: 0.4rem 0 1rem;
  color: var(--ink-soft);
  font-size: 1.1rem;
}

form {
  display: grid;
  gap: 0.7rem;
}

label {
  font-size: 1.05rem;
  color: #d7cfbe;
  text-transform: uppercase;
}

input,
select,
button {
  font-family: inherit;
  font-size: 1.1rem;
}

input,
select {
  border: 1px solid rgba(216, 168, 95, 0.35);
  background: rgba(10, 10, 10, 0.35);
  color: var(--ink);
  border-radius: 10px;
  padding: 0.6rem 0.8rem;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

input::placeholder {
  color: #998f7a;
}

input:focus,
select:focus {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(78, 183, 177, 0.18);
}

.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
}

.form-row-end {
  justify-content: flex-end;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1rem;
  text-transform: none;
}

.check input {
  width: 16px;
  height: 16px;
  margin: 0;
}

.aux-link {
  color: var(--accent-cyan);
  text-decoration: none;
  font-size: 1rem;
}

.aux-link:hover {
  text-decoration: underline;
}

.btn {
  border: none;
  border-radius: 10px;
  padding: 0.72rem 0.9rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 120ms ease, filter 180ms ease, box-shadow 180ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(1px);
}

.btn-main {
  color: #1d150d;
  background: linear-gradient(140deg, #e2c389, #d8a85f 46%, #bb7d34);
  box-shadow: 0 12px 18px -12px rgba(216, 168, 95, 0.8);
}

.btn-main:hover {
  filter: brightness(1.08);
}

.btn-ghost {
  margin-top: 0.2rem;
  background: transparent;
  color: var(--accent-cyan);
  border: 1px solid rgba(78, 183, 177, 0.45);
}

.btn-ghost:hover {
  box-shadow: 0 0 0 3px rgba(78, 183, 177, 0.14);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 20;
  padding: 1rem;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 7, 7, 0.72);
  backdrop-filter: blur(4px);
}

.modal-panel {
  position: relative;
  width: min(520px, 100%);
  background: rgba(20, 19, 16, 0.95);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 1.3rem;
  box-shadow:
    0 20px 50px -30px #000,
    0 0 0 1px rgba(216, 168, 95, 0.12) inset,
    0 0 38px var(--danger-shadow);
  animation: rise 220ms ease-out both;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  border: 1px solid rgba(216, 168, 95, 0.35);
  color: var(--ink-soft);
  background: transparent;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

.modal-panel h3 {
  margin: 0;
  font-family: "Cinzel", serif;
  font-size: clamp(1.3rem, 3.5vw, 1.9rem);
}

.modal-subtitle {
  margin: 0.35rem 0 1rem;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

.modal-form {
  display: grid;
  gap: 0.68rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
    filter: blur(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@media (max-width: 920px) {
  .shell {
    grid-template-columns: 1fr;
    gap: 1.3rem;
    align-content: center;
  }

  .hero {
    text-align: center;
  }

  .subtitle {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-tags {
    justify-content: center;
  }
}
