:root {
  --ink: #26181d;
  --night: #18312b;
  --plum: #5c3449;
  --teal: #2f7263;
  --aqua: #9ecdbc;
  --cream: #fff8ef;
  --champagne: #ecdab7;
  --gold: #c8a24b;
  --brass: #8e6a23;
  --rosewood: #8a4a5f;
  --paper: #fffaf3;
  --muted: #695e59;
  --line: rgba(200, 162, 75, 0.24);
  --panel-shadow: 0 18px 42px rgba(86, 56, 69, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Trebuchet MS", Verdana, Georgia, serif;
  background:
    radial-gradient(circle at top, rgba(255, 239, 202, 0.8), transparent 22%),
    radial-gradient(circle at right top, rgba(184, 214, 201, 0.32), transparent 30%),
    linear-gradient(180deg, #f8f0e4 0%, #efe2d1 52%, #e5d6ca 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.28), transparent 36%),
    linear-gradient(180deg, rgba(200, 162, 75, 0.07), transparent 48%);
  mix-blend-mode: soft-light;
  z-index: 0;
}

a {
  color: var(--aqua);
}

a:hover {
  color: #a9efe8;
}

.container {
  width: min(1040px, 92%);
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hidden {
  display: none !important;
}

.muted {
  color: var(--muted);
}

.login {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(rgba(255, 247, 232, 0.18), rgba(126, 103, 88, 0.42)),
    url("background1.png") center center / cover no-repeat;
}

.site {
  min-height: 100%;
  position: relative;
}

.card,
.box,
.topbar,
.section.alt {
  box-shadow: var(--panel-shadow);
}

.card {
  width: min(460px, 100%);
  background:
    linear-gradient(180deg, rgba(255, 251, 243, 0.9) 0%, rgba(240, 223, 189, 0.84) 100%);
  color: var(--ink);
  border: 1px solid rgba(244, 223, 182, 0.9);
  outline: 2px solid var(--brass);
  outline-offset: -10px;
  border-radius: 6px;
  padding: 30px;
  position: relative;
  z-index: 1;
  backdrop-filter: blur(3px);
}

.card::before,
.box::before,
.hero .container::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(142, 106, 35, 0.34);
  pointer-events: none;
}

h1,
h2,
h3,
.brand {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  text-align: center;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  color: var(--gold);
  text-shadow: 0 1px 0 rgba(255, 251, 242, 0.95);
}

.card h1 {
  color: var(--rosewood);
  text-shadow: none;
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  line-height: 0.95;
  letter-spacing: 0.05em;
  overflow-wrap: anywhere;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  color: #8e6a23;
  margin-bottom: 18px;
}

h3 {
  margin-top: 0;
  color: #5d3542;
}

label {
  display: block;
  margin: 14px 0 6px;
  font-size: 0.9rem;
  color: #5f4f34;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

input {
  width: 100%;
  padding: 12px;
  border: 2px inset #d3bf8a;
  border-radius: 2px;
  background: #fffaf0;
  color: var(--ink);
  outline: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.18);
}

input:focus {
  border-color: var(--gold);
  box-shadow:
    inset 0 1px 3px rgba(0, 0, 0, 0.18),
    0 0 0 3px rgba(123, 208, 200, 0.2);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
}

button,
.primary,
.ghost {
  border-radius: 2px;
  font-family: "Trebuchet MS", Verdana, sans-serif;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

button {
  padding: 12px 16px;
  border: 2px outset #efdca6;
  color: #fffaf2;
  background: linear-gradient(180deg, #2f7263 0%, #214f45 100%);
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(86, 56, 69, 0.2);
}

button:hover,
.primary:hover {
  filter: brightness(1.06);
}

button:active,
.primary:active {
  border-style: inset;
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.28);
}

.primary {
  width: 100%;
  margin-top: 14px;
  display: inline-block;
  padding: 13px 18px;
  color: #fffaf2;
  text-decoration: none;
  text-align: center;
  border: 2px outset #efdca6;
  background: linear-gradient(180deg, #9d5d71 0%, #7d4257 100%);
  box-shadow: 2px 2px 0 rgba(86, 56, 69, 0.2);
}

.primary.inline {
  width: auto;
  min-width: 220px;
}

.ghost {
  background: linear-gradient(180deg, #fff8e8 0%, #ecd3a2 100%);
  color: var(--ink);
  border: 2px outset #f4e3ba;
}

.error {
  margin-top: 10px;
  color: #8b112f;
  min-height: 1.2em;
  font-weight: 700;
}

.topbar {
  border-bottom: 3px double var(--gold);
  background:
    linear-gradient(180deg, rgba(255, 251, 242, 0.97) 0%, rgba(241, 227, 197, 0.97) 100%);
  position: sticky;
  top: 0;
  z-index: 5;
}

.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 14px 0;
}

.brand {
  color: #76521f;
  font-size: 1rem;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.55);
}

.nav {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.nav a {
  padding: 4px 6px;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 1px dotted transparent;
  font-weight: 700;
}

.nav a:hover {
  border-bottom-color: var(--aqua);
}

.hero {
  padding: 88px 0 58px;
  text-align: center;
}

.hero .container {
  padding: 36px 24px 42px;
  border: 1px solid rgba(201, 168, 95, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 252, 246, 0.95), rgba(242, 228, 202, 0.96));
  position: relative;
}

.hero p {
  max-width: 640px;
  margin: 0 auto 18px;
  font-size: 1.06rem;
}

.section {
  padding: 58px 0;
}

.section .container {
  padding: 28px 24px 34px;
  border: 1px solid var(--line);
  background: rgba(255, 250, 241, 0.82);
}

.section.alt {
  background:
    linear-gradient(180deg, rgba(47, 114, 99, 0.08), rgba(255, 246, 227, 0.14));
  border-top: 2px solid rgba(199, 164, 77, 0.45);
  border-bottom: 2px solid rgba(199, 164, 77, 0.45);
}

.section p {
  line-height: 1.7;
}

.grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.box {
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.98) 0%, rgba(240, 224, 192, 0.97) 100%);
  color: var(--ink);
  border: 1px solid #e9d19a;
  outline: 2px solid var(--brass);
  outline-offset: -8px;
  padding: 26px 20px;
  text-align: center;
  position: relative;
}

.box p,
.box .muted {
  color: #5f504d;
}

.footer {
  text-align: center;
  padding: 28px 0 40px;
  font-size: 14px;
}

@media (max-width: 900px) {
  .topbar .container {
    flex-direction: column;
  }

  .grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .row {
    flex-direction: column;
    align-items: stretch;
  }

  .card,
  .hero .container,
  .section .container,
  .box {
    padding-left: 18px;
    padding-right: 18px;
  }

  .nav {
    justify-content: center;
  }
}
