@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&family=VT323&display=swap");

:root {
  --wood-1: #2b1b10;
  --wood-2: #4a2f1a;
  --wood-3: #6a4728;
  --leaf-1: #4f7d33;
  --leaf-2: #88a857;
  --text: #f8e8c7;
  --text-soft: #e7d7b4;
  --panel: rgba(31, 20, 12, 0.9);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "VT323", monospace;
  color: var(--text);
  background-color: #120d08;
  background-image:
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='240'%20height='240'%20viewBox='0%200%20240%20240'%3E%3Cfilter%20id='n'%3E%3CfeTurbulence%20type='fractalNoise'%20baseFrequency='0.9'%20numOctaves='3'%20stitchTiles='stitch'/%3E%3C/filter%3E%3Crect%20width='240'%20height='240'%20filter='url(%23n)'%20opacity='0.1'/%3E%3C/svg%3E"),
    radial-gradient(1400px 900px at 45% 10%, rgba(255, 231, 181, 0.07) 0%, rgba(255, 231, 181, 0) 55%),
    radial-gradient(1000px 800px at 20% 70%, rgba(0, 0, 0, 0.34) 0%, rgba(0, 0, 0, 0) 62%),
    radial-gradient(1000px 800px at 85% 60%, rgba(0, 0, 0, 0.28) 0%, rgba(0, 0, 0, 0) 62%),
    radial-gradient(closest-side at 18% 38%, rgba(0, 0, 0, 0.35) 0%, rgba(0, 0, 0, 0) 72%),
    radial-gradient(closest-side at 78% 62%, rgba(0, 0, 0, 0.3) 0%, rgba(0, 0, 0, 0) 70%),
    url("data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20width='360'%20height='360'%20viewBox='0%200%20360%20360'%3E%3Cdefs%3E%3Cpattern%20id='p'%20patternUnits='userSpaceOnUse'%20width='36'%20height='360'%3E%3Crect%20x='0'%20y='0'%20width='1'%20height='360'%20fill='%23000'%20opacity='0.22'/%3E%3Crect%20x='7'%20y='0'%20width='1'%20height='360'%20fill='%23000'%20opacity='0.12'/%3E%3Crect%20x='13'%20y='0'%20width='2'%20height='360'%20fill='%23000'%20opacity='0.08'/%3E%3Crect%20x='23'%20y='0'%20width='1'%20height='360'%20fill='%23000'%20opacity='0.1'/%3E%3Crect%20x='29'%20y='0'%20width='1'%20height='360'%20fill='%23000'%20opacity='0.06'/%3E%3C/pattern%3E%3Cfilter%20id='g'%3E%3CfeTurbulence%20type='turbulence'%20baseFrequency='0.015%200.12'%20numOctaves='2'%20seed='2'%20stitchTiles='stitch'%20result='t'/%3E%3CfeDisplacementMap%20in='SourceGraphic'%20in2='t'%20scale='26'%20xChannelSelector='R'%20yChannelSelector='G'/%3E%3C/filter%3E%3C/defs%3E%3Crect%20width='360'%20height='360'%20fill='url(%23p)'%20filter='url(%23g)'%20opacity='0.5'/%3E%3C/svg%3E"),
    repeating-linear-gradient(
      90deg,
      var(--wood-1) 0px,
      var(--wood-1) 26px,
      var(--wood-2) 26px,
      var(--wood-2) 64px,
      var(--wood-3) 64px,
      var(--wood-3) 92px,
      var(--wood-2) 92px,
      var(--wood-2) 138px,
      var(--wood-1) 138px,
      var(--wood-1) 164px
    );
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.frame {
  width: min(100%, 44rem);
  background: var(--panel);
  border: 4px solid #140d07;
  box-shadow:
    0 0 0 4px #7f5b35,
    0 0 0 8px #2c1b0e;
  padding: 1.4rem;
  position: relative;
}

.frame::before,
.frame::after {
  content: "";
  position: absolute;
  width: 90px;
  height: 90px;
  opacity: 0.65;
  image-rendering: pixelated;
}

.frame::before {
  top: -14px;
  right: -16px;
}

.frame::after {
  bottom: -18px;
  left: -18px;
}

h1 {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(1rem, 2.2vw, 1.4rem);
  line-height: 1.35;
  color: #f6dfad;
  text-shadow: 2px 2px 0 #24150d;
}

body.salachar-login h1 {
  opacity: 0;
  animation: fadeIn 500ms ease-out forwards;
}

.subhead {
  margin: 0.7rem 0 0;
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: #a7cf67;
  text-shadow: 2px 2px 0 #2a1a0f;
}

body.salachar-login .subhead {
  opacity: 0;
  animation: fadeIn 500ms ease-out 1000ms forwards;
}

.blurb {
  margin: 1.1rem 0 0.8rem;
  color: var(--text-soft);
  font-size: 1.6rem;
  line-height: 1.1;
}

.blurb p {
  margin: 0;
}

.blurb p + p {
  margin-top: 0.8rem;
}

.blurb b {
  color: #d64141;
  font-weight: 700;
}

form {
  margin-top: 1rem;
}

label {
  display: block;
  margin-top: 0.8rem;
  font-size: 1.5rem;
  color: #d9efaf;
}

input {
  margin-top: 0.35rem;
  width: 100%;
  border: 2px solid #2f1b0d;
  border-radius: 0;
  background: #e5d4b0;
  color: #24150d;
  padding: 0.6rem;
  font: inherit;
  font-size: 1.45rem;
}

button {
  margin-top: 1rem;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, #93bc59 0%, #4c7b31 100%);
  color: #1b1008;
  font-family: "Press Start 2P", monospace;
  font-size: 0.72rem;
  padding: 0.8rem 1rem;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow:
    0 0 0 2px #244018,
    0 4px 0 0 #203217;
}

button:hover {
  filter: brightness(1.06);
}

button:active {
  transform: translateY(1px);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
