:root {
  --bg-0: #0b1f1c;
  --bg-1: #12352f;
  --bg-2: #1a4a41;
  --ink: #f3f0e7;
  --ink-muted: rgba(243, 240, 231, 0.72);
  --accent: #e8a54b;
  --accent-deep: #c8792a;
  --line: rgba(243, 240, 231, 0.14);
  --danger: #ff7a6e;
  --ok: #6dcaa2;
  --font-display: "Source Serif 4", Georgia, serif;
  --font-ui: "Outfit", "Segoe UI", sans-serif;
  --radius: 18px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font-ui);
  background: var(--bg-0);
  line-height: 1.5;
}

a {
  color: inherit;
  text-decoration: none;
}

.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(1200px 700px at 12% -10%, rgba(232, 165, 75, 0.28), transparent 55%),
    radial-gradient(900px 600px at 90% 10%, rgba(109, 202, 162, 0.18), transparent 50%),
    linear-gradient(160deg, #071614 0%, #12352f 45%, #0b1f1c 100%);
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(circle at 50% 20%, black, transparent 70%);
  opacity: 0.45;
}

.atmosphere-login {
  background:
    radial-gradient(800px 500px at 80% 0%, rgba(232, 165, 75, 0.22), transparent 55%),
    linear-gradient(180deg, #0a1c19 0%, #143832 100%);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem clamp(1.25rem, 4vw, 3rem);
}

.brand {
  font-family: var(--font-ui);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.15rem;
}

.site-header nav a {
  opacity: 0.85;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
}

.site-header nav a:hover {
  opacity: 1;
  border-color: var(--accent);
}

.hero {
  min-height: calc(100vh - 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem) clamp(1.25rem, 4vw, 3rem) 4rem;
  max-width: 920px;
  animation: rise 0.9s ease both;
}

.brand-mark {
  margin: 0 0 0.75rem;
  font-family: var(--font-ui);
  font-weight: 800;
  font-size: clamp(2.8rem, 8vw, 5.5rem);
  letter-spacing: -0.05em;
  line-height: 0.95;
  background: linear-gradient(120deg, #fff6e4 10%, var(--accent) 55%, #6dcaa2 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 6s ease-in-out infinite;
}

.brand-mark.compact {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  margin-bottom: 0.35rem;
}

.hero h1,
.login-panel h1 {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.35rem);
  letter-spacing: -0.02em;
}

.lede {
  margin: 0 0 1.75rem;
  max-width: 36rem;
  color: var(--ink-muted);
  font-size: 1.08rem;
}

.lede.tight {
  margin-bottom: 1.5rem;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.4rem;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.98rem;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  color: #1a1208;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-block {
  width: 100%;
}

.section-how {
  padding: 4rem clamp(1.25rem, 4vw, 3rem) 5rem;
  border-top: 1px solid var(--line);
  animation: rise 1s ease 0.15s both;
}

.section-how h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.section-lede {
  margin: 0 0 2rem;
  color: var(--ink-muted);
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
  max-width: 720px;
}

.steps li {
  display: grid;
  gap: 0.25rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
}

.steps strong {
  font-size: 1.05rem;
}

.steps span {
  color: var(--ink-muted);
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem clamp(1.25rem, 4vw, 3rem) 2rem;
  color: var(--ink-muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--line);
}

.login-shell {
  display: flex;
  justify-content: center;
  padding: 1rem clamp(1rem, 4vw, 2rem) 3rem;
}

.login-panel {
  width: min(100%, 440px);
  padding: 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 28, 25, 0.72);
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  animation: rise 0.7s ease both;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1rem;
}

.field span {
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.field em {
  font-style: normal;
  opacity: 0.7;
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  padding: 0.85rem 0.95rem;
  font: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(232, 165, 75, 0.7);
  box-shadow: 0 0 0 3px rgba(232, 165, 75, 0.15);
}

.form-message {
  min-height: 1.4rem;
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}

.form-message.error {
  color: var(--danger);
}

.form-message.ok {
  color: var(--ok);
}

.twofa-dialog {
  width: min(420px, calc(100vw - 2rem));
  margin: auto;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(165deg, rgba(26, 74, 65, 0.98), rgba(11, 31, 28, 0.98));
  color: var(--ink);
  box-shadow: var(--shadow);
}

.twofa-dialog::backdrop {
  background: rgba(4, 12, 11, 0.72);
  backdrop-filter: blur(6px);
}

.twofa-dialog h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.4rem;
}

.twofa-copy {
  margin: 0 0 1.25rem;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.twofa-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.twofa-actions .btn {
  min-width: 6.5rem;
}

.ota-result {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  animation: rise 0.5s ease both;
}

.ota-result h2 {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.ota-result p {
  color: var(--ink-muted);
}

.tiny {
  font-size: 0.78rem;
  word-break: break-all;
  opacity: 0.75;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shimmer {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.25) brightness(1.05);
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: calc(100vh - 4.5rem);
  }

  .login-panel {
    padding: 1.25rem;
  }

  .site-footer {
    flex-direction: column;
  }
}
